diff --git a/.dprint.jsonc b/.dprint.jsonc index 80387c67b0d79..7b83a13ee81a8 100644 --- a/.dprint.jsonc +++ b/.dprint.jsonc @@ -53,7 +53,7 @@ // Note: if adding new languages, make sure settings.template.json is updated too. // Also, if updating typescript, update the one in package.json. "plugins": [ - "https://plugins.dprint.dev/typescript-0.93.3.wasm", + "https://plugins.dprint.dev/typescript-0.93.4.wasm", "https://plugins.dprint.dev/json-0.19.4.wasm", "https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.0.wasm" ] diff --git a/.github/pr_owners.txt b/.github/pr_owners.txt index 015655cb42508..20f3cd6a377a6 100644 --- a/.github/pr_owners.txt +++ b/.github/pr_owners.txt @@ -3,14 +3,9 @@ weswigham andrewbranch RyanCavanaugh sheetalkamat -rbuckton ahejlsberg -amcasey -minestarks -armanio123 gabritto jakebailey DanielRosenwasser navya9singh iisaduan -dependabot diff --git a/.github/workflows/accept-baselines-fix-lints.yaml b/.github/workflows/accept-baselines-fix-lints.yaml index fda98582606e6..f6b51d1d51c61 100644 --- a/.github/workflows/accept-baselines-fix-lints.yaml +++ b/.github/workflows/accept-baselines-fix-lints.yaml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: token: ${{ secrets.TS_BOT_GITHUB_TOKEN }} - - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 'lts/*' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b3d9c346a2ab..9a72b16c66fc8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,7 +51,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Use node version ${{ matrix.node-version }} - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: ${{ matrix.node-version }} check-latest: true @@ -81,7 +81,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 'lts/*' - run: npm ci @@ -90,12 +90,12 @@ jobs: run: npm test -- --no-lint --coverage - name: Upload coverage artifact - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: coverage path: coverage - - uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1 + - uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2 with: use_oidc: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) }} disable_search: true @@ -106,7 +106,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 'lts/*' - run: npm ci @@ -119,7 +119,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 'lts/*' - run: npm ci @@ -132,12 +132,12 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 'lts/*' - run: npm ci - - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 + - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 with: path: ~/.cache/dprint key: ${{ runner.os }}-dprint-${{ hashFiles('package-lock.json', '.dprint.jsonc') }} @@ -152,7 +152,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 'lts/*' - run: npm ci @@ -168,7 +168,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 'lts/*' - run: npm ci @@ -182,7 +182,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 'lts/*' - run: | @@ -230,7 +230,7 @@ jobs: path: base ref: ${{ github.base_ref }} - - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 'lts/*' - run: | @@ -263,7 +263,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 'lts/*' - run: npm ci @@ -279,7 +279,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 'lts/*' - run: npm ci @@ -298,7 +298,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 'lts/*' - run: npm ci @@ -334,7 +334,7 @@ jobs: - name: Upload baseline diff artifact if: ${{ failure() && steps.check-baselines.conclusion == 'failure' }} - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: fix_baselines.patch path: fix_baselines.patch diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index d0d0ebc1a442b..026f0ebc48937 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -46,7 +46,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9 + uses: github/codeql-action/init@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15 with: config-file: ./.github/codeql/codeql-configuration.yml # Override language selection by uncommenting this and choosing your languages @@ -56,7 +56,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below). - name: Autobuild - uses: github/codeql-action/autobuild@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9 + uses: github/codeql-action/autobuild@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15 # â„šī¸ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun @@ -70,4 +70,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9 + uses: github/codeql-action/analyze@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15 diff --git a/.github/workflows/insiders.yaml b/.github/workflows/insiders.yaml index e7e6227fb4480..0069d5f476c0e 100644 --- a/.github/workflows/insiders.yaml +++ b/.github/workflows/insiders.yaml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 'lts/*' - run: | @@ -43,7 +43,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 'lts/*' # Use NODE_AUTH_TOKEN environment variable to authenticate to this registry. diff --git a/.github/workflows/lkg.yml b/.github/workflows/lkg.yml index c593b9d1bfe0f..427a78afbb313 100644 --- a/.github/workflows/lkg.yml +++ b/.github/workflows/lkg.yml @@ -31,7 +31,7 @@ jobs: with: ref: ${{ inputs.branch_name }} token: ${{ secrets.TS_BOT_GITHUB_TOKEN }} - - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 'lts/*' - run: | diff --git a/.github/workflows/new-release-branch.yaml b/.github/workflows/new-release-branch.yaml index 7b2d3a8f82661..6cc38b0289173 100644 --- a/.github/workflows/new-release-branch.yaml +++ b/.github/workflows/new-release-branch.yaml @@ -55,7 +55,7 @@ jobs: filter: blob:none # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/ fetch-depth: 0 # Default is 1; need to set to 0 to get the benefits of blob:none. token: ${{ secrets.TS_BOT_GITHUB_TOKEN }} - - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 'lts/*' - run: | diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 949aee8211d0f..2cba9873132bd 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -22,7 +22,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 'lts/*' - run: | @@ -43,7 +43,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 'lts/*' # Use NODE_AUTH_TOKEN environment variable to authenticate to this registry. diff --git a/.github/workflows/release-branch-artifact.yaml b/.github/workflows/release-branch-artifact.yaml index a3cfb107ea0b5..4cdafd08f49d4 100644 --- a/.github/workflows/release-branch-artifact.yaml +++ b/.github/workflows/release-branch-artifact.yaml @@ -20,7 +20,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 'lts/*' - run: | @@ -44,7 +44,7 @@ jobs: npm pack ./ mv typescript-*.tgz typescript.tgz - name: Upload built tarfile - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: tgz path: typescript.tgz diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index cca13091e26c9..6f55e8a5d49f2 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -34,7 +34,7 @@ jobs: persist-credentials: false - name: 'Run analysis' - uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0 + uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1 with: results_file: results.sarif results_format: sarif @@ -47,7 +47,7 @@ jobs: # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # format to the repository Actions tab. - name: 'Upload artifact' - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: SARIF file path: results.sarif @@ -55,6 +55,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: 'Upload to code-scanning' - uses: github/codeql-action/upload-sarif@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9 + uses: github/codeql-action/upload-sarif@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15 with: sarif_file: results.sarif diff --git a/.github/workflows/set-version.yaml b/.github/workflows/set-version.yaml index b2584906824f6..5c6834ce14674 100644 --- a/.github/workflows/set-version.yaml +++ b/.github/workflows/set-version.yaml @@ -53,7 +53,7 @@ jobs: with: ref: ${{ inputs.branch_name }} token: ${{ secrets.TS_BOT_GITHUB_TOKEN }} - - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 'lts/*' - run: | diff --git a/.github/workflows/sync-branch.yaml b/.github/workflows/sync-branch.yaml index cb0dae4931228..770e2e8dff0b9 100644 --- a/.github/workflows/sync-branch.yaml +++ b/.github/workflows/sync-branch.yaml @@ -42,7 +42,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 'lts/*' - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 diff --git a/.github/workflows/twoslash-repros.yaml b/.github/workflows/twoslash-repros.yaml index 6bf6949119c7f..74f6c5f5c058a 100644 --- a/.github/workflows/twoslash-repros.yaml +++ b/.github/workflows/twoslash-repros.yaml @@ -55,7 +55,7 @@ jobs: fetch-depth: 0 # Default is 1; need to set to 0 to get the benefits of blob:none. - if: ${{ !github.event.inputs.bisect }} uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 'lts/*' - uses: microsoft/TypeScript-Twoslash-Repro-Action@master diff --git a/.github/workflows/update-package-lock.yaml b/.github/workflows/update-package-lock.yaml index 1a55bfdd4f781..a7323313a3a15 100644 --- a/.github/workflows/update-package-lock.yaml +++ b/.github/workflows/update-package-lock.yaml @@ -25,7 +25,7 @@ jobs: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: token: ${{ secrets.TS_BOT_GITHUB_TOKEN }} - - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 'lts/*' - run: | diff --git a/Herebyfile.mjs b/Herebyfile.mjs index fd81046b52c26..fb96b072f1c23 100644 --- a/Herebyfile.mjs +++ b/Herebyfile.mjs @@ -1,7 +1,6 @@ // @ts-check import { CancelToken } from "@esfx/canceltoken"; import assert from "assert"; -import chalk from "chalk"; import chokidar from "chokidar"; import esbuild from "esbuild"; import { EventEmitter } from "events"; @@ -9,6 +8,7 @@ import fs from "fs"; import { glob } from "glob"; import { task } from "hereby"; import path from "path"; +import pc from "picocolors"; import { localizationDirectories } from "./scripts/build/localization.mjs"; import cmdLineOptions from "./scripts/build/options.mjs"; @@ -399,7 +399,7 @@ function entrypointBuildTask(options) { // allowing them to operate as regular tasks, while creating unresolved promises // in the background that keep the process running after all tasks have exited. if (!printedWatchWarning) { - console.error(chalk.yellowBright("Warning: watch mode is incomplete and may not work as expected. Use at your own risk.")); + console.error(pc.yellowBright("Warning: watch mode is incomplete and may not work as expected. Use at your own risk.")); printedWatchWarning = true; } @@ -707,7 +707,7 @@ export const runTestsAndWatch = task({ dependencies: [watchTests], run: async () => { if (!cmdLineOptions.tests && !cmdLineOptions.failed) { - console.log(chalk.redBright(`You must specifiy either --tests/-t or --failed to use 'runtests-watch'.`)); + console.log(pc.redBright(`You must specifiy either --tests/-t or --failed to use 'runtests-watch'.`)); return; } @@ -719,9 +719,8 @@ export const runTestsAndWatch = task({ const testsChangedDebouncer = new Debouncer(1_000, endRunTests); const testCaseWatcher = chokidar.watch([ - "tests/cases/**/*.*", - "tests/lib/**/*.*", - "tests/projects/**/*.*", + "tests/cases", + "tests/lib", ], { ignorePermissionErrors: true, alwaysStat: true, @@ -746,7 +745,7 @@ export const runTestsAndWatch = task({ running = false; } if (watching) { - console.log(chalk.yellowBright(`[watch] test run complete, waiting for changes...`)); + console.log(pc.yellowBright(`[watch] test run complete, waiting for changes...`)); await promise; } } @@ -756,7 +755,7 @@ export const runTestsAndWatch = task({ } /** - * @param {'add' | 'addDir' | 'change' | 'unlink' | 'unlinkDir'} eventName + * @param {'add' | 'addDir' | 'change' | 'unlink' | 'unlinkDir' | 'all' | 'ready' | 'raw' | 'error'} eventName * @param {string} path * @param {fs.Stats | undefined} stats */ @@ -783,9 +782,9 @@ export const runTestsAndWatch = task({ */ function beginRunTests(path) { if (testsChangedDebouncer.empty) { - console.log(chalk.yellowBright(`[watch] tests changed due to '${path}', restarting...`)); + console.log(pc.yellowBright(`[watch] tests changed due to '${path}', restarting...`)); if (running) { - console.log(chalk.yellowBright("[watch] aborting in-progress test run...")); + console.log(pc.yellowBright("[watch] aborting in-progress test run...")); } testsChangedCancelSource.cancel(); testsChangedCancelSource = CancelToken.source(); @@ -803,7 +802,7 @@ export const runTestsAndWatch = task({ function endWatchMode() { if (watching) { watching = false; - console.log(chalk.yellowBright("[watch] exiting watch mode...")); + console.log(pc.yellowBright("[watch] exiting watch mode...")); testsChangedCancelSource.cancel(); testCaseWatcher.close(); watchTestsEmitter.off("rebuild", onRebuild); diff --git a/azure-pipelines.release-publish.yml b/azure-pipelines.release-publish.yml new file mode 100644 index 0000000000000..2f3aac21446cc --- /dev/null +++ b/azure-pipelines.release-publish.yml @@ -0,0 +1,123 @@ +trigger: none +pr: none + +parameters: + - name: _REMINDER + default: Review & undraft the release at https://github.com/microsoft/TypeScript/releases once it appears! + - name: PUBLISH_TAG + default: dev + - name: RELEASE_TITLE_NAME + default: 0.0.0 Test + - name: TAG_NAME + default: v0.0.0-SetMe + +variables: + - name: _REMINDER + value: ${{ parameters._REMINDER }} + - name: PUBLISH_TAG + value: ${{ parameters.PUBLISH_TAG }} + - name: RELEASE_TITLE_NAME + value: ${{ parameters.RELEASE_TITLE_NAME }} + - name: TAG_NAME + value: ${{ parameters.TAG_NAME }} + +resources: + pipelines: + - pipeline: 'tgz' + project: 'TypeScript' + source: 'Release\TypeScript Release' + repositories: + - repository: 1esPipelines + type: git + name: 1ESPipelineTemplates/1ESPipelineTemplates + ref: refs/tags/release + +extends: + template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines + parameters: + pool: + name: TypeScript-AzurePipelines-EO + image: 1ESPT-Mariner2.0 + os: linux + + sdl: + sourceAnalysisPool: + name: TypeScript-AzurePipelines-EO + image: 1ESPT-Windows2022 + os: windows + + stages: + - stage: Stage_1 + displayName: Publish tarball + jobs: + - job: Job_1 + displayName: Agent job + condition: succeeded() + timeoutInMinutes: 0 + templateContext: + templateContext: + type: releaseJob + isProduction: true + inputs: + - input: pipelineArtifact + pipeline: 'tgz' + artifactName: 'tgz' + targetPath: '$(Pipeline.Workspace)/tgz' + steps: + - checkout: none + - task: CmdLine@2 + displayName: Rename versioned drop to typescript.tgz + inputs: + script: | + pushd $(Pipeline.Workspace)/tgz + ls -lhR + mv typescript-*.tgz typescript.tgz + - task: Npm@1 + displayName: npm publish tarball + inputs: + command: custom + workingDir: $(Pipeline.Workspace)/tgz + verbose: false + customCommand: publish $(Pipeline.Workspace)/tgz/typescript.tgz --tag $(PUBLISH_TAG) + # This must match the service connection. + customEndpoint: Typescript NPM + publishEndpoint: Typescript NPM + + - stage: Stage_2 + displayName: Publish git tag + dependsOn: Stage_1 + jobs: + - job: Job_1 + displayName: Agent job + condition: succeeded() + timeoutInMinutes: 0 + templateContext: + type: releaseJob + isProduction: true + inputs: + - input: pipelineArtifact + pipeline: 'tgz' + artifactName: 'tgz' + targetPath: '$(Pipeline.Workspace)/tgz' + steps: + - checkout: none + - task: GitHubRelease@1 + displayName: GitHub release (create) + inputs: + # This must match the service connection. + gitHubConnection: typescript-bot connection + repositoryName: microsoft/TypeScript + tagSource: userSpecifiedTag + tag: $(TAG_NAME) + title: TypeScript $(RELEASE_TITLE_NAME) + releaseNotesSource: inline + releaseNotesInline: | + For release notes, check out the [release announcement](). + For new features, check out the [What's new in TypeScript $(TAG_NAME)](). + For the complete list of fixed issues, check out the + * [fixed issues query for TypeScript $(TAG_NAME)](https://github.com/microsoft/TypeScript/issues?utf8=%E2%9C%93&q=is%3Aissue+milestone%3A%22TypeScript+3.3%22+is%3Aclosed+). + Downloads are available on: + * [npm](https://www.npmjs.com/package/typescript) + assets: $(Pipeline.Workspace)/tgz/**/typescript-*.tgz + isDraft: true + addChangeLog: false diff --git a/package-lock.json b/package-lock.json index 40e69852eb561..d4d2c055ccfff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "typescript", - "version": "5.8.0", + "version": "5.9.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "typescript", - "version": "5.8.0", + "version": "5.9.0", "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -14,48 +14,48 @@ }, "devDependencies": { "@dprint/formatter": "^0.4.1", - "@dprint/typescript": "0.93.3", + "@dprint/typescript": "0.93.4", "@esfx/canceltoken": "^1.0.0", - "@eslint/js": "^9.17.0", - "@octokit/rest": "^21.0.2", + "@eslint/js": "^9.20.0", + "@octokit/rest": "^21.1.1", "@types/chai": "^4.3.20", - "@types/diff": "^5.2.3", + "@types/diff": "^7.0.1", "@types/minimist": "^1.2.5", "@types/mocha": "^10.0.10", "@types/ms": "^0.7.34", "@types/node": "latest", "@types/source-map-support": "^0.5.10", "@types/which": "^3.0.4", - "@typescript-eslint/rule-tester": "^8.18.1", - "@typescript-eslint/type-utils": "^8.18.1", - "@typescript-eslint/utils": "^8.18.1", + "@typescript-eslint/rule-tester": "^8.24.1", + "@typescript-eslint/type-utils": "^8.24.1", + "@typescript-eslint/utils": "^8.24.1", "azure-devops-node-api": "^14.1.0", "c8": "^10.1.3", "chai": "^4.5.0", - "chalk": "^4.1.2", - "chokidar": "^3.6.0", - "diff": "^5.2.0", - "dprint": "^0.47.6", - "esbuild": "^0.24.0", - "eslint": "^9.17.0", + "chokidar": "^4.0.3", + "diff": "^7.0.0", + "dprint": "^0.49.0", + "esbuild": "^0.25.0", + "eslint": "^9.20.1", "eslint-formatter-autolinkable-stylish": "^1.4.0", "eslint-plugin-regexp": "^2.7.0", - "fast-xml-parser": "^4.5.1", + "fast-xml-parser": "^4.5.2", "glob": "^10.4.5", - "globals": "^15.13.0", + "globals": "^15.15.0", "hereby": "^1.10.0", "jsonc-parser": "^3.3.1", - "knip": "^5.41.0", + "knip": "^5.44.4", "minimist": "^1.2.8", "mocha": "^10.8.2", "mocha-fivemat-progress-reporter": "^0.1.0", - "monocart-coverage-reports": "^2.11.4", + "monocart-coverage-reports": "^2.12.1", "ms": "^2.1.3", - "playwright": "^1.49.1", + "picocolors": "^1.1.1", + "playwright": "^1.50.1", "source-map-support": "^0.5.21", "tslib": "^2.8.1", - "typescript": "^5.7.2", - "typescript-eslint": "^8.18.1", + "typescript": "^5.7.3", + "typescript-eslint": "^8.24.1", "which": "^3.0.1" }, "engines": { @@ -63,18 +63,18 @@ } }, "node_modules/@bcoe/v8-coverage": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-1.0.1.tgz", - "integrity": "sha512-W+a0/JpU28AqH4IKtwUPcEUnUyXMDLALcn5/JLczGGT9fHE2sIby/xP/oQnx3nxkForzgzPy201RAKcB4xPAFQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-1.0.2.tgz", + "integrity": "sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==", "dev": true, "engines": { "node": ">=18" } }, "node_modules/@dprint/darwin-arm64": { - "version": "0.47.6", - "resolved": "https://registry.npmjs.org/@dprint/darwin-arm64/-/darwin-arm64-0.47.6.tgz", - "integrity": "sha512-DrtKVOH7Ue6QYsqsUfUwBlTkSZNF2j35xqyI6KimUT1ulgUPocLG53JC/Aej9KuSCPmt4M3J40xxPKRgIM4jPA==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/@dprint/darwin-arm64/-/darwin-arm64-0.49.0.tgz", + "integrity": "sha512-b8fwjdfYrX5H+QyeWiB27gPc1GMVdd2LorCtsZWC+MDQO6NOgpuxJePqccbQlFUumy2rfmQuLQprnldvQZhceg==", "cpu": [ "arm64" ], @@ -85,9 +85,9 @@ ] }, "node_modules/@dprint/darwin-x64": { - "version": "0.47.6", - "resolved": "https://registry.npmjs.org/@dprint/darwin-x64/-/darwin-x64-0.47.6.tgz", - "integrity": "sha512-p16a4lMbAo4RngbNTAmtREnIRI/cOcZFy5wHPIzbCDnnHI+4UyHiAypTrpF8U8EYx1tw3hgih2MyAuupa9Gfag==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/@dprint/darwin-x64/-/darwin-x64-0.49.0.tgz", + "integrity": "sha512-cA/DIPlHClkufLufuIfcXHtZdlyP9U05RuJLvvAfHwJAxyeEC/chKYVc5BVz86RxMIq6czFGpJHoFtTjrfM3YA==", "cpu": [ "x64" ], @@ -104,9 +104,9 @@ "dev": true }, "node_modules/@dprint/linux-arm64-glibc": { - "version": "0.47.6", - "resolved": "https://registry.npmjs.org/@dprint/linux-arm64-glibc/-/linux-arm64-glibc-0.47.6.tgz", - "integrity": "sha512-WHphnk0oXpNzwJ9cjbddOL+hEZkXTvHxcA2pM1h1kWCBa5m+4qh0fg8YCktckMfHx1qdQuZYWRoT4l7yQbzWYA==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/@dprint/linux-arm64-glibc/-/linux-arm64-glibc-0.49.0.tgz", + "integrity": "sha512-UBo3lDJhotT+qza2S48DOPI64MirkJMoFDidh/TJBjokio2TcGd+QUzuB9O7J1+R3AlbwyObcTECjJryCNohHQ==", "cpu": [ "arm64" ], @@ -117,9 +117,9 @@ ] }, "node_modules/@dprint/linux-arm64-musl": { - "version": "0.47.6", - "resolved": "https://registry.npmjs.org/@dprint/linux-arm64-musl/-/linux-arm64-musl-0.47.6.tgz", - "integrity": "sha512-/2cSPudajg8J0U69ldNZkJx5QiKZNh+ohNVM9leWZ8v6GXN6sJDHX3T6hzS3ohIb03YOCiLOrJZDy9j3+fSgdQ==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/@dprint/linux-arm64-musl/-/linux-arm64-musl-0.49.0.tgz", + "integrity": "sha512-XWAPL6Hp+zqk9bi57450wuy4yz4fvT72L3Zji3X7ChL5KD/apMUzQnZhmTpln2sxwIgJ3nCbzEzlF7jhhp/7KA==", "cpu": [ "arm64" ], @@ -130,9 +130,9 @@ ] }, "node_modules/@dprint/linux-riscv64-glibc": { - "version": "0.47.6", - "resolved": "https://registry.npmjs.org/@dprint/linux-riscv64-glibc/-/linux-riscv64-glibc-0.47.6.tgz", - "integrity": "sha512-RMHJ3Zuzpls426upHlAveVwlGMi8oBLzhiCauyC/yWQl3CkGTAYdyhEpGnux0+RxacysfIL2bd8ourx4K0Sx3w==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/@dprint/linux-riscv64-glibc/-/linux-riscv64-glibc-0.49.0.tgz", + "integrity": "sha512-6GlGcauMeMbCCJ15OmAMkarouCifij9hb12Vz5UUZPevnutVoWRTQBPQLfllmd+9Znsp23fHnmzmykibdwj4Gw==", "cpu": [ "riscv64" ], @@ -143,9 +143,9 @@ ] }, "node_modules/@dprint/linux-x64-glibc": { - "version": "0.47.6", - "resolved": "https://registry.npmjs.org/@dprint/linux-x64-glibc/-/linux-x64-glibc-0.47.6.tgz", - "integrity": "sha512-4zbVsx/a8lHkRyAjfW0PNlN5IMwOJfFapgXNYJowWNO7X3j3m1jYJWovjmdZls+d6pDeOHoanMWtq95wd7zTeQ==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/@dprint/linux-x64-glibc/-/linux-x64-glibc-0.49.0.tgz", + "integrity": "sha512-PJUM1G8L2xwF9R1s4/J6kf29S2sJ/sZGy3ah7g5Uj+oYkZq6SlMOrx3xqCXEkKSa0T6Xuc1bUBcJyrjEf36xiw==", "cpu": [ "x64" ], @@ -156,9 +156,9 @@ ] }, "node_modules/@dprint/linux-x64-musl": { - "version": "0.47.6", - "resolved": "https://registry.npmjs.org/@dprint/linux-x64-musl/-/linux-x64-musl-0.47.6.tgz", - "integrity": "sha512-0C13t4OVzomgQjvUyD5IrRyjLDhGuOtqMo00uJlwn3QHucfgOBqkjyQ5fq7T6+grBse0m14/EWblvSbYkZpyDw==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/@dprint/linux-x64-musl/-/linux-x64-musl-0.49.0.tgz", + "integrity": "sha512-+WIInBwbCXYmWZcYYmnD8HdcZj6q8ewy6mPpHH6SDMtWr6nrxzyIVLFr72XeiBoHnVsQFUhN+wv5Bm5NnpJtRw==", "cpu": [ "x64" ], @@ -169,15 +169,15 @@ ] }, "node_modules/@dprint/typescript": { - "version": "0.93.3", - "resolved": "https://registry.npmjs.org/@dprint/typescript/-/typescript-0.93.3.tgz", - "integrity": "sha512-P/AAHYDyUG+5hih8knuk3s9n2wrCD1LSh0YsLlJMx6+v0Wsjf0PpcVRn+xDvHCtwPUctB5WBkZT2U8mu6Cm7RQ==", + "version": "0.93.4", + "resolved": "https://registry.npmjs.org/@dprint/typescript/-/typescript-0.93.4.tgz", + "integrity": "sha512-2pyMXLK9Bnodv4vSh/mUeYbaSnnzIj+vFOTUC9GVjUouEKpMNkZZsuS5d7rPqr72tfoy96vzFepsRa7spkgcRA==", "dev": true }, "node_modules/@dprint/win32-arm64": { - "version": "0.47.6", - "resolved": "https://registry.npmjs.org/@dprint/win32-arm64/-/win32-arm64-0.47.6.tgz", - "integrity": "sha512-UOkeFMBdGIuGNwfkrJdVM9eNiRMdbZRRGVy0Cdo2AXn/FCDVqZ74KJkvYVcoUE27GCytHi4Sp1s4at7659WCOw==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/@dprint/win32-arm64/-/win32-arm64-0.49.0.tgz", + "integrity": "sha512-AteygrhmT7OXIgE/72REUfTPs/+qU0I1vhU379AYXgcWzOKy6Eeyi8lAt17oF7OmGT4IuyrKEDjpdTxhOWLsQw==", "cpu": [ "arm64" ], @@ -188,9 +188,9 @@ ] }, "node_modules/@dprint/win32-x64": { - "version": "0.47.6", - "resolved": "https://registry.npmjs.org/@dprint/win32-x64/-/win32-x64-0.47.6.tgz", - "integrity": "sha512-i9xwXR8V8Jk/wU1gsYKx15eb0ypBRbRZFkHsnHfC0ZBimcfEOibGnGcfv+UCUcumXtnV46TnBqaJW7H70J1J+A==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/@dprint/win32-x64/-/win32-x64-0.49.0.tgz", + "integrity": "sha512-8bE6P9T/32Gd+zMAkcwvUHzOLEMnbHEMgsgiKypYsdFTskpDz+y1GLJvMaxIFd2DB2tMx9TdBYuBQrJroTsMeQ==", "cpu": [ "x64" ], @@ -201,9 +201,9 @@ ] }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.0.tgz", - "integrity": "sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.0.tgz", + "integrity": "sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ==", "cpu": [ "ppc64" ], @@ -217,9 +217,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.0.tgz", - "integrity": "sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.0.tgz", + "integrity": "sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g==", "cpu": [ "arm" ], @@ -233,9 +233,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.0.tgz", - "integrity": "sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.0.tgz", + "integrity": "sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g==", "cpu": [ "arm64" ], @@ -249,9 +249,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.0.tgz", - "integrity": "sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.0.tgz", + "integrity": "sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg==", "cpu": [ "x64" ], @@ -265,9 +265,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz", - "integrity": "sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.0.tgz", + "integrity": "sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw==", "cpu": [ "arm64" ], @@ -281,9 +281,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.0.tgz", - "integrity": "sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.0.tgz", + "integrity": "sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg==", "cpu": [ "x64" ], @@ -297,9 +297,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.0.tgz", - "integrity": "sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.0.tgz", + "integrity": "sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w==", "cpu": [ "arm64" ], @@ -313,9 +313,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.0.tgz", - "integrity": "sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.0.tgz", + "integrity": "sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A==", "cpu": [ "x64" ], @@ -329,9 +329,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.0.tgz", - "integrity": "sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.0.tgz", + "integrity": "sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg==", "cpu": [ "arm" ], @@ -345,9 +345,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.0.tgz", - "integrity": "sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.0.tgz", + "integrity": "sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg==", "cpu": [ "arm64" ], @@ -361,9 +361,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.0.tgz", - "integrity": "sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.0.tgz", + "integrity": "sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg==", "cpu": [ "ia32" ], @@ -377,9 +377,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.0.tgz", - "integrity": "sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.0.tgz", + "integrity": "sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw==", "cpu": [ "loong64" ], @@ -393,9 +393,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.0.tgz", - "integrity": "sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.0.tgz", + "integrity": "sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ==", "cpu": [ "mips64el" ], @@ -409,9 +409,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.0.tgz", - "integrity": "sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.0.tgz", + "integrity": "sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw==", "cpu": [ "ppc64" ], @@ -425,9 +425,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.0.tgz", - "integrity": "sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.0.tgz", + "integrity": "sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA==", "cpu": [ "riscv64" ], @@ -441,9 +441,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.0.tgz", - "integrity": "sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.0.tgz", + "integrity": "sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA==", "cpu": [ "s390x" ], @@ -457,9 +457,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.0.tgz", - "integrity": "sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.0.tgz", + "integrity": "sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw==", "cpu": [ "x64" ], @@ -472,10 +472,26 @@ "node": ">=18" } }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.0.tgz", + "integrity": "sha512-RuG4PSMPFfrkH6UwCAqBzauBWTygTvb1nxWasEJooGSJ/NwRw7b2HOwyRTQIU97Hq37l3npXoZGYMy3b3xYvPw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.0.tgz", - "integrity": "sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.0.tgz", + "integrity": "sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA==", "cpu": [ "x64" ], @@ -489,9 +505,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.0.tgz", - "integrity": "sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.0.tgz", + "integrity": "sha512-21sUNbq2r84YE+SJDfaQRvdgznTD8Xc0oc3p3iW/a1EVWeNj/SdUCbm5U0itZPQYRuRTW20fPMWMpcrciH2EJw==", "cpu": [ "arm64" ], @@ -505,9 +521,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.0.tgz", - "integrity": "sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.0.tgz", + "integrity": "sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg==", "cpu": [ "x64" ], @@ -521,9 +537,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.0.tgz", - "integrity": "sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.0.tgz", + "integrity": "sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg==", "cpu": [ "x64" ], @@ -537,9 +553,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.0.tgz", - "integrity": "sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.0.tgz", + "integrity": "sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw==", "cpu": [ "arm64" ], @@ -553,9 +569,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.0.tgz", - "integrity": "sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.0.tgz", + "integrity": "sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA==", "cpu": [ "ia32" ], @@ -569,9 +585,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.0.tgz", - "integrity": "sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.0.tgz", + "integrity": "sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ==", "cpu": [ "x64" ], @@ -638,12 +654,12 @@ } }, "node_modules/@eslint/config-array": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.1.tgz", - "integrity": "sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.2.tgz", + "integrity": "sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w==", "dev": true, "dependencies": { - "@eslint/object-schema": "^2.1.5", + "@eslint/object-schema": "^2.1.6", "debug": "^4.3.1", "minimatch": "^3.1.2" }, @@ -674,9 +690,9 @@ } }, "node_modules/@eslint/core": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.9.1.tgz", - "integrity": "sha512-GuUdqkyyzQI5RMIWkHhvTWLCyLo1jNK3vzkSyaExH5kHPDHcuL2VOpHjmMY+y3+NC69qAKToBqldTBgYeLSr9Q==", + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.11.0.tgz", + "integrity": "sha512-DWUB2pksgNEb6Bz2fggIy1wh6fGgZP4Xyy/Mt0QZPiloKKXerbqq9D3SBQTlCRYOrcRPu4vuz+CGjwdfqxnoWA==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.15" @@ -743,29 +759,30 @@ } }, "node_modules/@eslint/js": { - "version": "9.17.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.17.0.tgz", - "integrity": "sha512-Sxc4hqcs1kTu0iID3kcZDW3JHq2a77HO9P8CP6YEA/FpH3Ll8UXE2r/86Rz9YJLKme39S9vU5OWNjC6Xl0Cr3w==", + "version": "9.20.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.20.0.tgz", + "integrity": "sha512-iZA07H9io9Wn836aVTytRaNqh00Sad+EamwOVJT12GTLw1VGMFV/4JaME+JjLtr9fiGaoWgYnS54wrfWsSs4oQ==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@eslint/object-schema": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.5.tgz", - "integrity": "sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ==", + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", + "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@eslint/plugin-kit": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.4.tgz", - "integrity": "sha512-zSkKow6H5Kdm0ZUQUB2kV5JIXqoG0+uH5YADhaEHswm664N9Db8dXSi0nMJpacpMf+MyyglF1vnZohpEg5yUtg==", + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.6.tgz", + "integrity": "sha512-+0TjwR1eAUdZtvv/ir1mGX+v0tUoR3VEPB8Up0LLJC+whRW0GgBBtpbOkg/a/U4Dxa6l5a3l9AJ1aWIQVyoWJA==", "dev": true, "dependencies": { + "@eslint/core": "^0.11.0", "levn": "^0.4.1" }, "engines": { @@ -821,9 +838,9 @@ } }, "node_modules/@humanwhocodes/retry": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz", - "integrity": "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==", + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.2.tgz", + "integrity": "sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==", "dev": true, "engines": { "node": ">=18.18" @@ -920,25 +937,25 @@ } }, "node_modules/@octokit/auth-token": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-5.1.1.tgz", - "integrity": "sha512-rh3G3wDO8J9wSjfI436JUKzHIxq8NaiL0tVeB2aXmG6p/9859aUOAjA9pmSPNGGZxfwmaJ9ozOJImuNVJdpvbA==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-5.1.2.tgz", + "integrity": "sha512-JcQDsBdg49Yky2w2ld20IHAlwr8d/d8N6NiOXbtuoPCqzbsiJgF633mVUw3x4mo0H5ypataQIX7SFu3yy44Mpw==", "dev": true, "engines": { "node": ">= 18" } }, "node_modules/@octokit/core": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.2.tgz", - "integrity": "sha512-hEb7Ma4cGJGEUNOAVmyfdB/3WirWMg5hDuNFVejGEDFqupeOysLc2sG6HJxY2etBp5YQu5Wtxwi020jS9xlUwg==", + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.4.tgz", + "integrity": "sha512-lAS9k7d6I0MPN+gb9bKDt7X8SdxknYqAMh44S5L+lNqIN2NuV8nvv3g8rPp7MuRxcOpxpUIATWprO0C34a8Qmg==", "dev": true, "dependencies": { "@octokit/auth-token": "^5.0.0", - "@octokit/graphql": "^8.0.0", - "@octokit/request": "^9.0.0", - "@octokit/request-error": "^6.0.1", - "@octokit/types": "^13.0.0", + "@octokit/graphql": "^8.1.2", + "@octokit/request": "^9.2.1", + "@octokit/request-error": "^6.1.7", + "@octokit/types": "^13.6.2", "before-after-hook": "^3.0.2", "universal-user-agent": "^7.0.0" }, @@ -947,12 +964,12 @@ } }, "node_modules/@octokit/endpoint": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.1.tgz", - "integrity": "sha512-JYjh5rMOwXMJyUpj028cu0Gbp7qe/ihxfJMLc8VZBMMqSwLgOxDI1911gV4Enl1QSavAQNJcwmwBF9M0VvLh6Q==", + "version": "10.1.3", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.3.tgz", + "integrity": "sha512-nBRBMpKPhQUxCsQQeW+rCJ/OPSMcj3g0nfHn01zGYZXuNDvvXudF/TYY6APj5THlurerpFN4a/dQAIAaM6BYhA==", "dev": true, "dependencies": { - "@octokit/types": "^13.0.0", + "@octokit/types": "^13.6.2", "universal-user-agent": "^7.0.2" }, "engines": { @@ -960,13 +977,13 @@ } }, "node_modules/@octokit/graphql": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-8.1.1.tgz", - "integrity": "sha512-ukiRmuHTi6ebQx/HFRCXKbDlOh/7xEV6QUXaE7MJEKGNAncGI/STSbOkl12qVXZrfZdpXctx5O9X1AIaebiDBg==", + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-8.2.1.tgz", + "integrity": "sha512-n57hXtOoHrhwTWdvhVkdJHdhTv0JstjDbDRhJfwIRNfFqmSo1DaK/mD2syoNUoLCyqSjBpGAKOG0BuwF392slw==", "dev": true, "dependencies": { - "@octokit/request": "^9.0.0", - "@octokit/types": "^13.0.0", + "@octokit/request": "^9.2.2", + "@octokit/types": "^13.8.0", "universal-user-agent": "^7.0.0" }, "engines": { @@ -974,18 +991,18 @@ } }, "node_modules/@octokit/openapi-types": { - "version": "22.2.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-22.2.0.tgz", - "integrity": "sha512-QBhVjcUa9W7Wwhm6DBFu6ZZ+1/t/oYxqc2tp81Pi41YNuJinbFRx8B133qVOrAaBbF7D/m0Et6f9/pZt9Rc+tg==", + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz", + "integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g==", "dev": true }, "node_modules/@octokit/plugin-paginate-rest": { - "version": "11.3.6", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.3.6.tgz", - "integrity": "sha512-zcvqqf/+TicbTCa/Z+3w4eBJcAxCFymtc0UAIsR3dEVoNilWld4oXdscQ3laXamTszUZdusw97K8+DrbFiOwjw==", + "version": "11.4.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.4.2.tgz", + "integrity": "sha512-BXJ7XPCTDXFF+wxcg/zscfgw2O/iDPtNSkwwR1W1W5c4Mb3zav/M2XvxQ23nVmKj7jpweB4g8viMeCQdm7LMVA==", "dev": true, "dependencies": { - "@octokit/types": "^13.6.2" + "@octokit/types": "^13.7.0" }, "engines": { "node": ">= 18" @@ -1007,12 +1024,12 @@ } }, "node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "13.2.6", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.2.6.tgz", - "integrity": "sha512-wMsdyHMjSfKjGINkdGKki06VEkgdEldIGstIEyGX0wbYHGByOwN/KiM+hAAlUwAtPkP3gvXtVQA9L3ITdV2tVw==", + "version": "13.3.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.3.1.tgz", + "integrity": "sha512-o8uOBdsyR+WR8MK9Cco8dCgvG13H1RlM1nWnK/W7TEACQBFux/vPREgKucxUfuDQ5yi1T3hGf4C5ZmZXAERgwQ==", "dev": true, "dependencies": { - "@octokit/types": "^13.6.1" + "@octokit/types": "^13.8.0" }, "engines": { "node": ">= 18" @@ -1022,14 +1039,15 @@ } }, "node_modules/@octokit/request": { - "version": "9.1.3", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.1.3.tgz", - "integrity": "sha512-V+TFhu5fdF3K58rs1pGUJIDH5RZLbZm5BI+MNF+6o/ssFNT4vWlCh/tVpF3NxGtP15HUxTTMUbsG5llAuU2CZA==", + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.2.2.tgz", + "integrity": "sha512-dZl0ZHx6gOQGcffgm1/Sf6JfEpmh34v3Af2Uci02vzUYz6qEN6zepoRtmybWXIGXFIK8K9ylE3b+duCWqhArtg==", "dev": true, "dependencies": { - "@octokit/endpoint": "^10.0.0", - "@octokit/request-error": "^6.0.1", - "@octokit/types": "^13.1.0", + "@octokit/endpoint": "^10.1.3", + "@octokit/request-error": "^6.1.7", + "@octokit/types": "^13.6.2", + "fast-content-type-parse": "^2.0.0", "universal-user-agent": "^7.0.2" }, "engines": { @@ -1037,39 +1055,39 @@ } }, "node_modules/@octokit/request-error": { - "version": "6.1.5", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.5.tgz", - "integrity": "sha512-IlBTfGX8Yn/oFPMwSfvugfncK2EwRLjzbrpifNaMY8o/HTEAFqCA1FZxjD9cWvSKBHgrIhc4CSBIzMxiLsbzFQ==", + "version": "6.1.7", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.7.tgz", + "integrity": "sha512-69NIppAwaauwZv6aOzb+VVLwt+0havz9GT5YplkeJv7fG7a40qpLt/yZKyiDxAhgz0EtgNdNcb96Z0u+Zyuy2g==", "dev": true, "dependencies": { - "@octokit/types": "^13.0.0" + "@octokit/types": "^13.6.2" }, "engines": { "node": ">= 18" } }, "node_modules/@octokit/rest": { - "version": "21.0.2", - "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-21.0.2.tgz", - "integrity": "sha512-+CiLisCoyWmYicH25y1cDfCrv41kRSvTq6pPWtRroRJzhsCZWZyCqGyI8foJT5LmScADSwRAnr/xo+eewL04wQ==", + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-21.1.1.tgz", + "integrity": "sha512-sTQV7va0IUVZcntzy1q3QqPm/r8rWtDCqpRAmb8eXXnKkjoQEtFe3Nt5GTVsHft+R6jJoHeSiVLcgcvhtue/rg==", "dev": true, "dependencies": { - "@octokit/core": "^6.1.2", - "@octokit/plugin-paginate-rest": "^11.0.0", + "@octokit/core": "^6.1.4", + "@octokit/plugin-paginate-rest": "^11.4.2", "@octokit/plugin-request-log": "^5.3.1", - "@octokit/plugin-rest-endpoint-methods": "^13.0.0" + "@octokit/plugin-rest-endpoint-methods": "^13.3.0" }, "engines": { "node": ">= 18" } }, "node_modules/@octokit/types": { - "version": "13.6.2", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.6.2.tgz", - "integrity": "sha512-WpbZfZUcZU77DrSW4wbsSgTPfKcp286q3ItaIgvSbBpZJlu6mnYXAkjZz6LVZPXkEvLIM8McanyZejKTYUHipA==", + "version": "13.8.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz", + "integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==", "dev": true, "dependencies": { - "@octokit/openapi-types": "^22.2.0" + "@octokit/openapi-types": "^23.0.1" } }, "node_modules/@pkgjs/parseargs": { @@ -1106,9 +1124,9 @@ "dev": true }, "node_modules/@types/diff": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@types/diff/-/diff-5.2.3.tgz", - "integrity": "sha512-K0Oqlrq3kQMaO2RhfrNQX5trmt+XLyom88zS0u84nnIcLvFnRUMRRHmrGny5GSM+kNO9IZLARsdQHDzkhAgmrQ==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@types/diff/-/diff-7.0.1.tgz", + "integrity": "sha512-R/BHQFripuhW6XPXy05hIvXJQdQ4540KnTvEFHSLjXfHYM41liOLKgIJEyYYiQe796xpaMHfe4Uj/p7Uvng2vA==", "dev": true }, "node_modules/@types/estree": { @@ -1148,9 +1166,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "22.10.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.2.tgz", - "integrity": "sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==", + "version": "22.13.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.4.tgz", + "integrity": "sha512-ywP2X0DYtX3y08eFVx5fNIw7/uIv8hYUKgXoK8oayJlLnKcRfEYCxWMVE1XagUdVtCJlZT1AU4LXEABW+L1Peg==", "dev": true, "dependencies": { "undici-types": "~6.20.0" @@ -1172,20 +1190,20 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.18.1.tgz", - "integrity": "sha512-Ncvsq5CT3Gvh+uJG0Lwlho6suwDfUXH0HztslDf5I+F2wAFAZMRwYLEorumpKLzmO2suAXZ/td1tBg4NZIi9CQ==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.24.1.tgz", + "integrity": "sha512-ll1StnKtBigWIGqvYDVuDmXJHVH4zLVot1yQ4fJtLpL7qacwkxJc1T0bptqw+miBQ/QfUbhl1TcQ4accW5KUyA==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.18.1", - "@typescript-eslint/type-utils": "8.18.1", - "@typescript-eslint/utils": "8.18.1", - "@typescript-eslint/visitor-keys": "8.18.1", + "@typescript-eslint/scope-manager": "8.24.1", + "@typescript-eslint/type-utils": "8.24.1", + "@typescript-eslint/utils": "8.24.1", + "@typescript-eslint/visitor-keys": "8.24.1", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", - "ts-api-utils": "^1.3.0" + "ts-api-utils": "^2.0.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1201,15 +1219,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.18.1.tgz", - "integrity": "sha512-rBnTWHCdbYM2lh7hjyXqxk70wvon3p2FyaniZuey5TrcGBpfhVp0OxOa6gxr9Q9YhZFKyfbEnxc24ZnVbbUkCA==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.24.1.tgz", + "integrity": "sha512-Tqoa05bu+t5s8CTZFaGpCH2ub3QeT9YDkXbPd3uQ4SfsLoh1/vv2GEYAioPoxCWJJNsenXlC88tRjwoHNts1oQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "8.18.1", - "@typescript-eslint/types": "8.18.1", - "@typescript-eslint/typescript-estree": "8.18.1", - "@typescript-eslint/visitor-keys": "8.18.1", + "@typescript-eslint/scope-manager": "8.24.1", + "@typescript-eslint/types": "8.24.1", + "@typescript-eslint/typescript-estree": "8.24.1", + "@typescript-eslint/visitor-keys": "8.24.1", "debug": "^4.3.4" }, "engines": { @@ -1225,13 +1243,13 @@ } }, "node_modules/@typescript-eslint/rule-tester": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/rule-tester/-/rule-tester-8.18.1.tgz", - "integrity": "sha512-Ri73SSfOfd+aESELU2k0ikpIahTSY1VVsGiFWarDy54HSuMMZc/2JCST0dfpRep3egAvcI5/lcQvRHmSyzcA4g==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/rule-tester/-/rule-tester-8.24.1.tgz", + "integrity": "sha512-9d9cceSuljUx0nJ//bAg8g0UUzz/EOjhR9K2u0btfM8C9uVIR73KgUm87kZnzcDxm9tK/LcWSG2jG5SQfQvNHA==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "8.18.1", - "@typescript-eslint/utils": "8.18.1", + "@typescript-eslint/typescript-estree": "8.24.1", + "@typescript-eslint/utils": "8.24.1", "ajv": "^6.12.6", "json-stable-stringify-without-jsonify": "^1.0.1", "lodash.merge": "4.6.2", @@ -1249,13 +1267,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.18.1.tgz", - "integrity": "sha512-HxfHo2b090M5s2+/9Z3gkBhI6xBH8OJCFjH9MhQ+nnoZqxU3wNxkLT+VWXWSFWc3UF3Z+CfPAyqdCTdoXtDPCQ==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.24.1.tgz", + "integrity": "sha512-OdQr6BNBzwRjNEXMQyaGyZzgg7wzjYKfX2ZBV3E04hUCBDv3GQCHiz9RpqdUIiVrMgJGkXm3tcEh4vFSHreS2Q==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.18.1", - "@typescript-eslint/visitor-keys": "8.18.1" + "@typescript-eslint/types": "8.24.1", + "@typescript-eslint/visitor-keys": "8.24.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1266,15 +1284,15 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.18.1.tgz", - "integrity": "sha512-jAhTdK/Qx2NJPNOTxXpMwlOiSymtR2j283TtPqXkKBdH8OAMmhiUfP0kJjc/qSE51Xrq02Gj9NY7MwK+UxVwHQ==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.24.1.tgz", + "integrity": "sha512-/Do9fmNgCsQ+K4rCz0STI7lYB4phTtEXqqCAs3gZW0pnK7lWNkvWd5iW545GSmApm4AzmQXmSqXPO565B4WVrw==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "8.18.1", - "@typescript-eslint/utils": "8.18.1", + "@typescript-eslint/typescript-estree": "8.24.1", + "@typescript-eslint/utils": "8.24.1", "debug": "^4.3.4", - "ts-api-utils": "^1.3.0" + "ts-api-utils": "^2.0.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1289,9 +1307,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.18.1.tgz", - "integrity": "sha512-7uoAUsCj66qdNQNpH2G8MyTFlgerum8ubf21s3TSM3XmKXuIn+H2Sifh/ES2nPOPiYSRJWAk0fDkW0APBWcpfw==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.24.1.tgz", + "integrity": "sha512-9kqJ+2DkUXiuhoiYIUvIYjGcwle8pcPpdlfkemGvTObzgmYfJ5d0Qm6jwb4NBXP9W1I5tss0VIAnWFumz3mC5A==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1302,19 +1320,19 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.1.tgz", - "integrity": "sha512-z8U21WI5txzl2XYOW7i9hJhxoKKNG1kcU4RzyNvKrdZDmbjkmLBo8bgeiOJmA06kizLI76/CCBAAGlTlEeUfyg==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.24.1.tgz", + "integrity": "sha512-UPyy4MJ/0RE648DSKQe9g0VDSehPINiejjA6ElqnFaFIhI6ZEiZAkUI0D5MCk0bQcTf/LVqZStvQ6K4lPn/BRg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.18.1", - "@typescript-eslint/visitor-keys": "8.18.1", + "@typescript-eslint/types": "8.24.1", + "@typescript-eslint/visitor-keys": "8.24.1", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" + "ts-api-utils": "^2.0.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1328,15 +1346,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.18.1.tgz", - "integrity": "sha512-8vikiIj2ebrC4WRdcAdDcmnu9Q/MXXwg+STf40BVfT8exDqBCUPdypvzcUPxEqRGKg9ALagZ0UWcYCtn+4W2iQ==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.24.1.tgz", + "integrity": "sha512-OOcg3PMMQx9EXspId5iktsI3eMaXVwlhC8BvNnX6B5w9a4dVgpkQZuU8Hy67TolKcl+iFWq0XX+jbDGN4xWxjQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.18.1", - "@typescript-eslint/types": "8.18.1", - "@typescript-eslint/typescript-estree": "8.18.1" + "@typescript-eslint/scope-manager": "8.24.1", + "@typescript-eslint/types": "8.24.1", + "@typescript-eslint/typescript-estree": "8.24.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1351,12 +1369,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.1.tgz", - "integrity": "sha512-Vj0WLm5/ZsD013YeUKn+K0y8p1M0jPpxOkKdbD1wB0ns53a5piVY02zjf072TblEweAbcYiFiPoSMF3kp+VhhQ==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.24.1.tgz", + "integrity": "sha512-EwVHlp5l+2vp8CoqJm9KikPZgi3gbdZAtabKT9KPShGeOcJhsv4Zdo3oc8T8I0uKEmYoU4ItyxbptjF08enaxg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.18.1", + "@typescript-eslint/types": "8.24.1", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -1499,6 +1517,18 @@ "node": ">= 8" } }, + "node_modules/anymatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -1627,9 +1657,9 @@ } }, "node_modules/call-bind-apply-helpers": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", - "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", "dev": true, "dependencies": { "es-errors": "^1.3.0", @@ -1723,27 +1753,18 @@ } }, "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", "dev": true, "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" + "readdirp": "^4.0.1" }, "engines": { - "node": ">= 8.10.0" + "node": ">= 14.16.0" }, "funding": { "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" } }, "node_modules/clean-stack": { @@ -1957,9 +1978,9 @@ "dev": true }, "node_modules/console-grid": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/console-grid/-/console-grid-2.2.2.tgz", - "integrity": "sha512-ohlgXexdDTKLNsZz7DSJuCAwmRc8omSS61txOk39W3NOthgKGr1a1jJpZ5BCQe4PlrwMw01OvPQ1Bl3G7Y/uFg==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/console-grid/-/console-grid-2.2.3.tgz", + "integrity": "sha512-+mecFacaFxGl+1G31IsCx41taUXuW2FxX+4xIE0TIPhgML+Jb9JFcBWGhhWerd1/vhScubdmHqTwOhB0KCUUAg==", "dev": true }, "node_modules/convert-source-map": { @@ -2077,33 +2098,33 @@ } }, "node_modules/diff": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", - "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz", + "integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==", "dev": true, "engines": { "node": ">=0.3.1" } }, "node_modules/dprint": { - "version": "0.47.6", - "resolved": "https://registry.npmjs.org/dprint/-/dprint-0.47.6.tgz", - "integrity": "sha512-vCQC+IMHVZbISA5pxEj+yshQbozmQoVFA4lzcLlqJ8rzIAH8U+1DKvesN/2Uv3Bqz6rMW6W4WY7pYJQljmiZ8w==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/dprint/-/dprint-0.49.0.tgz", + "integrity": "sha512-xtBPZbPKWOOJH5al4h6rgzsGHuXpyK7TFJCQ5/TW8Z4zkcB9dfmPAh14/Yp5YZcB798D0liztXw+Nd7suzdzBQ==", "dev": true, "hasInstallScript": true, "bin": { "dprint": "bin.js" }, "optionalDependencies": { - "@dprint/darwin-arm64": "0.47.6", - "@dprint/darwin-x64": "0.47.6", - "@dprint/linux-arm64-glibc": "0.47.6", - "@dprint/linux-arm64-musl": "0.47.6", - "@dprint/linux-riscv64-glibc": "0.47.6", - "@dprint/linux-x64-glibc": "0.47.6", - "@dprint/linux-x64-musl": "0.47.6", - "@dprint/win32-arm64": "0.47.6", - "@dprint/win32-x64": "0.47.6" + "@dprint/darwin-arm64": "0.49.0", + "@dprint/darwin-x64": "0.49.0", + "@dprint/linux-arm64-glibc": "0.49.0", + "@dprint/linux-arm64-musl": "0.49.0", + "@dprint/linux-riscv64-glibc": "0.49.0", + "@dprint/linux-x64-glibc": "0.49.0", + "@dprint/linux-x64-musl": "0.49.0", + "@dprint/win32-arm64": "0.49.0", + "@dprint/win32-x64": "0.49.0" } }, "node_modules/dunder-proto": { @@ -2151,9 +2172,9 @@ "dev": true }, "node_modules/enhanced-resolve": { - "version": "5.17.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", - "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", + "version": "5.18.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.1.tgz", + "integrity": "sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==", "dev": true, "dependencies": { "graceful-fs": "^4.2.4", @@ -2182,9 +2203,9 @@ } }, "node_modules/es-object-atoms": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", - "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", "dev": true, "dependencies": { "es-errors": "^1.3.0" @@ -2194,9 +2215,9 @@ } }, "node_modules/esbuild": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz", - "integrity": "sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.0.tgz", + "integrity": "sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw==", "dev": true, "hasInstallScript": true, "bin": { @@ -2206,30 +2227,31 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.24.0", - "@esbuild/android-arm": "0.24.0", - "@esbuild/android-arm64": "0.24.0", - "@esbuild/android-x64": "0.24.0", - "@esbuild/darwin-arm64": "0.24.0", - "@esbuild/darwin-x64": "0.24.0", - "@esbuild/freebsd-arm64": "0.24.0", - "@esbuild/freebsd-x64": "0.24.0", - "@esbuild/linux-arm": "0.24.0", - "@esbuild/linux-arm64": "0.24.0", - "@esbuild/linux-ia32": "0.24.0", - "@esbuild/linux-loong64": "0.24.0", - "@esbuild/linux-mips64el": "0.24.0", - "@esbuild/linux-ppc64": "0.24.0", - "@esbuild/linux-riscv64": "0.24.0", - "@esbuild/linux-s390x": "0.24.0", - "@esbuild/linux-x64": "0.24.0", - "@esbuild/netbsd-x64": "0.24.0", - "@esbuild/openbsd-arm64": "0.24.0", - "@esbuild/openbsd-x64": "0.24.0", - "@esbuild/sunos-x64": "0.24.0", - "@esbuild/win32-arm64": "0.24.0", - "@esbuild/win32-ia32": "0.24.0", - "@esbuild/win32-x64": "0.24.0" + "@esbuild/aix-ppc64": "0.25.0", + "@esbuild/android-arm": "0.25.0", + "@esbuild/android-arm64": "0.25.0", + "@esbuild/android-x64": "0.25.0", + "@esbuild/darwin-arm64": "0.25.0", + "@esbuild/darwin-x64": "0.25.0", + "@esbuild/freebsd-arm64": "0.25.0", + "@esbuild/freebsd-x64": "0.25.0", + "@esbuild/linux-arm": "0.25.0", + "@esbuild/linux-arm64": "0.25.0", + "@esbuild/linux-ia32": "0.25.0", + "@esbuild/linux-loong64": "0.25.0", + "@esbuild/linux-mips64el": "0.25.0", + "@esbuild/linux-ppc64": "0.25.0", + "@esbuild/linux-riscv64": "0.25.0", + "@esbuild/linux-s390x": "0.25.0", + "@esbuild/linux-x64": "0.25.0", + "@esbuild/netbsd-arm64": "0.25.0", + "@esbuild/netbsd-x64": "0.25.0", + "@esbuild/openbsd-arm64": "0.25.0", + "@esbuild/openbsd-x64": "0.25.0", + "@esbuild/sunos-x64": "0.25.0", + "@esbuild/win32-arm64": "0.25.0", + "@esbuild/win32-ia32": "0.25.0", + "@esbuild/win32-x64": "0.25.0" } }, "node_modules/escalade": { @@ -2254,18 +2276,18 @@ } }, "node_modules/eslint": { - "version": "9.17.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.17.0.tgz", - "integrity": "sha512-evtlNcpJg+cZLcnVKwsai8fExnqjGPicK7gnUtlNuzu+Fv9bI0aLpND5T44VLQtoMEnI57LoXO9XAkIXwohKrA==", + "version": "9.20.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.20.1.tgz", + "integrity": "sha512-m1mM33o6dBUjxl2qb6wv6nGNwCAsns1eKtaQ4l/NPHeTvhiUPbtdfMyktxN4B3fgHIgsYh1VT3V9txblpQHq+g==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.19.0", - "@eslint/core": "^0.9.0", + "@eslint/core": "^0.11.0", "@eslint/eslintrc": "^3.2.0", - "@eslint/js": "9.17.0", - "@eslint/plugin-kit": "^0.2.3", + "@eslint/js": "9.20.0", + "@eslint/plugin-kit": "^0.2.5", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.1", @@ -2396,18 +2418,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, "node_modules/eslint/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -2491,6 +2501,22 @@ "node": ">=0.10.0" } }, + "node_modules/fast-content-type-parse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-2.0.1.tgz", + "integrity": "sha512-nGqtvLrj5w0naR6tDPfB4cUmYCqouzyQiz6C5y/LtcDllJdrcc6WaWW6iXyIIOErTa/XRybj28aasdn4LkVk6Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ] + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -2498,21 +2524,33 @@ "dev": true }, "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "micromatch": "^4.0.8" }, "engines": { "node": ">=8.6.0" } }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -2526,18 +2564,14 @@ "dev": true }, "node_modules/fast-xml-parser": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.5.1.tgz", - "integrity": "sha512-y655CeyUQ+jj7KBbYMc4FG01V8ZQqjN+gDYGJ50RtfsUB8iG9AmwmwoAgeKLJdmueKKMrH1RJ7yXHTSoczdv5w==", + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.5.2.tgz", + "integrity": "sha512-xmnYV9o0StIz/0ArdzmWTxn9oDy0lH8Z80/8X/TD2EUQKXY4DHxoT9mYBqgGIG17DgddCJtH1M6DriMbalNsAA==", "dev": true, "funding": [ { "type": "github", "url": "https://github.com/sponsors/NaturalIntelligence" - }, - { - "type": "paypal", - "url": "https://paypal.me/naturalintelligence" } ], "dependencies": { @@ -2557,9 +2591,9 @@ } }, "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.0.tgz", + "integrity": "sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA==", "dev": true, "dependencies": { "reusify": "^1.0.4" @@ -2628,9 +2662,9 @@ } }, "node_modules/flatted": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", - "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", "dev": true }, "node_modules/foreground-child": { @@ -2656,9 +2690,9 @@ "dev": true }, "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "dev": true, "hasInstallScript": true, "optional": true, @@ -2697,21 +2731,21 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.6.tgz", - "integrity": "sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", + "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", "dev": true, "dependencies": { "call-bind-apply-helpers": "^1.0.1", - "dunder-proto": "^1.0.0", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0", "function-bind": "^1.1.2", + "get-proto": "^1.0.0", "gopd": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", - "math-intrinsics": "^1.0.0" + "math-intrinsics": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -2720,6 +2754,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/glob": { "version": "10.4.5", "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", @@ -2741,21 +2788,21 @@ } }, "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "dependencies": { - "is-glob": "^4.0.1" + "is-glob": "^4.0.3" }, "engines": { - "node": ">= 6" + "node": ">=10.13.0" } }, "node_modules/globals": { - "version": "15.13.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-15.13.0.tgz", - "integrity": "sha512-49TewVEz0UxZjr1WYYsWpPrhyC/B/pA8Bq0fUmet2n+eR7yn0IvNzNaoBwnK6mdkzcN+se7Ez9zUgULTz2QH4g==", + "version": "15.15.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.15.0.tgz", + "integrity": "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==", "dev": true, "engines": { "node": ">=18" @@ -2865,9 +2912,9 @@ } }, "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", "dev": true, "dependencies": { "parent-module": "^1.0.0", @@ -3123,9 +3170,9 @@ } }, "node_modules/knip": { - "version": "5.41.0", - "resolved": "https://registry.npmjs.org/knip/-/knip-5.41.0.tgz", - "integrity": "sha512-W8omBs+jhC/P/A3kC0xdEGrhYVmsmWafUVz0wzQjYfoaK0YNEBPPLptUeqwQl6ihYVqzb/X0zs50gY9Akw1Bww==", + "version": "5.44.4", + "resolved": "https://registry.npmjs.org/knip/-/knip-5.44.4.tgz", + "integrity": "sha512-Ryn8LwWHLId8jSK1DgtT0hmg5DbzkqAtH+Gg3vZJpmSMgGHMspej9Ag+qKTm8wsPLDjVetuEz/lIsobo0XCMvQ==", "dev": true, "funding": [ { @@ -3142,12 +3189,12 @@ } ], "dependencies": { - "@nodelib/fs.walk": "1.2.8", + "@nodelib/fs.walk": "3.0.1", "@snyk/github-codeowners": "1.1.0", "easy-table": "1.2.0", - "enhanced-resolve": "^5.17.1", - "fast-glob": "^3.3.2", - "jiti": "^2.4.0", + "enhanced-resolve": "^5.18.0", + "fast-glob": "^3.3.3", + "jiti": "^2.4.2", "js-yaml": "^4.1.0", "minimist": "^1.2.8", "picocolors": "^1.1.0", @@ -3164,35 +3211,58 @@ "knip-bun": "bin/knip-bun.js" }, "engines": { - "node": ">=18.6.0" + "node": ">=18.18.0" }, "peerDependencies": { "@types/node": ">=18", "typescript": ">=5.0.4" } }, - "node_modules/knip/node_modules/parse-ms": { + "node_modules/knip/node_modules/@nodelib/fs.scandir": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-4.0.1.tgz", + "integrity": "sha512-vAkI715yhnmiPupY+dq+xenu5Tdf2TBQ66jLvBIcCddtz+5Q8LbMKaf9CIJJreez8fQ8fgaY+RaywQx8RJIWpw==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "4.0.0", + "run-parallel": "^1.2.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/knip/node_modules/@nodelib/fs.stat": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-4.0.0.tgz", - "integrity": "sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-4.0.0.tgz", + "integrity": "sha512-ctr6bByzksKRCV0bavi8WoQevU6plSp2IkllIsEqaiKe2mwNNnaluhnRhcsgGZHrrHk57B3lf95MkLMO3STYcg==", "dev": true, "engines": { - "node": ">=18" + "node": ">=18.18.0" + } + }, + "node_modules/knip/node_modules/@nodelib/fs.walk": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-3.0.1.tgz", + "integrity": "sha512-nIh/M6Kh3ZtOmlY00DaUYB4xeeV6F3/ts1l29iwl3/cfyY/OuCfUx+v08zgx8TKPTifXRcjjqVQ4KB2zOYSbyw==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "4.0.1", + "fastq": "^1.15.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=18.18.0" } }, - "node_modules/knip/node_modules/picomatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", - "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "node_modules/knip/node_modules/parse-ms": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-4.0.0.tgz", + "integrity": "sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==", "dev": true, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/knip/node_modules/pretty-ms": { @@ -3309,9 +3379,9 @@ } }, "node_modules/math-intrinsics": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.0.0.tgz", - "integrity": "sha512-4MqMiKP90ybymYvsut0CH2g4XWbfLtmlCkXmtmdcDCxNB+mQcu1w/1+L/VD7vi/PSv7X2JYV7SCcR+jiPXnQtA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", "dev": true, "engines": { "node": ">= 0.4" @@ -3339,6 +3409,18 @@ "node": ">=8.6" } }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -3419,6 +3501,30 @@ "integrity": "sha512-nCf6dmCEHObJ8BBrcjW+UHYvVtHEL+FliYR/Mfc/v7dKenNmBQ0ZSuvlICgsyQy9Tt581ldvh+SReS4qp4LrQw==", "dev": true }, + "node_modules/mocha/node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, "node_modules/mocha/node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -3430,6 +3536,15 @@ "wrap-ansi": "^7.0.0" } }, + "node_modules/mocha/node_modules/diff": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/mocha/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -3456,6 +3571,18 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/mocha/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/mocha/node_modules/minimatch": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", @@ -3468,6 +3595,30 @@ "node": ">=10" } }, + "node_modules/mocha/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/mocha/node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, "node_modules/mocha/node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -3554,16 +3705,16 @@ } }, "node_modules/monocart-coverage-reports": { - "version": "2.11.4", - "resolved": "https://registry.npmjs.org/monocart-coverage-reports/-/monocart-coverage-reports-2.11.4.tgz", - "integrity": "sha512-hFhfhIzD7Yv1fNJgnUVvrEpnwqB44KwSGbghOM9C8AMIVon5ZLRlspbWz+uwW04Yhgvo5WmtPEmX+mnET2VcGA==", + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/monocart-coverage-reports/-/monocart-coverage-reports-2.12.1.tgz", + "integrity": "sha512-pfHpUTX00a5Ts9WuBxEnQjH957M3H4tRTASZRVtSDKzyE8xRLkSat0fcz1AJpWQv7QBB2aP39+eeQUccWToh6Q==", "dev": true, "dependencies": { "acorn": "^8.14.0", "acorn-loose": "^8.4.0", "acorn-walk": "^8.3.4", - "commander": "^12.1.0", - "console-grid": "^2.2.2", + "commander": "^13.1.0", + "console-grid": "^2.2.3", "eight-colors": "^1.3.1", "foreground-child": "^3.3.0", "istanbul-lib-coverage": "^3.2.2", @@ -3577,9 +3728,9 @@ } }, "node_modules/monocart-coverage-reports/node_modules/commander": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", - "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz", + "integrity": "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==", "dev": true, "engines": { "node": ">=18" @@ -3613,9 +3764,9 @@ } }, "node_modules/object-inspect": { - "version": "1.13.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", - "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", "dev": true, "engines": { "node": ">= 0.4" @@ -3775,24 +3926,24 @@ "dev": true }, "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", "dev": true, "engines": { - "node": ">=8.6" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/jonschlinkert" } }, "node_modules/playwright": { - "version": "1.49.1", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.49.1.tgz", - "integrity": "sha512-VYL8zLoNTBxVOrJBbDuRgDWa3i+mfQgDTrL8Ah9QXZ7ax4Dsj0MSq5bYgytRnDVVe+njoKnfsYkH3HzqVj5UZA==", + "version": "1.50.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.50.1.tgz", + "integrity": "sha512-G8rwsOQJ63XG6BbKj2w5rHeavFjy5zynBA9zsJMMtBoe/Uf757oG12NXz6e6OirF7RCrTVAKFXbLmn1RbL7Qaw==", "dev": true, "dependencies": { - "playwright-core": "1.49.1" + "playwright-core": "1.50.1" }, "bin": { "playwright": "cli.js" @@ -3805,9 +3956,9 @@ } }, "node_modules/playwright-core": { - "version": "1.49.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.49.1.tgz", - "integrity": "sha512-BzmpVcs4kE2CH15rWfzpjzVGhWERJfmnXmniSyKeRZUs9Ws65m+RGIi7mjJK/euCegfn3i7jvqWeWyHe9y3Vgg==", + "version": "1.50.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.50.1.tgz", + "integrity": "sha512-ra9fsNWayuYumt+NiM069M6OkcRb1FZSK8bgi66AtpFoWkg2+y0bJSNmkFrWhMbEBbVKC/EruAHH3g0zmtwGmQ==", "dev": true, "bin": { "playwright-core": "cli.js" @@ -3816,20 +3967,6 @@ "node": ">=18" } }, - "node_modules/playwright/node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/plur": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/plur/-/plur-4.0.0.tgz", @@ -3879,12 +4016,12 @@ } }, "node_modules/qs": { - "version": "6.13.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.1.tgz", - "integrity": "sha512-EJPeIn0CYrGu+hli1xilKAPXODtJ12T0sP63Ijx2/khC2JtuaN3JyNIpvmnkmaEtha9ocbG4A4cMcr+TvqvwQg==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", + "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", "dev": true, "dependencies": { - "side-channel": "^1.0.6" + "side-channel": "^1.1.0" }, "engines": { "node": ">=0.6" @@ -3923,15 +4060,16 @@ } }, "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, "engines": { - "node": ">=8.10.0" + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" } }, "node_modules/reduce-flatten": { @@ -4054,9 +4192,9 @@ } }, "node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -4387,15 +4525,15 @@ } }, "node_modules/ts-api-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", - "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.0.1.tgz", + "integrity": "sha512-dnlgjFSVetynI8nzgJ+qF62efpglpWRk8isUEWZGWlJYySCTD6aKvbUDu+zbPeDakk3bg5H4XpitHukgfL1m9w==", "dev": true, "engines": { - "node": ">=16" + "node": ">=18.12" }, "peerDependencies": { - "typescript": ">=4.2.0" + "typescript": ">=4.8.4" } }, "node_modules/tslib": { @@ -4451,9 +4589,9 @@ } }, "node_modules/typescript": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", - "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", + "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -4464,14 +4602,14 @@ } }, "node_modules/typescript-eslint": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.18.1.tgz", - "integrity": "sha512-Mlaw6yxuaDEPQvb/2Qwu3/TfgeBHy9iTJ3mTwe7OvpPmF6KPQjVOfGyEJpPv6Ez2C34OODChhXrzYw/9phI0MQ==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.24.1.tgz", + "integrity": "sha512-cw3rEdzDqBs70TIcb0Gdzbt6h11BSs2pS0yaq7hDWDBtCCSei1pPSUXE9qUdQ/Wm9NgFg8mKtMt1b8fTHIl1jA==", "dev": true, "dependencies": { - "@typescript-eslint/eslint-plugin": "8.18.1", - "@typescript-eslint/parser": "8.18.1", - "@typescript-eslint/utils": "8.18.1" + "@typescript-eslint/eslint-plugin": "8.24.1", + "@typescript-eslint/parser": "8.24.1", + "@typescript-eslint/utils": "8.24.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4769,9 +4907,9 @@ } }, "node_modules/zod": { - "version": "3.24.1", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.1.tgz", - "integrity": "sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A==", + "version": "3.24.2", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.2.tgz", + "integrity": "sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==", "dev": true, "funding": { "url": "https://github.com/sponsors/colinhacks" @@ -4792,22 +4930,22 @@ }, "dependencies": { "@bcoe/v8-coverage": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-1.0.1.tgz", - "integrity": "sha512-W+a0/JpU28AqH4IKtwUPcEUnUyXMDLALcn5/JLczGGT9fHE2sIby/xP/oQnx3nxkForzgzPy201RAKcB4xPAFQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-1.0.2.tgz", + "integrity": "sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==", "dev": true }, "@dprint/darwin-arm64": { - "version": "0.47.6", - "resolved": "https://registry.npmjs.org/@dprint/darwin-arm64/-/darwin-arm64-0.47.6.tgz", - "integrity": "sha512-DrtKVOH7Ue6QYsqsUfUwBlTkSZNF2j35xqyI6KimUT1ulgUPocLG53JC/Aej9KuSCPmt4M3J40xxPKRgIM4jPA==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/@dprint/darwin-arm64/-/darwin-arm64-0.49.0.tgz", + "integrity": "sha512-b8fwjdfYrX5H+QyeWiB27gPc1GMVdd2LorCtsZWC+MDQO6NOgpuxJePqccbQlFUumy2rfmQuLQprnldvQZhceg==", "dev": true, "optional": true }, "@dprint/darwin-x64": { - "version": "0.47.6", - "resolved": "https://registry.npmjs.org/@dprint/darwin-x64/-/darwin-x64-0.47.6.tgz", - "integrity": "sha512-p16a4lMbAo4RngbNTAmtREnIRI/cOcZFy5wHPIzbCDnnHI+4UyHiAypTrpF8U8EYx1tw3hgih2MyAuupa9Gfag==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/@dprint/darwin-x64/-/darwin-x64-0.49.0.tgz", + "integrity": "sha512-cA/DIPlHClkufLufuIfcXHtZdlyP9U05RuJLvvAfHwJAxyeEC/chKYVc5BVz86RxMIq6czFGpJHoFtTjrfM3YA==", "dev": true, "optional": true }, @@ -4818,225 +4956,232 @@ "dev": true }, "@dprint/linux-arm64-glibc": { - "version": "0.47.6", - "resolved": "https://registry.npmjs.org/@dprint/linux-arm64-glibc/-/linux-arm64-glibc-0.47.6.tgz", - "integrity": "sha512-WHphnk0oXpNzwJ9cjbddOL+hEZkXTvHxcA2pM1h1kWCBa5m+4qh0fg8YCktckMfHx1qdQuZYWRoT4l7yQbzWYA==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/@dprint/linux-arm64-glibc/-/linux-arm64-glibc-0.49.0.tgz", + "integrity": "sha512-UBo3lDJhotT+qza2S48DOPI64MirkJMoFDidh/TJBjokio2TcGd+QUzuB9O7J1+R3AlbwyObcTECjJryCNohHQ==", "dev": true, "optional": true }, "@dprint/linux-arm64-musl": { - "version": "0.47.6", - "resolved": "https://registry.npmjs.org/@dprint/linux-arm64-musl/-/linux-arm64-musl-0.47.6.tgz", - "integrity": "sha512-/2cSPudajg8J0U69ldNZkJx5QiKZNh+ohNVM9leWZ8v6GXN6sJDHX3T6hzS3ohIb03YOCiLOrJZDy9j3+fSgdQ==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/@dprint/linux-arm64-musl/-/linux-arm64-musl-0.49.0.tgz", + "integrity": "sha512-XWAPL6Hp+zqk9bi57450wuy4yz4fvT72L3Zji3X7ChL5KD/apMUzQnZhmTpln2sxwIgJ3nCbzEzlF7jhhp/7KA==", "dev": true, "optional": true }, "@dprint/linux-riscv64-glibc": { - "version": "0.47.6", - "resolved": "https://registry.npmjs.org/@dprint/linux-riscv64-glibc/-/linux-riscv64-glibc-0.47.6.tgz", - "integrity": "sha512-RMHJ3Zuzpls426upHlAveVwlGMi8oBLzhiCauyC/yWQl3CkGTAYdyhEpGnux0+RxacysfIL2bd8ourx4K0Sx3w==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/@dprint/linux-riscv64-glibc/-/linux-riscv64-glibc-0.49.0.tgz", + "integrity": "sha512-6GlGcauMeMbCCJ15OmAMkarouCifij9hb12Vz5UUZPevnutVoWRTQBPQLfllmd+9Znsp23fHnmzmykibdwj4Gw==", "dev": true, "optional": true }, "@dprint/linux-x64-glibc": { - "version": "0.47.6", - "resolved": "https://registry.npmjs.org/@dprint/linux-x64-glibc/-/linux-x64-glibc-0.47.6.tgz", - "integrity": "sha512-4zbVsx/a8lHkRyAjfW0PNlN5IMwOJfFapgXNYJowWNO7X3j3m1jYJWovjmdZls+d6pDeOHoanMWtq95wd7zTeQ==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/@dprint/linux-x64-glibc/-/linux-x64-glibc-0.49.0.tgz", + "integrity": "sha512-PJUM1G8L2xwF9R1s4/J6kf29S2sJ/sZGy3ah7g5Uj+oYkZq6SlMOrx3xqCXEkKSa0T6Xuc1bUBcJyrjEf36xiw==", "dev": true, "optional": true }, "@dprint/linux-x64-musl": { - "version": "0.47.6", - "resolved": "https://registry.npmjs.org/@dprint/linux-x64-musl/-/linux-x64-musl-0.47.6.tgz", - "integrity": "sha512-0C13t4OVzomgQjvUyD5IrRyjLDhGuOtqMo00uJlwn3QHucfgOBqkjyQ5fq7T6+grBse0m14/EWblvSbYkZpyDw==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/@dprint/linux-x64-musl/-/linux-x64-musl-0.49.0.tgz", + "integrity": "sha512-+WIInBwbCXYmWZcYYmnD8HdcZj6q8ewy6mPpHH6SDMtWr6nrxzyIVLFr72XeiBoHnVsQFUhN+wv5Bm5NnpJtRw==", "dev": true, "optional": true }, "@dprint/typescript": { - "version": "0.93.3", - "resolved": "https://registry.npmjs.org/@dprint/typescript/-/typescript-0.93.3.tgz", - "integrity": "sha512-P/AAHYDyUG+5hih8knuk3s9n2wrCD1LSh0YsLlJMx6+v0Wsjf0PpcVRn+xDvHCtwPUctB5WBkZT2U8mu6Cm7RQ==", + "version": "0.93.4", + "resolved": "https://registry.npmjs.org/@dprint/typescript/-/typescript-0.93.4.tgz", + "integrity": "sha512-2pyMXLK9Bnodv4vSh/mUeYbaSnnzIj+vFOTUC9GVjUouEKpMNkZZsuS5d7rPqr72tfoy96vzFepsRa7spkgcRA==", "dev": true }, "@dprint/win32-arm64": { - "version": "0.47.6", - "resolved": "https://registry.npmjs.org/@dprint/win32-arm64/-/win32-arm64-0.47.6.tgz", - "integrity": "sha512-UOkeFMBdGIuGNwfkrJdVM9eNiRMdbZRRGVy0Cdo2AXn/FCDVqZ74KJkvYVcoUE27GCytHi4Sp1s4at7659WCOw==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/@dprint/win32-arm64/-/win32-arm64-0.49.0.tgz", + "integrity": "sha512-AteygrhmT7OXIgE/72REUfTPs/+qU0I1vhU379AYXgcWzOKy6Eeyi8lAt17oF7OmGT4IuyrKEDjpdTxhOWLsQw==", "dev": true, "optional": true }, "@dprint/win32-x64": { - "version": "0.47.6", - "resolved": "https://registry.npmjs.org/@dprint/win32-x64/-/win32-x64-0.47.6.tgz", - "integrity": "sha512-i9xwXR8V8Jk/wU1gsYKx15eb0ypBRbRZFkHsnHfC0ZBimcfEOibGnGcfv+UCUcumXtnV46TnBqaJW7H70J1J+A==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/@dprint/win32-x64/-/win32-x64-0.49.0.tgz", + "integrity": "sha512-8bE6P9T/32Gd+zMAkcwvUHzOLEMnbHEMgsgiKypYsdFTskpDz+y1GLJvMaxIFd2DB2tMx9TdBYuBQrJroTsMeQ==", "dev": true, "optional": true }, "@esbuild/aix-ppc64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.0.tgz", - "integrity": "sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.0.tgz", + "integrity": "sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ==", "dev": true, "optional": true }, "@esbuild/android-arm": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.0.tgz", - "integrity": "sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.0.tgz", + "integrity": "sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g==", "dev": true, "optional": true }, "@esbuild/android-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.0.tgz", - "integrity": "sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.0.tgz", + "integrity": "sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g==", "dev": true, "optional": true }, "@esbuild/android-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.0.tgz", - "integrity": "sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.0.tgz", + "integrity": "sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg==", "dev": true, "optional": true }, "@esbuild/darwin-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz", - "integrity": "sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.0.tgz", + "integrity": "sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw==", "dev": true, "optional": true }, "@esbuild/darwin-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.0.tgz", - "integrity": "sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.0.tgz", + "integrity": "sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg==", "dev": true, "optional": true }, "@esbuild/freebsd-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.0.tgz", - "integrity": "sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.0.tgz", + "integrity": "sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w==", "dev": true, "optional": true }, "@esbuild/freebsd-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.0.tgz", - "integrity": "sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.0.tgz", + "integrity": "sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A==", "dev": true, "optional": true }, "@esbuild/linux-arm": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.0.tgz", - "integrity": "sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.0.tgz", + "integrity": "sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg==", "dev": true, "optional": true }, "@esbuild/linux-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.0.tgz", - "integrity": "sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.0.tgz", + "integrity": "sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg==", "dev": true, "optional": true }, "@esbuild/linux-ia32": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.0.tgz", - "integrity": "sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.0.tgz", + "integrity": "sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg==", "dev": true, "optional": true }, "@esbuild/linux-loong64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.0.tgz", - "integrity": "sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.0.tgz", + "integrity": "sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw==", "dev": true, "optional": true }, "@esbuild/linux-mips64el": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.0.tgz", - "integrity": "sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.0.tgz", + "integrity": "sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ==", "dev": true, "optional": true }, "@esbuild/linux-ppc64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.0.tgz", - "integrity": "sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.0.tgz", + "integrity": "sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw==", "dev": true, "optional": true }, "@esbuild/linux-riscv64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.0.tgz", - "integrity": "sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.0.tgz", + "integrity": "sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA==", "dev": true, "optional": true }, "@esbuild/linux-s390x": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.0.tgz", - "integrity": "sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.0.tgz", + "integrity": "sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA==", "dev": true, "optional": true }, "@esbuild/linux-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.0.tgz", - "integrity": "sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.0.tgz", + "integrity": "sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw==", + "dev": true, + "optional": true + }, + "@esbuild/netbsd-arm64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.0.tgz", + "integrity": "sha512-RuG4PSMPFfrkH6UwCAqBzauBWTygTvb1nxWasEJooGSJ/NwRw7b2HOwyRTQIU97Hq37l3npXoZGYMy3b3xYvPw==", "dev": true, "optional": true }, "@esbuild/netbsd-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.0.tgz", - "integrity": "sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.0.tgz", + "integrity": "sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA==", "dev": true, "optional": true }, "@esbuild/openbsd-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.0.tgz", - "integrity": "sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.0.tgz", + "integrity": "sha512-21sUNbq2r84YE+SJDfaQRvdgznTD8Xc0oc3p3iW/a1EVWeNj/SdUCbm5U0itZPQYRuRTW20fPMWMpcrciH2EJw==", "dev": true, "optional": true }, "@esbuild/openbsd-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.0.tgz", - "integrity": "sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.0.tgz", + "integrity": "sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg==", "dev": true, "optional": true }, "@esbuild/sunos-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.0.tgz", - "integrity": "sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.0.tgz", + "integrity": "sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg==", "dev": true, "optional": true }, "@esbuild/win32-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.0.tgz", - "integrity": "sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.0.tgz", + "integrity": "sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw==", "dev": true, "optional": true }, "@esbuild/win32-ia32": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.0.tgz", - "integrity": "sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.0.tgz", + "integrity": "sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA==", "dev": true, "optional": true }, "@esbuild/win32-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.0.tgz", - "integrity": "sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.0.tgz", + "integrity": "sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ==", "dev": true, "optional": true }, @@ -5082,12 +5227,12 @@ "dev": true }, "@eslint/config-array": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.1.tgz", - "integrity": "sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.2.tgz", + "integrity": "sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w==", "dev": true, "requires": { - "@eslint/object-schema": "^2.1.5", + "@eslint/object-schema": "^2.1.6", "debug": "^4.3.1", "minimatch": "^3.1.2" }, @@ -5114,9 +5259,9 @@ } }, "@eslint/core": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.9.1.tgz", - "integrity": "sha512-GuUdqkyyzQI5RMIWkHhvTWLCyLo1jNK3vzkSyaExH5kHPDHcuL2VOpHjmMY+y3+NC69qAKToBqldTBgYeLSr9Q==", + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.11.0.tgz", + "integrity": "sha512-DWUB2pksgNEb6Bz2fggIy1wh6fGgZP4Xyy/Mt0QZPiloKKXerbqq9D3SBQTlCRYOrcRPu4vuz+CGjwdfqxnoWA==", "dev": true, "requires": { "@types/json-schema": "^7.0.15" @@ -5167,23 +5312,24 @@ } }, "@eslint/js": { - "version": "9.17.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.17.0.tgz", - "integrity": "sha512-Sxc4hqcs1kTu0iID3kcZDW3JHq2a77HO9P8CP6YEA/FpH3Ll8UXE2r/86Rz9YJLKme39S9vU5OWNjC6Xl0Cr3w==", + "version": "9.20.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.20.0.tgz", + "integrity": "sha512-iZA07H9io9Wn836aVTytRaNqh00Sad+EamwOVJT12GTLw1VGMFV/4JaME+JjLtr9fiGaoWgYnS54wrfWsSs4oQ==", "dev": true }, "@eslint/object-schema": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.5.tgz", - "integrity": "sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ==", + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", + "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", "dev": true }, "@eslint/plugin-kit": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.4.tgz", - "integrity": "sha512-zSkKow6H5Kdm0ZUQUB2kV5JIXqoG0+uH5YADhaEHswm664N9Db8dXSi0nMJpacpMf+MyyglF1vnZohpEg5yUtg==", + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.6.tgz", + "integrity": "sha512-+0TjwR1eAUdZtvv/ir1mGX+v0tUoR3VEPB8Up0LLJC+whRW0GgBBtpbOkg/a/U4Dxa6l5a3l9AJ1aWIQVyoWJA==", "dev": true, "requires": { + "@eslint/core": "^0.11.0", "levn": "^0.4.1" } }, @@ -5218,9 +5364,9 @@ "dev": true }, "@humanwhocodes/retry": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz", - "integrity": "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==", + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.2.tgz", + "integrity": "sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==", "dev": true }, "@isaacs/cliui": { @@ -5292,60 +5438,60 @@ } }, "@octokit/auth-token": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-5.1.1.tgz", - "integrity": "sha512-rh3G3wDO8J9wSjfI436JUKzHIxq8NaiL0tVeB2aXmG6p/9859aUOAjA9pmSPNGGZxfwmaJ9ozOJImuNVJdpvbA==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-5.1.2.tgz", + "integrity": "sha512-JcQDsBdg49Yky2w2ld20IHAlwr8d/d8N6NiOXbtuoPCqzbsiJgF633mVUw3x4mo0H5ypataQIX7SFu3yy44Mpw==", "dev": true }, "@octokit/core": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.2.tgz", - "integrity": "sha512-hEb7Ma4cGJGEUNOAVmyfdB/3WirWMg5hDuNFVejGEDFqupeOysLc2sG6HJxY2etBp5YQu5Wtxwi020jS9xlUwg==", + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.4.tgz", + "integrity": "sha512-lAS9k7d6I0MPN+gb9bKDt7X8SdxknYqAMh44S5L+lNqIN2NuV8nvv3g8rPp7MuRxcOpxpUIATWprO0C34a8Qmg==", "dev": true, "requires": { "@octokit/auth-token": "^5.0.0", - "@octokit/graphql": "^8.0.0", - "@octokit/request": "^9.0.0", - "@octokit/request-error": "^6.0.1", - "@octokit/types": "^13.0.0", + "@octokit/graphql": "^8.1.2", + "@octokit/request": "^9.2.1", + "@octokit/request-error": "^6.1.7", + "@octokit/types": "^13.6.2", "before-after-hook": "^3.0.2", "universal-user-agent": "^7.0.0" } }, "@octokit/endpoint": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.1.tgz", - "integrity": "sha512-JYjh5rMOwXMJyUpj028cu0Gbp7qe/ihxfJMLc8VZBMMqSwLgOxDI1911gV4Enl1QSavAQNJcwmwBF9M0VvLh6Q==", + "version": "10.1.3", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.3.tgz", + "integrity": "sha512-nBRBMpKPhQUxCsQQeW+rCJ/OPSMcj3g0nfHn01zGYZXuNDvvXudF/TYY6APj5THlurerpFN4a/dQAIAaM6BYhA==", "dev": true, "requires": { - "@octokit/types": "^13.0.0", + "@octokit/types": "^13.6.2", "universal-user-agent": "^7.0.2" } }, "@octokit/graphql": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-8.1.1.tgz", - "integrity": "sha512-ukiRmuHTi6ebQx/HFRCXKbDlOh/7xEV6QUXaE7MJEKGNAncGI/STSbOkl12qVXZrfZdpXctx5O9X1AIaebiDBg==", + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-8.2.1.tgz", + "integrity": "sha512-n57hXtOoHrhwTWdvhVkdJHdhTv0JstjDbDRhJfwIRNfFqmSo1DaK/mD2syoNUoLCyqSjBpGAKOG0BuwF392slw==", "dev": true, "requires": { - "@octokit/request": "^9.0.0", - "@octokit/types": "^13.0.0", + "@octokit/request": "^9.2.2", + "@octokit/types": "^13.8.0", "universal-user-agent": "^7.0.0" } }, "@octokit/openapi-types": { - "version": "22.2.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-22.2.0.tgz", - "integrity": "sha512-QBhVjcUa9W7Wwhm6DBFu6ZZ+1/t/oYxqc2tp81Pi41YNuJinbFRx8B133qVOrAaBbF7D/m0Et6f9/pZt9Rc+tg==", + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz", + "integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g==", "dev": true }, "@octokit/plugin-paginate-rest": { - "version": "11.3.6", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.3.6.tgz", - "integrity": "sha512-zcvqqf/+TicbTCa/Z+3w4eBJcAxCFymtc0UAIsR3dEVoNilWld4oXdscQ3laXamTszUZdusw97K8+DrbFiOwjw==", + "version": "11.4.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.4.2.tgz", + "integrity": "sha512-BXJ7XPCTDXFF+wxcg/zscfgw2O/iDPtNSkwwR1W1W5c4Mb3zav/M2XvxQ23nVmKj7jpweB4g8viMeCQdm7LMVA==", "dev": true, "requires": { - "@octokit/types": "^13.6.2" + "@octokit/types": "^13.7.0" } }, "@octokit/plugin-request-log": { @@ -5356,54 +5502,55 @@ "requires": {} }, "@octokit/plugin-rest-endpoint-methods": { - "version": "13.2.6", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.2.6.tgz", - "integrity": "sha512-wMsdyHMjSfKjGINkdGKki06VEkgdEldIGstIEyGX0wbYHGByOwN/KiM+hAAlUwAtPkP3gvXtVQA9L3ITdV2tVw==", + "version": "13.3.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.3.1.tgz", + "integrity": "sha512-o8uOBdsyR+WR8MK9Cco8dCgvG13H1RlM1nWnK/W7TEACQBFux/vPREgKucxUfuDQ5yi1T3hGf4C5ZmZXAERgwQ==", "dev": true, "requires": { - "@octokit/types": "^13.6.1" + "@octokit/types": "^13.8.0" } }, "@octokit/request": { - "version": "9.1.3", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.1.3.tgz", - "integrity": "sha512-V+TFhu5fdF3K58rs1pGUJIDH5RZLbZm5BI+MNF+6o/ssFNT4vWlCh/tVpF3NxGtP15HUxTTMUbsG5llAuU2CZA==", + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.2.2.tgz", + "integrity": "sha512-dZl0ZHx6gOQGcffgm1/Sf6JfEpmh34v3Af2Uci02vzUYz6qEN6zepoRtmybWXIGXFIK8K9ylE3b+duCWqhArtg==", "dev": true, "requires": { - "@octokit/endpoint": "^10.0.0", - "@octokit/request-error": "^6.0.1", - "@octokit/types": "^13.1.0", + "@octokit/endpoint": "^10.1.3", + "@octokit/request-error": "^6.1.7", + "@octokit/types": "^13.6.2", + "fast-content-type-parse": "^2.0.0", "universal-user-agent": "^7.0.2" } }, "@octokit/request-error": { - "version": "6.1.5", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.5.tgz", - "integrity": "sha512-IlBTfGX8Yn/oFPMwSfvugfncK2EwRLjzbrpifNaMY8o/HTEAFqCA1FZxjD9cWvSKBHgrIhc4CSBIzMxiLsbzFQ==", + "version": "6.1.7", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.7.tgz", + "integrity": "sha512-69NIppAwaauwZv6aOzb+VVLwt+0havz9GT5YplkeJv7fG7a40qpLt/yZKyiDxAhgz0EtgNdNcb96Z0u+Zyuy2g==", "dev": true, "requires": { - "@octokit/types": "^13.0.0" + "@octokit/types": "^13.6.2" } }, "@octokit/rest": { - "version": "21.0.2", - "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-21.0.2.tgz", - "integrity": "sha512-+CiLisCoyWmYicH25y1cDfCrv41kRSvTq6pPWtRroRJzhsCZWZyCqGyI8foJT5LmScADSwRAnr/xo+eewL04wQ==", + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-21.1.1.tgz", + "integrity": "sha512-sTQV7va0IUVZcntzy1q3QqPm/r8rWtDCqpRAmb8eXXnKkjoQEtFe3Nt5GTVsHft+R6jJoHeSiVLcgcvhtue/rg==", "dev": true, "requires": { - "@octokit/core": "^6.1.2", - "@octokit/plugin-paginate-rest": "^11.0.0", + "@octokit/core": "^6.1.4", + "@octokit/plugin-paginate-rest": "^11.4.2", "@octokit/plugin-request-log": "^5.3.1", - "@octokit/plugin-rest-endpoint-methods": "^13.0.0" + "@octokit/plugin-rest-endpoint-methods": "^13.3.0" } }, "@octokit/types": { - "version": "13.6.2", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.6.2.tgz", - "integrity": "sha512-WpbZfZUcZU77DrSW4wbsSgTPfKcp286q3ItaIgvSbBpZJlu6mnYXAkjZz6LVZPXkEvLIM8McanyZejKTYUHipA==", + "version": "13.8.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz", + "integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==", "dev": true, "requires": { - "@octokit/openapi-types": "^22.2.0" + "@octokit/openapi-types": "^23.0.1" } }, "@pkgjs/parseargs": { @@ -5431,9 +5578,9 @@ "dev": true }, "@types/diff": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@types/diff/-/diff-5.2.3.tgz", - "integrity": "sha512-K0Oqlrq3kQMaO2RhfrNQX5trmt+XLyom88zS0u84nnIcLvFnRUMRRHmrGny5GSM+kNO9IZLARsdQHDzkhAgmrQ==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@types/diff/-/diff-7.0.1.tgz", + "integrity": "sha512-R/BHQFripuhW6XPXy05hIvXJQdQ4540KnTvEFHSLjXfHYM41liOLKgIJEyYYiQe796xpaMHfe4Uj/p7Uvng2vA==", "dev": true }, "@types/estree": { @@ -5473,9 +5620,9 @@ "dev": true }, "@types/node": { - "version": "22.10.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.2.tgz", - "integrity": "sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==", + "version": "22.13.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.4.tgz", + "integrity": "sha512-ywP2X0DYtX3y08eFVx5fNIw7/uIv8hYUKgXoK8oayJlLnKcRfEYCxWMVE1XagUdVtCJlZT1AU4LXEABW+L1Peg==", "dev": true, "requires": { "undici-types": "~6.20.0" @@ -5497,43 +5644,43 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.18.1.tgz", - "integrity": "sha512-Ncvsq5CT3Gvh+uJG0Lwlho6suwDfUXH0HztslDf5I+F2wAFAZMRwYLEorumpKLzmO2suAXZ/td1tBg4NZIi9CQ==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.24.1.tgz", + "integrity": "sha512-ll1StnKtBigWIGqvYDVuDmXJHVH4zLVot1yQ4fJtLpL7qacwkxJc1T0bptqw+miBQ/QfUbhl1TcQ4accW5KUyA==", "dev": true, "requires": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.18.1", - "@typescript-eslint/type-utils": "8.18.1", - "@typescript-eslint/utils": "8.18.1", - "@typescript-eslint/visitor-keys": "8.18.1", + "@typescript-eslint/scope-manager": "8.24.1", + "@typescript-eslint/type-utils": "8.24.1", + "@typescript-eslint/utils": "8.24.1", + "@typescript-eslint/visitor-keys": "8.24.1", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", - "ts-api-utils": "^1.3.0" + "ts-api-utils": "^2.0.1" } }, "@typescript-eslint/parser": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.18.1.tgz", - "integrity": "sha512-rBnTWHCdbYM2lh7hjyXqxk70wvon3p2FyaniZuey5TrcGBpfhVp0OxOa6gxr9Q9YhZFKyfbEnxc24ZnVbbUkCA==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.24.1.tgz", + "integrity": "sha512-Tqoa05bu+t5s8CTZFaGpCH2ub3QeT9YDkXbPd3uQ4SfsLoh1/vv2GEYAioPoxCWJJNsenXlC88tRjwoHNts1oQ==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "8.18.1", - "@typescript-eslint/types": "8.18.1", - "@typescript-eslint/typescript-estree": "8.18.1", - "@typescript-eslint/visitor-keys": "8.18.1", + "@typescript-eslint/scope-manager": "8.24.1", + "@typescript-eslint/types": "8.24.1", + "@typescript-eslint/typescript-estree": "8.24.1", + "@typescript-eslint/visitor-keys": "8.24.1", "debug": "^4.3.4" } }, "@typescript-eslint/rule-tester": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/rule-tester/-/rule-tester-8.18.1.tgz", - "integrity": "sha512-Ri73SSfOfd+aESELU2k0ikpIahTSY1VVsGiFWarDy54HSuMMZc/2JCST0dfpRep3egAvcI5/lcQvRHmSyzcA4g==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/rule-tester/-/rule-tester-8.24.1.tgz", + "integrity": "sha512-9d9cceSuljUx0nJ//bAg8g0UUzz/EOjhR9K2u0btfM8C9uVIR73KgUm87kZnzcDxm9tK/LcWSG2jG5SQfQvNHA==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "8.18.1", - "@typescript-eslint/utils": "8.18.1", + "@typescript-eslint/typescript-estree": "8.24.1", + "@typescript-eslint/utils": "8.24.1", "ajv": "^6.12.6", "json-stable-stringify-without-jsonify": "^1.0.1", "lodash.merge": "4.6.2", @@ -5541,68 +5688,68 @@ } }, "@typescript-eslint/scope-manager": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.18.1.tgz", - "integrity": "sha512-HxfHo2b090M5s2+/9Z3gkBhI6xBH8OJCFjH9MhQ+nnoZqxU3wNxkLT+VWXWSFWc3UF3Z+CfPAyqdCTdoXtDPCQ==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.24.1.tgz", + "integrity": "sha512-OdQr6BNBzwRjNEXMQyaGyZzgg7wzjYKfX2ZBV3E04hUCBDv3GQCHiz9RpqdUIiVrMgJGkXm3tcEh4vFSHreS2Q==", "dev": true, "requires": { - "@typescript-eslint/types": "8.18.1", - "@typescript-eslint/visitor-keys": "8.18.1" + "@typescript-eslint/types": "8.24.1", + "@typescript-eslint/visitor-keys": "8.24.1" } }, "@typescript-eslint/type-utils": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.18.1.tgz", - "integrity": "sha512-jAhTdK/Qx2NJPNOTxXpMwlOiSymtR2j283TtPqXkKBdH8OAMmhiUfP0kJjc/qSE51Xrq02Gj9NY7MwK+UxVwHQ==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.24.1.tgz", + "integrity": "sha512-/Do9fmNgCsQ+K4rCz0STI7lYB4phTtEXqqCAs3gZW0pnK7lWNkvWd5iW545GSmApm4AzmQXmSqXPO565B4WVrw==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "8.18.1", - "@typescript-eslint/utils": "8.18.1", + "@typescript-eslint/typescript-estree": "8.24.1", + "@typescript-eslint/utils": "8.24.1", "debug": "^4.3.4", - "ts-api-utils": "^1.3.0" + "ts-api-utils": "^2.0.1" } }, "@typescript-eslint/types": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.18.1.tgz", - "integrity": "sha512-7uoAUsCj66qdNQNpH2G8MyTFlgerum8ubf21s3TSM3XmKXuIn+H2Sifh/ES2nPOPiYSRJWAk0fDkW0APBWcpfw==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.24.1.tgz", + "integrity": "sha512-9kqJ+2DkUXiuhoiYIUvIYjGcwle8pcPpdlfkemGvTObzgmYfJ5d0Qm6jwb4NBXP9W1I5tss0VIAnWFumz3mC5A==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.1.tgz", - "integrity": "sha512-z8U21WI5txzl2XYOW7i9hJhxoKKNG1kcU4RzyNvKrdZDmbjkmLBo8bgeiOJmA06kizLI76/CCBAAGlTlEeUfyg==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.24.1.tgz", + "integrity": "sha512-UPyy4MJ/0RE648DSKQe9g0VDSehPINiejjA6ElqnFaFIhI6ZEiZAkUI0D5MCk0bQcTf/LVqZStvQ6K4lPn/BRg==", "dev": true, "requires": { - "@typescript-eslint/types": "8.18.1", - "@typescript-eslint/visitor-keys": "8.18.1", + "@typescript-eslint/types": "8.24.1", + "@typescript-eslint/visitor-keys": "8.24.1", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" + "ts-api-utils": "^2.0.1" } }, "@typescript-eslint/utils": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.18.1.tgz", - "integrity": "sha512-8vikiIj2ebrC4WRdcAdDcmnu9Q/MXXwg+STf40BVfT8exDqBCUPdypvzcUPxEqRGKg9ALagZ0UWcYCtn+4W2iQ==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.24.1.tgz", + "integrity": "sha512-OOcg3PMMQx9EXspId5iktsI3eMaXVwlhC8BvNnX6B5w9a4dVgpkQZuU8Hy67TolKcl+iFWq0XX+jbDGN4xWxjQ==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.18.1", - "@typescript-eslint/types": "8.18.1", - "@typescript-eslint/typescript-estree": "8.18.1" + "@typescript-eslint/scope-manager": "8.24.1", + "@typescript-eslint/types": "8.24.1", + "@typescript-eslint/typescript-estree": "8.24.1" } }, "@typescript-eslint/visitor-keys": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.1.tgz", - "integrity": "sha512-Vj0WLm5/ZsD013YeUKn+K0y8p1M0jPpxOkKdbD1wB0ns53a5piVY02zjf072TblEweAbcYiFiPoSMF3kp+VhhQ==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.24.1.tgz", + "integrity": "sha512-EwVHlp5l+2vp8CoqJm9KikPZgi3gbdZAtabKT9KPShGeOcJhsv4Zdo3oc8T8I0uKEmYoU4ItyxbptjF08enaxg==", "dev": true, "requires": { - "@typescript-eslint/types": "8.18.1", + "@typescript-eslint/types": "8.24.1", "eslint-visitor-keys": "^4.2.0" }, "dependencies": { @@ -5696,6 +5843,14 @@ "requires": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" + }, + "dependencies": { + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + } } }, "argparse": { @@ -5794,9 +5949,9 @@ } }, "call-bind-apply-helpers": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", - "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", "dev": true, "requires": { "es-errors": "^1.3.0", @@ -5860,19 +6015,12 @@ } }, "chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", "dev": true, "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" + "readdirp": "^4.0.1" } }, "clean-stack": { @@ -6042,9 +6190,9 @@ "dev": true }, "console-grid": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/console-grid/-/console-grid-2.2.2.tgz", - "integrity": "sha512-ohlgXexdDTKLNsZz7DSJuCAwmRc8omSS61txOk39W3NOthgKGr1a1jJpZ5BCQe4PlrwMw01OvPQ1Bl3G7Y/uFg==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/console-grid/-/console-grid-2.2.3.tgz", + "integrity": "sha512-+mecFacaFxGl+1G31IsCx41taUXuW2FxX+4xIE0TIPhgML+Jb9JFcBWGhhWerd1/vhScubdmHqTwOhB0KCUUAg==", "dev": true }, "convert-source-map": { @@ -6132,26 +6280,26 @@ } }, "diff": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", - "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz", + "integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==", "dev": true }, "dprint": { - "version": "0.47.6", - "resolved": "https://registry.npmjs.org/dprint/-/dprint-0.47.6.tgz", - "integrity": "sha512-vCQC+IMHVZbISA5pxEj+yshQbozmQoVFA4lzcLlqJ8rzIAH8U+1DKvesN/2Uv3Bqz6rMW6W4WY7pYJQljmiZ8w==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/dprint/-/dprint-0.49.0.tgz", + "integrity": "sha512-xtBPZbPKWOOJH5al4h6rgzsGHuXpyK7TFJCQ5/TW8Z4zkcB9dfmPAh14/Yp5YZcB798D0liztXw+Nd7suzdzBQ==", "dev": true, "requires": { - "@dprint/darwin-arm64": "0.47.6", - "@dprint/darwin-x64": "0.47.6", - "@dprint/linux-arm64-glibc": "0.47.6", - "@dprint/linux-arm64-musl": "0.47.6", - "@dprint/linux-riscv64-glibc": "0.47.6", - "@dprint/linux-x64-glibc": "0.47.6", - "@dprint/linux-x64-musl": "0.47.6", - "@dprint/win32-arm64": "0.47.6", - "@dprint/win32-x64": "0.47.6" + "@dprint/darwin-arm64": "0.49.0", + "@dprint/darwin-x64": "0.49.0", + "@dprint/linux-arm64-glibc": "0.49.0", + "@dprint/linux-arm64-musl": "0.49.0", + "@dprint/linux-riscv64-glibc": "0.49.0", + "@dprint/linux-x64-glibc": "0.49.0", + "@dprint/linux-x64-musl": "0.49.0", + "@dprint/win32-arm64": "0.49.0", + "@dprint/win32-x64": "0.49.0" } }, "dunder-proto": { @@ -6194,9 +6342,9 @@ "dev": true }, "enhanced-resolve": { - "version": "5.17.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", - "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", + "version": "5.18.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.1.tgz", + "integrity": "sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==", "dev": true, "requires": { "graceful-fs": "^4.2.4", @@ -6216,44 +6364,45 @@ "dev": true }, "es-object-atoms": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", - "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", "dev": true, "requires": { "es-errors": "^1.3.0" } }, "esbuild": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz", - "integrity": "sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==", - "dev": true, - "requires": { - "@esbuild/aix-ppc64": "0.24.0", - "@esbuild/android-arm": "0.24.0", - "@esbuild/android-arm64": "0.24.0", - "@esbuild/android-x64": "0.24.0", - "@esbuild/darwin-arm64": "0.24.0", - "@esbuild/darwin-x64": "0.24.0", - "@esbuild/freebsd-arm64": "0.24.0", - "@esbuild/freebsd-x64": "0.24.0", - "@esbuild/linux-arm": "0.24.0", - "@esbuild/linux-arm64": "0.24.0", - "@esbuild/linux-ia32": "0.24.0", - "@esbuild/linux-loong64": "0.24.0", - "@esbuild/linux-mips64el": "0.24.0", - "@esbuild/linux-ppc64": "0.24.0", - "@esbuild/linux-riscv64": "0.24.0", - "@esbuild/linux-s390x": "0.24.0", - "@esbuild/linux-x64": "0.24.0", - "@esbuild/netbsd-x64": "0.24.0", - "@esbuild/openbsd-arm64": "0.24.0", - "@esbuild/openbsd-x64": "0.24.0", - "@esbuild/sunos-x64": "0.24.0", - "@esbuild/win32-arm64": "0.24.0", - "@esbuild/win32-ia32": "0.24.0", - "@esbuild/win32-x64": "0.24.0" + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.0.tgz", + "integrity": "sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw==", + "dev": true, + "requires": { + "@esbuild/aix-ppc64": "0.25.0", + "@esbuild/android-arm": "0.25.0", + "@esbuild/android-arm64": "0.25.0", + "@esbuild/android-x64": "0.25.0", + "@esbuild/darwin-arm64": "0.25.0", + "@esbuild/darwin-x64": "0.25.0", + "@esbuild/freebsd-arm64": "0.25.0", + "@esbuild/freebsd-x64": "0.25.0", + "@esbuild/linux-arm": "0.25.0", + "@esbuild/linux-arm64": "0.25.0", + "@esbuild/linux-ia32": "0.25.0", + "@esbuild/linux-loong64": "0.25.0", + "@esbuild/linux-mips64el": "0.25.0", + "@esbuild/linux-ppc64": "0.25.0", + "@esbuild/linux-riscv64": "0.25.0", + "@esbuild/linux-s390x": "0.25.0", + "@esbuild/linux-x64": "0.25.0", + "@esbuild/netbsd-arm64": "0.25.0", + "@esbuild/netbsd-x64": "0.25.0", + "@esbuild/openbsd-arm64": "0.25.0", + "@esbuild/openbsd-x64": "0.25.0", + "@esbuild/sunos-x64": "0.25.0", + "@esbuild/win32-arm64": "0.25.0", + "@esbuild/win32-ia32": "0.25.0", + "@esbuild/win32-x64": "0.25.0" } }, "escalade": { @@ -6269,18 +6418,18 @@ "dev": true }, "eslint": { - "version": "9.17.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.17.0.tgz", - "integrity": "sha512-evtlNcpJg+cZLcnVKwsai8fExnqjGPicK7gnUtlNuzu+Fv9bI0aLpND5T44VLQtoMEnI57LoXO9XAkIXwohKrA==", + "version": "9.20.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.20.1.tgz", + "integrity": "sha512-m1mM33o6dBUjxl2qb6wv6nGNwCAsns1eKtaQ4l/NPHeTvhiUPbtdfMyktxN4B3fgHIgsYh1VT3V9txblpQHq+g==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.19.0", - "@eslint/core": "^0.9.0", + "@eslint/core": "^0.11.0", "@eslint/eslintrc": "^3.2.0", - "@eslint/js": "9.17.0", - "@eslint/plugin-kit": "^0.2.3", + "@eslint/js": "9.20.0", + "@eslint/plugin-kit": "^0.2.5", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.1", @@ -6326,15 +6475,6 @@ "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "dev": true }, - "glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "requires": { - "is-glob": "^4.0.3" - } - }, "minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -6436,6 +6576,12 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, + "fast-content-type-parse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-2.0.1.tgz", + "integrity": "sha512-nGqtvLrj5w0naR6tDPfB4cUmYCqouzyQiz6C5y/LtcDllJdrcc6WaWW6iXyIIOErTa/XRybj28aasdn4LkVk6Q==", + "dev": true + }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -6443,16 +6589,27 @@ "dev": true }, "fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "micromatch": "^4.0.8" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + } } }, "fast-json-stable-stringify": { @@ -6468,9 +6625,9 @@ "dev": true }, "fast-xml-parser": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.5.1.tgz", - "integrity": "sha512-y655CeyUQ+jj7KBbYMc4FG01V8ZQqjN+gDYGJ50RtfsUB8iG9AmwmwoAgeKLJdmueKKMrH1RJ7yXHTSoczdv5w==", + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.5.2.tgz", + "integrity": "sha512-xmnYV9o0StIz/0ArdzmWTxn9oDy0lH8Z80/8X/TD2EUQKXY4DHxoT9mYBqgGIG17DgddCJtH1M6DriMbalNsAA==", "dev": true, "requires": { "strnum": "^1.0.5" @@ -6483,9 +6640,9 @@ "dev": true }, "fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.0.tgz", + "integrity": "sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA==", "dev": true, "requires": { "reusify": "^1.0.4" @@ -6536,9 +6693,9 @@ } }, "flatted": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", - "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", "dev": true }, "foreground-child": { @@ -6558,9 +6715,9 @@ "dev": true }, "fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "dev": true, "optional": true }, @@ -6583,21 +6740,31 @@ "dev": true }, "get-intrinsic": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.6.tgz", - "integrity": "sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", + "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", "dev": true, "requires": { "call-bind-apply-helpers": "^1.0.1", - "dunder-proto": "^1.0.0", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0", "function-bind": "^1.1.2", + "get-proto": "^1.0.0", "gopd": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", - "math-intrinsics": "^1.0.0" + "math-intrinsics": "^1.1.0" + } + }, + "get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "requires": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" } }, "glob": { @@ -6615,18 +6782,18 @@ } }, "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "requires": { - "is-glob": "^4.0.1" + "is-glob": "^4.0.3" } }, "globals": { - "version": "15.13.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-15.13.0.tgz", - "integrity": "sha512-49TewVEz0UxZjr1WYYsWpPrhyC/B/pA8Bq0fUmet2n+eR7yn0IvNzNaoBwnK6mdkzcN+se7Ez9zUgULTz2QH4g==", + "version": "15.15.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.15.0.tgz", + "integrity": "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==", "dev": true }, "gopd": { @@ -6700,9 +6867,9 @@ "dev": true }, "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", "dev": true, "requires": { "parent-module": "^1.0.0", @@ -6895,17 +7062,17 @@ } }, "knip": { - "version": "5.41.0", - "resolved": "https://registry.npmjs.org/knip/-/knip-5.41.0.tgz", - "integrity": "sha512-W8omBs+jhC/P/A3kC0xdEGrhYVmsmWafUVz0wzQjYfoaK0YNEBPPLptUeqwQl6ihYVqzb/X0zs50gY9Akw1Bww==", + "version": "5.44.4", + "resolved": "https://registry.npmjs.org/knip/-/knip-5.44.4.tgz", + "integrity": "sha512-Ryn8LwWHLId8jSK1DgtT0hmg5DbzkqAtH+Gg3vZJpmSMgGHMspej9Ag+qKTm8wsPLDjVetuEz/lIsobo0XCMvQ==", "dev": true, "requires": { - "@nodelib/fs.walk": "1.2.8", + "@nodelib/fs.walk": "3.0.1", "@snyk/github-codeowners": "1.1.0", "easy-table": "1.2.0", - "enhanced-resolve": "^5.17.1", - "fast-glob": "^3.3.2", - "jiti": "^2.4.0", + "enhanced-resolve": "^5.18.0", + "fast-glob": "^3.3.3", + "jiti": "^2.4.2", "js-yaml": "^4.1.0", "minimist": "^1.2.8", "picocolors": "^1.1.0", @@ -6918,18 +7085,38 @@ "zod-validation-error": "^3.0.3" }, "dependencies": { + "@nodelib/fs.scandir": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-4.0.1.tgz", + "integrity": "sha512-vAkI715yhnmiPupY+dq+xenu5Tdf2TBQ66jLvBIcCddtz+5Q8LbMKaf9CIJJreez8fQ8fgaY+RaywQx8RJIWpw==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "4.0.0", + "run-parallel": "^1.2.0" + } + }, + "@nodelib/fs.stat": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-4.0.0.tgz", + "integrity": "sha512-ctr6bByzksKRCV0bavi8WoQevU6plSp2IkllIsEqaiKe2mwNNnaluhnRhcsgGZHrrHk57B3lf95MkLMO3STYcg==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-3.0.1.tgz", + "integrity": "sha512-nIh/M6Kh3ZtOmlY00DaUYB4xeeV6F3/ts1l29iwl3/cfyY/OuCfUx+v08zgx8TKPTifXRcjjqVQ4KB2zOYSbyw==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "4.0.1", + "fastq": "^1.15.0" + } + }, "parse-ms": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-4.0.0.tgz", "integrity": "sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==", "dev": true }, - "picomatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", - "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", - "dev": true - }, "pretty-ms": { "version": "9.2.0", "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.2.0.tgz", @@ -7013,9 +7200,9 @@ } }, "math-intrinsics": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.0.0.tgz", - "integrity": "sha512-4MqMiKP90ybymYvsut0CH2g4XWbfLtmlCkXmtmdcDCxNB+mQcu1w/1+L/VD7vi/PSv7X2JYV7SCcR+jiPXnQtA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", "dev": true }, "merge2": { @@ -7032,6 +7219,14 @@ "requires": { "braces": "^3.0.3", "picomatch": "^2.3.1" + }, + "dependencies": { + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + } } }, "minimalistic-assert": { @@ -7089,6 +7284,22 @@ "yargs-unparser": "^2.0.0" }, "dependencies": { + "chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + } + }, "cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -7100,6 +7311,12 @@ "wrap-ansi": "^7.0.0" } }, + "diff": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "dev": true + }, "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -7119,6 +7336,15 @@ "once": "^1.3.0" } }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, "minimatch": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", @@ -7128,6 +7354,21 @@ "brace-expansion": "^2.0.1" } }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, "string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -7198,16 +7439,16 @@ "dev": true }, "monocart-coverage-reports": { - "version": "2.11.4", - "resolved": "https://registry.npmjs.org/monocart-coverage-reports/-/monocart-coverage-reports-2.11.4.tgz", - "integrity": "sha512-hFhfhIzD7Yv1fNJgnUVvrEpnwqB44KwSGbghOM9C8AMIVon5ZLRlspbWz+uwW04Yhgvo5WmtPEmX+mnET2VcGA==", + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/monocart-coverage-reports/-/monocart-coverage-reports-2.12.1.tgz", + "integrity": "sha512-pfHpUTX00a5Ts9WuBxEnQjH957M3H4tRTASZRVtSDKzyE8xRLkSat0fcz1AJpWQv7QBB2aP39+eeQUccWToh6Q==", "dev": true, "requires": { "acorn": "^8.14.0", "acorn-loose": "^8.4.0", "acorn-walk": "^8.3.4", - "commander": "^12.1.0", - "console-grid": "^2.2.2", + "commander": "^13.1.0", + "console-grid": "^2.2.3", "eight-colors": "^1.3.1", "foreground-child": "^3.3.0", "istanbul-lib-coverage": "^3.2.2", @@ -7218,9 +7459,9 @@ }, "dependencies": { "commander": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", - "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz", + "integrity": "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==", "dev": true } } @@ -7250,9 +7491,9 @@ "dev": true }, "object-inspect": { - "version": "1.13.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", - "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", "dev": true }, "once": { @@ -7361,34 +7602,25 @@ "dev": true }, "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", "dev": true }, "playwright": { - "version": "1.49.1", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.49.1.tgz", - "integrity": "sha512-VYL8zLoNTBxVOrJBbDuRgDWa3i+mfQgDTrL8Ah9QXZ7ax4Dsj0MSq5bYgytRnDVVe+njoKnfsYkH3HzqVj5UZA==", + "version": "1.50.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.50.1.tgz", + "integrity": "sha512-G8rwsOQJ63XG6BbKj2w5rHeavFjy5zynBA9zsJMMtBoe/Uf757oG12NXz6e6OirF7RCrTVAKFXbLmn1RbL7Qaw==", "dev": true, "requires": { "fsevents": "2.3.2", - "playwright-core": "1.49.1" - }, - "dependencies": { - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - } + "playwright-core": "1.50.1" } }, "playwright-core": { - "version": "1.49.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.49.1.tgz", - "integrity": "sha512-BzmpVcs4kE2CH15rWfzpjzVGhWERJfmnXmniSyKeRZUs9Ws65m+RGIi7mjJK/euCegfn3i7jvqWeWyHe9y3Vgg==", + "version": "1.50.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.50.1.tgz", + "integrity": "sha512-ra9fsNWayuYumt+NiM069M6OkcRb1FZSK8bgi66AtpFoWkg2+y0bJSNmkFrWhMbEBbVKC/EruAHH3g0zmtwGmQ==", "dev": true }, "plur": { @@ -7422,12 +7654,12 @@ "dev": true }, "qs": { - "version": "6.13.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.1.tgz", - "integrity": "sha512-EJPeIn0CYrGu+hli1xilKAPXODtJ12T0sP63Ijx2/khC2JtuaN3JyNIpvmnkmaEtha9ocbG4A4cMcr+TvqvwQg==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", + "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", "dev": true, "requires": { - "side-channel": "^1.0.6" + "side-channel": "^1.1.0" } }, "queue-microtask": { @@ -7446,13 +7678,10 @@ } }, "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "requires": { - "picomatch": "^2.2.1" - } + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true }, "reduce-flatten": { "version": "2.0.0", @@ -7524,9 +7753,9 @@ } }, "semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", "dev": true }, "serialize-javascript": { @@ -7760,9 +7989,9 @@ } }, "ts-api-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", - "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.0.1.tgz", + "integrity": "sha512-dnlgjFSVetynI8nzgJ+qF62efpglpWRk8isUEWZGWlJYySCTD6aKvbUDu+zbPeDakk3bg5H4XpitHukgfL1m9w==", "dev": true, "requires": {} }, @@ -7807,20 +8036,20 @@ } }, "typescript": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", - "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", + "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", "dev": true }, "typescript-eslint": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.18.1.tgz", - "integrity": "sha512-Mlaw6yxuaDEPQvb/2Qwu3/TfgeBHy9iTJ3mTwe7OvpPmF6KPQjVOfGyEJpPv6Ez2C34OODChhXrzYw/9phI0MQ==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.24.1.tgz", + "integrity": "sha512-cw3rEdzDqBs70TIcb0Gdzbt6h11BSs2pS0yaq7hDWDBtCCSei1pPSUXE9qUdQ/Wm9NgFg8mKtMt1b8fTHIl1jA==", "dev": true, "requires": { - "@typescript-eslint/eslint-plugin": "8.18.1", - "@typescript-eslint/parser": "8.18.1", - "@typescript-eslint/utils": "8.18.1" + "@typescript-eslint/eslint-plugin": "8.24.1", + "@typescript-eslint/parser": "8.24.1", + "@typescript-eslint/utils": "8.24.1" } }, "typical": { @@ -8046,9 +8275,9 @@ "dev": true }, "zod": { - "version": "3.24.1", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.1.tgz", - "integrity": "sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A==", + "version": "3.24.2", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.2.tgz", + "integrity": "sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==", "dev": true }, "zod-validation-error": { diff --git a/package.json b/package.json index d89e98d368c0b..ef2c80f8b91c2 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "typescript", "author": "Microsoft Corp.", "homepage": "https://www.typescriptlang.org/", - "version": "5.8.0", + "version": "5.9.0", "license": "Apache-2.0", "description": "TypeScript is a language for application scale JavaScript development", "keywords": [ @@ -40,48 +40,48 @@ ], "devDependencies": { "@dprint/formatter": "^0.4.1", - "@dprint/typescript": "0.93.3", + "@dprint/typescript": "0.93.4", "@esfx/canceltoken": "^1.0.0", - "@eslint/js": "^9.17.0", - "@octokit/rest": "^21.0.2", + "@eslint/js": "^9.20.0", + "@octokit/rest": "^21.1.1", "@types/chai": "^4.3.20", - "@types/diff": "^5.2.3", + "@types/diff": "^7.0.1", "@types/minimist": "^1.2.5", "@types/mocha": "^10.0.10", "@types/ms": "^0.7.34", "@types/node": "latest", "@types/source-map-support": "^0.5.10", "@types/which": "^3.0.4", - "@typescript-eslint/rule-tester": "^8.18.1", - "@typescript-eslint/type-utils": "^8.18.1", - "@typescript-eslint/utils": "^8.18.1", + "@typescript-eslint/rule-tester": "^8.24.1", + "@typescript-eslint/type-utils": "^8.24.1", + "@typescript-eslint/utils": "^8.24.1", "azure-devops-node-api": "^14.1.0", "c8": "^10.1.3", "chai": "^4.5.0", - "chalk": "^4.1.2", - "chokidar": "^3.6.0", - "diff": "^5.2.0", - "dprint": "^0.47.6", - "esbuild": "^0.24.0", - "eslint": "^9.17.0", + "chokidar": "^4.0.3", + "diff": "^7.0.0", + "dprint": "^0.49.0", + "esbuild": "^0.25.0", + "eslint": "^9.20.1", "eslint-formatter-autolinkable-stylish": "^1.4.0", "eslint-plugin-regexp": "^2.7.0", - "fast-xml-parser": "^4.5.1", + "fast-xml-parser": "^4.5.2", "glob": "^10.4.5", - "globals": "^15.13.0", + "globals": "^15.15.0", "hereby": "^1.10.0", "jsonc-parser": "^3.3.1", - "knip": "^5.41.0", + "knip": "^5.44.4", "minimist": "^1.2.8", "mocha": "^10.8.2", "mocha-fivemat-progress-reporter": "^0.1.0", - "monocart-coverage-reports": "^2.11.4", + "monocart-coverage-reports": "^2.12.1", "ms": "^2.1.3", - "playwright": "^1.49.1", + "picocolors": "^1.1.1", + "playwright": "^1.50.1", "source-map-support": "^0.5.21", "tslib": "^2.8.1", - "typescript": "^5.7.2", - "typescript-eslint": "^8.18.1", + "typescript": "^5.7.3", + "typescript-eslint": "^8.24.1", "which": "^3.0.1" }, "overrides": { diff --git a/scripts/browserIntegrationTest.mjs b/scripts/browserIntegrationTest.mjs index 7b3021f979350..68c2a14e46d7f 100644 --- a/scripts/browserIntegrationTest.mjs +++ b/scripts/browserIntegrationTest.mjs @@ -1,6 +1,6 @@ -import chalk from "chalk"; import { readFileSync } from "fs"; import { join } from "path"; +import pc from "picocolors"; import playwright from "playwright"; // Turning this on will leave the Chromium browser open, giving you the @@ -17,7 +17,7 @@ for (const browserType of browsers) { /** @type {(err: Error) => void} */ const errorCaught = err => { - console.error(chalk.red("There was an error running built/typescript.js in " + browserType)); + console.error(pc.red("There was an error running built/typescript.js in " + browserType)); console.log(err.toString()); process.exitCode = 1; }; diff --git a/scripts/build/tests.mjs b/scripts/build/tests.mjs index ba9e03548a01b..c81cd7800183b 100644 --- a/scripts/build/tests.mjs +++ b/scripts/build/tests.mjs @@ -1,8 +1,8 @@ import { CancelError } from "@esfx/canceltoken"; -import chalk from "chalk"; import fs from "fs"; import os from "os"; import path from "path"; +import pc from "picocolors"; import { findUpFile, @@ -48,12 +48,12 @@ export async function runConsoleTests(runJs, defaultReporter, runInParallel, opt if (coverage && testTimeout) { testTimeout *= 2; - console.log(chalk.yellowBright(`[coverage] doubling test timeout to ${testTimeout}ms...`)); + console.log(pc.yellowBright(`[coverage] doubling test timeout to ${testTimeout}ms...`)); } if (!cmdLineOptions.dirty) { if (options.watching) { - console.log(chalk.yellowBright(`[watch] cleaning test directories...`)); + console.log(pc.yellowBright(`[watch] cleaning test directories...`)); } await cleanTestDirs(); await rimraf(coverageDir); @@ -81,7 +81,7 @@ export async function runConsoleTests(runJs, defaultReporter, runInParallel, opt } if (options.watching) { - console.log(chalk.yellowBright(`[watch] running tests...`)); + console.log(pc.yellowBright(`[watch] running tests...`)); } if (tests || skipSysTests || runners || light || testTimeout || taskConfigsFolder || keepFailed || shards || shardId) { @@ -178,7 +178,7 @@ export async function runConsoleTests(runJs, defaultReporter, runInParallel, opt } if (options.watching) { - console.error(`${chalk.redBright(error.name)}: ${error.message}`); + console.error(`${pc.redBright(error.name)}: ${error.message}`); } else { process.exitCode = typeof errorStatus === "number" ? errorStatus : 2; diff --git a/scripts/build/utils.mjs b/scripts/build/utils.mjs index 4ffa94aaded00..86fe282d10823 100644 --- a/scripts/build/utils.mjs +++ b/scripts/build/utils.mjs @@ -1,9 +1,9 @@ import { CancelError } from "@esfx/canceltoken"; import assert from "assert"; -import chalk from "chalk"; import { spawn } from "child_process"; import fs from "fs"; import JSONC from "jsonc-parser"; +import pc from "picocolors"; import which from "which"; /** @import { CancelToken } from "@esfx/canceltoken" */ @@ -26,7 +26,7 @@ export async function exec(cmd, args, options = {}) { return /**@type {Promise<{exitCode?: number}>}*/ (new Promise((resolve, reject) => { const { ignoreExitCode, waitForExit = true, ignoreStdout } = options; - if (!options.hidePrompt) console.log(`> ${chalk.green(cmd)} ${args.join(" ")}`); + if (!options.hidePrompt) console.log(`> ${pc.green(cmd)} ${args.join(" ")}`); const proc = spawn(which.sync(cmd), args, { stdio: waitForExit ? ignoreStdout ? ["inherit", "ignore", "inherit"] : "inherit" : "ignore", detached: !waitForExit }); if (waitForExit) { const onCanceled = () => { diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index c83e11fc2a4a0..27ec079f614ab 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -3951,6 +3951,10 @@ export function getContainerFlags(node: Node): ContainerFlags { case SyntaxKind.ClassStaticBlockDeclaration: return ContainerFlags.IsContainer | ContainerFlags.IsControlFlowContainer | ContainerFlags.HasLocals | ContainerFlags.IsFunctionLike; + case SyntaxKind.JSDocImportTag: + // treat as a container to prevent using an enclosing effective host, ensuring import bindings are scoped correctly + return ContainerFlags.IsContainer | ContainerFlags.IsControlFlowContainer | ContainerFlags.HasLocals; + case SyntaxKind.FunctionExpression: case SyntaxKind.ArrowFunction: return ContainerFlags.IsContainer | ContainerFlags.IsControlFlowContainer | ContainerFlags.HasLocals | ContainerFlags.IsFunctionLike | ContainerFlags.IsFunctionExpression; diff --git a/src/compiler/builderState.ts b/src/compiler/builderState.ts index cf9932e94631b..625a64e266fee 100644 --- a/src/compiler/builderState.ts +++ b/src/compiler/builderState.ts @@ -206,7 +206,7 @@ export namespace BuilderState { * Gets the path to reference file from file name, it could be resolvedPath if present otherwise path */ function getReferencedFileFromFileName(program: Program, fileName: string, sourceFileDirectory: Path, getCanonicalFileName: GetCanonicalFileName): Path { - return toPath(program.getProjectReferenceRedirect(fileName) || fileName, sourceFileDirectory, getCanonicalFileName); + return toPath(program.getRedirectFromSourceFile(fileName)?.outputDts || fileName, sourceFileDirectory, getCanonicalFileName); } /** diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index d9d1950d6b675..14b8e477a9eed 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -374,6 +374,7 @@ import { getStrictOptionValue, getSuperContainer, getSymbolNameForPrivateIdentifier, + getSynthesizedDeepClone, getTextOfIdentifierOrLiteral, getTextOfJSDocComment, getTextOfJsxAttributeName, @@ -480,6 +481,7 @@ import { isAssignmentTarget, isAutoAccessorPropertyDeclaration, isAwaitExpression, + isBigIntLiteral, isBinaryExpression, isBinaryLogicalOperator, isBindableObjectDefinePropertyCall, @@ -881,6 +883,7 @@ import { moduleExportNameTextUnescaped, ModuleInstanceState, ModuleKind, + ModuleName, ModuleResolutionKind, ModuleSpecifierResolutionHost, moduleSupportsImportAttributes, @@ -1132,6 +1135,7 @@ import { WhileStatement, WideningContext, WithStatement, + WriterContextOut, YieldExpression, } from "./_namespaces/ts.js"; import * as moduleSpecifiers from "./_namespaces/ts.moduleSpecifiers.js"; @@ -1716,11 +1720,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { typePredicateToString: (predicate, enclosingDeclaration, flags) => { return typePredicateToString(predicate, getParseTreeNode(enclosingDeclaration), flags); }, - writeSignature: (signature, enclosingDeclaration, flags, kind, writer) => { - return signatureToString(signature, getParseTreeNode(enclosingDeclaration), flags, kind, writer); + writeSignature: (signature, enclosingDeclaration, flags, kind, writer, maximumLength, verbosityLevel, out) => { + return signatureToString(signature, getParseTreeNode(enclosingDeclaration), flags, kind, writer, maximumLength, verbosityLevel, out); }, - writeType: (type, enclosingDeclaration, flags, writer) => { - return typeToString(type, getParseTreeNode(enclosingDeclaration), flags, writer); + writeType: (type, enclosingDeclaration, flags, writer, maximumLength, verbosityLevel, out) => { + return typeToString(type, getParseTreeNode(enclosingDeclaration), flags, writer, maximumLength, verbosityLevel, out); }, writeSymbol: (symbol, enclosingDeclaration, meaning, flags, writer) => { return symbolToString(symbol, getParseTreeNode(enclosingDeclaration), meaning, flags, writer); @@ -1836,6 +1840,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { getNullType: () => nullType, getESSymbolType: () => esSymbolType, getNeverType: () => neverType, + getNonPrimitiveType: () => nonPrimitiveType, getOptionalType: () => optionalType, getPromiseType: () => getGlobalPromiseType(/*reportErrors*/ false), getPromiseLikeType: () => getGlobalPromiseLikeType(/*reportErrors*/ false), @@ -1932,6 +1937,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { typeHasCallOrConstructSignatures, getSymbolFlags, getTypeArgumentsForResolvedSignature, + isLibType, }; function getTypeArgumentsForResolvedSignature(signature: Signature) { @@ -2316,6 +2322,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { var inferenceContexts: (InferenceContext | undefined)[] = []; var inferenceContextCount = 0; + var activeTypeMappers: TypeMapper[] = []; + var activeTypeMappersCaches: Map[] = []; + var activeTypeMappersCount = 0; + var emptyStringType = getStringLiteralType(""); var zeroType = getNumberLiteralType(0); var zeroBigIntType = getBigIntLiteralType({ negative: false, base10Value: "0" }); @@ -3063,13 +3073,17 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return isForInOrOfStatement(grandparent) && isSameScopeDescendentOf(usage, grandparent.expression, declContainer); } - function isUsedInFunctionOrInstanceProperty(usage: Node, declaration: Node): boolean { + function isUsedInFunctionOrInstanceProperty(usage: Node, declaration: Node) { + return isUsedInFunctionOrInstancePropertyWorker(usage, declaration); + } + + function isUsedInFunctionOrInstancePropertyWorker(usage: Node, declaration: Node): boolean { return !!findAncestor(usage, current => { if (current === declContainer) { return "quit"; } if (isFunctionLike(current)) { - return true; + return !getImmediatelyInvokedFunctionExpression(current); } if (isClassStaticBlockDeclaration(current)) { return declaration.pos < usage.pos; @@ -3102,6 +3116,17 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } } + + const decorator = tryCast(current.parent, isDecorator); + if (decorator && decorator.expression === current) { + if (isParameter(decorator.parent)) { + return isUsedInFunctionOrInstancePropertyWorker(decorator.parent.parent.parent, declaration) ? true : "quit"; + } + if (isMethodDeclaration(decorator.parent)) { + return isUsedInFunctionOrInstancePropertyWorker(decorator.parent.parent, declaration) ? true : "quit"; + } + } + return false; }); } @@ -4699,7 +4724,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { ); } else if (resolvedModule.resolvedUsingTsExtension && shouldRewrite) { - const redirect = host.getResolvedProjectReferenceToRedirect(sourceFile.path); + const redirect = host.getRedirectFromSourceFile(sourceFile.path)?.resolvedRef; if (redirect) { const ignoreCase = !host.useCaseSensitiveFileNames(); const ownRootDir = host.getCommonSourceDirectory(); @@ -4794,9 +4819,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (moduleNotFoundError) { // See if this was possibly a projectReference redirect 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); + const redirect = host.getRedirectFromSourceFile(resolvedModule.resolvedFileName); + if (redirect?.outputDts) { + error(errorNode, Diagnostics.Output_file_0_has_not_been_built_from_source_file_1, redirect.outputDts, resolvedModule.resolvedFileName); return undefined; } } @@ -6027,7 +6052,16 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } - function signatureToString(signature: Signature, enclosingDeclaration?: Node, flags = TypeFormatFlags.None, kind?: SignatureKind, writer?: EmitTextWriter): string { + function signatureToString( + signature: Signature, + enclosingDeclaration?: Node, + flags = TypeFormatFlags.None, + kind?: SignatureKind, + writer?: EmitTextWriter, + maximumLength?: number, + verbosityLevel?: number, + out?: WriterContextOut, + ): string { return writer ? signatureToStringWorker(writer).getText() : usingSingleLineStringWriter(signatureToStringWorker); function signatureToStringWorker(writer: EmitTextWriter) { @@ -6038,7 +6072,17 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { else { sigOutput = kind === SignatureKind.Construct ? SyntaxKind.ConstructSignature : SyntaxKind.CallSignature; } - const sig = nodeBuilder.signatureToSignatureDeclaration(signature, sigOutput, enclosingDeclaration, toNodeBuilderFlags(flags) | NodeBuilderFlags.IgnoreErrors | NodeBuilderFlags.WriteTypeParametersInQualifiedName); + const sig = nodeBuilder.signatureToSignatureDeclaration( + signature, + sigOutput, + enclosingDeclaration, + toNodeBuilderFlags(flags) | NodeBuilderFlags.IgnoreErrors | NodeBuilderFlags.WriteTypeParametersInQualifiedName, + /*internalFlags*/ undefined, + /*tracker*/ undefined, + maximumLength, + verbosityLevel, + out, + ); const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon(); const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration); printer.writeNode(EmitHint.Unspecified, sig!, /*sourceFile*/ sourceFile, getTrailingSemicolonDeferringWriter(writer)); // TODO: GH#18217 @@ -6046,9 +6090,27 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } - function typeToString(type: Type, enclosingDeclaration?: Node, flags: TypeFormatFlags = TypeFormatFlags.AllowUniqueESSymbolType | TypeFormatFlags.UseAliasDefinedOutsideCurrentScope, writer: EmitTextWriter = createTextWriter("")): string { - const noTruncation = compilerOptions.noErrorTruncation || flags & TypeFormatFlags.NoTruncation; - const typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | NodeBuilderFlags.IgnoreErrors | (noTruncation ? NodeBuilderFlags.NoTruncation : NodeBuilderFlags.None), /*internalFlags*/ undefined); + function typeToString( + type: Type, + enclosingDeclaration?: Node, + flags: TypeFormatFlags = TypeFormatFlags.AllowUniqueESSymbolType | TypeFormatFlags.UseAliasDefinedOutsideCurrentScope, + writer: EmitTextWriter = createTextWriter(""), + maximumLength?: number, + verbosityLevel?: number, + out?: WriterContextOut, + ): string { + const noTruncation = compilerOptions.noErrorTruncation || + flags & TypeFormatFlags.NoTruncation; + const typeNode = nodeBuilder.typeToTypeNode( + type, + enclosingDeclaration, + toNodeBuilderFlags(flags) | NodeBuilderFlags.IgnoreErrors | (noTruncation ? NodeBuilderFlags.NoTruncation : 0), + /*internalFlags*/ undefined, + /*tracker*/ undefined, + maximumLength, + verbosityLevel, + out, + ); if (typeNode === undefined) return Debug.fail("should always get typenode"); // The unresolved type gets a synthesized comment on `any` to hint to users that it's not a plain `any`. // Otherwise, we always strip comments out. @@ -6057,7 +6119,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { printer.writeNode(EmitHint.Unspecified, typeNode, /*sourceFile*/ sourceFile, writer); const result = writer.getText(); - const maxLength = noTruncation ? noTruncationMaximumTruncationLength * 2 : defaultMaximumTruncationLength * 2; + const maxLength = maximumLength || (noTruncation ? noTruncationMaximumTruncationLength * 2 : defaultMaximumTruncationLength * 2); if (maxLength && result && result.length >= maxLength) { return result.substr(0, maxLength - "...".length) + "..."; } @@ -6127,7 +6189,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { }, isOptionalParameter, isUndefinedIdentifierExpression(node: Identifier) { - Debug.assert(isExpressionNode(node)); return getSymbolAtLocation(node) === undefinedSymbol; }, isEntityNameVisible(context, entityName, shouldComputeAliasToMakeVisible) { @@ -6136,10 +6197,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { serializeExistingTypeNode(context, typeNode, addUndefined) { return serializeExistingTypeNode(context as NodeBuilderContext, typeNode, !!addUndefined); }, - serializeReturnTypeForSignature(syntacticContext, signatureDeclaration) { + serializeReturnTypeForSignature(syntacticContext, signatureDeclaration, symbol) { const context = syntacticContext as NodeBuilderContext; const signature = getSignatureFromDeclaration(signatureDeclaration); - const returnType = context.enclosingSymbolTypes.get(getSymbolId(getSymbolOfDeclaration(signatureDeclaration))) ?? instantiateType(getReturnTypeOfSignature(signature), context.mapper); + symbol ??= getSymbolOfDeclaration(signatureDeclaration); + const returnType = context.enclosingSymbolTypes.get(getSymbolId(symbol)) ?? instantiateType(getReturnTypeOfSignature(signature), context.mapper); return serializeInferredReturnTypeForSignature(context, signature, returnType); }, serializeTypeOfExpression(syntacticContext, expr) { @@ -6153,7 +6215,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { symbol ??= getSymbolOfDeclaration(declaration); let type = context.enclosingSymbolTypes?.get(getSymbolId(symbol)); if (type === undefined) { - type = symbol && !(symbol.flags & (SymbolFlags.TypeLiteral | SymbolFlags.Signature)) + type = symbol.flags & SymbolFlags.Accessor && declaration.kind === SyntaxKind.SetAccessor ? instantiateType(getWriteTypeOfSymbol(symbol), context.mapper) : + symbol && !(symbol.flags & (SymbolFlags.TypeLiteral | SymbolFlags.Signature)) ? instantiateType(getWidenedLiteralType(getTypeOfSymbol(symbol)), context.mapper) : errorType; } @@ -6207,6 +6270,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const context = syntacticContext as NodeBuilderContext; if (context.bundled || context.enclosingFile !== getSourceFileOfNode(lit)) { let name = lit.text; + const originalName = name; const nodeSymbol = getNodeLinks(parent).resolvedSymbol; const meaning = parent.isTypeOf ? SymbolFlags.Value : SymbolFlags.Type; const parentSymbol = nodeSymbol @@ -6227,7 +6291,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { context.tracker.reportLikelyUnsafeImportRequiredError(name); } } - return name; + if (name !== originalName) { + return name; + } } }, canReuseTypeNode(context, typeNode) { @@ -6265,20 +6331,21 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { }; return { syntacticBuilderResolver, - typeToTypeNode: (type: Type, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => typeToTypeNodeHelper(type, context)), - typePredicateToTypePredicateNode: (typePredicate: TypePredicate, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => typePredicateToTypePredicateNodeHelper(typePredicate, context)), - serializeTypeForExpression: (expr: Expression, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => syntacticNodeBuilder.serializeTypeOfExpression(expr, context)), - serializeTypeForDeclaration: (declaration: HasInferredType, symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => syntacticNodeBuilder.serializeTypeOfDeclaration(declaration, symbol, context)), - serializeReturnTypeForSignature: (signature: SignatureDeclaration, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => syntacticNodeBuilder.serializeReturnTypeForSignature(signature, getSymbolOfDeclaration(signature), context)), - indexInfoToIndexSignatureDeclaration: (indexInfo: IndexInfo, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => indexInfoToIndexSignatureDeclarationHelper(indexInfo, context, /*typeNode*/ undefined)), - signatureToSignatureDeclaration: (signature: Signature, kind: SignatureDeclaration["kind"], enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => signatureToSignatureDeclarationHelper(signature, kind, context)), - symbolToEntityName: (symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => symbolToName(symbol, context, meaning, /*expectsIdentifier*/ false)), - symbolToExpression: (symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => symbolToExpression(symbol, context, meaning)), - symbolToTypeParameterDeclarations: (symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => typeParametersToTypeParameterDeclarations(symbol, context)), - symbolToParameterDeclaration: (symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => symbolToParameterDeclaration(symbol, context)), - typeParameterToDeclaration: (parameter: TypeParameter, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => typeParameterToDeclaration(parameter, context)), - symbolTableToDeclarationStatements: (symbolTable: SymbolTable, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => symbolTableToDeclarationStatements(symbolTable, context)), - symbolToNode: (symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => symbolToNode(symbol, context, meaning)), + typeToTypeNode: (type: Type, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker, maximumLength?: number, verbosityLevel?: number, out?: WriterContextOut) => withContext(enclosingDeclaration, flags, internalFlags, tracker, maximumLength, verbosityLevel, context => typeToTypeNodeHelper(type, context), out), + typePredicateToTypePredicateNode: (typePredicate: TypePredicate, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*maximumLength*/ undefined, /*verbosityLevel*/ undefined, context => typePredicateToTypePredicateNodeHelper(typePredicate, context)), + serializeTypeForDeclaration: (declaration: HasInferredType, symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*maximumLength*/ undefined, /*verbosityLevel*/ undefined, context => syntacticNodeBuilder.serializeTypeOfDeclaration(declaration, symbol, context)), + serializeReturnTypeForSignature: (signature: SignatureDeclaration, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*maximumLength*/ undefined, /*verbosityLevel*/ undefined, context => syntacticNodeBuilder.serializeReturnTypeForSignature(signature, getSymbolOfDeclaration(signature), context)), + serializeTypeForExpression: (expr: Expression, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*maximumLength*/ undefined, /*verbosityLevel*/ undefined, context => syntacticNodeBuilder.serializeTypeOfExpression(expr, context)), + indexInfoToIndexSignatureDeclaration: (indexInfo: IndexInfo, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*maximumLength*/ undefined, /*verbosityLevel*/ undefined, context => indexInfoToIndexSignatureDeclarationHelper(indexInfo, context, /*typeNode*/ undefined)), + signatureToSignatureDeclaration: (signature: Signature, kind: SignatureDeclaration["kind"], enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker, maximumLength?: number, verbosityLevel?: number, out?: WriterContextOut) => withContext(enclosingDeclaration, flags, internalFlags, tracker, maximumLength, verbosityLevel, context => signatureToSignatureDeclarationHelper(signature, kind, context), out), + symbolToEntityName: (symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*maximumLength*/ undefined, /*verbosityLevel*/ undefined, context => symbolToName(symbol, context, meaning, /*expectsIdentifier*/ false)), + symbolToExpression: (symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*maximumLength*/ undefined, /*verbosityLevel*/ undefined, context => symbolToExpression(symbol, context, meaning)), + symbolToTypeParameterDeclarations: (symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*maximumLength*/ undefined, /*verbosityLevel*/ undefined, context => typeParametersToTypeParameterDeclarations(symbol, context)), + symbolToParameterDeclaration: (symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*maximumLength*/ undefined, /*verbosityLevel*/ undefined, context => symbolToParameterDeclaration(symbol, context)), + typeParameterToDeclaration: (parameter: TypeParameter, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker, maximumLength?: number, verbosityLevel?: number, out?: WriterContextOut) => withContext(enclosingDeclaration, flags, internalFlags, tracker, maximumLength, verbosityLevel, context => typeParameterToDeclaration(parameter, context), out), + symbolTableToDeclarationStatements: (symbolTable: SymbolTable, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*maximumLength*/ undefined, /*verbosityLevel*/ undefined, context => symbolTableToDeclarationStatements(symbolTable, context)), + symbolToNode: (symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*maximumLength*/ undefined, /*verbosityLevel*/ undefined, context => symbolToNode(symbol, context, meaning)), + symbolToDeclarations, }; function getTypeFromTypeNode(context: NodeBuilderContext, node: TypeNode, noMappedTypes?: false): Type; @@ -6338,16 +6405,101 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return symbolToExpression(symbol, context, meaning); } - function withContext(enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined, internalFlags: InternalNodeBuilderFlags | undefined, tracker: SymbolTracker | undefined, cb: (context: NodeBuilderContext) => T): T | undefined { + function symbolToDeclarations(symbol: Symbol, meaning: SymbolFlags, flags: NodeBuilderFlags, maximumLength?: number, verbosityLevel?: number, out?: WriterContextOut): Declaration[] { + const nodes = withContext( + /*enclosingDeclaration*/ undefined, + flags, + /*internalFlags*/ undefined, + /*tracker*/ undefined, + maximumLength, + verbosityLevel, + context => symbolToDeclarationsWorker(symbol, context), + out, + ); + return mapDefined(nodes, node => { + switch (node.kind) { + case SyntaxKind.ClassDeclaration: + return simplifyClassDeclaration(node as ClassDeclaration, symbol); + case SyntaxKind.EnumDeclaration: + return simplifyModifiers(node as EnumDeclaration, isEnumDeclaration, symbol); + case SyntaxKind.InterfaceDeclaration: + return simplifyInterfaceDeclaration(node as InterfaceDeclaration, symbol, meaning); + case SyntaxKind.ModuleDeclaration: + return simplifyModifiers(node as ModuleDeclaration, isModuleDeclaration, symbol); + default: + return undefined; + } + }); + } + + function simplifyClassDeclaration(classDecl: ClassDeclaration, symbol: Symbol): Declaration { + const classDeclarations = filter(symbol.declarations, isClassLike); + const originalClassDecl = classDeclarations && classDeclarations.length > 0 ? classDeclarations[0] : classDecl; + const modifiers = getEffectiveModifierFlags(originalClassDecl) & ~(ModifierFlags.Export | ModifierFlags.Ambient); + const isAnonymous = isClassExpression(originalClassDecl); + if (isAnonymous) { + classDecl = factory.updateClassDeclaration( + classDecl, + classDecl.modifiers, + /*name*/ undefined, + classDecl.typeParameters, + classDecl.heritageClauses, + classDecl.members, + ); + } + return factory.replaceModifiers(classDecl, modifiers); + } + + function simplifyModifiers(newDecl: Declaration & HasModifiers, isDeclKind: (d: Declaration) => boolean, symbol: Symbol): Declaration & HasModifiers { + const decls = filter(symbol.declarations, isDeclKind); + const declWithModifiers = decls && decls.length > 0 ? decls[0] : newDecl; + const modifiers = getEffectiveModifierFlags(declWithModifiers) & ~(ModifierFlags.Export | ModifierFlags.Ambient); + return factory.replaceModifiers(newDecl, modifiers); + } + + function simplifyInterfaceDeclaration(interfaceDecl: InterfaceDeclaration, symbol: Symbol, meaning: SymbolFlags): Declaration | undefined { + if (!(meaning & SymbolFlags.Interface)) { + return undefined; + } + return simplifyModifiers(interfaceDecl, isInterfaceDeclaration, symbol); + } + + function symbolToDeclarationsWorker(symbol: Symbol, context: NodeBuilderContext): Statement[] { + // We're already expanding the type: set it in the stack to avoid expanding it again. + const type = getDeclaredTypeOfSymbol(symbol); + context.typeStack.push(type.id); + context.typeStack.push(-1); + const table = createSymbolTable([symbol]); + const statements = symbolTableToDeclarationStatements(table, context); + context.typeStack.pop(); + context.typeStack.pop(); + return statements; + } + + function withContext( + enclosingDeclaration: Node | undefined, + flags: NodeBuilderFlags | undefined, + internalFlags: InternalNodeBuilderFlags | undefined, + tracker: SymbolTracker | undefined, + maximumLength: number | undefined, + verbosityLevel: number | undefined, + cb: (context: NodeBuilderContext) => T, + out?: WriterContextOut, + ): T | undefined { const moduleResolverHost = tracker?.trackSymbol ? tracker.moduleResolverHost : (internalFlags || InternalNodeBuilderFlags.None) & InternalNodeBuilderFlags.DoNotIncludeSymbolChain ? createBasicNodeBuilderModuleSpecifierResolutionHost(host) : undefined; + flags = flags || NodeBuilderFlags.None; + const maxTruncationLength = maximumLength || + (flags & NodeBuilderFlags.NoTruncation ? noTruncationMaximumTruncationLength : defaultMaximumTruncationLength); const context: NodeBuilderContext = { enclosingDeclaration, enclosingFile: enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration), - flags: flags || NodeBuilderFlags.None, + flags, internalFlags: internalFlags || InternalNodeBuilderFlags.None, tracker: undefined!, + maxTruncationLength, + maxExpansionDepth: verbosityLevel ?? -1, encounteredError: false, suppressReportInferenceFallback: false, reportedDiagnostic: false, @@ -6370,12 +6522,22 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { typeParameterNamesByTextNextNameCount: undefined, enclosingSymbolTypes: new Map(), mapper: undefined, + depth: 0, + typeStack: [], + out: { + canIncreaseExpansionDepth: false, + truncated: false, + }, }; context.tracker = new SymbolTrackerImpl(context, tracker, moduleResolverHost); const resultingNode = cb(context); if (context.truncating && context.flags & NodeBuilderFlags.NoTruncation) { context.tracker.reportTruncationError(); } + if (out) { + out.canIncreaseExpansionDepth = context.out.canIncreaseExpansionDepth; + out.truncated = context.out.truncated; + } return context.encounteredError ? undefined : resultingNode; } @@ -6396,23 +6558,65 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function saveRestoreFlags(context: NodeBuilderContext) { const flags = context.flags; const internalFlags = context.internalFlags; + const depth = context.depth; return restore; function restore() { context.flags = flags; context.internalFlags = internalFlags; + context.depth = depth; } } + function checkTruncationLengthIfExpanding(context: NodeBuilderContext): boolean { + return context.maxExpansionDepth >= 0 && checkTruncationLength(context); + } + function checkTruncationLength(context: NodeBuilderContext): boolean { if (context.truncating) return context.truncating; - return context.truncating = context.approximateLength > ((context.flags & NodeBuilderFlags.NoTruncation) ? noTruncationMaximumTruncationLength : defaultMaximumTruncationLength); + return context.truncating = context.approximateLength > context.maxTruncationLength; + } + + /** + * Returns true if it's possible the type or one of its components can be expanded. + */ + function canPossiblyExpandType(type: Type, context: NodeBuilderContext): boolean { + for (let i = 0; i < context.typeStack.length - 1; i++) { + if (context.typeStack[i] === type.id) { + return false; + } + } + return context.depth < context.maxExpansionDepth || + context.depth === context.maxExpansionDepth && !context.out.canIncreaseExpansionDepth; + } + + /** + * Determines if the input type should be expanded, based on how many layers of names we're allowed to expand. + * @param isAlias - Whether we're expanding a type alias or not. + */ + function shouldExpandType(type: Type, context: NodeBuilderContext, isAlias = false): boolean { + if (!isAlias && isLibType(type)) { + return false; + } + for (let i = 0; i < context.typeStack.length - 1; i++) { + if (context.typeStack[i] === type.id) { + return false; + } + } + const result = context.depth < context.maxExpansionDepth; + if (!result) { + // This type would have been expanded if `maxExpansionDepth` was increased. + context.out.canIncreaseExpansionDepth = true; + } + return result; } function typeToTypeNodeHelper(type: Type, context: NodeBuilderContext): TypeNode { const restoreFlags = saveRestoreFlags(context); + if (type) context.typeStack.push(type.id); const typeNode = typeToTypeNodeWorker(type, context); + if (type) context.typeStack.pop(); restoreFlags(); return typeNode; } @@ -6423,6 +6627,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } const inTypeAlias = context.flags & NodeBuilderFlags.InTypeAlias; context.flags &= ~NodeBuilderFlags.InTypeAlias; + let expandingEnum = false; if (!type) { if (!(context.flags & NodeBuilderFlags.AllowEmptyUnionOrIntersection)) { @@ -6491,7 +6696,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return Debug.fail("Unhandled type node kind returned from `symbolToTypeNode`."); } } - return symbolToTypeNode(type.symbol, context, SymbolFlags.Type); + if (!shouldExpandType(type, context)) { + return symbolToTypeNode(type.symbol, context, SymbolFlags.Type); + } + else { + expandingEnum = true; + } } if (type.flags & TypeFlags.StringLiteral) { context.approximateLength += (type as StringLiteralType).value.length + 2; @@ -6559,18 +6769,25 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } if (!inTypeAlias && type.aliasSymbol && (context.flags & NodeBuilderFlags.UseAliasDefinedOutsideCurrentScope || isTypeSymbolAccessible(type.aliasSymbol, context.enclosingDeclaration))) { - const typeArgumentNodes = mapToTypeNodes(type.aliasTypeArguments, context); - if (isReservedMemberName(type.aliasSymbol.escapedName) && !(type.aliasSymbol.flags & SymbolFlags.Class)) return factory.createTypeReferenceNode(factory.createIdentifier(""), typeArgumentNodes); - if (length(typeArgumentNodes) === 1 && type.aliasSymbol === globalArrayType.symbol) { - return factory.createArrayTypeNode(typeArgumentNodes![0]); + if (!shouldExpandType(type, context, /*isAlias*/ true)) { + const typeArgumentNodes = mapToTypeNodes(type.aliasTypeArguments, context); + if (isReservedMemberName(type.aliasSymbol.escapedName) && !(type.aliasSymbol.flags & SymbolFlags.Class)) return factory.createTypeReferenceNode(factory.createIdentifier(""), typeArgumentNodes); + if (length(typeArgumentNodes) === 1 && type.aliasSymbol === globalArrayType.symbol) { + return factory.createArrayTypeNode(typeArgumentNodes![0]); + } + return symbolToTypeNode(type.aliasSymbol, context, SymbolFlags.Type, typeArgumentNodes); } - return symbolToTypeNode(type.aliasSymbol, context, SymbolFlags.Type, typeArgumentNodes); + context.depth += 1; } const objectFlags = getObjectFlags(type); if (objectFlags & ObjectFlags.Reference) { Debug.assert(!!(type.flags & TypeFlags.Object)); + if (shouldExpandType(type, context)) { + context.depth += 1; + return createAnonymousTypeNode(type as TypeReference, /*forceClassExpansion*/ true, /*forceExpansion*/ true); + } return (type as TypeReference).node ? visitAndTransformType(type as TypeReference, typeReferenceToTypeNode) : typeReferenceToTypeNode(type as TypeReference); } if (type.flags & TypeFlags.TypeParameter || objectFlags & ObjectFlags.ClassOrInterface) { @@ -6599,6 +6816,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { context.approximateLength += idText(name).length; return factory.createTypeReferenceNode(factory.createIdentifier(idText(name)), /*typeArguments*/ undefined); } + if (objectFlags & ObjectFlags.ClassOrInterface && shouldExpandType(type, context)) { + context.depth += 1; + return createAnonymousTypeNode(type as InterfaceType, /*forceClassExpansion*/ true, /*forceExpansion*/ true); + } // Ignore constraint/default when creating a usage (as opposed to declaration) of a type parameter. if (type.symbol) { return symbolToTypeNode(type.symbol, context, SymbolFlags.Type); @@ -6611,7 +6832,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { type = (type as UnionType).origin!; } if (type.flags & (TypeFlags.Union | TypeFlags.Intersection)) { - const types = type.flags & TypeFlags.Union ? formatUnionTypes((type as UnionType).types) : (type as IntersectionType).types; + const types = type.flags & TypeFlags.Union ? formatUnionTypes((type as UnionType).types, expandingEnum) : (type as IntersectionType).types; if (length(types) === 1) { return typeToTypeNodeHelper(types[0], context); } @@ -6747,6 +6968,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const questionToken = type.declaration.questionToken ? factory.createToken(type.declaration.questionToken.kind) as QuestionToken | PlusToken | MinusToken : undefined; let appropriateConstraintTypeNode: TypeNode; let newTypeVariable: TypeReferenceNode | undefined; + let templateType = getTemplateTypeFromMappedType(type); + const typeParameter = getTypeParameterFromMappedType(type); // If the mapped type isn't `keyof` constraint-declared, _but_ still has modifiers preserved, and its naive instantiation won't preserve modifiers because its constraint isn't `keyof` constrained, we have work to do const needsModifierPreservingWrapper = !isMappedTypeWithKeyofConstraintDeclaration(type) && !(getModifiersTypeFromMappedType(type).flags & TypeFlags.Unknown) @@ -6756,9 +6979,14 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // We have a { [P in keyof T]: X } // We do this to ensure we retain the toplevel keyof-ness of the type which may be lost due to keyof distribution during `getConstraintTypeFromMappedType` if (isHomomorphicMappedTypeWithNonHomomorphicInstantiation(type) && context.flags & NodeBuilderFlags.GenerateNamesForShadowedTypeParams) { - const newParam = createTypeParameter(createSymbol(SymbolFlags.TypeParameter, "T" as __String)); - const name = typeParameterToName(newParam, context); + const newConstraintParam = createTypeParameter(createSymbol(SymbolFlags.TypeParameter, "T" as __String)); + const name = typeParameterToName(newConstraintParam, context); + const target = type.target as MappedType; newTypeVariable = factory.createTypeReferenceNode(name); + templateType = instantiateType( + getTemplateTypeFromMappedType(target), + makeArrayTypeMapper([getTypeParameterFromMappedType(target), getModifiersTypeFromMappedType(target)], [typeParameter, newConstraintParam]), + ); } appropriateConstraintTypeNode = factory.createTypeOperatorNode(SyntaxKind.KeyOfKeyword, newTypeVariable || typeToTypeNodeHelper(getModifiersTypeFromMappedType(type), context)); } @@ -6773,9 +7001,14 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { else { appropriateConstraintTypeNode = typeToTypeNodeHelper(getConstraintTypeFromMappedType(type), context); } - const typeParameterNode = typeParameterToDeclarationWithConstraint(getTypeParameterFromMappedType(type), context, appropriateConstraintTypeNode); + const typeParameterNode = typeParameterToDeclarationWithConstraint(typeParameter, context, appropriateConstraintTypeNode); + + // nameType and templateType nodes have to be in the new scope + const cleanup = enterNewScope(context, type.declaration, /*expandedParams*/ undefined, [getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(type.declaration.typeParameter))]); const nameTypeNode = type.declaration.nameType ? typeToTypeNodeHelper(getNameTypeFromMappedType(type)!, context) : undefined; - const templateTypeNode = typeToTypeNodeHelper(removeMissingType(getTemplateTypeFromMappedType(type), !!(getMappedTypeModifiers(type) & MappedTypeModifiers.IncludeOptional)), context); + const templateTypeNode = typeToTypeNodeHelper(removeMissingType(templateType, !!(getMappedTypeModifiers(type) & MappedTypeModifiers.IncludeOptional)), context); + cleanup(); + const mappedTypeNode = factory.createMappedTypeNode(readonlyToken, typeParameterNode, nameTypeNode, questionToken, templateTypeNode, /*members*/ undefined); context.approximateLength += 10; const result = setEmitFlags(mappedTypeNode, EmitFlags.SingleLine); @@ -6806,7 +7039,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return result; } - function createAnonymousTypeNode(type: ObjectType): TypeNode { + function createAnonymousTypeNode(type: ObjectType, forceClassExpansion = false, forceExpansion = false): TypeNode { const typeId = type.id; const symbol = type.symbol; if (symbol) { @@ -6839,15 +7072,26 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } // Always use 'typeof T' for type of class, enum, and module objects else if ( - symbol.flags & SymbolFlags.Class - && !getBaseTypeVariableOfClass(symbol) - && !(symbol.valueDeclaration && isClassLike(symbol.valueDeclaration) && context.flags & NodeBuilderFlags.WriteClassExpressionAsTypeLiteral && (!isClassDeclaration(symbol.valueDeclaration) || isSymbolAccessible(symbol, context.enclosingDeclaration, isInstanceType, /*shouldComputeAliasesToMakeVisible*/ false).accessibility !== SymbolAccessibility.Accessible)) || - symbol.flags & (SymbolFlags.Enum | SymbolFlags.ValueModule) || - shouldWriteTypeOfFunctionSymbol() + !forceExpansion && + (symbol.flags & SymbolFlags.Class + && !forceClassExpansion + && !getBaseTypeVariableOfClass(symbol) + && !(symbol.valueDeclaration + && isClassLike(symbol.valueDeclaration) + && context.flags & NodeBuilderFlags.WriteClassExpressionAsTypeLiteral + && (!isClassDeclaration(symbol.valueDeclaration) + || isSymbolAccessible(symbol, context.enclosingDeclaration, isInstanceType, /*shouldComputeAliasesToMakeVisible*/ false).accessibility !== SymbolAccessibility.Accessible)) + || symbol.flags & (SymbolFlags.Enum | SymbolFlags.ValueModule) + || shouldWriteTypeOfFunctionSymbol()) ) { - return symbolToTypeNode(symbol, context, isInstanceType); + if (shouldExpandType(type, context)) { + context.depth += 1; + } + else { + return symbolToTypeNode(symbol, context, isInstanceType); + } } - else if (context.visitedTypes?.has(typeId)) { + if (context.visitedTypes?.has(typeId)) { // If type is an anonymous type literal in a type alias declaration, use type alias name const typeAlias = getTypeAliasForTypeLiteral(type); if (typeAlias) { @@ -6896,7 +7140,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { context.symbolDepth = new Map(); } - const links = context.enclosingDeclaration && getNodeLinks(context.enclosingDeclaration); + // Don't rely on type cache if we're expand a type, because we need to compute `canIncreaseExpansionDepth`. + const links = context.maxExpansionDepth >= 0 ? undefined : context.enclosingDeclaration && getNodeLinks(context.enclosingDeclaration); const key = `${getTypeId(type)}|${context.flags}|${context.internalFlags}`; if (links) { links.serializedTypes ||= new Map(); @@ -6975,7 +7220,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (isGenericMappedType(type) || (type as MappedType).containsError) { return createMappedTypeNodeFromType(type as MappedType); } - const resolved = resolveStructuredTypeMembers(type); if (!resolved.properties.length && !resolved.indexInfos.length) { if (!resolved.callSignatures.length && !resolved.constructSignatures.length) { @@ -7257,11 +7501,13 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function createTypeNodesFromResolvedType(resolvedType: ResolvedType): TypeElement[] | undefined { if (checkTruncationLength(context)) { + context.out.truncated = true; if (context.flags & NodeBuilderFlags.NoTruncation) { return [addSyntheticTrailingComment(factory.createNotEmittedTypeElement(), SyntaxKind.MultiLineCommentTrivia, "elided")]; } return [factory.createPropertySignature(/*modifiers*/ undefined, "...", /*questionToken*/ undefined, /*type*/ undefined)]; } + context.typeStack.push(-1); const typeElements: TypeElement[] = []; for (const signature of resolvedType.callSignatures) { typeElements.push(signatureToSignatureDeclarationHelper(signature, SyntaxKind.CallSignature, context) as CallSignatureDeclaration); @@ -7276,11 +7522,15 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const properties = resolvedType.properties; if (!properties) { + context.typeStack.pop(); return typeElements; } let i = 0; for (const propertySymbol of properties) { + if (isExpanding(context) && propertySymbol.flags & SymbolFlags.Prototype) { + continue; + } i++; if (context.flags & NodeBuilderFlags.WriteClassExpressionAsTypeLiteral) { if (propertySymbol.flags & SymbolFlags.Prototype) { @@ -7291,6 +7541,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } if (checkTruncationLength(context) && (i + 2 < properties.length - 1)) { + context.out.truncated = true; if (context.flags & NodeBuilderFlags.NoTruncation) { const typeElement = typeElements.pop()!; typeElements.push(addSyntheticTrailingComment(typeElement, SyntaxKind.MultiLineCommentTrivia, `... ${properties.length - i} more elided ...`)); @@ -7303,6 +7554,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } addPropertyToElementList(propertySymbol, context, typeElements); } + context.typeStack.pop(); return typeElements.length ? typeElements : undefined; } } @@ -7383,12 +7635,13 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (propertySymbol.flags & SymbolFlags.Accessor) { const writeType = getWriteTypeOfSymbol(propertySymbol); if (propertyType !== writeType && !isErrorType(propertyType) && !isErrorType(writeType)) { + const symbolMapper = getSymbolLinks(propertySymbol).mapper; const getterDeclaration = getDeclarationOfKind(propertySymbol, SyntaxKind.GetAccessor)!; const getterSignature = getSignatureFromDeclaration(getterDeclaration); typeElements.push( setCommentRange( context, - signatureToSignatureDeclarationHelper(getterSignature, SyntaxKind.GetAccessor, context, { name: propertyName }) as GetAccessorDeclaration, + signatureToSignatureDeclarationHelper(symbolMapper ? instantiateSignature(getterSignature, symbolMapper) : getterSignature, SyntaxKind.GetAccessor, context, { name: propertyName }) as GetAccessorDeclaration, getterDeclaration, ), ); @@ -7397,7 +7650,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { typeElements.push( setCommentRange( context, - signatureToSignatureDeclarationHelper(setterSignature, SyntaxKind.SetAccessor, context, { name: propertyName }) as SetAccessorDeclaration, + signatureToSignatureDeclarationHelper(symbolMapper ? instantiateSignature(setterSignature, symbolMapper) : setterSignature, SyntaxKind.SetAccessor, context, { name: propertyName }) as SetAccessorDeclaration, setterDeclaration, ), ); @@ -7471,6 +7724,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function mapToTypeNodes(types: readonly Type[] | undefined, context: NodeBuilderContext, isBareList?: boolean): TypeNode[] | undefined { if (some(types)) { if (checkTruncationLength(context)) { + context.out.truncated = true; if (!isBareList) { return [ context.flags & NodeBuilderFlags.NoTruncation @@ -7496,6 +7750,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { for (const type of types) { i++; if (checkTruncationLength(context) && (i + 2 < types.length - 1)) { + context.out.truncated = true; result.push( context.flags & NodeBuilderFlags.NoTruncation ? addSyntheticLeadingComment(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), SyntaxKind.MultiLineCommentTrivia, `... ${types.length - i} more elided ...`) @@ -7922,7 +8177,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function typeToTypeNodeHelperWithPossibleReusableTypeNode(type: Type, typeNode: TypeNode | undefined, context: NodeBuilderContext) { - return typeNode && getTypeFromTypeNode(context, typeNode) === type && syntacticNodeBuilder.tryReuseExistingTypeNode(context, typeNode) + return !canPossiblyExpandType(type, context) && typeNode && getTypeFromTypeNode(context, typeNode) === type && syntacticNodeBuilder.tryReuseExistingTypeNode(context, typeNode) || typeToTypeNodeHelper(type, context); } @@ -8495,13 +8750,15 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { let firstChar = symbolName.charCodeAt(0); if (isSingleOrDoubleQuote(firstChar) && some(symbol.declarations, hasNonGlobalAugmentationExternalModuleSymbol)) { - return factory.createStringLiteral(getSpecifierForModuleSymbol(symbol, context)); + const specifier = getSpecifierForModuleSymbol(symbol, context); + context.approximateLength += 2 + specifier.length; // "specifier" + return factory.createStringLiteral(specifier); } if (index === 0 || canUsePropertyAccess(symbolName, languageVersion)) { const identifier = setEmitFlags(factory.createIdentifier(symbolName), EmitFlags.NoAsciiEscaping); if (typeParameterNodes) setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes)); identifier.symbol = symbol; - + context.approximateLength += 1 + symbolName.length; // .symbolName return index > 0 ? factory.createPropertyAccessExpression(createExpressionFromSymbolChain(chain, index - 1), identifier) : identifier; } else { @@ -8511,17 +8768,22 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } let expression: Expression | undefined; if (isSingleOrDoubleQuote(firstChar) && !(symbol.flags & SymbolFlags.EnumMember)) { - expression = factory.createStringLiteral(stripQuotes(symbolName).replace(/\\./g, s => s.substring(1)), firstChar === CharacterCodes.singleQuote); + const literalText = stripQuotes(symbolName).replace(/\\./g, s => s.substring(1)); + context.approximateLength += literalText.length + 2; // "literalText" + expression = factory.createStringLiteral(literalText, firstChar === CharacterCodes.singleQuote); } else if (("" + +symbolName) === symbolName) { + context.approximateLength += symbolName.length; // +symbolName expression = factory.createNumericLiteral(+symbolName); } if (!expression) { const identifier = setEmitFlags(factory.createIdentifier(symbolName), EmitFlags.NoAsciiEscaping); if (typeParameterNodes) setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes)); identifier.symbol = symbol; + context.approximateLength += symbolName.length; // symbolName expression = identifier; } + context.approximateLength += 2; // [] return factory.createElementAccessExpression(createExpressionFromSymbolChain(chain, index - 1), expression); } } @@ -8549,6 +8811,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function getPropertyNameNodeForSymbol(symbol: Symbol, context: NodeBuilderContext) { + const hashPrivateName = getClonedHashPrivateName(symbol); + if (hashPrivateName) { + return hashPrivateName; + } const stringNamed = !!length(symbol.declarations) && every(symbol.declarations, isStringNamed); const singleQuote = !!length(symbol.declarations) && every(symbol.declarations, isSingleQuotedStringNamed); const isMethod = !!(symbol.flags & SymbolFlags.Method); @@ -8661,7 +8927,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { let result; const addUndefinedForParameter = declaration && (isParameter(declaration) || isJSDocParameterTag(declaration)) && requiresAddingImplicitUndefined(declaration, context.enclosingDeclaration); const decl = declaration ?? symbol.valueDeclaration ?? getDeclarationWithTypeAnnotation(symbol) ?? symbol.declarations?.[0]; - if (decl) { + if (!canPossiblyExpandType(type, context) && decl) { + const restore = addSymbolTypeToContext(context, symbol, type); if (isAccessor(decl)) { result = syntacticNodeBuilder.serializeTypeOfAccessor(decl, symbol, context); } @@ -8670,10 +8937,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { && !nodeIsSynthesized(decl) && !(getObjectFlags(type) & ObjectFlags.RequiresWidening) ) { - const restore = addSymbolTypeToContext(context, symbol, type); result = syntacticNodeBuilder.serializeTypeOfDeclaration(decl, symbol, context); - restore(); } + restore(); } if (!result) { if (addUndefinedForParameter) { @@ -8711,7 +8977,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const returnType = getReturnTypeOfSignature(signature); if (!(suppressAny && isTypeAny(returnType))) { - if (signature.declaration && !nodeIsSynthesized(signature.declaration)) { + if (signature.declaration && !nodeIsSynthesized(signature.declaration) && !canPossiblyExpandType(returnType, context)) { const declarationSymbol = getSymbolOfDeclaration(signature.declaration); const restore = addSymbolTypeToContext(context, declarationSymbol, returnType); returnTypeNode = syntacticNodeBuilder.serializeReturnTypeForSignature(signature.declaration, declarationSymbol, context); @@ -8831,10 +9097,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return setTextRange(context, setEmitFlags(name, EmitFlags.NoAsciiEscaping), node); } const updated = visitEachChildWorker(node, c => attachSymbolToLeftmostIdentifier(c), /*context*/ undefined); - if (updated !== node) { - setTextRange(context, updated, node); - } - return updated; + return setTextRange(context, updated, node); } } @@ -9143,9 +9406,18 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (!suppressNewPrivateContext) { deferredPrivatesStack.push(new Map()); } - symbolTable.forEach((symbol: Symbol) => { + let i = 0; + const symbols = Array.from(symbolTable.values()); + for (const symbol of symbols) { + i++; + if (checkTruncationLengthIfExpanding(context) && (i + 2 < symbolTable.size - 1)) { + context.out.truncated = true; + results.push(createTruncationStatement(`... (${symbolTable.size - i} more ...)`)); + serializeSymbol(symbols[symbols.length - 1], /*isPrivate*/ false, !!propertyAsAlias); + break; + } serializeSymbol(symbol, /*isPrivate*/ false, !!propertyAsAlias); - }); + } if (!suppressNewPrivateContext) { // deferredPrivates will be filled up by visiting the symbol table // And will continue to iterate as elements are added while visited `deferredPrivates` @@ -9271,6 +9543,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { && type.symbol?.valueDeclaration && isSourceFile(type.symbol.valueDeclaration) ) { const alias = localName === propertyAccessRequire.parent.right.escapedText ? undefined : propertyAccessRequire.parent.right; + context.approximateLength += 12 + ((alias?.escapedText as string | undefined)?.length ?? 0); // `export { alias };` addResult( factory.createExportDeclaration( /*modifiers*/ undefined, @@ -9292,6 +9565,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { ), textRange, ); + context.approximateLength += 7 + name.length; // `var name: ;` addResult(statement, name !== localName ? modifierFlags & ~ModifierFlags.Export : modifierFlags); if (name !== localName && !isPrivate) { // We rename the variable declaration we generate for Property symbols since they may have a name which @@ -9315,6 +9589,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // export { g_1 as g }; // ``` // To create an export named `g` that does _not_ shadow the local `g` + context.approximateLength += 16 + name.length + localName.length; // `export { name as localName };` addResult( factory.createExportDeclaration( /*modifiers*/ undefined, @@ -9369,19 +9644,26 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { for (const node of symbol.declarations) { const resolvedModule = resolveExternalModuleName(node, (node as ExportDeclaration).moduleSpecifier!); if (!resolvedModule) continue; - addResult(factory.createExportDeclaration(/*modifiers*/ undefined, /*isTypeOnly*/ (node as ExportDeclaration).isTypeOnly, /*exportClause*/ undefined, factory.createStringLiteral(getSpecifierForModuleSymbol(resolvedModule, context))), ModifierFlags.None); + const isTypeOnly = (node as ExportDeclaration).isTypeOnly; + const specifier = getSpecifierForModuleSymbol(resolvedModule, context); + context.approximateLength += 17 + specifier.length; // `export * from "specifier";` + addResult(factory.createExportDeclaration(/*modifiers*/ undefined, isTypeOnly, /*exportClause*/ undefined, factory.createStringLiteral(specifier)), ModifierFlags.None); } } } if (needsPostExportDefault) { - addResult(factory.createExportAssignment(/*modifiers*/ undefined, /*isExportEquals*/ false, factory.createIdentifier(getInternalSymbolName(symbol, symbolName))), ModifierFlags.None); + const internalSymbolName = getInternalSymbolName(symbol, symbolName); + context.approximateLength += 16 + internalSymbolName.length; // `export default internalName;` + addResult(factory.createExportAssignment(/*modifiers*/ undefined, /*isExportEquals*/ false, factory.createIdentifier(internalSymbolName)), ModifierFlags.None); } else if (needsExportDeclaration) { + const internalSymbolName = getInternalSymbolName(symbol, symbolName); + context.approximateLength += 22 + symbolName.length + internalSymbolName.length; // `export { internalName as symbolName };` addResult( factory.createExportDeclaration( /*modifiers*/ undefined, /*isTypeOnly*/ false, - factory.createNamedExports([factory.createExportSpecifier(/*isTypeOnly*/ false, getInternalSymbolName(symbol, symbolName), symbolName)]), + factory.createNamedExports([factory.createExportSpecifier(/*isTypeOnly*/ false, internalSymbolName, symbolName)]), ), ModifierFlags.None, ); @@ -9412,6 +9694,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // Prepends a `declare` and/or `export` modifier if the context requires it, and then adds `node` to `result` and returns `node` function addResult(node: Statement, additionalModifierFlags: ModifierFlags) { if (canHaveModifiers(node)) { + const oldModifierFlags = getEffectiveModifierFlags(node); let newModifierFlags: ModifierFlags = ModifierFlags.None; const enclosingDeclaration = context.enclosingDeclaration && (isJSDocTypeAlias(context.enclosingDeclaration) ? getSourceFileOfNode(context.enclosingDeclaration) : context.enclosingDeclaration); @@ -9435,8 +9718,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { newModifierFlags |= ModifierFlags.Default; } if (newModifierFlags) { - node = factory.replaceModifiers(node, newModifierFlags | getEffectiveModifierFlags(node)); + node = factory.replaceModifiers(node, newModifierFlags | oldModifierFlags); } + context.approximateLength += modifiersLength(newModifierFlags | oldModifierFlags); } results.push(node); } @@ -9455,9 +9739,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { && isJSDocTypeExpression(jsdocAliasDecl.typeExpression) && syntacticNodeBuilder.tryReuseExistingTypeNode(context, jsdocAliasDecl.typeExpression.type) || typeToTypeNodeHelper(aliasType, context); + const internalSymbolName = getInternalSymbolName(symbol, symbolName); + context.approximateLength += 8 + (commentText?.length ?? 0) + internalSymbolName.length; // `/* comment */ type name = ...` addResult( setSyntheticLeadingComments( - factory.createTypeAliasDeclaration(/*modifiers*/ undefined, getInternalSymbolName(symbol, symbolName), typeParamDecls, typeNode), + factory.createTypeAliasDeclaration(/*modifiers*/ undefined, internalSymbolName, typeParamDecls, typeNode), !commentText ? [] : [{ kind: SyntaxKind.MultiLineCommentTrivia, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }], ), modifierFlags, @@ -9467,12 +9753,14 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function serializeInterface(symbol: Symbol, symbolName: string, modifierFlags: ModifierFlags) { + const internalSymbolName = getInternalSymbolName(symbol, symbolName); + context.approximateLength += 14 + internalSymbolName.length; // `interface name { }` const interfaceType = getDeclaredTypeOfClassOrInterface(symbol); const localParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol); const typeParamDecls = map(localParams, p => typeParameterToDeclaration(p, context)); const baseTypes = getBaseTypes(interfaceType); const baseType = length(baseTypes) ? getIntersectionType(baseTypes) : undefined; - const members = flatMap(getPropertiesOfType(interfaceType), p => serializePropertySymbolForInterface(p, baseType)); + const members = serializePropertySymbolsForClassOrInterface(getPropertiesOfType(interfaceType), /*isClass*/ false, baseType); const callSignatures = serializeSignatures(SignatureKind.Call, interfaceType, baseType, SyntaxKind.CallSignature) as CallSignatureDeclaration[]; const constructSignatures = serializeSignatures(SignatureKind.Construct, interfaceType, baseType, SyntaxKind.ConstructSignature) as ConstructSignatureDeclaration[]; const indexSignatures = serializeIndexSignatures(interfaceType, baseType); @@ -9481,7 +9769,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { addResult( factory.createInterfaceDeclaration( /*modifiers*/ undefined, - getInternalSymbolName(symbol, symbolName), + internalSymbolName, typeParamDecls, heritageClauses, [...indexSignatures, ...constructSignatures, ...callSignatures, ...members], @@ -9490,6 +9778,63 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { ); } + function serializePropertySymbolsForClassOrInterface(props: readonly Symbol[], isClass: false, baseType: Type | undefined): TypeElement[]; + function serializePropertySymbolsForClassOrInterface(props: readonly Symbol[], isClass: true, baseType: Type | undefined, isStatic: boolean): ClassElement[]; + function serializePropertySymbolsForClassOrInterface(props: readonly Symbol[], isClass: boolean, baseType: Type | undefined, isStatic?: boolean): (ClassElement | TypeElement)[] { + const elements: (ClassElement | TypeElement)[] = []; + let i = 0; + for (const prop of props) { + i++; + if (checkTruncationLengthIfExpanding(context) && (i + 2 < props.length - 1)) { + context.out.truncated = true; + const placeholder = createTruncationProperty(`... ${props.length - i} more ... `, isClass); + elements.push(placeholder); + const result = isClass ? + serializePropertySymbolForClass(props[props.length - 1], isStatic!, baseType) : + serializePropertySymbolForInterface(props[props.length - 1], baseType); + if (isArray(result)) { + elements.push(...result); + } + else { + elements.push(result); + } + break; + } + + context.approximateLength += 1; // separator + const result = isClass ? + serializePropertySymbolForClass(prop, isStatic!, baseType) : + serializePropertySymbolForInterface(prop, baseType); + if (isArray(result)) { + elements.push(...result); + } + else { + elements.push(result); + } + } + return elements; + } + + function createTruncationProperty(dotDotDotText: string, isClass: boolean): TypeElement | ClassElement { + if (context.flags & NodeBuilderFlags.NoTruncation) { + return addSyntheticLeadingComment(factory.createNotEmittedTypeElement(), SyntaxKind.MultiLineCommentTrivia, dotDotDotText); + } + return isClass ? + factory.createPropertyDeclaration( + /*modifiers*/ undefined, + dotDotDotText, + /*questionOrExclamationToken*/ undefined, + /*type*/ undefined, + /*initializer*/ undefined, + ) : + factory.createPropertySignature( + /*modifiers*/ undefined, + dotDotDotText, + /*questionToken*/ undefined, + /*type*/ undefined, + ); + } + function getNamespaceMembersForSerialization(symbol: Symbol) { let exports = arrayFrom(getExportsOfSymbol(symbol).values()); const merged = getMergedSymbol(symbol); @@ -9511,15 +9856,28 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function serializeModule(symbol: Symbol, symbolName: string, modifierFlags: ModifierFlags) { const members = getNamespaceMembersForSerialization(symbol); + const expanding = isExpanding(context); // Split NS members up by declaration - members whose parent symbol is the ns symbol vs those whose is not (but were added in later via merging) - const locationMap = arrayToMultiMap(members, m => m.parent && m.parent === symbol ? "real" : "merged"); + const locationMap = arrayToMultiMap(members, m => m.parent && m.parent === symbol || expanding ? "real" : "merged"); const realMembers = locationMap.get("real") || emptyArray; const mergedMembers = locationMap.get("merged") || emptyArray; // TODO: `suppressNewPrivateContext` is questionable -we need to simply be emitting privates in whatever scope they were declared in, rather // than whatever scope we traverse to them in. That's a bit of a complex rewrite, since we're not _actually_ tracking privates at all in advance, // so we don't even have placeholders to fill in. - if (length(realMembers)) { - const localName = getInternalSymbolName(symbol, symbolName); + if (length(realMembers) || expanding) { + let localName: ModuleName; + if (expanding) { + // Use the same name as symbol display. + const oldFlags = context.flags; + context.flags |= NodeBuilderFlags.WriteTypeParametersInQualifiedName | SymbolFormatFlags.UseOnlyExternalAliasing; + localName = symbolToNode(symbol, context, /*meaning*/ SymbolFlags.All) as ModuleName; + context.flags = oldFlags; + } + else { + const localText = getInternalSymbolName(symbol, symbolName); + localName = factory.createIdentifier(localText); + context.approximateLength += localText.length; + } serializeAsNamespaceDeclaration(realMembers, localName, modifierFlags, !!(symbol.flags & (SymbolFlags.Function | SymbolFlags.Assignment))); } if (length(mergedMembers)) { @@ -9555,23 +9913,62 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function serializeEnum(symbol: Symbol, symbolName: string, modifierFlags: ModifierFlags) { + const internalSymbolName = getInternalSymbolName(symbol, symbolName); + context.approximateLength += 9 + internalSymbolName.length; // `enum internalName { }` + const members: EnumMember[] = []; + const memberProps = filter(getPropertiesOfType(getTypeOfSymbol(symbol)), p => !!(p.flags & SymbolFlags.EnumMember)); + let i = 0; + for (const p of memberProps) { + i++; + if (checkTruncationLengthIfExpanding(context) && (i + 2 < memberProps.length - 1)) { + context.out.truncated = true; + members.push(factory.createEnumMember(` ... ${memberProps.length - i} more ... `)); + const last = memberProps[memberProps.length - 1]; + const initializedValue = last.declarations && last.declarations[0] && isEnumMember(last.declarations[0]) ? getConstantValue(last.declarations[0]) : undefined; + const initializer = initializedValue === undefined ? undefined : + typeof initializedValue === "string" ? factory.createStringLiteral(initializedValue) : + factory.createNumericLiteral(initializedValue); + const memberName = unescapeLeadingUnderscores(last.escapedName); + const member = factory.createEnumMember( + memberName, + initializer, + ); + members.push(member); + break; + } + // TODO: Handle computed names + // I hate that to get the initialized value we need to walk back to the declarations here; but there's no + // other way to get the possible const value of an enum member that I'm aware of, as the value is cached + // _on the declaration_, not on the declaration's symbol... + const memberDecl = p.declarations && p.declarations[0] && isEnumMember(p.declarations[0]) ? + p.declarations[0] : + undefined; + let initializer: Expression | undefined; + let initializerLength: number; + if (isExpanding(context) && memberDecl && memberDecl.initializer) { + initializer = getSynthesizedDeepClone(memberDecl.initializer); + initializerLength = memberDecl.initializer.end - memberDecl.initializer.pos; + } + else { + const initializedValue = memberDecl && getConstantValue(memberDecl); + initializer = initializedValue === undefined ? undefined : + typeof initializedValue === "string" ? factory.createStringLiteral(initializedValue) : + factory.createNumericLiteral(initializedValue); + initializerLength = (initializer as StringLiteral | NumericLiteral | undefined)?.text.length ?? 0; + } + const memberName = unescapeLeadingUnderscores(p.escapedName); + context.approximateLength += 4 + memberName.length + initializerLength; // `member = initializer,` + const member = factory.createEnumMember( + memberName, + initializer, + ); + members.push(member); + } addResult( factory.createEnumDeclaration( factory.createModifiersFromModifierFlags(isConstEnumSymbol(symbol) ? ModifierFlags.Const : 0), - getInternalSymbolName(symbol, symbolName), - map(filter(getPropertiesOfType(getTypeOfSymbol(symbol)), p => !!(p.flags & SymbolFlags.EnumMember)), p => { - // TODO: Handle computed names - // I hate that to get the initialized value we need to walk back to the declarations here; but there's no - // other way to get the possible const value of an enum member that I'm aware of, as the value is cached - // _on the declaration_, not on the declaration's symbol... - const initializedValue = p.declarations && p.declarations[0] && isEnumMember(p.declarations[0]) ? getConstantValue(p.declarations[0]) : undefined; - return factory.createEnumMember( - unescapeLeadingUnderscores(p.escapedName), - initializedValue === undefined ? undefined : - typeof initializedValue === "string" ? factory.createStringLiteral(initializedValue) : - factory.createNumericLiteral(initializedValue), - ); - }), + internalSymbolName, + members, ), modifierFlags, ); @@ -9580,6 +9977,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function serializeAsFunctionNamespaceMerge(type: Type, symbol: Symbol, localName: string, modifierFlags: ModifierFlags) { const signatures = getSignaturesOfType(type, SignatureKind.Call); for (const sig of signatures) { + context.approximateLength += 1; // ; // Each overload becomes a separate function declaration, in order const decl = signatureToSignatureDeclarationHelper(sig, SyntaxKind.FunctionDeclaration, context, { name: factory.createIdentifier(localName) }) as FunctionDeclaration; addResult(setTextRange(context, decl, getSignatureTextRangeLocation(sig)), modifierFlags); @@ -9587,10 +9985,18 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // Module symbol emit will take care of module-y members, provided it has exports if (!(symbol.flags & (SymbolFlags.ValueModule | SymbolFlags.NamespaceModule) && !!symbol.exports && !!symbol.exports.size)) { const props = filter(getPropertiesOfType(type), isNamespaceMember); - serializeAsNamespaceDeclaration(props, localName, modifierFlags, /*suppressNewPrivateContext*/ true); + context.approximateLength += localName.length; + serializeAsNamespaceDeclaration(props, factory.createIdentifier(localName), modifierFlags, /*suppressNewPrivateContext*/ true); } } + function createTruncationStatement(dotDotDotText: string): Statement { + if (context.flags & NodeBuilderFlags.NoTruncation) { + return addSyntheticLeadingComment(factory.createEmptyStatement(), SyntaxKind.MultiLineCommentTrivia, dotDotDotText); + } + return factory.createExpressionStatement(factory.createIdentifier(dotDotDotText)); + } + function getSignatureTextRangeLocation(signature: Signature) { if (signature.declaration && signature.declaration.parent) { if (isBinaryExpression(signature.declaration.parent) && getAssignmentDeclarationKind(signature.declaration.parent) === AssignmentDeclarationKind.Property) { @@ -9604,9 +10010,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return signature.declaration; } - function serializeAsNamespaceDeclaration(props: readonly Symbol[], localName: string, modifierFlags: ModifierFlags, suppressNewPrivateContext: boolean) { + function serializeAsNamespaceDeclaration(props: readonly Symbol[], localName: ModuleName, modifierFlags: ModifierFlags, suppressNewPrivateContext: boolean) { + const nodeFlags = isIdentifier(localName) ? NodeFlags.Namespace : NodeFlags.None; + const expanding = isExpanding(context); if (length(props)) { - const localVsRemoteMap = arrayToMultiMap(props, p => !length(p.declarations) || some(p.declarations, d => getSourceFileOfNode(d) === getSourceFileOfNode(context.enclosingDeclaration!)) ? "local" : "remote"); + context.approximateLength += 14; // "namespace { }" + const localVsRemoteMap = arrayToMultiMap(props, p => !length(p.declarations) || some(p.declarations, d => getSourceFileOfNode(d) === getSourceFileOfNode(context.enclosingDeclaration!)) || expanding ? "local" : "remote"); const localProps = localVsRemoteMap.get("local") || emptyArray; // handle remote props first - we need to make an `import` declaration that points at the module containing each remote // prop in the outermost scope (TODO: a namespace within a namespace would need to be appropriately handled by this) @@ -9625,7 +10034,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // Add a namespace // Create namespace as non-synthetic so it is usable as an enclosing declaration - let fakespace = parseNodeFactory.createModuleDeclaration(/*modifiers*/ undefined, factory.createIdentifier(localName), factory.createModuleBlock([]), NodeFlags.Namespace); + let fakespace = parseNodeFactory.createModuleDeclaration(/*modifiers*/ undefined, localName, factory.createModuleBlock([]), nodeFlags); setParent(fakespace, enclosingDeclaration as SourceFile | NamespaceDeclaration); fakespace.locals = createSymbolTable(props); fakespace.symbol = props[0].parent!; @@ -9659,6 +10068,18 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { ); addResult(fakespace, modifierFlags); // namespaces can never be default exported } + else if (expanding) { + context.approximateLength += 14; // "namespace { }" + addResult( + factory.createModuleDeclaration( + /*modifiers*/ undefined, + localName, + factory.createModuleBlock([]), + nodeFlags, + ), + modifierFlags, + ); + } } function isNamespaceMember(p: Symbol) { @@ -9700,11 +10121,13 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function serializeAsClass(symbol: Symbol, localName: string, modifierFlags: ModifierFlags) { + context.approximateLength += 9 + localName.length; // `class localName { }` const originalDecl = symbol.declarations?.find(isClassLike); const oldEnclosing = context.enclosingDeclaration; context.enclosingDeclaration = originalDecl || oldEnclosing; const localParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol); const typeParamDecls = map(localParams, p => typeParameterToDeclaration(p, context)); + forEach(localParams, p => context.approximateLength += symbolName(p.symbol).length); const classType = getTypeWithThisArgument(getDeclaredTypeOfClassOrInterface(symbol)) as InterfaceType; const baseTypes = getBaseTypes(classType); const originalImplements = originalDecl && getEffectiveImplementsTypeNodes(originalDecl); @@ -9715,40 +10138,36 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const staticBaseType = isClass ? getBaseConstructorTypeOfClass(staticType as InterfaceType) : anyType; + context.approximateLength += (length(baseTypes) ? 8 : 0) + (length(implementsExpressions) ? 11 : 0); // `extends ` and `implements ` const heritageClauses = [ ...!length(baseTypes) ? [] : [factory.createHeritageClause(SyntaxKind.ExtendsKeyword, map(baseTypes, b => serializeBaseType(b, staticBaseType, localName)))], ...!length(implementsExpressions) ? [] : [factory.createHeritageClause(SyntaxKind.ImplementsKeyword, implementsExpressions)], ]; const symbolProps = getNonInheritedProperties(classType, baseTypes, getPropertiesOfType(classType)); - const publicSymbolProps = filter(symbolProps, s => { - // `valueDeclaration` could be undefined if inherited from - // a union/intersection base type, but inherited properties - // don't matter here. - const valueDecl = s.valueDeclaration; - return !!valueDecl && !(isNamedDeclaration(valueDecl) && isPrivateIdentifier(valueDecl.name)); - }); - const hasPrivateIdentifier = some(symbolProps, s => { - // `valueDeclaration` could be undefined if inherited from - // a union/intersection base type, but inherited properties - // don't matter here. - const valueDecl = s.valueDeclaration; - return !!valueDecl && isNamedDeclaration(valueDecl) && isPrivateIdentifier(valueDecl.name); - }); + const publicSymbolProps = filter(symbolProps, s => !isHashPrivate(s)); + const hasPrivateIdentifier = some(symbolProps, isHashPrivate); // Boil down all private properties into a single one. const privateProperties = hasPrivateIdentifier ? - [factory.createPropertyDeclaration( - /*modifiers*/ undefined, - factory.createPrivateIdentifier("#private"), - /*questionOrExclamationToken*/ undefined, - /*type*/ undefined, - /*initializer*/ undefined, - )] : + isExpanding(context) ? + serializePropertySymbolsForClassOrInterface(filter(symbolProps, isHashPrivate), /*isClass*/ true, baseTypes[0], /*isStatic*/ false) : + [factory.createPropertyDeclaration( + /*modifiers*/ undefined, + factory.createPrivateIdentifier("#private"), + /*questionOrExclamationToken*/ undefined, + /*type*/ undefined, + /*initializer*/ undefined, + )] : emptyArray; - const publicProperties = flatMap(publicSymbolProps, p => serializePropertySymbolForClass(p, /*isStatic*/ false, baseTypes[0])); + if (hasPrivateIdentifier && !isExpanding(context)) { + context.approximateLength += 9; // `#private;` + } + const publicProperties = serializePropertySymbolsForClassOrInterface(publicSymbolProps, /*isClass*/ true, baseTypes[0], /*isStatic*/ false); // Consider static members empty if symbol also has function or module meaning - function namespacey emit will handle statics - const staticMembers = flatMap( + const staticMembers = serializePropertySymbolsForClassOrInterface( filter(getPropertiesOfType(staticType), p => !(p.flags & SymbolFlags.Prototype) && p.escapedName !== "prototype" && !isNamespaceMember(p)), - p => serializePropertySymbolForClass(p, /*isStatic*/ true, staticBaseType), + /*isClass*/ true, + staticBaseType, + /*isStatic*/ true, ); // When we encounter an `X.prototype.y` assignment in a JS file, we bind `X` as a class regardless as to whether // the value is ever initialized with a class or function-like value. For cases where `X` could never be @@ -9757,6 +10176,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { !!symbol.valueDeclaration && isInJSFile(symbol.valueDeclaration) && !some(getSignaturesOfType(staticType, SignatureKind.Construct)); + if (isNonConstructableClassLikeInJsFile) context.approximateLength += 21; // `private constructor()` const constructors = isNonConstructableClassLikeInJsFile ? [factory.createConstructorDeclaration(factory.createModifiersFromModifierFlags(ModifierFlags.Private), [], /*body*/ undefined)] : serializeSignatures(SignatureKind.Construct, staticType, staticBaseType, SyntaxKind.Constructor) as ConstructorDeclaration[]; @@ -9825,15 +10245,17 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // const { SomeClass } = require('./lib'); const specifier = getSpecifierForModuleSymbol(target.parent || target, context); // './lib' const { propertyName } = node as BindingElement; + const propertyNameText = propertyName && isIdentifier(propertyName) ? idText(propertyName) : undefined; + context.approximateLength += 24 + localName.length + specifier.length + (propertyNameText?.length ?? 0); // `import { propertyName as name } from "specifier";` addResult( factory.createImportDeclaration( /*modifiers*/ undefined, factory.createImportClause( - /*isTypeOnly*/ false, + /*phaseModifier*/ undefined, /*name*/ undefined, factory.createNamedImports([factory.createImportSpecifier( /*isTypeOnly*/ false, - propertyName && isIdentifier(propertyName) ? factory.createIdentifier(idText(propertyName)) : undefined, + propertyNameText ? factory.createIdentifier(propertyNameText) : undefined, factory.createIdentifier(localName), )]), ), @@ -9864,6 +10286,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const uniqueName = factory.createUniqueName(localName); // _x const specifier = getSpecifierForModuleSymbol(target.parent || target, context); // 'y' // import _x = require('y'); + context.approximateLength += 22 + specifier.length + idText(uniqueName).length; // `import uniqueName = require("specifier");` addResult( factory.createImportEqualsDeclaration( /*modifiers*/ undefined, @@ -9874,6 +10297,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { ModifierFlags.None, ); // import x = _x.z + context.approximateLength += 12 + localName.length + idText(uniqueName).length + idText(initializer.name).length; // `import localName = uniqueName.initializerName;` addResult( factory.createImportEqualsDeclaration( /*modifiers*/ undefined, @@ -9896,6 +10320,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // Could be a local `import localName = ns.member` or // an external `import localName = require("whatever")` const isLocalImport = !(target.flags & SymbolFlags.ValueModule) && !isVariableDeclaration(node); + context.approximateLength += 11 + localName.length + unescapeLeadingUnderscores(target.escapedName).length; // `import localName = target;` addResult( factory.createImportEqualsDeclaration( /*modifiers*/ undefined, @@ -9919,10 +10344,15 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const specifier = context.bundled ? factory.createStringLiteral(generatedSpecifier) : (node as ImportClause).parent.moduleSpecifier; const attributes = isImportDeclaration(node.parent) ? node.parent.attributes : undefined; const isTypeOnly = isJSDocImportTag((node as ImportClause).parent); + context.approximateLength += 14 + localName.length + 3 + (isTypeOnly ? 4 : 0); // `import localName from specifier;`, approximate specifier addResult( factory.createImportDeclaration( /*modifiers*/ undefined, - factory.createImportClause(isTypeOnly, factory.createIdentifier(localName), /*namedBindings*/ undefined), + factory.createImportClause( + /* phaseModifier */ isTypeOnly ? SyntaxKind.TypeKeyword : undefined, + factory.createIdentifier(localName), + /*namedBindings*/ undefined, + ), specifier, attributes, ), @@ -9934,10 +10364,15 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); // generate specifier (even though we're reusing and existing one) for ambient module reference include side effects const specifier = context.bundled ? factory.createStringLiteral(generatedSpecifier) : (node as NamespaceImport).parent.parent.moduleSpecifier; const isTypeOnly = isJSDocImportTag((node as NamespaceImport).parent.parent); + context.approximateLength += 19 + localName.length + 3 + (isTypeOnly ? 4 : 0); // `import * as localName from specifier;`, approximate specifier addResult( factory.createImportDeclaration( /*modifiers*/ undefined, - factory.createImportClause(isTypeOnly, /*name*/ undefined, factory.createNamespaceImport(factory.createIdentifier(localName))), + factory.createImportClause( + /* phaseModifier */ isTypeOnly ? SyntaxKind.TypeKeyword : undefined, + /*name*/ undefined, + factory.createNamespaceImport(factory.createIdentifier(localName)), + ), specifier, (node as ImportClause).parent.attributes, ), @@ -9946,6 +10381,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { break; } case SyntaxKind.NamespaceExport: + context.approximateLength += 19 + localName.length + 3; // `export * as localName from specifier;`, approximate specifier addResult( factory.createExportDeclaration( /*modifiers*/ undefined, @@ -9960,11 +10396,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); // generate specifier (even though we're reusing and existing one) for ambient module reference include side effects const specifier = context.bundled ? factory.createStringLiteral(generatedSpecifier) : (node as ImportSpecifier).parent.parent.parent.moduleSpecifier; const isTypeOnly = isJSDocImportTag((node as ImportSpecifier).parent.parent.parent); + context.approximateLength += 19 + localName.length + 3 + (isTypeOnly ? 4 : 0); // `import { localName } from specifier;`, approximate specifier addResult( factory.createImportDeclaration( /*modifiers*/ undefined, factory.createImportClause( - isTypeOnly, + /* phaseModifier */ isTypeOnly ? SyntaxKind.TypeKeyword : undefined, /*name*/ undefined, factory.createNamedImports([ factory.createImportSpecifier( @@ -10021,6 +10458,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function serializeExportSpecifier(localName: string, targetName: string, specifier?: Expression) { + context.approximateLength += 16 + localName.length + (localName !== targetName ? targetName.length : 0); // `export { targetName as localName };` addResult( factory.createExportDeclaration( /*modifiers*/ undefined, @@ -10069,6 +10507,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const prevDisableTrackSymbol = context.tracker.disableTrackSymbol; context.tracker.disableTrackSymbol = true; if (isExportAssignmentCompatibleSymbolName) { + context.approximateLength += 10; // `export = ;` results.push(factory.createExportAssignment( /*modifiers*/ undefined, isExportEquals, @@ -10086,6 +10525,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { else { // serialize as `import _Ref = t.arg.et; export { _Ref as name }` const varName = getUnusedName(name, symbol); + context.approximateLength += varName.length + 10; // `import name = ;` addResult( factory.createImportEqualsDeclaration( /*modifiers*/ undefined, @@ -10113,6 +10553,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } else { const flags = context.enclosingDeclaration?.kind === SyntaxKind.ModuleDeclaration && (!(symbol.flags & SymbolFlags.Accessor) || symbol.flags & SymbolFlags.SetAccessor) ? NodeFlags.Let : NodeFlags.Const; + context.approximateLength += varName.length + 5; // `var name: ;` const statement = factory.createVariableStatement( /*modifiers*/ undefined, factory.createVariableDeclarationList([ @@ -10129,6 +10570,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { ); } if (isExportAssignmentCompatibleSymbolName) { + context.approximateLength += varName.length + 10; // `export = name;` results.push(factory.createExportAssignment( /*modifiers*/ undefined, isExportEquals, @@ -10205,7 +10647,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { ): (p: Symbol, isStatic: boolean, baseType: Type | undefined) => T | AccessorDeclaration | (T | AccessorDeclaration)[] { return function serializePropertySymbol(p: Symbol, isStatic: boolean, baseType: Type | undefined): T | AccessorDeclaration | (T | AccessorDeclaration)[] { const modifierFlags = getDeclarationModifierFlagsFromSymbol(p); - const isPrivate = !!(modifierFlags & ModifierFlags.Private); + const omitType = !!(modifierFlags & ModifierFlags.Private) && !isExpanding(context); if (isStatic && (p.flags & (SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias))) { // Only value-only-meaning symbols can be correctly encoded as class statics, type/namespace/alias meaning symbols // need to be merged namespace members @@ -10243,6 +10685,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { Debug.assert(!!setter); const paramSymbol = isFunctionLikeDeclaration(setter) ? getSignatureFromDeclaration(setter).parameters[0] : undefined; const setterDeclaration = p.declarations?.find(isSetAccessor); + context.approximateLength += modifiersLength(flag) + 7 + (paramSymbol ? symbolName(paramSymbol).length : 5) + (omitType ? 0 : 2); // `modifiers set name(param);`, approximate name result.push(setTextRange( context, factory.createSetAccessorDeclaration( @@ -10253,7 +10696,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { /*dotDotDotToken*/ undefined, paramSymbol ? parameterToParameterDeclarationName(paramSymbol, getEffectiveParameterDeclaration(paramSymbol), context) : "value", /*questionToken*/ undefined, - isPrivate ? undefined : serializeTypeForDeclaration(context, setterDeclaration, getWriteTypeOfSymbol(p), p), + omitType ? undefined : serializeTypeForDeclaration(context, setterDeclaration, getWriteTypeOfSymbol(p), p), )], /*body*/ undefined, ), @@ -10261,15 +10704,15 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { )); } if (p.flags & SymbolFlags.GetAccessor) { - const isPrivate = modifierFlags & ModifierFlags.Private; const getterDeclaration = p.declarations?.find(isGetAccessor); + context.approximateLength += modifiersLength(flag) + 8 + (omitType ? 0 : 2); // `modifiers get name(): ;`, approximate name result.push(setTextRange( context, factory.createGetAccessorDeclaration( factory.createModifiersFromModifierFlags(flag), name, [], - isPrivate ? undefined : serializeTypeForDeclaration(context, getterDeclaration, getTypeOfSymbol(p), p), + omitType ? undefined : serializeTypeForDeclaration(context, getterDeclaration, getTypeOfSymbol(p), p), /*body*/ undefined, ), getterDeclaration ?? firstPropertyLikeDecl, @@ -10280,13 +10723,15 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // This is an else/if as accessors and properties can't merge in TS, but might in JS // If this happens, we assume the accessor takes priority, as it imposes more constraints else if (p.flags & (SymbolFlags.Property | SymbolFlags.Variable | SymbolFlags.Accessor)) { + const modifierFlags = (isReadonlySymbol(p) ? ModifierFlags.Readonly : 0) | flag; + context.approximateLength += 2 + (omitType ? 0 : 2) + modifiersLength(modifierFlags); // `modifiers name: ;`, approximate name return setTextRange( context, createProperty( - factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? ModifierFlags.Readonly : 0) | flag), + factory.createModifiersFromModifierFlags(modifierFlags), name, p.flags & SymbolFlags.Optional ? factory.createToken(SyntaxKind.QuestionToken) : undefined, - isPrivate ? undefined : serializeTypeForDeclaration(context, p.declarations?.find(isSetAccessorDeclaration), getWriteTypeOfSymbol(p), p), + omitType ? undefined : serializeTypeForDeclaration(context, p.declarations?.find(isSetAccessorDeclaration), getWriteTypeOfSymbol(p), p), // TODO: https://github.com/microsoft/TypeScript/pull/32372#discussion_r328386357 // interface members can't have initializers, however class members _can_ /*initializer*/ undefined, @@ -10297,11 +10742,13 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (p.flags & (SymbolFlags.Method | SymbolFlags.Function)) { const type = getTypeOfSymbol(p); const signatures = getSignaturesOfType(type, SignatureKind.Call); - if (flag & ModifierFlags.Private) { + if (omitType) { + const modifierFlags = (isReadonlySymbol(p) ? ModifierFlags.Readonly : 0) | flag; + context.approximateLength += 1 + modifiersLength(modifierFlags); // `modifiers name;`, approximate name return setTextRange( context, createProperty( - factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? ModifierFlags.Readonly : 0) | flag), + factory.createModifiersFromModifierFlags(modifierFlags), name, p.flags & SymbolFlags.Optional ? factory.createToken(SyntaxKind.QuestionToken) : undefined, /*type*/ undefined, @@ -10313,6 +10760,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const results = []; for (const sig of signatures) { + context.approximateLength += 1; // ; // Each overload becomes a separate method declaration, in order const decl = signatureToSignatureDeclarationHelper( sig, @@ -10334,6 +10782,27 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { }; } + function modifiersLength(flags: ModifierFlags): number { + let result = 0; + // Include the trailing space after the modifier keyword. + if (flags & ModifierFlags.Export) result += 7; + if (flags & ModifierFlags.Ambient) result += 8; + if (flags & ModifierFlags.Default) result += 8; + if (flags & ModifierFlags.Const) result += 6; + if (flags & ModifierFlags.Public) result += 7; + if (flags & ModifierFlags.Private) result += 8; + if (flags & ModifierFlags.Protected) result += 10; + if (flags & ModifierFlags.Abstract) result += 9; + if (flags & ModifierFlags.Static) result += 7; + if (flags & ModifierFlags.Override) result += 9; + if (flags & ModifierFlags.Readonly) result += 9; + if (flags & ModifierFlags.Accessor) result += 9; + if (flags & ModifierFlags.Async) result += 6; + if (flags & ModifierFlags.In) result += 3; + if (flags & ModifierFlags.Out) result += 4; + return result; + } + function serializePropertySymbolForInterface(p: Symbol, baseType: Type | undefined) { return serializePropertySymbolForInterfaceWorker(p, /*isStatic*/ false, baseType); } @@ -10384,6 +10853,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const results = []; for (const sig of signatures) { + context.approximateLength += 1; // ; // Each overload becomes a separate constructor declaration, in order const decl = signatureToSignatureDeclarationHelper(sig, outputKind, context); results.push(setTextRange(context, decl, sig.declaration)); @@ -10503,6 +10973,31 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return localName; } } + + function isExpanding(context: NodeBuilderContext) { + return context.maxExpansionDepth !== -1; + } + + function isHashPrivate(s: Symbol): boolean { + // `valueDeclaration` could be undefined if inherited from + // a union/intersection base type, but inherited properties + // don't matter here. + return !!s.valueDeclaration && isNamedDeclaration(s.valueDeclaration) && isPrivateIdentifier(s.valueDeclaration.name); + } + + function getClonedHashPrivateName(s: Symbol): PrivateIdentifier | undefined { + if (s.valueDeclaration && isNamedDeclaration(s.valueDeclaration) && isPrivateIdentifier(s.valueDeclaration.name)) { + return factory.cloneNode(s.valueDeclaration.name); + } + return undefined; + } + } + + /** Returns true if a type is declared in a lib file. */ + // Don't expand types like `Array` or `Promise`, instead treating them as opaque. + function isLibType(type: Type): boolean { + const symbol = (getObjectFlags(type) & ObjectFlags.Reference) !== 0 ? (type as TypeReference).target.symbol : type.symbol; + return isTupleType(type) || !!(symbol?.declarations?.some(decl => host.isSourceFileDefaultLibrary(getSourceFileOfNode(decl)))); } function typePredicateToString(typePredicate: TypePredicate, enclosingDeclaration?: Node, flags: TypeFormatFlags = TypeFormatFlags.UseAliasDefinedOutsideCurrentScope, writer?: EmitTextWriter): string { @@ -10518,14 +11013,14 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } - function formatUnionTypes(types: readonly Type[]): Type[] { + function formatUnionTypes(types: readonly Type[], expandingEnum: boolean): Type[] { const result: Type[] = []; let flags = 0 as TypeFlags; for (let i = 0; i < types.length; i++) { const t = types[i]; flags |= t.flags; if (!(t.flags & TypeFlags.Nullable)) { - if (t.flags & (TypeFlags.BooleanLiteral | TypeFlags.EnumLike)) { + if (t.flags & (TypeFlags.BooleanLiteral) || !expandingEnum && (t.flags | TypeFlags.EnumLike)) { const baseType = t.flags & TypeFlags.BooleanLiteral ? booleanType : getBaseTypeOfEnumLikeType(t as LiteralType); if (baseType.flags & TypeFlags.Union) { const count = (baseType as UnionType).types.length; @@ -11821,7 +12316,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } // always widen a 'unique symbol' type if the type was created for a different declaration. - if (type.flags & TypeFlags.UniqueESSymbol && (isBindingElement(declaration) || !declaration.type) && type.symbol !== getSymbolOfDeclaration(declaration)) { + if (type.flags & TypeFlags.UniqueESSymbol && (isBindingElement(declaration) || !tryGetTypeFromEffectiveTypeNode(declaration)) && type.symbol !== getSymbolOfDeclaration(declaration)) { type = esSymbolType; } @@ -13175,9 +13670,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { symbol.declarations.push(member); } if (symbolFlags & SymbolFlags.Value) { - if (!symbol.valueDeclaration || symbol.valueDeclaration.kind !== member.kind) { - symbol.valueDeclaration = member; - } + setValueDeclaration(symbol, member); } } @@ -15504,7 +15997,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { isInJSFile(declaration) && isValueSignatureDeclaration(declaration) && !hasJSDocParameterTags(declaration) && - !getJSDocType(declaration); + !some(declaration.parameters, p => !!getJSDocType(p)) && + !getJSDocType(declaration) && + !getContextualSignatureForFunctionLikeDeclaration(declaration); if (isUntypedSignatureInJSFile) { flags |= SignatureFlags.IsUntypedSignatureInJSFile; } @@ -20367,10 +20862,26 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { error(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite); return errorType; } + const index = findActiveMapper(mapper); + if (index === -1) { + pushActiveMapper(mapper); + } + const key = type.id + getAliasId(aliasSymbol, aliasTypeArguments); + const mapperCache = activeTypeMappersCaches[index !== -1 ? index : activeTypeMappersCount - 1]; + const cached = mapperCache.get(key); + if (cached) { + return cached; + } totalInstantiationCount++; instantiationCount++; instantiationDepth++; const result = instantiateTypeWorker(type, mapper, aliasSymbol, aliasTypeArguments); + if (index === -1) { + popActiveMapper(); + } + else { + mapperCache.set(key, result); + } instantiationDepth--; return result; } @@ -22890,6 +23401,24 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } } + if (sourceFlags & TypeFlags.TemplateLiteral) { + if (arrayIsEqualTo((source as TemplateLiteralType).texts, (target as TemplateLiteralType).texts)) { + const sourceTypes = (source as TemplateLiteralType).types; + const targetTypes = (target as TemplateLiteralType).types; + result = Ternary.True; + for (let i = 0; i < sourceTypes.length; i++) { + if (!(result &= isRelatedTo(sourceTypes[i], targetTypes[i], RecursionFlags.Both, /*reportErrors*/ false))) { + break; + } + } + return result; + } + } + if (sourceFlags & TypeFlags.StringMapping) { + if ((source as StringMappingType).symbol === (target as StringMappingType).symbol) { + return isRelatedTo((source as StringMappingType).type, (target as StringMappingType).type, RecursionFlags.Both, /*reportErrors*/ false); + } + } if (!(sourceFlags & TypeFlags.Object)) { return Ternary.False; } @@ -23585,6 +24114,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function isPropertySymbolTypeRelated(sourceProp: Symbol, targetProp: Symbol, getTypeOfSourceProperty: (sym: Symbol) => Type, reportErrors: boolean, intersectionState: IntersectionState): Ternary { const targetIsOptional = strictNullChecks && !!(getCheckFlags(targetProp) & CheckFlags.Partial); const effectiveTarget = addOptionality(getNonMissingTypeOfSymbol(targetProp), /*isProperty*/ false, targetIsOptional); + // source could resolve to `any` and that's not related to `unknown` target under strict subtype relation + if (effectiveTarget.flags & (relation === strictSubtypeRelation ? TypeFlags.Any : TypeFlags.AnyOrUnknown)) { + return Ternary.True; + } const effectiveSource = getTypeOfSourceProperty(sourceProp); return isRelatedTo(effectiveSource, effectiveTarget, RecursionFlags.Both, reportErrors, /*headMessage*/ undefined, intersectionState); } @@ -25934,7 +26467,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return !!(target.flags & TypeFlags.Number && isValidNumberString(value, /*roundTripOnly*/ false) || target.flags & TypeFlags.BigInt && isValidBigIntString(value, /*roundTripOnly*/ false) || target.flags & (TypeFlags.BooleanLiteral | TypeFlags.Nullable) && value === (target as IntrinsicType).intrinsicName || - target.flags & TypeFlags.StringMapping && isMemberOfStringMapping(getStringLiteralType(value), target) || + target.flags & TypeFlags.StringMapping && isMemberOfStringMapping(source, target) || target.flags & TypeFlags.TemplateLiteral && isTypeMatchedByTemplateLiteralType(source, target as TemplateLiteralType)); } if (source.flags & TypeFlags.TemplateLiteral) { @@ -26943,6 +27476,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { inference.inferredType = fallbackType && context.compareTypes(fallbackType, getTypeWithThisArgument(instantiatedConstraint, fallbackType)) ? fallbackType : instantiatedConstraint; } } + clearActiveMapperCaches(); } return inference.inferredType; @@ -28731,7 +29265,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // parameter declared in the same parameter list is a candidate. if (isIdentifier(expr)) { const symbol = getResolvedSymbol(expr); - const declaration = symbol.valueDeclaration; + const declaration = getExportSymbolOfValueSymbolIfExported(symbol).valueDeclaration; if (declaration && (isBindingElement(declaration) || isParameter(declaration)) && reference === declaration.parent && !declaration.initializer && !declaration.dotDotDotToken) { return declaration; } @@ -30281,8 +30815,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // To avoid that we will give an error to users if they use arguments objects in arrow function so that they // can explicitly bound arguments objects if (symbol === argumentsSymbol) { - if (isInPropertyInitializerOrClassStaticBlock(node)) { - error(node, Diagnostics.arguments_cannot_be_referenced_in_property_initializers); + if (isInPropertyInitializerOrClassStaticBlock(node, /*ignoreArrowFunctions*/ true)) { + error(node, Diagnostics.arguments_cannot_be_referenced_in_property_initializers_or_class_static_initialization_blocks); return; } @@ -32159,6 +32693,31 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } + function pushActiveMapper(mapper: TypeMapper) { + activeTypeMappers[activeTypeMappersCount] = mapper; + activeTypeMappersCaches[activeTypeMappersCount] = new Map(); + activeTypeMappersCount++; + } + + function popActiveMapper() { + activeTypeMappersCount--; + } + + function findActiveMapper(mapper: TypeMapper) { + for (let i = activeTypeMappersCount - 1; i >= 0; i--) { + if (mapper === activeTypeMappers[i]) { + return i; + } + } + return -1; + } + + function clearActiveMapperCaches() { + for (let i = activeTypeMappersCount - 1; i >= 0; i--) { + activeTypeMappersCaches[i].clear(); + } + } + function getContextualImportAttributeType(node: ImportAttribute) { return getTypeOfPropertyOfContextualType(getGlobalImportAttributesType(/*reportErrors*/ false), getNameFromImportAttribute(node)); } @@ -34331,31 +34890,21 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } - function isInPropertyInitializerOrClassStaticBlock(node: Node): boolean { + function isInPropertyInitializerOrClassStaticBlock(node: Node, ignoreArrowFunctions?: boolean): boolean { return !!findAncestor(node, node => { switch (node.kind) { case SyntaxKind.PropertyDeclaration: + case SyntaxKind.ClassStaticBlockDeclaration: return true; - case SyntaxKind.PropertyAssignment: - case SyntaxKind.MethodDeclaration: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - case SyntaxKind.SpreadAssignment: - case SyntaxKind.ComputedPropertyName: - case SyntaxKind.TemplateSpan: - case SyntaxKind.JsxExpression: - case SyntaxKind.JsxAttribute: - case SyntaxKind.JsxAttributes: - case SyntaxKind.JsxSpreadAttribute: - case SyntaxKind.JsxOpeningElement: - case SyntaxKind.ExpressionWithTypeArguments: - case SyntaxKind.HeritageClause: - return false; + case SyntaxKind.TypeQuery: + case SyntaxKind.JsxClosingElement: // already reported in JsxOpeningElement + return "quit"; case SyntaxKind.ArrowFunction: - case SyntaxKind.ExpressionStatement: - return isBlock(node.parent) && isClassStaticBlockDeclaration(node.parent.parent) ? true : "quit"; + return ignoreArrowFunctions ? false : "quit"; + case SyntaxKind.Block: + return isFunctionLikeDeclaration(node.parent) && node.parent.kind !== SyntaxKind.ArrowFunction ? "quit" : false; default: - return isExpressionNode(node) ? false : "quit"; + return false; } }); } @@ -34450,7 +34999,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function containerSeemsToBeEmptyDomElement(containingType: Type) { - return (compilerOptions.lib && !compilerOptions.lib.includes("dom")) && + return (compilerOptions.lib && !compilerOptions.lib.includes("lib.dom.d.ts")) && everyContainedType(containingType, type => type.symbol && /^(?:EventTarget|Node|(?:HTML[a-zA-Z]*)?Element)$/.test(unescapeLeadingUnderscores(type.symbol.escapedName))) && isEmptyObjectType(containingType); } @@ -37311,6 +37860,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (file && fileExtensionIsOneOf(file.fileName, [Extension.Cts, Extension.Mts])) { grammarErrorOnNode(node, Diagnostics.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead); } + if (compilerOptions.erasableSyntaxOnly) { + const start = skipTrivia(file.text, node.pos); + const end = node.expression.pos; + diagnostics.add(createFileDiagnostic(file, start, end - start, Diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled)); + } } return checkAssertionWorker(node, checkMode); } @@ -37518,6 +38072,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } if (node.keywordToken === SyntaxKind.ImportKeyword) { + if (node.name.escapedText === "defer") { + Debug.assert(!isCallExpression(node.parent) || node.parent.expression !== node, "Trying to get the type of `import.defer` in `import.defer(...)`"); + return errorType; + } return checkImportMetaProperty(node); } @@ -37869,7 +38427,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return signature.parameters.length > 0 ? getTypeAtPosition(signature, 0) : fallbackType; } - function inferFromAnnotatedParameters(signature: Signature, context: Signature, inferenceContext: InferenceContext) { + function inferFromAnnotatedParametersAndReturn(signature: Signature, context: Signature, inferenceContext: InferenceContext) { const len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); for (let i = 0; i < len; i++) { const declaration = signature.parameters[i].valueDeclaration as ParameterDeclaration; @@ -37880,6 +38438,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { inferTypes(inferenceContext.inferences, source, target); } } + const typeNode = signature.declaration && getEffectiveReturnTypeNode(signature.declaration); + if (typeNode) { + const source = getTypeFromTypeNode(typeNode); + const target = getReturnTypeOfSignature(context); + inferTypes(inferenceContext.inferences, source, target); + } } function assignContextualParameterTypes(signature: Signature, context: Signature) { @@ -38753,7 +39317,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // "x is T" means that x is T if and only if it returns true. If it returns false then x is not T. // This means that if the function is called with an argument of type trueType, there can't be anything left in the `else` branch. It must reduce to `never`. const falseCondition = createFlowNode(FlowFlags.FalseCondition, expr, antecedent); - const falseSubtype = getFlowTypeOfReference(param.name, initType, trueType, func, falseCondition); + const falseSubtype = getReducedType(getFlowTypeOfReference(param.name, initType, trueType, func, falseCondition)); return falseSubtype.flags & TypeFlags.Never ? trueType : undefined; } @@ -38877,7 +39441,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const inferenceContext = getInferenceContext(node); let instantiatedContextualSignature: Signature | undefined; if (checkMode && checkMode & CheckMode.Inferential) { - inferFromAnnotatedParameters(signature, contextualSignature, inferenceContext!); + inferFromAnnotatedParametersAndReturn(signature, contextualSignature, inferenceContext!); const restType = getEffectiveRestType(contextualSignature); if (restType && restType.flags & TypeFlags.TypeParameter) { instantiatedContextualSignature = instantiateSignature(contextualSignature, inferenceContext!.nonFixingMapper); @@ -38895,7 +39459,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { else if (contextualSignature && !node.typeParameters && contextualSignature.parameters.length > node.parameters.length) { const inferenceContext = getInferenceContext(node); if (checkMode && checkMode & CheckMode.Inferential) { - inferFromAnnotatedParameters(signature, contextualSignature, inferenceContext!); + inferFromAnnotatedParametersAndReturn(signature, contextualSignature, inferenceContext!); } } if (contextualSignature && !getReturnTypeFromAnnotation(node) && !signature.resolvedReturnType) { @@ -39840,24 +40404,44 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { grammarErrorOnNode(right, Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses, tokenToString(right.operatorToken.kind), tokenToString(operatorToken.kind)); } - const leftTarget = skipOuterExpressions(left, OuterExpressionKinds.All); - const nullishSemantics = getSyntacticNullishnessSemantics(leftTarget); - if (nullishSemantics !== PredicateSemantics.Sometimes) { - if (node.parent.kind === SyntaxKind.BinaryExpression) { - error(leftTarget, Diagnostics.This_binary_expression_is_never_nullish_Are_you_missing_parentheses); - } - else { - if (nullishSemantics === PredicateSemantics.Always) { - error(leftTarget, Diagnostics.This_expression_is_always_nullish); - } - else { - error(leftTarget, Diagnostics.Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish); - } - } + checkNullishCoalesceOperandLeft(node); + checkNullishCoalesceOperandRight(node); + } + } + + function checkNullishCoalesceOperandLeft(node: BinaryExpression) { + const leftTarget = skipOuterExpressions(node.left, OuterExpressionKinds.All); + + const nullishSemantics = getSyntacticNullishnessSemantics(leftTarget); + if (nullishSemantics !== PredicateSemantics.Sometimes) { + if (nullishSemantics === PredicateSemantics.Always) { + error(leftTarget, Diagnostics.This_expression_is_always_nullish); + } + else { + error(leftTarget, Diagnostics.Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish); } } } + function checkNullishCoalesceOperandRight(node: BinaryExpression) { + const rightTarget = skipOuterExpressions(node.right, OuterExpressionKinds.All); + const nullishSemantics = getSyntacticNullishnessSemantics(rightTarget); + if (isNotWithinNullishCoalesceExpression(node)) { + return; + } + + if (nullishSemantics === PredicateSemantics.Always) { + error(rightTarget, Diagnostics.This_expression_is_always_nullish); + } + else if (nullishSemantics === PredicateSemantics.Never) { + error(rightTarget, Diagnostics.This_expression_is_never_nullish); + } + } + + function isNotWithinNullishCoalesceExpression(node: BinaryExpression) { + return !isBinaryExpression(node.parent) || node.parent.operatorToken.kind !== SyntaxKind.QuestionQuestionToken; + } + function getSyntacticNullishnessSemantics(node: Node): PredicateSemantics { node = skipOuterExpressions(node); switch (node.kind) { @@ -40930,7 +41514,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } // Optimize for the common case of a call to a function with a single non-generic call // signature where we can just fetch the return type without checking the arguments. - if (isCallExpression(expr) && expr.expression.kind !== SyntaxKind.SuperKeyword && !isRequireCall(expr, /*requireStringLiteralLikeArgument*/ true) && !isSymbolOrSymbolForCall(expr)) { + if (isCallExpression(expr) && expr.expression.kind !== SyntaxKind.SuperKeyword && !isRequireCall(expr, /*requireStringLiteralLikeArgument*/ true) && !isSymbolOrSymbolForCall(expr) && !isImportCall(expr)) { return isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) : getReturnTypeOfSingleNonGenericCallSignature(checkNonNullExpression(expr.expression)); } @@ -41009,7 +41593,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { ) { Debug.assert(!!(type.symbol.flags & SymbolFlags.ConstEnum)); const constEnumDeclaration = type.symbol.valueDeclaration as EnumDeclaration; - const redirect = host.getRedirectReferenceForResolutionFromSourceOfProject(getSourceFileOfNode(constEnumDeclaration).resolvedPath); + const redirect = host.getRedirectFromOutput(getSourceFileOfNode(constEnumDeclaration).resolvedPath)?.resolvedRef; if (constEnumDeclaration.flags & NodeFlags.Ambient && !isValidTypeOnlyAliasUseSite(node) && (!redirect || !shouldPreserveConstEnums(redirect.commandLine.options))) { error(node, Diagnostics.Cannot_access_ambient_const_enums_when_0_is_enabled, isolatedModulesLikeFlagName); } @@ -41084,8 +41668,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { case SyntaxKind.ElementAccessExpression: return checkIndexedAccess(node as ElementAccessExpression, checkMode); case SyntaxKind.CallExpression: - if ((node as CallExpression).expression.kind === SyntaxKind.ImportKeyword) { - return checkImportCallExpression(node as ImportCall); + if (isImportCall(node)) { + return checkImportCallExpression(node); } // falls through case SyntaxKind.NewExpression: @@ -47020,6 +47604,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (isComputedNonLiteralName(member.name)) { error(member.name, Diagnostics.Computed_property_names_are_not_allowed_in_enums); } + else if (isBigIntLiteral(member.name)) { + error(member.name, Diagnostics.An_enum_member_cannot_have_a_numeric_name); + } else { const text = getTextOfPropertyName(member.name); if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) { @@ -47165,7 +47752,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { checkCollisionsForDeclarationName(node, node.name); checkExportsOnMergedDeclarations(node); - node.members.forEach(checkEnumMember); + node.members.forEach(checkSourceElement); if (compilerOptions.erasableSyntaxOnly && !(node.flags & NodeFlags.Ambient)) { error(node, Diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled); @@ -47663,7 +48250,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { targetFlags & SymbolFlags.ConstEnum ) { const constEnumDeclaration = target.valueDeclaration as EnumDeclaration; - const redirect = host.getRedirectReferenceForResolutionFromSourceOfProject(getSourceFileOfNode(constEnumDeclaration).resolvedPath); + const redirect = host.getRedirectFromOutput(getSourceFileOfNode(constEnumDeclaration).resolvedPath)?.resolvedRef; if (constEnumDeclaration.flags & NodeFlags.Ambient && (!redirect || !shouldPreserveConstEnums(redirect.commandLine.options))) { error(node, Diagnostics.Cannot_access_ambient_const_enums_when_0_is_enabled, isolatedModulesLikeFlagName); } @@ -47830,11 +48417,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } checkGrammarModifiers(node); - const isImportEquals = isInternalModuleImportEqualsDeclaration(node); - if (compilerOptions.erasableSyntaxOnly && isImportEquals && !(node.flags & NodeFlags.Ambient)) { + if (compilerOptions.erasableSyntaxOnly && !(node.flags & NodeFlags.Ambient)) { error(node, Diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled); } - if (isImportEquals || checkExternalImportOrExportDeclaration(node)) { + if (isInternalModuleImportEqualsDeclaration(node) || checkExternalImportOrExportDeclaration(node)) { checkImportBinding(node); markLinkedReferences(node, ReferenceHint.ExportImportEquals); if (node.moduleReference.kind !== SyntaxKind.ExternalModuleReference) { @@ -47975,6 +48561,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return; } + if (compilerOptions.erasableSyntaxOnly && node.isExportEquals && !(node.flags & NodeFlags.Ambient)) { + error(node, Diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled); + } const container = node.parent.kind === SyntaxKind.SourceFile ? node.parent : node.parent.parent as ModuleDeclaration; if (container.kind === SyntaxKind.ModuleDeclaration && !isAmbientModule(container)) { if (node.isExportEquals) { @@ -48364,6 +48953,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return checkTypeAliasDeclaration(node as TypeAliasDeclaration); case SyntaxKind.EnumDeclaration: return checkEnumDeclaration(node as EnumDeclaration); + case SyntaxKind.EnumMember: + return checkEnumMember(node as EnumMember); case SyntaxKind.ModuleDeclaration: return checkModuleDeclaration(node as ModuleDeclaration); case SyntaxKind.ImportDeclaration: @@ -49348,6 +49939,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return isExportAssignment(node.parent) ? Debug.checkDefined(node.parent.symbol) : undefined; case SyntaxKind.ImportKeyword: + if (isMetaProperty(node.parent) && node.parent.name.escapedText === "defer") { + return undefined; + } + // falls through case SyntaxKind.NewKeyword: return isMetaProperty(node.parent) ? checkMetaPropertyKeyword(node.parent).symbol : undefined; case SyntaxKind.InstanceOfKeyword: @@ -50537,6 +51132,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } }, + symbolToDeclarations: (symbol, meaning, flags, maximumLength, verbosityLevel, out) => { + return nodeBuilder.symbolToDeclarations(symbol, meaning, flags, maximumLength, verbosityLevel, out); + }, }; function isImportRequiredByAugmentation(node: ImportDeclaration) { @@ -52262,17 +52860,28 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } const blockScopeFlags = declarationList.flags & NodeFlags.BlockScoped; - if ((blockScopeFlags === NodeFlags.Using || blockScopeFlags === NodeFlags.AwaitUsing) && isForInStatement(declarationList.parent)) { - return grammarErrorOnNode( - declarationList, - blockScopeFlags === NodeFlags.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 === NodeFlags.Using || blockScopeFlags === NodeFlags.AwaitUsing) { + if (isForInStatement(declarationList.parent)) { + return grammarErrorOnNode( + declarationList, + blockScopeFlags === NodeFlags.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 (declarationList.flags & NodeFlags.Ambient) { + return grammarErrorOnNode( + declarationList, + blockScopeFlags === NodeFlags.Using ? + Diagnostics.using_declarations_are_not_allowed_in_ambient_contexts : + Diagnostics.await_using_declarations_are_not_allowed_in_ambient_contexts, + ); + } - if (blockScopeFlags === NodeFlags.AwaitUsing) { - return checkAwaitGrammar(declarationList); + if (blockScopeFlags === NodeFlags.AwaitUsing) { + return checkAwaitGrammar(declarationList); + } } return false; @@ -52304,7 +52913,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { blockScopeKind === NodeFlags.Using ? "using" : blockScopeKind === NodeFlags.AwaitUsing ? "await using" : Debug.fail("Unknown BlockScope flag"); - return grammarErrorOnNode(node, Diagnostics._0_declarations_can_only_be_declared_inside_a_block, keyword); + error(node, Diagnostics._0_declarations_can_only_be_declared_inside_a_block, keyword); } } } @@ -52319,7 +52928,18 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { break; case SyntaxKind.ImportKeyword: if (escapedText !== "meta") { - return grammarErrorOnNode(node.name, Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, unescapeLeadingUnderscores(node.name.escapedText), tokenToString(node.keywordToken), "meta"); + const isCallee = isCallExpression(node.parent) && node.parent.expression === node; + if (escapedText === "defer") { + if (!isCallee) { + return grammarErrorAtPos(node, node.end, 0, Diagnostics._0_expected, "("); + } + } + else { + if (isCallee) { + return grammarErrorOnNode(node.name, Diagnostics._0_is_not_a_valid_meta_property_for_keyword_import_Did_you_mean_meta_or_defer, unescapeLeadingUnderscores(node.name.escapedText)); + } + return grammarErrorOnNode(node.name, Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, unescapeLeadingUnderscores(node.name.escapedText), tokenToString(node.keywordToken), "meta"); + } } break; } @@ -52360,7 +52980,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function grammarErrorOnNode(node: Node, message: DiagnosticMessage, ...args: DiagnosticArguments): boolean { const sourceFile = getSourceFileOfNode(node); if (!hasParseDiagnostics(sourceFile)) { - diagnostics.add(createDiagnosticForNode(node, message, ...args)); + error(node, message, ...args); return true; } return false; @@ -52578,11 +53198,24 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function checkGrammarImportClause(node: ImportClause): boolean { - 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.phaseModifier === SyntaxKind.TypeKeyword) { + if (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.namedBindings?.kind === SyntaxKind.NamedImports) { + return checkGrammarNamedImportsOrExports(node.namedBindings); + } } - if (node.isTypeOnly && node.namedBindings?.kind === SyntaxKind.NamedImports) { - return checkGrammarNamedImportsOrExports(node.namedBindings); + else if (node.phaseModifier === SyntaxKind.DeferKeyword) { + if (node.name) { + return grammarErrorOnNode(node, Diagnostics.Default_imports_are_not_allowed_in_a_deferred_import); + } + if (node.namedBindings?.kind === SyntaxKind.NamedImports) { + return grammarErrorOnNode(node, Diagnostics.Named_imports_are_not_allowed_in_a_deferred_import); + } + if (moduleKind !== ModuleKind.ESNext && moduleKind !== ModuleKind.Preserve) { + return grammarErrorOnNode(node, Diagnostics.Deferred_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_or_preserve); + } } return false; } @@ -52605,7 +53238,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return grammarErrorOnNode(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } - if (moduleKind === ModuleKind.ES2015) { + if (node.expression.kind === SyntaxKind.MetaProperty) { + if (moduleKind !== ModuleKind.ESNext && moduleKind !== ModuleKind.Preserve) { + return grammarErrorOnNode(node, Diagnostics.Deferred_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_or_preserve); + } + } + else if (moduleKind === ModuleKind.ES2015) { return grammarErrorOnNode(node, Diagnostics.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_node18_or_nodenext); } @@ -52846,7 +53484,7 @@ function createBasicNodeBuilderModuleSpecifierResolutionHost(host: TypeCheckerHo getPackageJsonInfoCache: () => host.getPackageJsonInfoCache?.(), useCaseSensitiveFileNames: () => host.useCaseSensitiveFileNames(), redirectTargetsMap: host.redirectTargetsMap, - getProjectReferenceRedirect: fileName => host.getProjectReferenceRedirect(fileName), + getRedirectFromSourceFile: fileName => host.getRedirectFromSourceFile(fileName), isSourceOfProjectReferenceRedirect: fileName => host.isSourceOfProjectReferenceRedirect(fileName), fileExists: fileName => host.fileExists(fileName), getFileIncludeReasons: () => host.getFileIncludeReasons(), @@ -52871,6 +53509,10 @@ interface NodeBuilderContext extends SyntacticTypeNodeBuilderContext { flags: NodeBuilderFlags; internalFlags: InternalNodeBuilderFlags; tracker: SymbolTrackerImpl; + /* Maximum depth we're allowed to expand names. */ + readonly maxExpansionDepth: number; + /* Maximum length before we truncate the output. */ + readonly maxTruncationLength: number; // State encounteredError: boolean; @@ -52894,7 +53536,13 @@ interface NodeBuilderContext extends SyntacticTypeNodeBuilderContext { reverseMappedStack: ReverseMappedSymbol[] | undefined; bundled: boolean; mapper: TypeMapper | undefined; + /* How many levels of nested names we have expanded so far. */ + depth: number; suppressReportInferenceFallback: boolean; + typeStack: number[]; + + // Output + out: WriterContextOut; } class SymbolTrackerImpl implements SymbolTracker { diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 8248a04194666..dd861e653acd8 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -44,7 +44,6 @@ import { filterMutate, find, findIndex, - firstOrUndefinedIterator, flatten, forEach, forEachEntry, @@ -133,9 +132,9 @@ const compileOnSaveCommandLineOption: CommandLineOption = { const jsxOptionMap = new Map(Object.entries({ "preserve": JsxEmit.Preserve, "react-native": JsxEmit.ReactNative, - "react": JsxEmit.React, "react-jsx": JsxEmit.ReactJSX, "react-jsxdev": JsxEmit.ReactJSXDev, + "react": JsxEmit.React, })); /** @internal */ @@ -249,6 +248,8 @@ const libEntries: [string, string][] = [ ["esnext.iterator", "lib.esnext.iterator.d.ts"], ["esnext.promise", "lib.esnext.promise.d.ts"], ["esnext.float16", "lib.esnext.float16.d.ts"], + ["esnext.error", "lib.esnext.error.d.ts"], + ["esnext.sharedmemory", "lib.esnext.sharedmemory.d.ts"], ["decorators", "lib.decorators.d.ts"], ["decorators.legacy", "lib.decorators.legacy.d.ts"], ]; @@ -2789,140 +2790,146 @@ function serializeOptionBaseObject( return result; } -/** - * Generate a list of the compiler options whose value is not the default. - * @param options compilerOptions to be evaluated. -/** @internal */ -export function getCompilerOptionsDiffValue(options: CompilerOptions, newLine: string): string { - const compilerOptionsMap = getSerializedCompilerOption(options); - return getOverwrittenDefaultOptions(); - - function makePadding(paddingLength: number): string { - return Array(paddingLength + 1).join(" "); - } - - function getOverwrittenDefaultOptions() { - const result: string[] = []; - const tab = makePadding(2); - commandOptionsWithoutBuild.forEach(cmd => { - if (!compilerOptionsMap.has(cmd.name)) { - return; - } - - const newValue = compilerOptionsMap.get(cmd.name); - const defaultValue = getDefaultValueForOption(cmd); - if (newValue !== defaultValue) { - result.push(`${tab}${cmd.name}: ${newValue}`); - } - else if (hasProperty(defaultInitCompilerOptions, cmd.name)) { - result.push(`${tab}${cmd.name}: ${defaultValue}`); - } - }); - return result.join(newLine) + newLine; - } -} - -/** - * Get the compiler options to be written into the tsconfig.json. - * @param options commandlineOptions to be included in the compileOptions. - */ -function getSerializedCompilerOption(options: CompilerOptions): Map { - const compilerOptions = extend(options, defaultInitCompilerOptions); - return serializeCompilerOptions(compilerOptions); -} /** * Generate tsconfig configuration when running command line "--init" * @param options commandlineOptions to be generated into tsconfig.json - * @param fileNames array of filenames to be generated into tsconfig.json - * * @internal */ -export function generateTSConfig(options: CompilerOptions, fileNames: readonly string[], newLine: string): string { - const compilerOptionsMap = getSerializedCompilerOption(options); - return writeConfigurations(); +export function generateTSConfig(options: CompilerOptions, newLine: string): string { + type PresetValue = string | number | boolean | (string | number | boolean)[]; + + const tab = " "; + const result: string[] = []; + const allSetOptions = Object.keys(options).filter(k => k !== "init" && k !== "help" && k !== "watch"); + + result.push(`{`); + result.push(`${tab}// ${getLocaleSpecificMessage(Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file)}`); + result.push(`${tab}"compilerOptions": {`); + + emitHeader(Diagnostics.File_Layout); + emitOption("rootDir", "./src", "optional"); + emitOption("outDir", "./dist", "optional"); + + newline(); + + emitHeader(Diagnostics.Environment_Settings); + emitHeader(Diagnostics.See_also_https_Colon_Slash_Slashaka_ms_Slashtsconfig_Slashmodule); + emitOption("module", ModuleKind.NodeNext); + emitOption("target", ScriptTarget.ESNext); + emitOption("types", []); + if (options.lib) { + emitOption("lib", options.lib); + } + emitHeader(Diagnostics.For_nodejs_Colon); + result.push(`${tab}${tab}// "lib": ["esnext"],`); + result.push(`${tab}${tab}// "types": ["node"],`); + emitHeader(Diagnostics.and_npm_install_D_types_Slashnode); + + newline(); + + emitHeader(Diagnostics.Other_Outputs); + emitOption("sourceMap", /*defaultValue*/ true); + emitOption("declaration", /*defaultValue*/ true); + emitOption("declarationMap", /*defaultValue*/ true); + + newline(); + + emitHeader(Diagnostics.Stricter_Typechecking_Options); + emitOption("noUncheckedIndexedAccess", /*defaultValue*/ true); + emitOption("exactOptionalPropertyTypes", /*defaultValue*/ true); + + newline(); + + emitHeader(Diagnostics.Style_Options); + emitOption("noImplicitReturns", /*defaultValue*/ true, "optional"); + emitOption("noImplicitOverride", /*defaultValue*/ true, "optional"); + emitOption("noUnusedLocals", /*defaultValue*/ true, "optional"); + emitOption("noUnusedParameters", /*defaultValue*/ true, "optional"); + emitOption("noFallthroughCasesInSwitch", /*defaultValue*/ true, "optional"); + emitOption("noPropertyAccessFromIndexSignature", /*defaultValue*/ true, "optional"); + + newline(); + + emitHeader(Diagnostics.Recommended_Options); + emitOption("strict", /*defaultValue*/ true); + emitOption("jsx", JsxEmit.ReactJSX); + emitOption("verbatimModuleSyntax", /*defaultValue*/ true); + emitOption("isolatedModules", /*defaultValue*/ true); + emitOption("noUncheckedSideEffectImports", /*defaultValue*/ true); + emitOption("moduleDetection", ModuleDetectionKind.Force); + emitOption("skipLibCheck", /*defaultValue*/ true); + + // Write any user-provided options we haven't already + if (allSetOptions.length > 0) { + newline(); + while (allSetOptions.length > 0) { + emitOption(allSetOptions[0], options[allSetOptions[0]]); + } + } - function makePadding(paddingLength: number): string { - return Array(paddingLength + 1).join(" "); + function newline() { + result.push(""); } - function isAllowedOptionForOutput({ category, name, isCommandLineOnly }: CommandLineOption): boolean { - // Skip options which do not have a category or have categories which are more niche - const categoriesToSkip = [Diagnostics.Command_line_Options, Diagnostics.Editor_Support, Diagnostics.Compiler_Diagnostics, Diagnostics.Backwards_Compatibility, Diagnostics.Watch_and_Build_Modes, Diagnostics.Output_Formatting]; - return !isCommandLineOnly && category !== undefined && (!categoriesToSkip.includes(category) || compilerOptionsMap.has(name)); + function emitHeader(header: DiagnosticMessage) { + result.push(`${tab}${tab}// ${getLocaleSpecificMessage(header)}`); } - function writeConfigurations() { - // Filter applicable options to place in the file - const categorizedOptions = new Map(); - // Set allowed categories in order - categorizedOptions.set(Diagnostics.Projects, []); - categorizedOptions.set(Diagnostics.Language_and_Environment, []); - categorizedOptions.set(Diagnostics.Modules, []); - categorizedOptions.set(Diagnostics.JavaScript_Support, []); - categorizedOptions.set(Diagnostics.Emit, []); - categorizedOptions.set(Diagnostics.Interop_Constraints, []); - categorizedOptions.set(Diagnostics.Type_Checking, []); - categorizedOptions.set(Diagnostics.Completeness, []); - for (const option of optionDeclarations) { - if (isAllowedOptionForOutput(option)) { - let listForCategory = categorizedOptions.get(option.category!); - if (!listForCategory) categorizedOptions.set(option.category!, listForCategory = []); - listForCategory.push(option); - } + // commented = 'always': Always comment this out, even if it's on commandline + // commented = 'optional': Comment out unless it's on commandline + // commented = 'never': Never comment this out + function emitOption(setting: K, defaultValue: CompilerOptions[K], commented: "always" | "optional" | "never" = "never") { + const existingOptionIndex = allSetOptions.indexOf(setting); + if (existingOptionIndex >= 0) { + allSetOptions.splice(existingOptionIndex, 1); } - // Serialize all options and their descriptions - let marginLength = 0; - let seenKnownKeys = 0; - const entries: { value: string; description?: string; }[] = []; - categorizedOptions.forEach((options, category) => { - if (entries.length !== 0) { - entries.push({ value: "" }); - } - entries.push({ value: `/* ${getLocaleSpecificMessage(category)} */` }); - for (const option of options) { - let optionName; - if (compilerOptionsMap.has(option.name)) { - optionName = `"${option.name}": ${JSON.stringify(compilerOptionsMap.get(option.name))}${(seenKnownKeys += 1) === compilerOptionsMap.size ? "" : ","}`; - } - else { - optionName = `// "${option.name}": ${JSON.stringify(getDefaultValueForOption(option))},`; - } - entries.push({ - value: optionName, - description: `/* ${option.description && getLocaleSpecificMessage(option.description) || option.name} */`, - }); - marginLength = Math.max(optionName.length, marginLength); - } - }); - - // Write the output - const tab = makePadding(2); - const result: string[] = []; - result.push(`{`); - result.push(`${tab}"compilerOptions": {`); - result.push(`${tab}${tab}/* ${getLocaleSpecificMessage(Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file)} */`); - result.push(""); - // Print out each row, aligning all the descriptions on the same column. - for (const entry of entries) { - const { value, description = "" } = entry; - result.push(value && `${tab}${tab}${value}${description && (makePadding(marginLength - value.length + 2) + description)}`); + let comment: boolean; + if (commented === "always") { + comment = true; } - if (fileNames.length) { - result.push(`${tab}},`); - result.push(`${tab}"files": [`); - for (let i = 0; i < fileNames.length; i++) { - result.push(`${tab}${tab}${JSON.stringify(fileNames[i])}${i === fileNames.length - 1 ? "" : ","}`); - } - result.push(`${tab}]`); + else if (commented === "never") { + comment = false; + } + else { + comment = !hasProperty(options, setting); + } + + const value = (options[setting] ?? defaultValue) as PresetValue; + if (comment) { + result.push(`${tab}${tab}// "${setting}": ${formatValueOrArray(setting, value)},`); + } + else { + result.push(`${tab}${tab}"${setting}": ${formatValueOrArray(setting, value)},`); + } + } + + function formatValueOrArray(settingName: string, value: PresetValue): string { + const option = optionDeclarations.filter(c => c.name === settingName)[0]; + if (!option) Debug.fail(`No option named ${settingName}?`); + const map = (option.type instanceof Map) ? option.type : undefined; + if (isArray(value)) { + // eslint-disable-next-line local/no-in-operator + const map = ("element" in option && (option.element.type instanceof Map)) ? option.element.type : undefined; + return `[${value.map(v => formatSingleValue(v, map)).join(", ")}]`; } else { - result.push(`${tab}}`); + return formatSingleValue(value, map); } - result.push(`}`); + } - return result.join(newLine) + newLine; + function formatSingleValue(value: PresetValue, map: Map | undefined) { + if (map) { + value = getNameOfCompilerOptionValue(value as string | number, map) ?? Debug.fail(`No matching value of ${value}`); + } + return JSON.stringify(value); } + + result.push(`${tab}}`); + result.push(`}`); + result.push(``); + + return result.join(newLine); } /** @internal */ @@ -4256,25 +4263,3 @@ function getOptionValueWithEmptyStrings(value: any, option: CommandLineOption): }); } } - -function getDefaultValueForOption(option: CommandLineOption): {} { - switch (option.type) { - case "number": - return 1; - case "boolean": - return true; - case "string": - const defaultValue = option.defaultValueDescription; - return option.isFilePath ? `./${defaultValue && typeof defaultValue === "string" ? defaultValue : ""}` : ""; - case "list": - return []; - case "listOrElement": - return getDefaultValueForOption(option.element); - case "object": - return {}; - default: - const value = firstOrUndefinedIterator(option.type.keys()); - if (value !== undefined) return value; - return Debug.fail("Expected 'option.type' to have entries."); - } -} diff --git a/src/compiler/corePublic.ts b/src/compiler/corePublic.ts index 532d2bb55c3e7..dc4843810a8a4 100644 --- a/src/compiler/corePublic.ts +++ b/src/compiler/corePublic.ts @@ -1,6 +1,6 @@ // WARNING: The script `configurePrerelease.ts` uses a regexp to parse out these values. // If changing the text in this section, be sure to test `configurePrerelease` too. -export const versionMajorMinor = "5.8"; +export const versionMajorMinor = "5.9"; // The following is baselined as a literal template type without intervention /** The version of the TypeScript compiler release */ export const version: string = `${versionMajorMinor}.0-dev`; diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 0d7e0bb39a8d4..fad4ba72a5569 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1837,6 +1837,14 @@ "category": "Error", "code": 1544 }, + "'using' declarations are not allowed in ambient contexts.": { + "category": "Error", + "code": 1545 + }, + "'await using' declarations are not allowed in ambient contexts.": { + "category": "Error", + "code": 1546 + }, "The types of '{0}' are incompatible between these types.": { "category": "Error", @@ -3767,7 +3775,7 @@ "category": "Error", "code": 2814 }, - "'arguments' cannot be referenced in property initializers.": { + "'arguments' cannot be referenced in property initializers or class static initialization blocks.": { "category": "Error", "code": 2815 }, @@ -3987,6 +3995,10 @@ "category": "Error", "code": 2880 }, + "This expression is never nullish.": { + "category": "Error", + "code": 2881 + }, "Import declaration '{0}' is using private name '{1}'.": { "category": "Error", @@ -5698,6 +5710,42 @@ "category": "Message", "code": 6283 }, + "File Layout": { + "category": "Message", + "code": 6284 + }, + "Environment Settings": { + "category": "Message", + "code": 6285 + }, + "See also https://aka.ms/tsconfig/module": { + "category": "Message", + "code": 6286 + }, + "For nodejs:": { + "category": "Message", + "code": 6287 + }, + "and npm install -D @types/node": { + "category": "Message", + "code": 6290 + }, + "Other Outputs": { + "category": "Message", + "code": 6291 + }, + "Stricter Typechecking Options": { + "category": "Message", + "code": 6292 + }, + "Style Options": { + "category": "Message", + "code": 6293 + }, + "Recommended Options": { + "category": "Message", + "code": 6294 + }, "Enable project compilation": { "category": "Message", @@ -8447,5 +8495,21 @@ "String literal import and export names are not supported when the '--module' flag is set to 'es2015' or 'es2020'.": { "category": "Error", "code": 18057 + }, + "Default imports are not allowed in a deferred import.": { + "category": "Error", + "code": 18058 + }, + "Named imports are not allowed in a deferred import.": { + "category": "Error", + "code": 18059 + }, + "Deferred imports are only supported when the '--module' flag is set to 'esnext' or 'preserve'.": { + "category": "Error", + "code": 18060 + }, + "'{0}' is not a valid meta-property for keyword 'import'. Did you mean 'meta' or 'defer'?": { + "category": "Error", + "code": 18061 } } diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 01a96579861f4..c60fd92787275 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1168,6 +1168,7 @@ export const notImplementedResolver: EmitResolver = { isImportRequiredByAugmentation: notImplemented, isDefinitelyReferenceToGlobalSymbolObject: notImplemented, createLateBoundIndexSignatures: notImplemented, + symbolToDeclarations: notImplemented, }; const enum PipelinePhase { @@ -3685,8 +3686,8 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri } function emitImportClause(node: ImportClause) { - if (node.isTypeOnly) { - emitTokenWithComment(SyntaxKind.TypeKeyword, node.pos, writeKeyword, node); + if (node.phaseModifier !== undefined) { + emitTokenWithComment(node.phaseModifier, node.pos, writeKeyword, node); writeSpace(); } emit(node.name); diff --git a/src/compiler/executeCommandLine.ts b/src/compiler/executeCommandLine.ts index ca166635ac5c1..edeb0eb277c57 100644 --- a/src/compiler/executeCommandLine.ts +++ b/src/compiler/executeCommandLine.ts @@ -48,7 +48,6 @@ import { formatMessage, generateTSConfig, getBuildOrderFromAnyBuildOrder, - getCompilerOptionsDiffValue, getConfigFileParsingDiagnostics, getDiagnosticText, getErrorSummaryText, @@ -574,7 +573,7 @@ function executeCommandLineWorker( } if (commandLine.options.init) { - writeConfigFile(sys, reportDiagnostic, commandLine.options, commandLine.fileNames); + writeConfigFile(sys, reportDiagnostic, commandLine.options); return sys.exit(ExitStatus.Success); } @@ -1277,7 +1276,6 @@ function writeConfigFile( sys: System, reportDiagnostic: DiagnosticReporter, options: CompilerOptions, - fileNames: string[], ) { const currentDirectory = sys.getCurrentDirectory(); const file = normalizePath(combinePaths(currentDirectory, "tsconfig.json")); @@ -1285,9 +1283,8 @@ function writeConfigFile( reportDiagnostic(createCompilerDiagnostic(Diagnostics.A_tsconfig_json_file_is_already_defined_at_Colon_0, file)); } else { - sys.writeFile(file, generateTSConfig(options, fileNames, sys.newLine)); - const output: string[] = [sys.newLine, ...getHeader(sys, "Created a new tsconfig.json with:")]; - output.push(getCompilerOptionsDiffValue(options, sys.newLine) + sys.newLine + sys.newLine); + sys.writeFile(file, generateTSConfig(options, sys.newLine)); + const output: string[] = [sys.newLine, ...getHeader(sys, "Created a new tsconfig.json")]; output.push(`You can learn more at https://aka.ms/tsconfig` + sys.newLine); for (const line of output) { sys.write(line); diff --git a/src/compiler/expressionToTypeNode.ts b/src/compiler/expressionToTypeNode.ts index ad4f8321066e9..bb3db3bd0ccc5 100644 --- a/src/compiler/expressionToTypeNode.ts +++ b/src/compiler/expressionToTypeNode.ts @@ -435,9 +435,11 @@ export function createSyntacticTypeNodeBuilder( if (!resolver.canReuseTypeNode(context, node)) { return resolver.serializeExistingTypeNode(context, node); } + const specifier = rewriteModuleSpecifier(node, node.argument.literal); + const literal = specifier === node.argument.literal ? reuseNode(context, node.argument.literal) : specifier; return factory.updateImportTypeNode( node, - factory.updateLiteralTypeNode(node.argument, rewriteModuleSpecifier(node, node.argument.literal)), + literal === node.argument.literal ? reuseNode(context, node.argument) : factory.createLiteralTypeNode(literal), visitNode(node.attributes, visitExistingNodeTreeSymbols, isImportAttributes), visitNode(node.qualifier, visitExistingNodeTreeSymbols, isEntityName), visitNodes(node.typeArguments, visitExistingNodeTreeSymbols, isTypeNode), @@ -612,10 +614,7 @@ export function createSyntacticTypeNodeBuilder( function rewriteModuleSpecifier(parent: ImportTypeNode, lit: StringLiteral) { const newName = resolver.getModuleSpecifierOverride(context, parent, lit); - if (newName) { - return setOriginalNode(factory.createStringLiteral(newName), lit); - } - return visitNode(lit, visitExistingNodeTreeSymbols, isStringLiteral)!; + return newName ? setOriginalNode(factory.createStringLiteral(newName), lit) : lit; } } } @@ -764,7 +763,7 @@ export function createSyntacticTypeNodeBuilder( return withNewScope(context, node, () => serializeTypeAnnotationOfDeclaration(accessorType, context, node, symbol) ?? inferTypeOfDeclaration(node, symbol, context)); } if (accessorDeclarations.getAccessor) { - return withNewScope(context, accessorDeclarations.getAccessor, () => createReturnFromSignature(accessorDeclarations.getAccessor!, /*symbol*/ undefined, context)); + return withNewScope(context, accessorDeclarations.getAccessor, () => createReturnFromSignature(accessorDeclarations.getAccessor!, symbol, context)); } return undefined; } @@ -855,14 +854,14 @@ export function createSyntacticTypeNodeBuilder( return resolver.serializeTypeOfExpression(context, node) ?? factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); } - function inferReturnTypeOfSignatureSignature(node: SignatureDeclaration | JSDocSignature, context: SyntacticTypeNodeBuilderContext, reportFallback: boolean) { + function inferReturnTypeOfSignatureSignature(node: SignatureDeclaration | JSDocSignature, context: SyntacticTypeNodeBuilderContext, symbol: Symbol | undefined, reportFallback: boolean) { if (reportFallback) { context.tracker.reportInferenceFallback(node); } if (context.noInferenceFallback === true) { return factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); } - return resolver.serializeReturnTypeForSignature(context, node) ?? factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); + return resolver.serializeReturnTypeForSignature(context, node, symbol) ?? factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); } function inferAccessorType(node: GetAccessorDeclaration | SetAccessorDeclaration, allAccessors: AllAccessorDeclarations, context: SyntacticTypeNodeBuilderContext, symbol: Symbol | undefined, reportFallback: boolean = true): TypeNode | undefined { @@ -1123,15 +1122,16 @@ export function createSyntacticTypeNodeBuilder( ); } function reuseTypeParameters(typeParameters: NodeArray | undefined, context: SyntacticTypeNodeBuilderContext) { - return typeParameters?.map(tp => - factory.updateTypeParameterDeclaration( + return typeParameters?.map(tp => { + const { node: tpName } = resolver.trackExistingEntityName(context, tp.name); + return factory.updateTypeParameterDeclaration( tp, tp.modifiers?.map(m => reuseNode(context, m)), - reuseNode(context, tp.name), + tpName, serializeExistingTypeNodeWithFallback(tp.constraint, context), serializeExistingTypeNodeWithFallback(tp.default, context), - ) - ); + ); + }); } function typeFromObjectLiteralMethod(method: MethodDeclaration, name: PropertyName, context: SyntacticTypeNodeBuilderContext, isConstContext: boolean) { @@ -1276,7 +1276,7 @@ export function createSyntacticTypeNodeBuilder( else if (isValueSignatureDeclaration(fn)) { returnType = typeFromSingleReturnExpression(fn, context); } - return returnType.type !== undefined ? returnType.type : inferReturnTypeOfSignatureSignature(fn, context, reportFallback && returnType.reportFallback && !returnTypeNode); + return returnType.type !== undefined ? returnType.type : inferReturnTypeOfSignatureSignature(fn, context, symbol, reportFallback && returnType.reportFallback && !returnTypeNode); } function typeFromSingleReturnExpression(declaration: FunctionLikeDeclaration | undefined, context: SyntacticTypeNodeBuilderContext): SyntacticResult { diff --git a/src/compiler/factory/nodeFactory.ts b/src/compiler/factory/nodeFactory.ts index 694262eeeb54a..c7286dc33c677 100644 --- a/src/compiler/factory/nodeFactory.ts +++ b/src/compiler/factory/nodeFactory.ts @@ -135,6 +135,7 @@ import { ImportClause, ImportDeclaration, ImportEqualsDeclaration, + ImportPhaseModifierSyntaxKind, ImportSpecifier, ImportTypeAssertionContainer, ImportTypeNode, @@ -4723,14 +4724,18 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode } // @api - function createImportClause(isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause { + function createImportClause(phaseModifier: ImportPhaseModifierSyntaxKind | boolean | undefined, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause { const node = createBaseDeclaration(SyntaxKind.ImportClause); - node.isTypeOnly = isTypeOnly; + if (typeof phaseModifier === "boolean") { + phaseModifier = phaseModifier ? SyntaxKind.TypeKeyword : undefined; + } + node.isTypeOnly = phaseModifier === SyntaxKind.TypeKeyword; + node.phaseModifier = phaseModifier; node.name = name; node.namedBindings = namedBindings; node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.namedBindings); - if (isTypeOnly) { + if (phaseModifier === SyntaxKind.TypeKeyword) { node.transformFlags |= TransformFlags.ContainsTypeScript; } node.transformFlags &= ~TransformFlags.ContainsPossibleTopLevelAwait; // always parsed in an Await context @@ -4738,11 +4743,14 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode } // @api - function updateImportClause(node: ImportClause, isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined) { - return node.isTypeOnly !== isTypeOnly + function updateImportClause(node: ImportClause, phaseModifier: ImportPhaseModifierSyntaxKind | boolean | undefined, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined) { + if (typeof phaseModifier === "boolean") { + phaseModifier = phaseModifier ? SyntaxKind.TypeKeyword : undefined; + } + return node.phaseModifier !== phaseModifier || node.name !== name || node.namedBindings !== namedBindings - ? update(createImportClause(isTypeOnly, name, namedBindings), node) + ? update(createImportClause(phaseModifier, name, namedBindings), node) : node; } diff --git a/src/compiler/factory/utilities.ts b/src/compiler/factory/utilities.ts index 80df86fd3ceae..d58b118a8e32d 100644 --- a/src/compiler/factory/utilities.ts +++ b/src/compiler/factory/utilities.ts @@ -700,9 +700,10 @@ export function createExternalHelpersImportDeclarationIfNeeded(nodeFactory: Node const impliedModuleKind = getImpliedNodeFormatForEmitWorker(sourceFile, compilerOptions); const helpers = getImportedHelpers(sourceFile); if ( - (moduleKind >= ModuleKind.ES2015 && moduleKind <= ModuleKind.ESNext) || - impliedModuleKind === ModuleKind.ESNext || - impliedModuleKind === undefined && moduleKind === ModuleKind.Preserve + impliedModuleKind !== ModuleKind.CommonJS && + ((moduleKind >= ModuleKind.ES2015 && moduleKind <= ModuleKind.ESNext) || + impliedModuleKind === ModuleKind.ESNext || + impliedModuleKind === undefined && moduleKind === ModuleKind.Preserve) ) { // When we emit as an ES module, generate an `import` declaration that uses named imports for helpers. // If we cannot determine the implied module kind under `module: preserve` we assume ESM. @@ -730,7 +731,7 @@ export function createExternalHelpersImportDeclarationIfNeeded(nodeFactory: Node const externalHelpersImportDeclaration = nodeFactory.createImportDeclaration( /*modifiers*/ undefined, - nodeFactory.createImportClause(/*isTypeOnly*/ false, /*name*/ undefined, namedBindings), + nodeFactory.createImportClause(/*phaseModifier*/ undefined, /*name*/ undefined, namedBindings), nodeFactory.createStringLiteral(externalHelpersModuleNameText), /*attributes*/ undefined, ); diff --git a/src/compiler/moduleSpecifiers.ts b/src/compiler/moduleSpecifiers.ts index eacba122e496c..8860677e6cab1 100644 --- a/src/compiler/moduleSpecifiers.ts +++ b/src/compiler/moduleSpecifiers.ts @@ -719,7 +719,7 @@ export function forEachFileNameOfModule( ): T | undefined { const getCanonicalFileName = hostGetCanonicalFileName(host); const cwd = host.getCurrentDirectory(); - const referenceRedirect = host.isSourceOfProjectReferenceRedirect(importedFileName) ? host.getProjectReferenceRedirect(importedFileName) : undefined; + const referenceRedirect = host.isSourceOfProjectReferenceRedirect(importedFileName) ? host.getRedirectFromSourceFile(importedFileName)?.outputDts : undefined; const importedPath = toPath(importedFileName, cwd, getCanonicalFileName); const redirects = host.redirectTargetsMap.get(importedPath) || emptyArray; const importedFileNames = [...(referenceRedirect ? [referenceRedirect] : emptyArray), importedFileName, ...redirects]; diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 8c69cccba1282..b04055500dafa 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -123,6 +123,7 @@ import { ImportDeclaration, ImportEqualsDeclaration, ImportOrExportSpecifier, + ImportPhaseModifierSyntaxKind, ImportSpecifier, ImportTypeAssertionContainer, ImportTypeNode, @@ -5938,7 +5939,15 @@ namespace Parser { nextToken(); // advance past the 'import' nextToken(); // advance past the dot expression = finishNode(factory.createMetaProperty(SyntaxKind.ImportKeyword, parseIdentifierName()), pos); - sourceFlags |= NodeFlags.PossiblyContainsImportMeta; + + if ((expression as MetaProperty).name.escapedText === "defer") { + if (token() === SyntaxKind.OpenParenToken || token() === SyntaxKind.LessThanToken) { + sourceFlags |= NodeFlags.PossiblyContainsDynamicImport; + } + } + else { + sourceFlags |= NodeFlags.PossiblyContainsImportMeta; + } } else { expression = parseMemberExpressionOrHigher(); @@ -7190,6 +7199,7 @@ namespace Parser { // could be legal, it would add complexity for very little gain. case SyntaxKind.InterfaceKeyword: case SyntaxKind.TypeKeyword: + case SyntaxKind.DeferKeyword: return nextTokenIsIdentifierOnSameLine(); case SyntaxKind.ModuleKeyword: case SyntaxKind.NamespaceKeyword: @@ -7221,7 +7231,7 @@ namespace Parser { case SyntaxKind.ImportKeyword: nextToken(); - return token() === SyntaxKind.StringLiteral || token() === SyntaxKind.AsteriskToken || + return token() === SyntaxKind.DeferKeyword || token() === SyntaxKind.StringLiteral || token() === SyntaxKind.AsteriskToken || token() === SyntaxKind.OpenBraceToken || tokenIsIdentifierOrKeyword(token()); case SyntaxKind.ExportKeyword: let currentToken = nextToken(); @@ -7295,6 +7305,7 @@ namespace Parser { case SyntaxKind.NamespaceKeyword: case SyntaxKind.TypeKeyword: case SyntaxKind.GlobalKeyword: + case SyntaxKind.DeferKeyword: // When these don't start a declaration, they're an identifier in an expression statement return true; @@ -7328,9 +7339,16 @@ namespace Parser { return nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine(/*disallowOf*/ true); } + function nextTokenIsEqualsOrSemicolonOrColonToken() { + nextToken(); + return token() === SyntaxKind.EqualsToken || token() === SyntaxKind.SemicolonToken || token() === SyntaxKind.ColonToken; + } + function nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine(disallowOf?: boolean) { nextToken(); - if (disallowOf && token() === SyntaxKind.OfKeyword) return false; + if (disallowOf && token() === SyntaxKind.OfKeyword) { + return lookAhead(nextTokenIsEqualsOrSemicolonOrColonToken); + } return (isBindingIdentifier() || token() === SyntaxKind.OpenBraceToken) && !scanner.hasPrecedingLineBreak(); } @@ -8365,21 +8383,25 @@ namespace Parser { identifier = parseIdentifier(); } - let isTypeOnly = false; + let phaseModifier: ImportPhaseModifierSyntaxKind | undefined; if ( identifier?.escapedText === "type" && (token() !== SyntaxKind.FromKeyword || isIdentifier() && lookAhead(nextTokenIsFromKeywordOrEqualsToken)) && (isIdentifier() || tokenAfterImportDefinitelyProducesImportDeclaration()) ) { - isTypeOnly = true; + phaseModifier = SyntaxKind.TypeKeyword; + identifier = isIdentifier() ? parseIdentifier() : undefined; + } + else if (identifier?.escapedText === "defer" && token() !== SyntaxKind.FromKeyword) { + phaseModifier = SyntaxKind.DeferKeyword; identifier = isIdentifier() ? parseIdentifier() : undefined; } - if (identifier && !tokenAfterImportedIdentifierDefinitelyProducesImportDeclaration()) { - return parseImportEqualsDeclaration(pos, hasJSDoc, modifiers, identifier, isTypeOnly); + if (identifier && !tokenAfterImportedIdentifierDefinitelyProducesImportDeclaration() && phaseModifier !== SyntaxKind.DeferKeyword) { + return parseImportEqualsDeclaration(pos, hasJSDoc, modifiers, identifier, phaseModifier === SyntaxKind.TypeKeyword); } - const importClause = tryParseImportClause(identifier, afterImportPos, isTypeOnly); + const importClause = tryParseImportClause(identifier, afterImportPos, phaseModifier, /*skipJsDocLeadingAsterisks*/ undefined); const moduleSpecifier = parseModuleSpecifier(); const attributes = tryParseImportAttributes(); @@ -8388,7 +8410,7 @@ namespace Parser { return withJSDoc(finishNode(node, pos), hasJSDoc); } - function tryParseImportClause(identifier: Identifier | undefined, pos: number, isTypeOnly: boolean, skipJsDocLeadingAsterisks = false) { + function tryParseImportClause(identifier: Identifier | undefined, pos: number, phaseModifier: undefined | ImportPhaseModifierSyntaxKind, skipJsDocLeadingAsterisks = false) { // ImportDeclaration: // import ImportClause from ModuleSpecifier ; // import ModuleSpecifier; @@ -8398,7 +8420,7 @@ namespace Parser { token() === SyntaxKind.AsteriskToken || // import * token() === SyntaxKind.OpenBraceToken // import { ) { - importClause = parseImportClause(identifier, pos, isTypeOnly, skipJsDocLeadingAsterisks); + importClause = parseImportClause(identifier, pos, phaseModifier, skipJsDocLeadingAsterisks); parseExpected(SyntaxKind.FromKeyword); } return importClause; @@ -8464,7 +8486,7 @@ namespace Parser { return finished; } - function parseImportClause(identifier: Identifier | undefined, pos: number, isTypeOnly: boolean, skipJsDocLeadingAsterisks: boolean) { + function parseImportClause(identifier: Identifier | undefined, pos: number, phaseModifier: undefined | ImportPhaseModifierSyntaxKind, skipJsDocLeadingAsterisks: boolean) { // ImportClause: // ImportedDefaultBinding // NameSpaceImport @@ -8480,11 +8502,16 @@ namespace Parser { parseOptional(SyntaxKind.CommaToken) ) { if (skipJsDocLeadingAsterisks) scanner.setSkipJsDocLeadingAsterisks(true); - namedBindings = token() === SyntaxKind.AsteriskToken ? parseNamespaceImport() : parseNamedImportsOrExports(SyntaxKind.NamedImports); + if (token() === SyntaxKind.AsteriskToken) { + namedBindings = parseNamespaceImport(); + } + else { + namedBindings = parseNamedImportsOrExports(SyntaxKind.NamedImports); + } if (skipJsDocLeadingAsterisks) scanner.setSkipJsDocLeadingAsterisks(false); } - return finishNode(factory.createImportClause(isTypeOnly, identifier, namedBindings), pos); + return finishNode(factory.createImportClause(phaseModifier, identifier, namedBindings), pos); } function parseModuleReference() { @@ -9518,7 +9545,7 @@ namespace Parser { identifier = parseIdentifier(); } - const importClause = tryParseImportClause(identifier, afterImportTagPos, /*isTypeOnly*/ true, /*skipJsDocLeadingAsterisks*/ true); + const importClause = tryParseImportClause(identifier, afterImportTagPos, SyntaxKind.TypeKeyword, /*skipJsDocLeadingAsterisks*/ true); const moduleSpecifier = parseModuleSpecifier(); const attributes = tryParseImportAttributes(); diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 48d8d07f1641e..abb937d0271f0 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -272,6 +272,8 @@ import { ResolvedModuleFull, ResolvedModuleWithFailedLookupLocations, ResolvedProjectReference, + ResolvedRefAndOutputDts, + ResolvedRefAndSource, ResolvedTypeReferenceDirectiveWithFailedLookupLocations, resolveLibrary, resolveModuleName, @@ -291,7 +293,6 @@ import { SourceFile, sourceFileAffectingCompilerOptions, sourceFileMayBeEmitted, - SourceOfProjectReferenceRedirect, startsWith, Statement, StringLiteral, @@ -1715,8 +1716,9 @@ export function createProgram(_rootNamesOrOptions: readonly string[] | CreatePro // A parallel array to projectReferences storing the results of reading in the referenced tsconfig files let resolvedProjectReferences: readonly (ResolvedProjectReference | undefined)[] | undefined; let projectReferenceRedirects: Map | undefined; - let mapFromFileToProjectReferenceRedirects: Map | undefined; - let mapFromToProjectReferenceRedirectSource: Map | undefined; + + let mapSourceFileToResolvedRef: Map | undefined; + let mapOutputFileToResolvedRef: Map | undefined; const useSourceOfProjectReferenceRedirect = !!host.useSourceOfProjectReferenceRedirect?.() && !options.disableSourceOfProjectReferenceRedirect; @@ -1726,7 +1728,7 @@ export function createProgram(_rootNamesOrOptions: readonly string[] | CreatePro useSourceOfProjectReferenceRedirect, toPath, getResolvedProjectReferences, - getSourceOfProjectReferenceRedirect, + getRedirectFromOutput, forEachResolvedProjectReference, }); const readFile = host.readFile.bind(host) as typeof host.readFile; @@ -1933,12 +1935,11 @@ export function createProgram(_rootNamesOrOptions: readonly string[] | CreatePro getConfigFileParsingDiagnostics, getProjectReferences, getResolvedProjectReferences, - getProjectReferenceRedirect, - getResolvedProjectReferenceToRedirect, + getRedirectFromSourceFile, getResolvedProjectReferenceByPath, forEachResolvedProjectReference, isSourceOfProjectReferenceRedirect, - getRedirectReferenceForResolutionFromSourceOfProject, + getRedirectFromOutput, getCompilerOptionsForFile, getDefaultResolutionModeForFile, getEmitModuleFormatOfFile, @@ -2106,12 +2107,12 @@ export function createProgram(_rootNamesOrOptions: readonly string[] | CreatePro } function getRedirectReferenceForResolution(file: SourceFile) { - const redirect = getResolvedProjectReferenceToRedirect(file.originalFileName); - if (redirect || !isDeclarationFileName(file.originalFileName)) return redirect; + const redirect = getRedirectFromSourceFile(file.originalFileName); + if (redirect || !isDeclarationFileName(file.originalFileName)) return redirect?.resolvedRef; // The originalFileName could not be actual source file name if file found was d.ts from referecned project // So in this case try to look up if this is output from referenced project, if it is use the redirected project in that case - const resultFromDts = getRedirectReferenceForResolutionFromSourceOfProject(file.path); + const resultFromDts = getRedirectFromOutput(file.path)?.resolvedRef; if (resultFromDts) return resultFromDts; // If preserveSymlinks is true, module resolution wont jump the symlink @@ -2120,19 +2121,7 @@ export function createProgram(_rootNamesOrOptions: readonly string[] | CreatePro // file is from node_modules to avoid having to run real path on all file paths if (!host.realpath || !options.preserveSymlinks || !file.originalFileName.includes(nodeModulesPathPart)) return undefined; const realDeclarationPath = toPath(host.realpath(file.originalFileName)); - return realDeclarationPath === file.path ? undefined : getRedirectReferenceForResolutionFromSourceOfProject(realDeclarationPath); - } - - function getRedirectReferenceForResolutionFromSourceOfProject(filePath: Path) { - const source = getSourceOfProjectReferenceRedirect(filePath); - if (isString(source)) return getResolvedProjectReferenceToRedirect(source); - if (!source) return undefined; - // Output of .d.ts file so return resolved ref that matches the out file name - return forEachResolvedProjectReference(resolvedRef => { - const out = resolvedRef.commandLine.options.outFile; - if (!out) return undefined; - return toPath(out) === filePath ? resolvedRef : undefined; - }); + return realDeclarationPath === file.path ? undefined : getRedirectFromOutput(realDeclarationPath)?.resolvedRef; } function compareDefaultLibFiles(a: SourceFile, b: SourceFile) { @@ -2621,8 +2610,7 @@ export function createProgram(_rootNamesOrOptions: readonly string[] | CreatePro getSourceFileByPath: program.getSourceFileByPath, getSourceFiles: program.getSourceFiles, isSourceFileFromExternalLibrary, - getResolvedProjectReferenceToRedirect, - getProjectReferenceRedirect, + getRedirectFromSourceFile, isSourceOfProjectReferenceRedirect, getSymlinkCache, writeFile: writeFileCallback || writeFile, @@ -3493,9 +3481,9 @@ export function createProgram(_rootNamesOrOptions: readonly string[] | CreatePro const sourceFile = getSourceFile(fileName); if (fail) { if (!sourceFile) { - const redirect = getProjectReferenceRedirect(fileName); - if (redirect) { - fail(Diagnostics.Output_file_0_has_not_been_built_from_source_file_1, redirect, fileName); + const redirect = getRedirectFromSourceFile(fileName); + if (redirect?.outputDts) { + fail(Diagnostics.Output_file_0_has_not_been_built_from_source_file_1, redirect.outputDts, fileName); } else { fail(Diagnostics.File_0_not_found, fileName); @@ -3586,7 +3574,7 @@ export function createProgram(_rootNamesOrOptions: readonly string[] | CreatePro function findSourceFileWorker(fileName: string, isDefaultLib: boolean, ignoreNoDefaultLib: boolean, reason: FileIncludeReason, packageId: PackageId | undefined): SourceFile | undefined { const path = toPath(fileName); if (useSourceOfProjectReferenceRedirect) { - let source = getSourceOfProjectReferenceRedirect(path); + let source = getRedirectFromOutput(path); // If preserveSymlinks is true, module resolution wont jump the symlink // but the resolved real path may be the .d.ts from project reference // Note:: Currently we try the real path only if the @@ -3599,12 +3587,10 @@ export function createProgram(_rootNamesOrOptions: readonly string[] | CreatePro fileName.includes(nodeModulesPathPart) ) { const realPath = toPath(host.realpath(fileName)); - if (realPath !== path) source = getSourceOfProjectReferenceRedirect(realPath); + if (realPath !== path) source = getRedirectFromOutput(realPath); } - if (source) { - const file = isString(source) ? - findSourceFile(source, isDefaultLib, ignoreNoDefaultLib, reason, packageId) : - undefined; + if (source?.source) { + const file = findSourceFile(source.source, isDefaultLib, ignoreNoDefaultLib, reason, packageId); if (file) addFileToFilesByName(file, path, fileName, /*redirectedPath*/ undefined); return file; } @@ -3619,7 +3605,7 @@ export function createProgram(_rootNamesOrOptions: readonly string[] | CreatePro const checkedName = file.fileName; const isRedirect = toPath(checkedName) !== toPath(fileName); if (isRedirect) { - fileName = getProjectReferenceRedirect(fileName) || fileName; + fileName = getRedirectFromSourceFile(fileName)?.outputDts || fileName; } // Check if it differs only in drive letters its ok to ignore that error: const checkedAbsolutePath = getNormalizedAbsolutePathWithoutRoot(checkedName, currentDirectory); @@ -3657,20 +3643,19 @@ export function createProgram(_rootNamesOrOptions: readonly string[] | CreatePro let redirectedPath: Path | undefined; if (!useSourceOfProjectReferenceRedirect) { - const redirectProject = getProjectReferenceRedirectProject(fileName); - if (redirectProject) { - if (redirectProject.commandLine.options.outFile) { + const redirectProject = getRedirectFromSourceFile(fileName); + if (redirectProject?.outputDts) { + if (redirectProject.resolvedRef.commandLine.options.outFile) { // Shouldnt create many to 1 mapping file in --out scenario return undefined; } - const redirect = getProjectReferenceOutputName(redirectProject, fileName); - fileName = redirect; + fileName = redirectProject.outputDts; // Once we start redirecting to a file, we can potentially come back to it // via a back-reference from another file in the .d.ts folder. If that happens we'll // end up trying to add it to the program *again* because we were tracking it via its // original (un-redirected) name. So we have to map both the original path and the redirected path // to the source file we're about to find/create - redirectedPath = toPath(redirect); + redirectedPath = toPath(redirectProject.outputDts); } } @@ -3774,45 +3759,11 @@ export function createProgram(_rootNamesOrOptions: readonly string[] | CreatePro else missingFileNames.set(path, fileName); } - function getProjectReferenceRedirect(fileName: string): string | undefined { - const referencedProject = getProjectReferenceRedirectProject(fileName); - return referencedProject && getProjectReferenceOutputName(referencedProject, fileName); - } - - function getProjectReferenceRedirectProject(fileName: string) { - // Ignore dts or any json files - if (!resolvedProjectReferences || !resolvedProjectReferences.length || isDeclarationFileName(fileName) || fileExtensionIs(fileName, Extension.Json)) { - return undefined; - } - - // If this file is produced by a referenced project, we need to rewrite it to - // look in the output folder of the referenced project rather than the input - return getResolvedProjectReferenceToRedirect(fileName); - } - - function getProjectReferenceOutputName(referencedProject: ResolvedProjectReference, fileName: string) { - const out = referencedProject.commandLine.options.outFile; - return out ? - changeExtension(out, Extension.Dts) : - getOutputDeclarationFileName(fileName, referencedProject.commandLine, !host.useCaseSensitiveFileNames()); - } - /** * Get the referenced project if the file is input file from that reference project */ - function getResolvedProjectReferenceToRedirect(fileName: string) { - if (mapFromFileToProjectReferenceRedirects === undefined) { - mapFromFileToProjectReferenceRedirects = new Map(); - forEachResolvedProjectReference(referencedProject => { - // not input file from the referenced project, ignore - if (toPath(options.configFilePath!) !== referencedProject.sourceFile.path) { - referencedProject.commandLine.fileNames.forEach(f => mapFromFileToProjectReferenceRedirects!.set(toPath(f), referencedProject.sourceFile.path)); - } - }); - } - - const referencedProjectPath = mapFromFileToProjectReferenceRedirects.get(toPath(fileName)); - return referencedProjectPath && getResolvedProjectReferenceByPath(referencedProjectPath); + function getRedirectFromSourceFile(fileName: string) { + return mapSourceFileToResolvedRef?.get(toPath(fileName)); } function forEachResolvedProjectReference( @@ -3821,33 +3772,12 @@ export function createProgram(_rootNamesOrOptions: readonly string[] | CreatePro return ts_forEachResolvedProjectReference(resolvedProjectReferences, cb); } - function getSourceOfProjectReferenceRedirect(path: Path) { - if (!isDeclarationFileName(path)) return undefined; - if (mapFromToProjectReferenceRedirectSource === undefined) { - mapFromToProjectReferenceRedirectSource = new Map(); - forEachResolvedProjectReference(resolvedRef => { - const out = resolvedRef.commandLine.options.outFile; - if (out) { - // Dont know which source file it means so return true? - const outputDts = changeExtension(out, Extension.Dts); - mapFromToProjectReferenceRedirectSource!.set(toPath(outputDts), true); - } - else { - const getCommonSourceDirectory = memoize(() => getCommonSourceDirectoryOfConfig(resolvedRef.commandLine, !host.useCaseSensitiveFileNames())); - forEach(resolvedRef.commandLine.fileNames, fileName => { - if (!isDeclarationFileName(fileName) && !fileExtensionIs(fileName, Extension.Json)) { - const outputDts = getOutputDeclarationFileName(fileName, resolvedRef.commandLine, !host.useCaseSensitiveFileNames(), getCommonSourceDirectory); - mapFromToProjectReferenceRedirectSource!.set(toPath(outputDts), fileName); - } - }); - } - }); - } - return mapFromToProjectReferenceRedirectSource.get(path); + function getRedirectFromOutput(path: Path) { + return mapOutputFileToResolvedRef?.get(path); } function isSourceOfProjectReferenceRedirect(fileName: string) { - return useSourceOfProjectReferenceRedirect && !!getResolvedProjectReferenceToRedirect(fileName); + return useSourceOfProjectReferenceRedirect && !!getRedirectFromSourceFile(fileName); } function getResolvedProjectReferenceByPath(projectReferencePath: Path): ResolvedProjectReference | undefined { @@ -4034,7 +3964,7 @@ export function createProgram(_rootNamesOrOptions: readonly string[] | CreatePro const isFromNodeModulesSearch = resolution.isExternalLibraryImport; // If this is js file source of project reference, dont treat it as js file but as d.ts - const isJsFile = !resolutionExtensionIsTSOrJson(resolution.extension) && !getProjectReferenceRedirectProject(resolution.resolvedFileName); + const isJsFile = !resolutionExtensionIsTSOrJson(resolution.extension) && !getRedirectFromSourceFile(resolution.resolvedFileName); const isJsFileFromNodeModules = isFromNodeModulesSearch && isJsFile && (!resolution.originalPath || pathContainsNodeModules(resolution.resolvedFileName)); const resolvedFileName = resolution.resolvedFileName; @@ -4143,9 +4073,36 @@ export function createProgram(_rootNamesOrOptions: readonly string[] | CreatePro const resolvedRef: ResolvedProjectReference = { commandLine, sourceFile }; projectReferenceRedirects.set(sourceFilePath, resolvedRef); + if (options.configFile !== sourceFile) { + mapSourceFileToResolvedRef ??= new Map(); + mapOutputFileToResolvedRef ??= new Map(); + let outDts: string; + if (commandLine.options.outFile) { + outDts = changeExtension(commandLine.options.outFile, Extension.Dts); + mapOutputFileToResolvedRef?.set(toPath(outDts), { resolvedRef }); + } + const getCommonSourceDirectory = memoize(() => getCommonSourceDirectoryOfConfig(resolvedRef.commandLine, !host.useCaseSensitiveFileNames())); + commandLine.fileNames.forEach(fileName => { + if (isDeclarationFileName(fileName)) return; + const path = toPath(fileName); + let outputDts; + if (!fileExtensionIs(fileName, Extension.Json)) { + if (!commandLine.options.outFile) { + outputDts = getOutputDeclarationFileName(fileName, resolvedRef.commandLine, !host.useCaseSensitiveFileNames(), getCommonSourceDirectory); + mapOutputFileToResolvedRef!.set(toPath(outputDts), { resolvedRef, source: fileName }); + } + else { + outputDts = outDts; + } + } + mapSourceFileToResolvedRef!.set(path, { resolvedRef, outputDts }); + }); + } + if (commandLine.projectReferences) { resolvedRef.references = commandLine.projectReferences.map(parseProjectReferenceConfigFile); } + return resolvedRef; } @@ -4894,7 +4851,7 @@ interface HostForUseSourceOfProjectReferenceRedirect { useSourceOfProjectReferenceRedirect: boolean; toPath(fileName: string): Path; getResolvedProjectReferences(): readonly (ResolvedProjectReference | undefined)[] | undefined; - getSourceOfProjectReferenceRedirect(path: Path): SourceOfProjectReferenceRedirect | undefined; + getRedirectFromOutput(path: Path): ResolvedRefAndSource | undefined; forEachResolvedProjectReference(cb: (resolvedProjectReference: ResolvedProjectReference) => T | undefined): T | undefined; } @@ -4981,9 +4938,9 @@ function updateHostForUseSourceOfProjectReferenceRedirect(host: HostForUseSource } function fileExistsIfProjectReferenceDts(file: string) { - const source = host.getSourceOfProjectReferenceRedirect(host.toPath(file)); + const source = host.getRedirectFromOutput(host.toPath(file)); return source !== undefined ? - isString(source) ? originalFileExists.call(host.compilerHost, source) as boolean : true : + isString(source.source) ? originalFileExists.call(host.compilerHost, source.source) as boolean : true : undefined; } diff --git a/src/compiler/resolutionCache.ts b/src/compiler/resolutionCache.ts index 7c69055ec1f66..7bced48353b82 100644 --- a/src/compiler/resolutionCache.ts +++ b/src/compiler/resolutionCache.ts @@ -324,7 +324,7 @@ export function canWatchAtTypes(atTypes: Path): boolean { } function isInDirectoryPath(dirComponents: Readonly, fileOrDirComponents: Readonly) { - if (fileOrDirComponents.length < fileOrDirComponents.length) return false; + if (fileOrDirComponents.length < dirComponents.length) return false; for (let i = 0; i < dirComponents.length; i++) { if (fileOrDirComponents[i] !== dirComponents[i]) return false; } @@ -872,7 +872,7 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD // All the resolutions in this file are invalidated if this file wasn't resolved using same redirect const program = resolutionHost.getCurrentProgram(); - const oldRedirect = program && program.getResolvedProjectReferenceToRedirect(containingFile); + const oldRedirect = program && program.getRedirectFromSourceFile(containingFile)?.resolvedRef; const unmatchedRedirects = oldRedirect ? !redirectedReference || redirectedReference.sourceFile.path !== oldRedirect.sourceFile.path : !!redirectedReference; diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index 50e827c17bd24..343df39ad9cbc 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -151,6 +151,7 @@ export const textToKeywordObj: MapLike = { debugger: SyntaxKind.DebuggerKeyword, declare: SyntaxKind.DeclareKeyword, default: SyntaxKind.DefaultKeyword, + defer: SyntaxKind.DeferKeyword, delete: SyntaxKind.DeleteKeyword, do: SyntaxKind.DoKeyword, else: SyntaxKind.ElseKeyword, diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 7c41bcccc3e7a..4b6941dc61f95 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -877,6 +877,7 @@ export function transformDeclarations(context: TransformationContext): Transform tryGetResolutionModeOverride(decl.attributes), ); } + const phaseModifier = decl.importClause.phaseModifier === SyntaxKind.DeferKeyword ? undefined : decl.importClause.phaseModifier; // The `importClause` visibility corresponds to the default's visibility. const visibleDefaultBinding = decl.importClause && decl.importClause.name && resolver.isDeclarationVisible(decl.importClause) ? decl.importClause.name : undefined; if (!decl.importClause.namedBindings) { @@ -886,7 +887,7 @@ export function transformDeclarations(context: TransformationContext): Transform decl.modifiers, factory.updateImportClause( decl.importClause, - decl.importClause.isTypeOnly, + phaseModifier, visibleDefaultBinding, /*namedBindings*/ undefined, ), @@ -902,7 +903,7 @@ export function transformDeclarations(context: TransformationContext): Transform decl.modifiers, factory.updateImportClause( decl.importClause, - decl.importClause.isTypeOnly, + phaseModifier, visibleDefaultBinding, namedBindings, ), @@ -918,7 +919,7 @@ export function transformDeclarations(context: TransformationContext): Transform decl.modifiers, factory.updateImportClause( decl.importClause, - decl.importClause.isTypeOnly, + phaseModifier, visibleDefaultBinding, bindingList && bindingList.length ? factory.updateNamedImports(decl.importClause.namedBindings, bindingList) : undefined, ), diff --git a/src/compiler/transformers/jsx.ts b/src/compiler/transformers/jsx.ts index bcb0cbf8ee2cc..885f4c5d67ad6 100644 --- a/src/compiler/transformers/jsx.ts +++ b/src/compiler/transformers/jsx.ts @@ -172,7 +172,7 @@ export function transformJsx(context: TransformationContext): (x: SourceFile | B for (const [importSource, importSpecifiersMap] of arrayFrom(currentFileState.utilizedImplicitRuntimeImports.entries())) { if (isExternalModule(node)) { // Add `import` statement - const importStatement = factory.createImportDeclaration(/*modifiers*/ undefined, factory.createImportClause(/*isTypeOnly*/ false, /*name*/ undefined, factory.createNamedImports(arrayFrom(importSpecifiersMap.values()))), factory.createStringLiteral(importSource), /*attributes*/ undefined); + const importStatement = factory.createImportDeclaration(/*modifiers*/ undefined, factory.createImportClause(/*phaseModifier*/ undefined, /*name*/ undefined, factory.createNamedImports(arrayFrom(importSpecifiersMap.values()))), factory.createStringLiteral(importSource), /*attributes*/ undefined); setParentRecursive(importStatement, /*incremental*/ false); statements = insertStatementAfterCustomPrologue(statements.slice(), importStatement); } diff --git a/src/compiler/transformers/module/esnextAnd2015.ts b/src/compiler/transformers/module/esnextAnd2015.ts index 40662f302269c..7776e2c4bb2f0 100644 --- a/src/compiler/transformers/module/esnextAnd2015.ts +++ b/src/compiler/transformers/module/esnextAnd2015.ts @@ -219,7 +219,7 @@ export function transformECMAScriptModule(context: TransformationContext): (x: S const importStatement = factory.createImportDeclaration( /*modifiers*/ undefined, factory.createImportClause( - /*isTypeOnly*/ false, + /*phaseModifier*/ undefined, /*name*/ undefined, factory.createNamedImports([ factory.createImportSpecifier(/*isTypeOnly*/ false, factory.createIdentifier("createRequire"), createRequireName), @@ -351,7 +351,7 @@ export function transformECMAScriptModule(context: TransformationContext): (x: S const importDecl = factory.createImportDeclaration( /*modifiers*/ undefined, factory.createImportClause( - /*isTypeOnly*/ false, + /*phaseModifier*/ undefined, /*name*/ undefined, factory.createNamespaceImport( synthName, diff --git a/src/compiler/transformers/ts.ts b/src/compiler/transformers/ts.ts index 75656cf5aefab..cc3da23d2067b 100644 --- a/src/compiler/transformers/ts.ts +++ b/src/compiler/transformers/ts.ts @@ -2282,11 +2282,11 @@ export function transformTypeScript(context: TransformationContext): Transformer * @param node The import clause node. */ function visitImportClause(node: ImportClause): VisitResult | undefined { - Debug.assert(!node.isTypeOnly); + Debug.assert(node.phaseModifier !== SyntaxKind.TypeKeyword); // Elide the import clause if we elide both its name and its named bindings. const name = shouldEmitAliasDeclaration(node) ? node.name : undefined; const namedBindings = visitNode(node.namedBindings, visitNamedImportBindings, isNamedImportBindings); - return (name || namedBindings) ? factory.updateImportClause(node, /*isTypeOnly*/ false, name, namedBindings) : undefined; + return (name || namedBindings) ? factory.updateImportClause(node, node.phaseModifier, name, namedBindings) : undefined; } /** diff --git a/src/compiler/types.ts b/src/compiler/types.ts index f6ca75a68e17d..b5e4d234e4f1a 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -222,7 +222,8 @@ export const enum SyntaxKind { GlobalKeyword, BigIntKeyword, OverrideKeyword, - OfKeyword, // LastKeyword and LastToken and LastContextualKeyword + OfKeyword, + DeferKeyword, // LastKeyword and LastToken and LastContextualKeyword // Parse tree nodes @@ -462,7 +463,7 @@ export const enum SyntaxKind { FirstReservedWord = BreakKeyword, LastReservedWord = WithKeyword, FirstKeyword = BreakKeyword, - LastKeyword = OfKeyword, + LastKeyword = DeferKeyword, FirstFutureReservedWord = ImplementsKeyword, LastFutureReservedWord = YieldKeyword, FirstTypeNode = TypePredicate, @@ -487,7 +488,7 @@ export const enum SyntaxKind { FirstJSDocTagNode = JSDocTag, LastJSDocTagNode = JSDocImportTag, /** @internal */ FirstContextualKeyword = AbstractKeyword, - /** @internal */ LastContextualKeyword = OfKeyword, + /** @internal */ LastContextualKeyword = LastKeyword, } export type TriviaSyntaxKind = @@ -599,6 +600,7 @@ export type KeywordSyntaxKind = | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword + | SyntaxKind.DeferKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword @@ -3099,7 +3101,7 @@ export interface SuperCall extends CallExpression { } export interface ImportCall extends CallExpression { - readonly expression: ImportExpression; + readonly expression: ImportExpression | ImportDeferProperty; } export interface ExpressionWithTypeArguments extends MemberExpression, NodeWithTypeArguments { @@ -3179,6 +3181,11 @@ export interface ImportMetaProperty extends MetaProperty { readonly name: Identifier & { readonly escapedText: __String & "meta"; }; } +export interface ImportDeferProperty extends MetaProperty { + readonly keywordToken: SyntaxKind.ImportKeyword; + readonly name: Identifier & { readonly escapedText: __String & "defer"; }; +} + /// A JSX expression of the form ... export interface JsxElement extends PrimaryExpression { readonly kind: SyntaxKind.JsxElement; @@ -3711,11 +3718,15 @@ export type NamedExportBindings = export interface ImportClause extends NamedDeclaration { readonly kind: SyntaxKind.ImportClause; readonly parent: ImportDeclaration | JSDocImportTag; + /** @deprecated Use `phaseModifier` instead */ readonly isTypeOnly: boolean; + readonly phaseModifier: undefined | ImportPhaseModifierSyntaxKind; readonly name?: Identifier; // Default binding readonly namedBindings?: NamedImportBindings; } +export type ImportPhaseModifierSyntaxKind = SyntaxKind.TypeKeyword | SyntaxKind.DeferKeyword; + /** @deprecated */ export type AssertionKey = ImportAttributeName; @@ -4553,6 +4564,17 @@ export interface ParseConfigHost extends ModuleResolutionHost { */ export type ResolvedConfigFileName = string & { _isResolvedConfigFileName: never; }; +/** @internal */ +export interface ResolvedRefAndOutputDts { + resolvedRef: ResolvedProjectReference; + outputDts?: string; // Not set if its a json source file +} +/** @internal */ +export interface ResolvedRefAndSource { + resolvedRef: ResolvedProjectReference; + source?: string; // Not set if options have --outFile +} + export interface WriteFileCallbackData { /** @internal */ sourceMapUrlPos?: number; /** @internal */ buildInfo?: BuildInfo; @@ -4907,15 +4929,14 @@ export interface Program extends ScriptReferenceHost { getProjectReferences(): readonly ProjectReference[] | undefined; getResolvedProjectReferences(): readonly (ResolvedProjectReference | undefined)[] | undefined; - /** @internal */ getProjectReferenceRedirect(fileName: string): string | undefined; /** * @internal * Get the referenced project if the file is input file from that reference project */ - getResolvedProjectReferenceToRedirect(fileName: string): ResolvedProjectReference | undefined; + getRedirectFromSourceFile(fileName: string): ResolvedRefAndOutputDts | undefined; /** @internal */ forEachResolvedProjectReference(cb: (resolvedProjectReference: ResolvedProjectReference) => T | undefined): T | undefined; /** @internal */ getResolvedProjectReferenceByPath(projectReferencePath: Path): ResolvedProjectReference | undefined; - /** @internal */ getRedirectReferenceForResolutionFromSourceOfProject(filePath: Path): ResolvedProjectReference | undefined; + /** @internal */ getRedirectFromOutput(filePath: Path): ResolvedRefAndSource | undefined; /** @internal */ isSourceOfProjectReferenceRedirect(fileName: string): boolean; /** @internal */ getCompilerOptionsForFile(file: SourceFile): CompilerOptions; /** @internal */ getBuildInfo?(): BuildInfo; @@ -5031,10 +5052,10 @@ export interface TypeCheckerHost extends ModuleSpecifierResolutionHost, SourceFi getSourceFiles(): readonly SourceFile[]; getSourceFile(fileName: string): SourceFile | undefined; - getProjectReferenceRedirect(fileName: string): string | undefined; + getRedirectFromSourceFile(fileName: string): ResolvedRefAndOutputDts | undefined; isSourceOfProjectReferenceRedirect(fileName: string): boolean; getEmitSyntaxForUsageLocation(file: SourceFile, usage: StringLiteralLike): ResolutionMode; - getRedirectReferenceForResolutionFromSourceOfProject(filePath: Path): ResolvedProjectReference | undefined; + getRedirectFromOutput(filePath: Path): ResolvedRefAndSource | undefined; getModeForUsageLocation(file: SourceFile, usage: StringLiteralLike): ResolutionMode; getDefaultResolutionModeForFile(sourceFile: SourceFile): ResolutionMode; getImpliedNodeFormatForEmit(sourceFile: SourceFile): ResolutionMode; @@ -5046,6 +5067,15 @@ export interface TypeCheckerHost extends ModuleSpecifierResolutionHost, SourceFi typesPackageExists(packageName: string): boolean; packageBundlesTypes(packageName: string): boolean; + + isSourceFileDefaultLibrary(file: SourceFile): boolean; +} + +/** @internal */ +export interface WriterContextOut { + /** Whether increasing the expansion depth will cause us to expand more types. */ + canIncreaseExpansionDepth: boolean; + truncated: boolean; } export interface TypeChecker { @@ -5134,6 +5164,16 @@ export interface TypeChecker { symbolToParameterDeclaration(symbol: Symbol, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): ParameterDeclaration | undefined; /** Note that the resulting nodes cannot be checked. */ typeParameterToDeclaration(parameter: TypeParameter, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): TypeParameterDeclaration | undefined; + /** @internal */ typeParameterToDeclaration( + parameter: TypeParameter, + enclosingDeclaration: Node | undefined, + flags: NodeBuilderFlags | undefined, + internalFlags?: InternalNodeBuilderFlags, + tracker?: SymbolTracker, + maximumLength?: number, + verbosityLevel?: number, + out?: WriterContextOut, // eslint-disable-line @typescript-eslint/unified-signatures + ): TypeParameterDeclaration | undefined; getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; getSymbolAtLocation(node: Node): Symbol | undefined; @@ -5165,8 +5205,25 @@ export interface TypeChecker { symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): string; typePredicateToString(predicate: TypePredicate, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; - /** @internal */ writeSignature(signature: Signature, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind, writer?: EmitTextWriter): string; - /** @internal */ writeType(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags, writer?: EmitTextWriter): string; + /** @internal */ writeSignature( + signature: Signature, + enclosingDeclaration?: Node, + flags?: TypeFormatFlags, + kind?: SignatureKind, + writer?: EmitTextWriter, + maximumLength?: number, + verbosityLevel?: number, + out?: WriterContextOut, + ): string; + /** @internal */ writeType( + type: Type, + enclosingDeclaration?: Node, + flags?: TypeFormatFlags, + writer?: EmitTextWriter, + maximumLength?: number, + verbosityLevel?: number, + out?: WriterContextOut, + ): string; /** @internal */ writeSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags, writer?: EmitTextWriter): string; /** @internal */ writeTypePredicate(predicate: TypePredicate, enclosingDeclaration?: Node, flags?: TypeFormatFlags, writer?: EmitTextWriter): string; @@ -5286,6 +5343,10 @@ export interface TypeChecker { * is `never`. Instead, use `type.flags & TypeFlags.Never`. */ getNeverType(): Type; + /** + * Gets the intrinsic `object` type. + */ + getNonPrimitiveType(): Type; /** @internal */ getOptionalType(): Type; /** @internal */ getUnionType(types: Type[], subtypeReduction?: UnionReduction): Type; /** @internal */ createArrayType(elementType: Type): Type; @@ -5435,6 +5496,7 @@ export interface TypeChecker { /** @internal */ fillMissingTypeArguments(typeArguments: readonly Type[], typeParameters: readonly TypeParameter[] | undefined, minTypeArgumentCount: number, isJavaScriptImplicitAny: boolean): Type[]; getTypeArgumentsForResolvedSignature(signature: Signature): readonly Type[] | undefined; + /** @internal */ isLibType(type: Type): boolean; } /** @internal */ @@ -5881,6 +5943,7 @@ export interface EmitResolver { isImportRequiredByAugmentation(decl: ImportDeclaration): boolean; isDefinitelyReferenceToGlobalSymbolObject(node: Node): boolean; createLateBoundIndexSignatures(cls: ClassLikeDeclaration, enclosingDeclaration: Node, flags: NodeBuilderFlags, internalFlags: InternalNodeBuilderFlags, tracker: SymbolTracker): (IndexSignatureDeclaration | PropertyDeclaration)[] | undefined; + symbolToDeclarations(symbol: Symbol, meaning: SymbolFlags, flags: NodeBuilderFlags, maximumLength?: number, verbosityLevel?: number, out?: WriterContextOut): Declaration[]; } // dprint-ignore @@ -8134,11 +8197,6 @@ export interface CompilerHost extends ModuleResolutionHost { jsDocParsingMode?: JSDocParsingMode; } -/** true if --out otherwise source file name * - * @internal - */ -export type SourceOfProjectReferenceRedirect = string | true; - /** @internal */ export const enum TransformFlags { None = 0, @@ -8524,7 +8582,7 @@ export const enum EmitHint { export interface SourceFileMayBeEmittedHost { getCompilerOptions(): CompilerOptions; isSourceFileFromExternalLibrary(file: SourceFile): boolean; - getResolvedProjectReferenceToRedirect(fileName: string): ResolvedProjectReference | undefined; + getRedirectFromSourceFile(fileName: string): ResolvedRefAndOutputDts | undefined; isSourceOfProjectReferenceRedirect(fileName: string): boolean; getCurrentDirectory(): string; getCanonicalFileName: GetCanonicalFileName; @@ -9021,8 +9079,12 @@ export interface NodeFactory { updateImportEqualsDeclaration(node: ImportEqualsDeclaration, modifiers: readonly ModifierLike[] | undefined, isTypeOnly: boolean, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; createImportDeclaration(modifiers: readonly ModifierLike[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, attributes?: ImportAttributes): ImportDeclaration; updateImportDeclaration(node: ImportDeclaration, modifiers: readonly ModifierLike[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, attributes: ImportAttributes | undefined): ImportDeclaration; - createImportClause(isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause; - updateImportClause(node: ImportClause, isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause; + createImportClause(phaseModifier: ImportPhaseModifierSyntaxKind | undefined, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause; + // eslint-disable-next-line @typescript-eslint/unified-signatures -- Cannot unify due to the @deprecated tag + /** @deprecated */ createImportClause(isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause; + updateImportClause(node: ImportClause, phaseModifier: ImportPhaseModifierSyntaxKind | undefined, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause; + // eslint-disable-next-line @typescript-eslint/unified-signatures -- Cannot unify due to the @deprecated tag + /** @deprecated */ updateImportClause(node: ImportClause, isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause; /** @deprecated */ createAssertClause(elements: NodeArray, multiLine?: boolean): AssertClause; /** @deprecated */ updateAssertClause(node: AssertClause, elements: NodeArray, multiLine?: boolean): AssertClause; /** @deprecated */ createAssertEntry(name: AssertionKey, value: Expression): AssertEntry; @@ -9924,7 +9986,7 @@ export interface ModuleSpecifierResolutionHost { getNearestAncestorDirectoryWithPackageJson?(fileName: string, rootDir?: string): string | undefined; readonly redirectTargetsMap: RedirectTargetsMap; - getProjectReferenceRedirect(fileName: string): string | undefined; + getRedirectFromSourceFile(fileName: string): ResolvedRefAndOutputDts | undefined; isSourceOfProjectReferenceRedirect(fileName: string): boolean; getFileIncludeReasons(): MultiMap; getCommonSourceDirectory(): string; @@ -10501,6 +10563,12 @@ export interface UserPreferences { readonly displayPartsForJSDoc?: boolean; readonly generateReturnInDocTemplate?: boolean; readonly disableLineTextInReferences?: boolean; + /** + * A positive integer indicating the maximum length of a hover text before it is truncated. + * + * Default: `500` + */ + readonly maximumHoverLength?: number; } export type OrganizeImportsTypeOrder = "last" | "inline" | "first"; @@ -10553,7 +10621,7 @@ export interface SyntacticTypeNodeBuilderResolver { isDefinitelyReferenceToGlobalSymbolObject(node: Node): boolean; isEntityNameVisible(context: SyntacticTypeNodeBuilderContext, entityName: EntityNameOrEntityNameExpression, shouldComputeAliasToMakeVisible?: boolean): SymbolVisibilityResult; serializeExistingTypeNode(context: SyntacticTypeNodeBuilderContext, node: TypeNode, addUndefined?: boolean): TypeNode | undefined; - serializeReturnTypeForSignature(context: SyntacticTypeNodeBuilderContext, signatureDeclaration: SignatureDeclaration | JSDocSignature): TypeNode | undefined; + serializeReturnTypeForSignature(context: SyntacticTypeNodeBuilderContext, signatureDeclaration: SignatureDeclaration | JSDocSignature, symbol: Symbol | undefined): TypeNode | undefined; serializeTypeOfExpression(context: SyntacticTypeNodeBuilderContext, expr: Expression): TypeNode; serializeTypeOfDeclaration(context: SyntacticTypeNodeBuilderContext, node: HasInferredType | GetAccessorDeclaration | SetAccessorDeclaration, symbol: Symbol | undefined): TypeNode | undefined; serializeNameOfParameter(context: SyntacticTypeNodeBuilderContext, parameter: ParameterDeclaration): BindingName | string; diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 5755369134d8a..72b6a3c1a667b 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -2,6 +2,7 @@ import { __String, AccessExpression, AccessorDeclaration, + addEmitFlags, addRange, affectsDeclarationPathOptionDeclarations, affectsEmitOptionDeclarations, @@ -511,6 +512,8 @@ import { ScriptTarget, semanticDiagnosticsOptionDeclarations, SetAccessorDeclaration, + setOriginalNode, + setTextRange, ShorthandPropertyAssignment, shouldAllowImportingTsExtension, Signature, @@ -592,6 +595,7 @@ import { VariableDeclarationList, VariableLikeDeclaration, VariableStatement, + visitEachChild, WhileStatement, WithStatement, WrappedExpression, @@ -610,6 +614,8 @@ export const externalHelpersModuleNameText = "tslib"; export const defaultMaximumTruncationLength = 160; /** @internal */ export const noTruncationMaximumTruncationLength = 1_000_000; +/** @internal */ +export const defaultHoverMaximumTruncationLength = 500; /** @internal */ export function getDeclarationOfKind(symbol: Symbol, kind: T["kind"]): T | undefined { @@ -1446,6 +1452,9 @@ export const getScriptTargetFeatures: () => ScriptTargetFeatures = /* @__PURE__ es2024: [ "waitAsync", ], + esnext: [ + "pause", + ], })), SharedArrayBuffer: new Map(Object.entries({ es2017: [ @@ -2642,7 +2651,13 @@ export function isSuperCall(n: Node): n is SuperCall { /** @internal */ export function isImportCall(n: Node): n is ImportCall { - return n.kind === SyntaxKind.CallExpression && (n as CallExpression).expression.kind === SyntaxKind.ImportKeyword; + if (n.kind !== SyntaxKind.CallExpression) return false; + const e = (n as CallExpression).expression; + return e.kind === SyntaxKind.ImportKeyword || ( + isMetaProperty(e) + && e.keywordToken === SyntaxKind.ImportKeyword + && e.name.escapedText === "defer" + ); } /** @internal */ @@ -3593,8 +3608,10 @@ export function isExpressionNode(node: Node): boolean { case SyntaxKind.JsxFragment: case SyntaxKind.YieldExpression: case SyntaxKind.AwaitExpression: - case SyntaxKind.MetaProperty: return true; + case SyntaxKind.MetaProperty: + // `import.defer` in `import.defer(...)` is not an expression + return !isImportCall(node.parent) || node.parent.expression !== node; case SyntaxKind.ExpressionWithTypeArguments: return !isHeritageClause(node.parent) && !isJSDocAugmentsTag(node.parent); case SyntaxKind.QualifiedName: @@ -6585,7 +6602,7 @@ export function sourceFileMayBeEmitted(sourceFile: SourceFile, host: SourceFileM if (host.isSourceOfProjectReferenceRedirect(sourceFile.fileName)) return false; // Any non json file should be emitted if (!isJsonSourceFile(sourceFile)) return true; - if (host.getResolvedProjectReferenceToRedirect(sourceFile.fileName)) return false; + if (host.getRedirectFromSourceFile(sourceFile.fileName)) return false; // Emit json file if outFile is specified if (options.outFile) return true; // Json file is not emitted if outDir is not specified @@ -9057,8 +9074,8 @@ const _computedOptions = createComputedCompilerOptions({ if (!moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) { return false; } - if (compilerOptions.resolvePackageJsonExports !== undefined) { - return compilerOptions.resolvePackageJsonExports; + if (compilerOptions.resolvePackageJsonImports !== undefined) { + return compilerOptions.resolvePackageJsonImports; } switch (moduleResolution) { case ModuleResolutionKind.Node16: @@ -10933,10 +10950,11 @@ export function isTypeDeclaration(node: Node): node is TypeParameterDeclaration case SyntaxKind.JSDocEnumTag: return true; case SyntaxKind.ImportClause: - return (node as ImportClause).isTypeOnly; + return (node as ImportClause).phaseModifier === SyntaxKind.TypeKeyword; case SyntaxKind.ImportSpecifier: + return (node as ImportSpecifier).parent.parent.phaseModifier === SyntaxKind.TypeKeyword; case SyntaxKind.ExportSpecifier: - return (node as ImportSpecifier | ExportSpecifier).parent.parent.isTypeOnly; + return (node as ExportSpecifier).parent.parent.isTypeOnly; default: return false; } @@ -12108,7 +12126,7 @@ function getNodeAtPosition(sourceFile: SourceFile, position: number, includeJSDo }; while (true) { const child = isJavaScriptFile && includeJSDoc && hasJSDocNodes(current) && forEach(current.jsDoc, getContainingChild) || forEachChild(current, getContainingChild); - if (!child) { + if (!child || isMetaProperty(child)) { return current; } current = child; @@ -12135,12 +12153,12 @@ export function getLibFileNameFromLibReference(libReference: FileReference): str /** @internal */ export function forEachResolvedProjectReference( resolvedProjectReferences: readonly (ResolvedProjectReference | undefined)[] | undefined, - cb: (resolvedProjectReference: ResolvedProjectReference, parent: ResolvedProjectReference | undefined) => T | undefined, + cb: (resolvedProjectReference: ResolvedProjectReference) => T | undefined, ): T | undefined { return forEachProjectReference( /*projectReferences*/ undefined, resolvedProjectReferences, - (resolvedRef, parent) => resolvedRef && cb(resolvedRef, parent), + resolvedRef => resolvedRef && cb(resolvedRef), ); } @@ -12208,3 +12226,121 @@ export function getOptionsSyntaxByValue(optionsObject: ObjectLiteralExpression | export function forEachOptionsSyntaxByName(optionsObject: ObjectLiteralExpression | undefined, name: string, callback: (prop: PropertyAssignment) => T | undefined): T | undefined { return forEachPropertyAssignment(optionsObject, name, callback); } + +/** + * Creates a deep, memberwise clone of a node with no source map location. + * + * WARNING: This is an expensive operation and is only intended to be used in refactorings + * and code fixes (because those are triggered by explicit user actions). + * + * @internal + */ +// Moved here to compiler utilities for usage in node builder for quickinfo. +export function getSynthesizedDeepClone(node: T, includeTrivia = true): T { + const clone = node && getSynthesizedDeepCloneWorker(node); + if (clone && !includeTrivia) suppressLeadingAndTrailingTrivia(clone); + return setParentRecursive(clone, /*incremental*/ false); +} + +/** @internal */ +export function getSynthesizedDeepCloneWithReplacements( + node: T, + includeTrivia: boolean, + replaceNode: (node: Node) => Node | undefined, +): T { + let clone = replaceNode(node); + if (clone) { + setOriginalNode(clone, node); + } + else { + clone = getSynthesizedDeepCloneWorker(node as NonNullable, replaceNode); + } + + if (clone && !includeTrivia) suppressLeadingAndTrailingTrivia(clone); + return clone as T; +} + +function getSynthesizedDeepCloneWorker(node: T, replaceNode?: (node: Node) => Node | undefined): T { + const nodeClone: (n: T) => T = replaceNode + ? n => getSynthesizedDeepCloneWithReplacements(n, /*includeTrivia*/ true, replaceNode) + : getSynthesizedDeepClone; + const nodesClone: (ns: NodeArray | undefined) => NodeArray | undefined = replaceNode + ? ns => ns && getSynthesizedDeepClonesWithReplacements(ns, /*includeTrivia*/ true, replaceNode) + : ns => ns && getSynthesizedDeepClones(ns); + const visited = visitEachChild(node, nodeClone, /*context*/ undefined, nodesClone, nodeClone); + + if (visited === node) { + // This only happens for leaf nodes - internal nodes always see their children change. + const clone = isStringLiteral(node) ? setOriginalNode(factory.createStringLiteralFromNode(node), node) as Node as T : + isNumericLiteral(node) ? setOriginalNode(factory.createNumericLiteral(node.text, node.numericLiteralFlags), node) as Node as T : + factory.cloneNode(node); + return setTextRange(clone, node); + } + + // PERF: As an optimization, rather than calling factory.cloneNode, we'll update + // the new node created by visitEachChild with the extra changes factory.cloneNode + // would have made. + (visited as Mutable).parent = undefined!; + return visited; +} + +/** @internal */ +export function getSynthesizedDeepClones(nodes: NodeArray, includeTrivia?: boolean): NodeArray; +/** @internal */ +export function getSynthesizedDeepClones(nodes: NodeArray | undefined, includeTrivia?: boolean): NodeArray | undefined; +/** @internal */ +export function getSynthesizedDeepClones(nodes: NodeArray | undefined, includeTrivia = true): NodeArray | undefined { + if (nodes) { + const cloned = factory.createNodeArray(nodes.map(n => getSynthesizedDeepClone(n, includeTrivia)), nodes.hasTrailingComma); + setTextRange(cloned, nodes); + return cloned; + } + return nodes; +} + +/** @internal */ +export function getSynthesizedDeepClonesWithReplacements( + nodes: NodeArray, + includeTrivia: boolean, + replaceNode: (node: Node) => Node | undefined, +): NodeArray { + return factory.createNodeArray(nodes.map(n => getSynthesizedDeepCloneWithReplacements(n, includeTrivia, replaceNode)), nodes.hasTrailingComma); +} + +/** + * Sets EmitFlags to suppress leading and trailing trivia on the node. + * + * @internal + */ +export function suppressLeadingAndTrailingTrivia(node: Node): void { + suppressLeadingTrivia(node); + suppressTrailingTrivia(node); +} + +/** + * Sets EmitFlags to suppress leading trivia on the node. + * + * @internal + */ +export function suppressLeadingTrivia(node: Node): void { + addEmitFlagsRecursively(node, EmitFlags.NoLeadingComments, getFirstChild); +} + +/** + * Sets EmitFlags to suppress trailing trivia on the node. + * + * @internal @knipignore + */ +export function suppressTrailingTrivia(node: Node): void { + addEmitFlagsRecursively(node, EmitFlags.NoTrailingComments, getLastChild); +} + +function addEmitFlagsRecursively(node: Node, flag: EmitFlags, getChild: (n: Node) => Node | undefined) { + addEmitFlags(node, flag); + const child = getChild(node); + if (child) addEmitFlagsRecursively(child, flag, getChild); +} + +function getFirstChild(node: Node): Node | undefined { + return forEachChild(node, child => child); +} diff --git a/src/compiler/utilitiesPublic.ts b/src/compiler/utilitiesPublic.ts index 02623678a0cf0..36eba18db07ba 100644 --- a/src/compiler/utilitiesPublic.ts +++ b/src/compiler/utilitiesPublic.ts @@ -1534,12 +1534,13 @@ export function isImportOrExportSpecifier(node: Node): node is ImportSpecifier | export function isTypeOnlyImportDeclaration(node: Node): node is TypeOnlyImportDeclaration { switch (node.kind) { case SyntaxKind.ImportSpecifier: - return (node as ImportSpecifier).isTypeOnly || (node as ImportSpecifier).parent.parent.isTypeOnly; + return (node as ImportSpecifier).isTypeOnly || (node as ImportSpecifier).parent.parent.phaseModifier === SyntaxKind.TypeKeyword; case SyntaxKind.NamespaceImport: - return (node as NamespaceImport).parent.isTypeOnly; + return (node as NamespaceImport).parent.phaseModifier === SyntaxKind.TypeKeyword; case SyntaxKind.ImportClause: + return (node as ImportClause).phaseModifier === SyntaxKind.TypeKeyword; case SyntaxKind.ImportEqualsDeclaration: - return (node as ImportClause | ImportEqualsDeclaration).isTypeOnly; + return (node as ImportEqualsDeclaration).isTypeOnly; } return false; } diff --git a/src/compiler/visitorPublic.ts b/src/compiler/visitorPublic.ts index dbd49379e5750..d1aee94bc6e1b 100644 --- a/src/compiler/visitorPublic.ts +++ b/src/compiler/visitorPublic.ts @@ -1549,7 +1549,7 @@ const visitEachChildTable: VisitEachChildTable = { [SyntaxKind.ImportClause]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportClause( node, - node.isTypeOnly, + node.phaseModifier, nodeVisitor(node.name, visitor, isIdentifier), nodeVisitor(node.namedBindings, visitor, isNamedImportBindings), ); diff --git a/src/harness/client.ts b/src/harness/client.ts index ec659d738c02a..786690be0f467 100644 --- a/src/harness/client.ts +++ b/src/harness/client.ts @@ -254,8 +254,8 @@ export class SessionClient implements LanguageService { return { line, character: offset }; } - getQuickInfoAtPosition(fileName: string, position: number): QuickInfo { - const args = this.createFileLocationRequestArgs(fileName, position); + getQuickInfoAtPosition(fileName: string, position: number, maximumLength?: number, verbosityLevel?: number | undefined): QuickInfo { + const args = { ...this.createFileLocationRequestArgs(fileName, position), verbosityLevel }; const request = this.processRequest(protocol.CommandTypes.Quickinfo, args); const response = this.processResponse(request); @@ -268,6 +268,7 @@ export class SessionClient implements LanguageService { displayParts: [{ kind: "text", text: body.displayString }], documentation: typeof body.documentation === "string" ? [{ kind: "text", text: body.documentation }] : body.documentation, tags: this.decodeLinkDisplayParts(body.tags), + canIncreaseVerbosityLevel: body.canIncreaseVerbosityLevel, }; } diff --git a/src/harness/fourslashImpl.ts b/src/harness/fourslashImpl.ts index e1a410dfb5d3b..e53dbb123c553 100644 --- a/src/harness/fourslashImpl.ts +++ b/src/harness/fourslashImpl.ts @@ -86,6 +86,10 @@ export interface TextSpan { end: number; } +export interface VerbosityLevels { + [markerName: string]: number | number[] | undefined; +} + // Name of testcase metadata including ts.CompilerOptions properties that will be used by globalOptions // To add additional option, add property into the testOptMetadataNames, refer the property in either globalMetadataNames or fileMetadataNames // Add cases into convertGlobalOptionsToCompilationsSettings function for the compiler to acknowledge such option from meta data @@ -2451,19 +2455,33 @@ export class TestState { return result; } - public baselineQuickInfo(): void { - const result = ts.arrayFrom(this.testData.markerPositions.entries(), ([name, marker]) => ({ - marker: { ...marker, name }, - item: this.languageService.getQuickInfoAtPosition(marker.fileName, marker.position), - })); + public baselineQuickInfo(verbosityLevels?: VerbosityLevels, maximumLength?: number): void { + const result = ts.arrayFrom(this.testData.markerPositions.entries(), ([name, marker]) => { + const verbosityLevel = toArray(verbosityLevels?.[name]); + const items = verbosityLevel.map(verbosityLevel => { + const item: ts.QuickInfo & { verbosityLevel?: number; } | undefined = this.languageService.getQuickInfoAtPosition( + marker.fileName, + marker.position, + maximumLength, + verbosityLevel, + ); + if (item) item.verbosityLevel = verbosityLevel; + return { + marker: { ...marker, name }, + item, + }; + }); + return items; + }).flat(); const annotations = this.annotateContentWithTooltips( result, "quickinfo", item => item.textSpan, - ({ displayParts, documentation, tags }) => [ + ({ displayParts, documentation, tags, verbosityLevel }) => [ ...(displayParts ? displayParts.map(p => p.text).join("").split("\n") : []), ...(documentation?.length ? documentation.map(p => p.text).join("").split("\n") : []), ...(tags?.length ? tags.map(p => `@${p.name} ${p.text?.map(dp => dp.text).join("") ?? ""}`).join("\n").split("\n") : []), + ...(verbosityLevel !== undefined ? [`(verbosity level: ${verbosityLevel})`] : []), ], ); this.baseline("QuickInfo", annotations + "\n\n" + stringify(result)); @@ -2585,9 +2603,9 @@ export class TestState { const sorted = items.slice(); // sort by file, then *backwards* by position in the file so I can insert multiple times on a line without counting sorted.sort((q1, q2) => - q1.marker.fileName === q1.marker.fileName + q1.marker.fileName === q2.marker.fileName ? (q1.marker.position > q2.marker.position ? -1 : 1) - : (q1.marker.fileName > q1.marker.fileName ? 1 : -1) + : (q1.marker.fileName > q2.marker.fileName ? 1 : -1) ); const files = new Map(); let previous: T | undefined; diff --git a/src/harness/fourslashInterfaceImpl.ts b/src/harness/fourslashInterfaceImpl.ts index ec23609de6db0..db6127dc106e0 100644 --- a/src/harness/fourslashInterfaceImpl.ts +++ b/src/harness/fourslashInterfaceImpl.ts @@ -449,8 +449,8 @@ export class Verify extends VerifyNegatable { this.state.baselineGetEmitOutput(); } - public baselineQuickInfo(): void { - this.state.baselineQuickInfo(); + public baselineQuickInfo(verbosityLevels?: FourSlash.VerbosityLevels, maximumLength?: number): void { + this.state.baselineQuickInfo(verbosityLevels, maximumLength); } public baselineSignatureHelp(): void { diff --git a/src/harness/vfsUtil.ts b/src/harness/vfsUtil.ts index 4799927a70a14..596575beece2c 100644 --- a/src/harness/vfsUtil.ts +++ b/src/harness/vfsUtil.ts @@ -637,7 +637,7 @@ export class FileSystem { * * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. */ - public readFileSync(path: string, encoding?: null): Buffer; // eslint-disable-line no-restricted-syntax + public readFileSync(path: string, encoding?: null): Buffer; // eslint-disable-line no-restricted-syntax /** * Read from a file. * @@ -649,7 +649,7 @@ export class FileSystem { * * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. */ - public readFileSync(path: string, encoding?: BufferEncoding | null): string | Buffer; // eslint-disable-line no-restricted-syntax + public readFileSync(path: string, encoding?: BufferEncoding | null): string | Buffer; // eslint-disable-line no-restricted-syntax public readFileSync(path: string, encoding: BufferEncoding | null = null) { // eslint-disable-line no-restricted-syntax const { node } = this._walk(this._resolve(path)); if (!node) throw createIOError("ENOENT"); diff --git a/src/lib/dom.generated.d.ts b/src/lib/dom.generated.d.ts index 7b6d0275cf54e..30e7063e2cd64 100644 --- a/src/lib/dom.generated.d.ts +++ b/src/lib/dom.generated.d.ts @@ -121,7 +121,7 @@ interface AudioDataInit { interface AudioDecoderConfig { codec: string; - description?: BufferSource; + description?: AllowSharedBufferSource; numberOfChannels: number; sampleRate: number; } @@ -232,7 +232,7 @@ interface BiquadFilterOptions extends AudioNodeOptions { type?: BiquadFilterType; } -interface BlobEventInit { +interface BlobEventInit extends EventInit { data: Blob; timecode?: DOMHighResTimeStamp; } @@ -369,6 +369,38 @@ interface ConvolverOptions extends AudioNodeOptions { disableNormalization?: boolean; } +interface CookieChangeEventInit extends EventInit { + changed?: CookieList; + deleted?: CookieList; +} + +interface CookieInit { + domain?: string | null; + expires?: DOMHighResTimeStamp | null; + name: string; + partitioned?: boolean; + path?: string; + sameSite?: CookieSameSite; + value: string; +} + +interface CookieListItem { + name?: string; + value?: string; +} + +interface CookieStoreDeleteOptions { + domain?: string | null; + name: string; + partitioned?: boolean; + path?: string; +} + +interface CookieStoreGetOptions { + name?: string; + url?: string; +} + interface CredentialCreationOptions { publicKey?: PublicKeyCredentialCreationOptions; signal?: AbortSignal; @@ -533,6 +565,7 @@ interface EffectTiming { } interface ElementCreationOptions { + customElementRegistry?: CustomElementRegistry; is?: string; } @@ -794,6 +827,11 @@ interface ImageEncodeOptions { type?: string; } +interface ImportNodeOptions { + customElementRegistry?: CustomElementRegistry; + selfOnly?: boolean; +} + interface InputEventInit extends UIEventInit { data?: string | null; dataTransfer?: DataTransfer | null; @@ -886,7 +924,7 @@ interface MIDIConnectionEventInit extends EventInit { } interface MIDIMessageEventInit extends EventInit { - data?: Uint8Array; + data?: Uint8Array; } interface MIDIOptions { @@ -993,6 +1031,12 @@ interface MediaSessionActionDetails { seekTime?: number; } +interface MediaSettingsRange { + max?: number; + min?: number; + step?: number; +} + interface MediaStreamAudioSourceOptions { mediaStream: MediaStream; } @@ -1063,7 +1107,10 @@ interface MediaTrackSettings { noiseSuppression?: boolean; sampleRate?: number; sampleSize?: number; + torch?: boolean; + whiteBalanceMode?: string; width?: number; + zoom?: number; } interface MediaTrackSupportedConstraints { @@ -1323,6 +1370,20 @@ interface PermissionDescriptor { name: PermissionName; } +interface PhotoCapabilities { + fillLightMode?: FillLightMode[]; + imageHeight?: MediaSettingsRange; + imageWidth?: MediaSettingsRange; + redEyeReduction?: RedEyeReduction; +} + +interface PhotoSettings { + fillLightMode?: FillLightMode; + imageHeight?: number; + imageWidth?: number; + redEyeReduction?: boolean; +} + interface PictureInPictureEventInit extends EventInit { pictureInPictureWindow: PictureInPictureWindow; } @@ -1657,6 +1718,9 @@ interface RTCInboundRtpStreamStats extends RTCReceivedRtpStreamStats { trackIdentifier: string; } +interface RTCLocalIceCandidateInit extends RTCIceCandidateInit { +} + interface RTCLocalSessionDescriptionInit { sdp?: string; type?: RTCSdpType; @@ -1712,7 +1776,6 @@ interface RTCPeerConnectionIceErrorEventInit extends EventInit { interface RTCPeerConnectionIceEventInit extends EventInit { candidate?: RTCIceCandidate | null; - url?: string | null; } interface RTCReceivedRtpStreamStats extends RTCRtpStreamStats { @@ -1870,7 +1933,7 @@ interface ReadableStreamIteratorOptions { interface ReadableStreamReadDoneResult { done: true; - value?: T; + value: T | undefined; } interface ReadableStreamReadValueResult { @@ -2012,6 +2075,8 @@ interface SecurityPolicyViolationEventInit extends EventInit { } interface ShadowRootInit { + clonable?: boolean; + customElementRegistry?: CustomElementRegistry; delegatesFocus?: boolean; mode: ShadowRootMode; serializable?: boolean; @@ -2037,6 +2102,11 @@ interface SpeechSynthesisEventInit extends EventInit { utterance: SpeechSynthesisUtterance; } +interface StartViewTransitionOptions { + types?: string[] | null; + update?: ViewTransitionUpdateCallback | null; +} + interface StaticRangeInit { endContainer: Node; endOffset: number; @@ -2373,10 +2443,13 @@ interface WebTransportOptions { serverCertificateHashes?: WebTransportHash[]; } -interface WebTransportSendStreamOptions { +interface WebTransportSendOptions { sendOrder?: number; } +interface WebTransportSendStreamOptions extends WebTransportSendOptions { +} + interface WheelEventInit extends MouseEventInit { deltaMode?: number; deltaX?: number; @@ -2429,7 +2502,7 @@ declare var NodeFilter: { type XPathNSResolver = ((prefix: string | null) => string | null) | { lookupNamespaceURI(prefix: string | null): string | null; }; /** - * The ANGLE_instanced_arrays extension is part of the WebGL API and allows to draw the same object, or groups of similar objects multiple times, if they share the same vertex data, primitive count and type. + * The **`ANGLE_instanced_arrays`** extension is part of the WebGL API and allows to draw the same object, or groups of similar objects multiple times, if they share the same vertex data, primitive count and type. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ANGLE_instanced_arrays) */ @@ -2444,6 +2517,7 @@ interface ANGLE_instanced_arrays { } interface ARIAMixin { + ariaActiveDescendantElement: Element | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaAtomic) */ ariaAtomic: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaAutoComplete) */ @@ -2464,23 +2538,30 @@ interface ARIAMixin { ariaColIndexText: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaColSpan) */ ariaColSpan: string | null; + ariaControlsElements: ReadonlyArray | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaCurrent) */ ariaCurrent: string | null; + ariaDescribedByElements: ReadonlyArray | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaDescription) */ ariaDescription: string | null; + ariaDetailsElements: ReadonlyArray | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaDisabled) */ ariaDisabled: string | null; + ariaErrorMessageElements: ReadonlyArray | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaExpanded) */ ariaExpanded: string | null; + ariaFlowToElements: ReadonlyArray | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaHasPopup) */ ariaHasPopup: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaHidden) */ ariaHidden: string | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaInvalid) */ ariaInvalid: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaKeyShortcuts) */ ariaKeyShortcuts: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaLabel) */ ariaLabel: string | null; + ariaLabelledByElements: ReadonlyArray | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaLevel) */ ariaLevel: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaLive) */ @@ -2493,6 +2574,7 @@ interface ARIAMixin { ariaMultiSelectable: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaOrientation) */ ariaOrientation: string | null; + ariaOwnsElements: ReadonlyArray | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaPlaceholder) */ ariaPlaceholder: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaPosInSet) */ @@ -2529,11 +2611,12 @@ interface ARIAMixin { ariaValueNow: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaValueText) */ ariaValueText: string | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/role) */ role: string | null; } /** - * A controller object that allows you to abort one or more DOM requests as and when desired. + * The **`AbortController`** interface represents a controller object that allows you to abort one or more Web requests as and when desired. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController) */ @@ -2562,7 +2645,7 @@ interface AbortSignalEventMap { } /** - * A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. + * The **`AbortSignal`** interface represents a signal object that allows you to communicate with an asynchronous operation (such as a fetch request) and abort it if required via an AbortController object. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal) */ @@ -2596,7 +2679,11 @@ declare var AbortSignal: { timeout(milliseconds: number): AbortSignal; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbstractRange) */ +/** + * The **`AbstractRange`** abstract interface is the base class upon which all DOM range types are defined. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbstractRange) + */ interface AbstractRange { /** * Returns true if range is collapsed, and false otherwise. @@ -2649,7 +2736,7 @@ interface AbstractWorker { } /** - * A node able to provide real-time frequency and time-domain analysis information. It is an AudioNode that passes the audio stream unchanged from the input to the output, but allows you to take the generated data, process it, and create audio visualizations. + * The **`AnalyserNode`** interface represents a node able to provide real-time frequency and time-domain analysis information. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnalyserNode) */ @@ -2665,13 +2752,13 @@ interface AnalyserNode extends AudioNode { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnalyserNode/smoothingTimeConstant) */ smoothingTimeConstant: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnalyserNode/getByteFrequencyData) */ - getByteFrequencyData(array: Uint8Array): void; + getByteFrequencyData(array: Uint8Array): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnalyserNode/getByteTimeDomainData) */ - getByteTimeDomainData(array: Uint8Array): void; + getByteTimeDomainData(array: Uint8Array): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnalyserNode/getFloatFrequencyData) */ - getFloatFrequencyData(array: Float32Array): void; + getFloatFrequencyData(array: Float32Array): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnalyserNode/getFloatTimeDomainData) */ - getFloatTimeDomainData(array: Float32Array): void; + getFloatTimeDomainData(array: Float32Array): void; } declare var AnalyserNode: { @@ -2692,7 +2779,11 @@ interface AnimationEventMap { "remove": AnimationPlaybackEvent; } -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Animation) */ +/** + * The **`Animation`** interface of the Web Animations API represents a single animation player and provides playback controls and a timeline for an animation node or source. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Animation) + */ interface Animation extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Animation/currentTime) */ currentTime: CSSNumberish | null; @@ -2749,7 +2840,11 @@ declare var Animation: { new(effect?: AnimationEffect | null, timeline?: AnimationTimeline | null): Animation; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationEffect) */ +/** + * The `AnimationEffect` interface of the Web Animations API is an interface representing animation effects. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationEffect) + */ interface AnimationEffect { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationEffect/getComputedTiming) */ getComputedTiming(): ComputedEffectTiming; @@ -2765,7 +2860,7 @@ declare var AnimationEffect: { }; /** - * Events providing information related to animations. + * The **`AnimationEvent`** interface represents events providing information related to animations. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationEvent) */ @@ -2790,7 +2885,11 @@ interface AnimationFrameProvider { requestAnimationFrame(callback: FrameRequestCallback): number; } -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationPlaybackEvent) */ +/** + * The AnimationPlaybackEvent interface of the Web Animations API represents animation events. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationPlaybackEvent) + */ interface AnimationPlaybackEvent extends Event { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationPlaybackEvent/currentTime) */ readonly currentTime: CSSNumberish | null; @@ -2803,7 +2902,11 @@ declare var AnimationPlaybackEvent: { new(type: string, eventInitDict?: AnimationPlaybackEventInit): AnimationPlaybackEvent; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationTimeline) */ +/** + * The `AnimationTimeline` interface of the Web Animations API represents the timeline of an animation. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationTimeline) + */ interface AnimationTimeline { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationTimeline/currentTime) */ readonly currentTime: CSSNumberish | null; @@ -2815,7 +2918,7 @@ declare var AnimationTimeline: { }; /** - * A DOM element's attribute as an object. In most DOM methods, you will probably directly retrieve the attribute as a string (e.g., Element.getAttribute(), but certain functions (e.g., Element.getAttributeNode()) or means of iterating give Attr types. + * The **`Attr`** interface represents one of an element's attributes as an object. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Attr) */ @@ -2847,7 +2950,7 @@ declare var Attr: { }; /** - * A short audio asset residing in memory, created from an audio file using the AudioContext.decodeAudioData() method, or from raw data using AudioContext.createBuffer(). Once put into an AudioBuffer, the audio can then be played by being passed into an AudioBufferSourceNode. + * The **`AudioBuffer`** interface represents a short audio asset residing in memory, created from an audio file using the BaseAudioContext/decodeAudioData method, or from raw data using BaseAudioContext/createBuffer. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioBuffer) */ @@ -2861,11 +2964,11 @@ interface AudioBuffer { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioBuffer/sampleRate) */ readonly sampleRate: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioBuffer/copyFromChannel) */ - copyFromChannel(destination: Float32Array, channelNumber: number, bufferOffset?: number): void; + copyFromChannel(destination: Float32Array, channelNumber: number, bufferOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioBuffer/copyToChannel) */ - copyToChannel(source: Float32Array, channelNumber: number, bufferOffset?: number): void; + copyToChannel(source: Float32Array, channelNumber: number, bufferOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioBuffer/getChannelData) */ - getChannelData(channel: number): Float32Array; + getChannelData(channel: number): Float32Array; } declare var AudioBuffer: { @@ -2874,7 +2977,7 @@ declare var AudioBuffer: { }; /** - * An AudioScheduledSourceNode which represents an audio source consisting of in-memory audio data, stored in an AudioBuffer. It's especially useful for playing back audio which has particularly stringent timing accuracy requirements, such as for sounds that must match a specific rhythm and can be kept in memory rather than being played from disk or the network. + * The **`AudioBufferSourceNode`** interface is an AudioScheduledSourceNode which represents an audio source consisting of in-memory audio data, stored in an AudioBuffer. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioBufferSourceNode) */ @@ -2905,7 +3008,7 @@ declare var AudioBufferSourceNode: { }; /** - * An audio-processing graph built from audio modules linked together, each represented by an AudioNode. + * The `AudioContext` interface represents an audio-processing graph built from audio modules linked together, each represented by an AudioNode. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioContext) */ @@ -2939,7 +3042,11 @@ declare var AudioContext: { new(contextOptions?: AudioContextOptions): AudioContext; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData) */ +/** + * The **`AudioData`** interface of the WebCodecs API represents an audio sample. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData) + */ interface AudioData { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/duration) */ readonly duration: number; @@ -2973,6 +3080,7 @@ interface AudioDecoderEventMap { } /** + * The **`AudioDecoder`** interface of the WebCodecs API decodes chunks of audio. * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder) @@ -3008,7 +3116,7 @@ declare var AudioDecoder: { }; /** - * AudioDestinationNode has no output (as it is the output, no more AudioNode can be linked after it in the audio graph) and one input. The number of channels in the input must be between 0 and the maxChannelCount value or an exception is raised. + * The `AudioDestinationNode` interface represents the end destination of an audio graph in a given context — usually the speakers of your device. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDestinationNode) */ @@ -3027,6 +3135,7 @@ interface AudioEncoderEventMap { } /** + * The **`AudioEncoder`** interface of the WebCodecs API encodes AudioData objects. * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder) @@ -3062,7 +3171,7 @@ declare var AudioEncoder: { }; /** - * The position and orientation of the unique person listening to the audio scene, and is used in audio spatialization. All PannerNodes spatialize in relation to the AudioListener stored in the BaseAudioContext.listener attribute. + * The `AudioListener` interface represents the position and orientation of the unique person listening to the audio scene, and is used in audio spatialization. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioListener) */ @@ -3105,7 +3214,7 @@ declare var AudioListener: { }; /** - * A generic interface for representing an audio processing module. Examples include: + * The **`AudioNode`** interface is a generic interface for representing an audio processing module. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioNode) */ @@ -3141,7 +3250,7 @@ declare var AudioNode: { }; /** - * The Web Audio API's AudioParam interface represents an audio-related parameter, usually a parameter of an AudioNode (such as GainNode.gain). + * The Web Audio API's `AudioParam` interface represents an audio-related parameter, usually a parameter of an AudioNode (such as GainNode.gain). * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioParam) */ @@ -3176,7 +3285,11 @@ declare var AudioParam: { new(): AudioParam; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioParamMap) */ +/** + * The **`AudioParamMap`** interface of the Web Audio API represents an iterable and read-only set of multiple audio parameters. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioParamMap) + */ interface AudioParamMap { forEach(callbackfn: (value: AudioParam, key: string, parent: AudioParamMap) => void, thisArg?: any): void; } @@ -3187,7 +3300,7 @@ declare var AudioParamMap: { }; /** - * The Web Audio API events that occur when a ScriptProcessorNode input buffer is ready to be processed. + * The `AudioProcessingEvent` interface of the Web Audio API represents events that occur when a ScriptProcessorNode input buffer is ready to be processed. * @deprecated As of the August 29 2014 Web Audio API spec publication, this feature has been marked as deprecated, and is soon to be replaced by AudioWorklet. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioProcessingEvent) @@ -3223,7 +3336,11 @@ interface AudioScheduledSourceNodeEventMap { "ended": Event; } -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioScheduledSourceNode) */ +/** + * The `AudioScheduledSourceNode` interface—part of the Web Audio API—is a parent interface for several types of audio source node interfaces which share the ability to be started and stopped, optionally at specified times. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioScheduledSourceNode) + */ interface AudioScheduledSourceNode extends AudioNode { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioScheduledSourceNode/ended_event) */ onended: ((this: AudioScheduledSourceNode, ev: Event) => any) | null; @@ -3243,6 +3360,7 @@ declare var AudioScheduledSourceNode: { }; /** + * The **`AudioWorklet`** interface of the Web Audio API is used to supply custom audio processing scripts that execute in a separate thread to provide very low latency audio processing. * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioWorklet) @@ -3260,6 +3378,7 @@ interface AudioWorkletNodeEventMap { } /** + * The **`AudioWorkletNode`** interface of the Web Audio API represents a base class for a user-defined AudioNode, which can be connected to an audio routing graph along with other nodes. * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioWorkletNode) @@ -3283,6 +3402,7 @@ declare var AudioWorkletNode: { }; /** + * The **`AuthenticatorAssertionResponse`** interface of the Web Authentication API contains a digital signature from the private key of a particular WebAuthn credential. * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AuthenticatorAssertionResponse) @@ -3302,6 +3422,7 @@ declare var AuthenticatorAssertionResponse: { }; /** + * The **`AuthenticatorAttestationResponse`** interface of the Web Authentication API is the result of a WebAuthn credential registration. * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AuthenticatorAttestationResponse) @@ -3325,6 +3446,7 @@ declare var AuthenticatorAttestationResponse: { }; /** + * The **`AuthenticatorResponse`** interface of the Web Authentication API is the base interface for interfaces that provide a cryptographic root of trust for a key pair. * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AuthenticatorResponse) @@ -3339,7 +3461,11 @@ declare var AuthenticatorResponse: { new(): AuthenticatorResponse; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/BarProp) */ +/** + * The **`BarProp`** interface of the Document Object Model represents the web browser user interface elements that are exposed to scripts in web pages. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/BarProp) + */ interface BarProp { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/BarProp/visible) */ readonly visible: boolean; @@ -3354,7 +3480,11 @@ interface BaseAudioContextEventMap { "statechange": Event; } -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/BaseAudioContext) */ +/** + * The `BaseAudioContext` interface of the Web Audio API acts as a base definition for online and offline audio-processing graphs, as represented by AudioContext and OfflineAudioContext respectively. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/BaseAudioContext) + */ interface BaseAudioContext extends EventTarget { /** * Available only in secure contexts. @@ -3428,7 +3558,7 @@ declare var BaseAudioContext: { }; /** - * The beforeunload event is fired when the window, the document and its resources are about to be unloaded. + * The **`BeforeUnloadEvent`** interface represents the event object for the Window/beforeunload_event event, which is fired when the current window, contained document, and associated resources are about to be unloaded. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/BeforeUnloadEvent) */ @@ -3447,7 +3577,7 @@ declare var BeforeUnloadEvent: { }; /** - * A simple low-order filter, and is created using the AudioContext.createBiquadFilter() method. It is an AudioNode that can represent different kinds of filters, tone control devices, and graphic equalizers. + * The `BiquadFilterNode` interface represents a simple low-order filter, and is created using the BaseAudioContext/createBiquadFilter method. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/BiquadFilterNode) */ @@ -3463,7 +3593,7 @@ interface BiquadFilterNode extends AudioNode { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/BiquadFilterNode/type) */ type: BiquadFilterType; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/BiquadFilterNode/getFrequencyResponse) */ - getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void; + getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void; } declare var BiquadFilterNode: { @@ -3472,7 +3602,7 @@ declare var BiquadFilterNode: { }; /** - * A file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user's system. + * The **`Blob`** interface represents a blob, which is a file-like object of immutable, raw data; they can be read as text or binary data, or converted into a ReadableStream so its methods can be used for processing the data. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob) */ @@ -3484,11 +3614,11 @@ interface Blob { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */ arrayBuffer(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/bytes) */ - bytes(): Promise; + bytes(): Promise>; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */ slice(start?: number, end?: number, contentType?: string): Blob; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream) */ - stream(): ReadableStream; + stream(): ReadableStream>; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */ text(): Promise; } @@ -3498,7 +3628,11 @@ declare var Blob: { new(blobParts?: BlobPart[], options?: BlobPropertyBag): Blob; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/BlobEvent) */ +/** + * The **`BlobEvent`** interface of the MediaStream Recording API represents events associated with a Blob. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/BlobEvent) + */ interface BlobEvent extends Event { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/BlobEvent/data) */ readonly data: Blob; @@ -3513,7 +3647,7 @@ declare var BlobEvent: { interface Body { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/body) */ - readonly body: ReadableStream | null; + readonly body: ReadableStream> | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */ readonly bodyUsed: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */ @@ -3521,7 +3655,7 @@ interface Body { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/blob) */ blob(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bytes) */ - bytes(): Promise; + bytes(): Promise>; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/formData) */ formData(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/json) */ @@ -3535,7 +3669,11 @@ interface BroadcastChannelEventMap { "messageerror": MessageEvent; } -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/BroadcastChannel) */ +/** + * The **`BroadcastChannel`** interface represents a named channel that any browsing context of a given origin can subscribe to. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/BroadcastChannel) + */ interface BroadcastChannel extends EventTarget { /** * Returns the channel name (as passed to the constructor). @@ -3571,7 +3709,7 @@ declare var BroadcastChannel: { }; /** - * This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. + * The **`ByteLengthQueuingStrategy`** interface of the Streams API provides a built-in byte length queuing strategy that can be used when constructing streams. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy) */ @@ -3588,7 +3726,7 @@ declare var ByteLengthQueuingStrategy: { }; /** - * A CDATA section that can be used within XML to include extended portions of unescaped text. The symbols < and & don’t need escaping as they normally do when inside a CDATA section. + * The **`CDATASection`** interface represents a CDATA section that can be used within XML to include extended portions of unescaped text. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CDATASection) */ @@ -3600,7 +3738,48 @@ declare var CDATASection: { new(): CDATASection; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSAnimation) */ +/** + * The `CSPViolationReportBody` interface is an extension of the Reporting API that represents the body of a Content Security Policy (CSP) violation report. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSPViolationReportBody) + */ +interface CSPViolationReportBody extends ReportBody { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSPViolationReportBody/blockedURL) */ + readonly blockedURL: string | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSPViolationReportBody/columnNumber) */ + readonly columnNumber: number | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSPViolationReportBody/disposition) */ + readonly disposition: SecurityPolicyViolationEventDisposition; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSPViolationReportBody/documentURL) */ + readonly documentURL: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSPViolationReportBody/effectiveDirective) */ + readonly effectiveDirective: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSPViolationReportBody/lineNumber) */ + readonly lineNumber: number | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSPViolationReportBody/originalPolicy) */ + readonly originalPolicy: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSPViolationReportBody/referrer) */ + readonly referrer: string | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSPViolationReportBody/sample) */ + readonly sample: string | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSPViolationReportBody/sourceFile) */ + readonly sourceFile: string | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSPViolationReportBody/statusCode) */ + readonly statusCode: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSPViolationReportBody/toJSON) */ + toJSON(): any; +} + +declare var CSPViolationReportBody: { + prototype: CSPViolationReportBody; + new(): CSPViolationReportBody; +}; + +/** + * The **`CSSAnimation`** interface of the Web Animations API represents an Animation object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSAnimation) + */ interface CSSAnimation extends Animation { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSAnimation/animationName) */ readonly animationName: string; @@ -3616,7 +3795,7 @@ declare var CSSAnimation: { }; /** - * A single condition CSS at-rule, which consists of a condition and a statement block. It is a child of CSSGroupingRule. + * An object implementing the **`CSSConditionRule`** interface represents a single condition CSS at-rule, which consists of a condition and a statement block. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSConditionRule) */ @@ -3630,7 +3809,11 @@ declare var CSSConditionRule: { new(): CSSConditionRule; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSContainerRule) */ +/** + * The **`CSSContainerRule`** interface represents a single CSS @container rule. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSContainerRule) + */ interface CSSContainerRule extends CSSConditionRule { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSContainerRule/containerName) */ readonly containerName: string; @@ -3643,7 +3826,11 @@ declare var CSSContainerRule: { new(): CSSContainerRule; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSCounterStyleRule) */ +/** + * The **`CSSCounterStyleRule`** interface represents an @counter-style at-rule. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSCounterStyleRule) + */ interface CSSCounterStyleRule extends CSSRule { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSCounterStyleRule/additiveSymbols) */ additiveSymbols: string; @@ -3674,7 +3861,11 @@ declare var CSSCounterStyleRule: { new(): CSSCounterStyleRule; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSFontFaceRule) */ +/** + * The **`CSSFontFaceRule`** interface represents an @font-face at-rule. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSFontFaceRule) + */ interface CSSFontFaceRule extends CSSRule { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSFontFaceRule/style) */ get style(): CSSStyleDeclaration; @@ -3686,7 +3877,11 @@ declare var CSSFontFaceRule: { new(): CSSFontFaceRule; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSFontFeatureValuesRule) */ +/** + * The **`CSSFontFeatureValuesRule`** interface represents an @font-feature-values at-rule, letting developers assign for each font face a common name to specify features indices to be used in font-variant-alternates. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSFontFeatureValuesRule) + */ interface CSSFontFeatureValuesRule extends CSSRule { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSFontFeatureValuesRule/fontFamily) */ fontFamily: string; @@ -3697,7 +3892,11 @@ declare var CSSFontFeatureValuesRule: { new(): CSSFontFeatureValuesRule; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSFontPaletteValuesRule) */ +/** + * The **`CSSFontPaletteValuesRule`** interface represents an @font-palette-values at-rule. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSFontPaletteValuesRule) + */ interface CSSFontPaletteValuesRule extends CSSRule { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSFontPaletteValuesRule/basePalette) */ readonly basePalette: string; @@ -3715,7 +3914,7 @@ declare var CSSFontPaletteValuesRule: { }; /** - * Any CSS at-rule that contains other rules nested within it. + * The **`CSSGroupingRule`** interface of the CSS Object Model represents any CSS at-rule that contains other rules nested within it. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSGroupingRule) */ @@ -3733,7 +3932,11 @@ declare var CSSGroupingRule: { new(): CSSGroupingRule; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSImageValue) */ +/** + * The **`CSSImageValue`** interface of the CSS Typed Object Model API represents values for properties that take an image, for example background-image, list-style-image, or border-image-source. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSImageValue) + */ interface CSSImageValue extends CSSStyleValue { } @@ -3742,7 +3945,11 @@ declare var CSSImageValue: { new(): CSSImageValue; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSImportRule) */ +/** + * The **`CSSImportRule`** interface represents an @import at-rule. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSImportRule) + */ interface CSSImportRule extends CSSRule { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSImportRule/href) */ readonly href: string; @@ -3763,7 +3970,7 @@ declare var CSSImportRule: { }; /** - * An object representing a set of style for a given keyframe. It corresponds to the contains of a single keyframe of a @keyframes at-rule. It implements the CSSRule interface with a type value of 8 (CSSRule.KEYFRAME_RULE). + * The **`CSSKeyframeRule`** interface describes an object representing a set of styles for a given keyframe. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSKeyframeRule) */ @@ -3781,7 +3988,7 @@ declare var CSSKeyframeRule: { }; /** - * An object representing a complete set of keyframes for a CSS animation. It corresponds to the contains of a whole @keyframes at-rule. It implements the CSSRule interface with a type value of 7 (CSSRule.KEYFRAMES_RULE). + * The **`CSSKeyframesRule`** interface describes an object representing a complete set of keyframes for a CSS animation. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSKeyframesRule) */ @@ -3806,7 +4013,11 @@ declare var CSSKeyframesRule: { new(): CSSKeyframesRule; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSKeywordValue) */ +/** + * The **`CSSKeywordValue`** interface of the CSS Typed Object Model API creates an object to represent CSS keywords and other identifiers. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSKeywordValue) + */ interface CSSKeywordValue extends CSSStyleValue { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSKeywordValue/value) */ value: string; @@ -3817,7 +4028,11 @@ declare var CSSKeywordValue: { new(value: string): CSSKeywordValue; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSLayerBlockRule) */ +/** + * The **`CSSLayerBlockRule`** represents a @layer block rule. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSLayerBlockRule) + */ interface CSSLayerBlockRule extends CSSGroupingRule { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSLayerBlockRule/name) */ readonly name: string; @@ -3828,7 +4043,11 @@ declare var CSSLayerBlockRule: { new(): CSSLayerBlockRule; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSLayerStatementRule) */ +/** + * The **`CSSLayerStatementRule`** represents a @layer statement rule. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSLayerStatementRule) + */ interface CSSLayerStatementRule extends CSSRule { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSLayerStatementRule/nameList) */ readonly nameList: ReadonlyArray; @@ -3850,7 +4069,11 @@ declare var CSSMathClamp: { new(lower: CSSNumberish, value: CSSNumberish, upper: CSSNumberish): CSSMathClamp; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathInvert) */ +/** + * The **`CSSMathInvert`** interface of the CSS Typed Object Model API represents a CSS calc used as `calc(1 / ).` It inherits properties and methods from its parent CSSNumericValue. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathInvert) + */ interface CSSMathInvert extends CSSMathValue { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathInvert/value) */ readonly value: CSSNumericValue; @@ -3861,7 +4084,11 @@ declare var CSSMathInvert: { new(arg: CSSNumberish): CSSMathInvert; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathMax) */ +/** + * The **`CSSMathMax`** interface of the CSS Typed Object Model API represents the CSS max function. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathMax) + */ interface CSSMathMax extends CSSMathValue { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathMax/values) */ readonly values: CSSNumericArray; @@ -3872,7 +4099,11 @@ declare var CSSMathMax: { new(...args: CSSNumberish[]): CSSMathMax; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathMin) */ +/** + * The **`CSSMathMin`** interface of the CSS Typed Object Model API represents the CSS min function. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathMin) + */ interface CSSMathMin extends CSSMathValue { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathMin/values) */ readonly values: CSSNumericArray; @@ -3883,7 +4114,11 @@ declare var CSSMathMin: { new(...args: CSSNumberish[]): CSSMathMin; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathNegate) */ +/** + * The **`CSSMathNegate`** interface of the CSS Typed Object Model API negates the value passed into it. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathNegate) + */ interface CSSMathNegate extends CSSMathValue { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathNegate/value) */ readonly value: CSSNumericValue; @@ -3894,7 +4129,11 @@ declare var CSSMathNegate: { new(arg: CSSNumberish): CSSMathNegate; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathProduct) */ +/** + * The **`CSSMathProduct`** interface of the CSS Typed Object Model API represents the result obtained by calling CSSNumericValue.add, CSSNumericValue.sub, or CSSNumericValue.toSum on CSSNumericValue. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathProduct) + */ interface CSSMathProduct extends CSSMathValue { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathProduct/values) */ readonly values: CSSNumericArray; @@ -3905,7 +4144,11 @@ declare var CSSMathProduct: { new(...args: CSSNumberish[]): CSSMathProduct; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathSum) */ +/** + * The **`CSSMathSum`** interface of the CSS Typed Object Model API represents the result obtained by calling CSSNumericValue.add, CSSNumericValue.sub, or CSSNumericValue.toSum on CSSNumericValue. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathSum) + */ interface CSSMathSum extends CSSMathValue { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathSum/values) */ readonly values: CSSNumericArray; @@ -3916,7 +4159,11 @@ declare var CSSMathSum: { new(...args: CSSNumberish[]): CSSMathSum; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathValue) */ +/** + * The **`CSSMathValue`** interface of the CSS Typed Object Model API a base class for classes representing complex numeric values. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathValue) + */ interface CSSMathValue extends CSSNumericValue { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathValue/operator) */ readonly operator: CSSMathOperator; @@ -3927,7 +4174,11 @@ declare var CSSMathValue: { new(): CSSMathValue; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMatrixComponent) */ +/** + * The **`CSSMatrixComponent`** interface of the CSS Typed Object Model API represents the matrix() and matrix3d() values of the individual transform property in CSS. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMatrixComponent) + */ interface CSSMatrixComponent extends CSSTransformComponent { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMatrixComponent/matrix) */ matrix: DOMMatrix; @@ -3939,7 +4190,7 @@ declare var CSSMatrixComponent: { }; /** - * A single CSS @media rule. It implements the CSSConditionRule interface, and therefore the CSSGroupingRule and the CSSRule interface with a type value of 4 (CSSRule.MEDIA_RULE). + * The **`CSSMediaRule`** interface represents a single CSS @media rule. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMediaRule) */ @@ -3955,7 +4206,7 @@ declare var CSSMediaRule: { }; /** - * An object representing a single CSS @namespace at-rule. It implements the CSSRule interface, with a type value of 10 (CSSRule.NAMESPACE_RULE). + * The **`CSSNamespaceRule`** interface describes an object representing a single CSS @namespace at-rule. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNamespaceRule) */ @@ -3971,7 +4222,11 @@ declare var CSSNamespaceRule: { new(): CSSNamespaceRule; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNestedDeclarations) */ +/** + * The **`CSSNestedDeclarations`** interface of the CSS Rule API is used to group nested CSSRules. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNestedDeclarations) + */ interface CSSNestedDeclarations extends CSSRule { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNestedDeclarations/style) */ get style(): CSSStyleDeclaration; @@ -3983,7 +4238,11 @@ declare var CSSNestedDeclarations: { new(): CSSNestedDeclarations; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericArray) */ +/** + * The **`CSSNumericArray`** interface of the CSS Typed Object Model API contains a list of CSSNumericValue objects. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericArray) + */ interface CSSNumericArray { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericArray/length) */ readonly length: number; @@ -3996,7 +4255,11 @@ declare var CSSNumericArray: { new(): CSSNumericArray; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue) */ +/** + * The **`CSSNumericValue`** interface of the CSS Typed Object Model API represents operations that all numeric values can perform. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue) + */ interface CSSNumericValue extends CSSStyleValue { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/add) */ add(...values: CSSNumberish[]): CSSNumericValue; @@ -4028,7 +4291,7 @@ declare var CSSNumericValue: { }; /** - * CSSPageRule is an interface representing a single CSS @page rule. It implements the CSSRule interface with a type value of 6 (CSSRule.PAGE_RULE). + * **`CSSPageRule`** represents a single CSS @page rule. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSPageRule) */ @@ -4045,7 +4308,11 @@ declare var CSSPageRule: { new(): CSSPageRule; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSPerspective) */ +/** + * The **`CSSPerspective`** interface of the CSS Typed Object Model API represents the perspective() value of the individual transform property in CSS. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSPerspective) + */ interface CSSPerspective extends CSSTransformComponent { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSPerspective/length) */ length: CSSPerspectiveValue; @@ -4056,7 +4323,11 @@ declare var CSSPerspective: { new(length: CSSPerspectiveValue): CSSPerspective; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSPropertyRule) */ +/** + * The **`CSSPropertyRule`** interface of the CSS Properties and Values API represents a single CSS @property rule. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSPropertyRule) + */ interface CSSPropertyRule extends CSSRule { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSPropertyRule/inherits) */ readonly inherits: boolean; @@ -4073,7 +4344,11 @@ declare var CSSPropertyRule: { new(): CSSPropertyRule; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSRotate) */ +/** + * The **`CSSRotate`** interface of the CSS Typed Object Model API represents the rotate value of the individual transform property in CSS. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSRotate) + */ interface CSSRotate extends CSSTransformComponent { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSRotate/angle) */ angle: CSSNumericValue; @@ -4092,7 +4367,7 @@ declare var CSSRotate: { }; /** - * A single CSS rule. There are several types of rules, listed in the Type constants section below. + * The **`CSSRule`** interface represents a single CSS rule. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSRule) */ @@ -4141,7 +4416,7 @@ declare var CSSRule: { }; /** - * A CSSRuleList is an (indirect-modify only) array-like object containing an ordered collection of CSSRule objects. + * A `CSSRuleList` represents an ordered collection of read-only CSSRule objects. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSRuleList) */ @@ -4158,7 +4433,11 @@ declare var CSSRuleList: { new(): CSSRuleList; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSScale) */ +/** + * The **`CSSScale`** interface of the CSS Typed Object Model API represents the scale() and scale3d() values of the individual transform property in CSS. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSScale) + */ interface CSSScale extends CSSTransformComponent { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSScale/x) */ x: CSSNumberish; @@ -4173,7 +4452,11 @@ declare var CSSScale: { new(x: CSSNumberish, y: CSSNumberish, z?: CSSNumberish): CSSScale; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSScopeRule) */ +/** + * The **`CSSScopeRule`** interface of the CSS Object Model represents a CSS @scope at-rule. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSScopeRule) + */ interface CSSScopeRule extends CSSGroupingRule { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSScopeRule/end) */ readonly end: string | null; @@ -4186,7 +4469,11 @@ declare var CSSScopeRule: { new(): CSSScopeRule; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSSkew) */ +/** + * The **`CSSSkew`** interface of the CSS Typed Object Model API is part of the CSSTransformValue interface. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSSkew) + */ interface CSSSkew extends CSSTransformComponent { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSSkew/ax) */ ax: CSSNumericValue; @@ -4199,7 +4486,11 @@ declare var CSSSkew: { new(ax: CSSNumericValue, ay: CSSNumericValue): CSSSkew; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSSkewX) */ +/** + * The **`CSSSkewX`** interface of the CSS Typed Object Model API represents the `skewX()` value of the individual transform property in CSS. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSSkewX) + */ interface CSSSkewX extends CSSTransformComponent { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSSkewX/ax) */ ax: CSSNumericValue; @@ -4210,7 +4501,11 @@ declare var CSSSkewX: { new(ax: CSSNumericValue): CSSSkewX; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSSkewY) */ +/** + * The **`CSSSkewY`** interface of the CSS Typed Object Model API represents the `skewY()` value of the individual transform property in CSS. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSSkewY) + */ interface CSSSkewY extends CSSTransformComponent { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSSkewY/ay) */ ay: CSSNumericValue; @@ -4221,7 +4516,11 @@ declare var CSSSkewY: { new(ay: CSSNumericValue): CSSSkewY; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStartingStyleRule) */ +/** + * The **`CSSStartingStyleRule`** interface of the CSS Object Model represents a CSS @starting-style at-rule. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStartingStyleRule) + */ interface CSSStartingStyleRule extends CSSGroupingRule { } @@ -4231,7 +4530,7 @@ declare var CSSStartingStyleRule: { }; /** - * An object that is a CSS declaration block, and exposes style information and various style-related methods and properties. + * The **`CSSStyleDeclaration`** interface represents an object that is a CSS declaration block, and exposes style information and various style-related methods and properties. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration) */ @@ -4576,7 +4875,11 @@ interface CSSStyleDeclaration { fontSize: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/font-size-adjust) */ fontSizeAdjust: string; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/font-stretch) */ + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/font-stretch) + */ fontStretch: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/font-style) */ fontStyle: string; @@ -4650,6 +4953,8 @@ interface CSSStyleDeclaration { height: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/hyphenate-character) */ hyphenateCharacter: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/hyphenate-limit-chars) */ + hyphenateLimitChars: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/hyphens) */ hyphens: string; /** @@ -4812,8 +5117,12 @@ interface CSSStyleDeclaration { overflow: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/overflow-anchor) */ overflowAnchor: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/overflow-block) */ + overflowBlock: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/overflow-clip-margin) */ overflowClipMargin: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/overflow-inline) */ + overflowInline: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/overflow-wrap) */ overflowWrap: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/overflow-x) */ @@ -5010,8 +5319,11 @@ interface CSSStyleDeclaration { textAlignLast: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/text-anchor) */ textAnchor: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/text-box) */ textBox: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/text-box-edge) */ textBoxEdge: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/text-box-trim) */ textBoxTrim: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/text-combine-upright) */ textCombineUpright: string; @@ -5324,7 +5636,7 @@ interface CSSStyleDeclaration { * [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/justify-content) */ webkitJustifyContent: string; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/-webkit-line-clamp) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/line-clamp) */ webkitLineClamp: string; /** * @deprecated This is a legacy alias of `mask`. @@ -5545,7 +5857,7 @@ declare var CSSStyleDeclaration: { }; /** - * CSSStyleRule represents a single CSS style rule. It implements the CSSRule interface with a type value of 1 (CSSRule.STYLE_RULE). + * The **`CSSStyleRule`** interface represents a single CSS style rule. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleRule) */ @@ -5565,7 +5877,7 @@ declare var CSSStyleRule: { }; /** - * A single CSS style sheet. It inherits properties and methods from its parent, StyleSheet. + * The **`CSSStyleSheet`** interface represents a single CSS stylesheet, and lets you inspect and modify the list of rules contained in the stylesheet. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet) */ @@ -5607,7 +5919,11 @@ declare var CSSStyleSheet: { new(options?: CSSStyleSheetInit): CSSStyleSheet; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleValue) */ +/** + * The **`CSSStyleValue`** interface of the CSS Typed Object Model API is the base class of all CSS values accessible through the Typed OM API. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleValue) + */ interface CSSStyleValue { toString(): string; } @@ -5622,7 +5938,7 @@ declare var CSSStyleValue: { }; /** - * An object representing a single CSS @supports at-rule. It implements the CSSConditionRule interface, and therefore the CSSRule and CSSGroupingRule interfaces with a type value of 12 (CSSRule.SUPPORTS_RULE). + * The **`CSSSupportsRule`** interface represents a single CSS @supports at-rule. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSSupportsRule) */ @@ -5634,7 +5950,11 @@ declare var CSSSupportsRule: { new(): CSSSupportsRule; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTransformComponent) */ +/** + * The **`CSSTransformComponent`** interface of the CSS Typed Object Model API is part of the CSSTransformValue interface. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTransformComponent) + */ interface CSSTransformComponent { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTransformComponent/is2D) */ is2D: boolean; @@ -5648,7 +5968,11 @@ declare var CSSTransformComponent: { new(): CSSTransformComponent; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTransformValue) */ +/** + * The **`CSSTransformValue`** interface of the CSS Typed Object Model API represents `transform-list` values as used by the CSS transform property. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTransformValue) + */ interface CSSTransformValue extends CSSStyleValue { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTransformValue/is2D) */ readonly is2D: boolean; @@ -5665,7 +5989,11 @@ declare var CSSTransformValue: { new(transforms: CSSTransformComponent[]): CSSTransformValue; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTransition) */ +/** + * The **`CSSTransition`** interface of the Web Animations API represents an Animation object used for a CSS Transition. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTransition) + */ interface CSSTransition extends Animation { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTransition/transitionProperty) */ readonly transitionProperty: string; @@ -5680,7 +6008,11 @@ declare var CSSTransition: { new(): CSSTransition; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTranslate) */ +/** + * The **`CSSTranslate`** interface of the CSS Typed Object Model API represents the translate() value of the individual transform property in CSS. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTranslate) + */ interface CSSTranslate extends CSSTransformComponent { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTranslate/x) */ x: CSSNumericValue; @@ -5695,7 +6027,11 @@ declare var CSSTranslate: { new(x: CSSNumericValue, y: CSSNumericValue, z?: CSSNumericValue): CSSTranslate; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSUnitValue) */ +/** + * The **`CSSUnitValue`** interface of the CSS Typed Object Model API represents values that contain a single unit type. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSUnitValue) + */ interface CSSUnitValue extends CSSNumericValue { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSUnitValue/unit) */ readonly unit: string; @@ -5708,7 +6044,11 @@ declare var CSSUnitValue: { new(value: number, unit: string): CSSUnitValue; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSUnparsedValue) */ +/** + * The **`CSSUnparsedValue`** interface of the CSS Typed Object Model API represents property values that reference custom properties. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSUnparsedValue) + */ interface CSSUnparsedValue extends CSSStyleValue { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSUnparsedValue/length) */ readonly length: number; @@ -5721,7 +6061,11 @@ declare var CSSUnparsedValue: { new(members: CSSUnparsedSegment[]): CSSUnparsedValue; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSVariableReferenceValue) */ +/** + * The **`CSSVariableReferenceValue`** interface of the CSS Typed Object Model API allows you to create a custom name for a built-in CSS value. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSVariableReferenceValue) + */ interface CSSVariableReferenceValue { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSVariableReferenceValue/fallback) */ readonly fallback: CSSUnparsedValue | null; @@ -5745,7 +6089,7 @@ declare var CSSViewTransitionRule: { }; /** - * Provides a storage mechanism for Request / Response object pairs that are cached, for example as part of the ServiceWorker life cycle. Note that the Cache interface is exposed to windowed scopes as well as workers. You don't have to use it in conjunction with service workers, even though it is defined in the service worker spec. + * The **`Cache`** interface provides a persistent storage mechanism for Request / Response object pairs that are cached in long lived memory. * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache) @@ -5773,7 +6117,7 @@ declare var Cache: { }; /** - * The storage for Cache objects. + * The **`CacheStorage`** interface represents the storage for Cache objects. * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage) @@ -5796,7 +6140,11 @@ declare var CacheStorage: { new(): CacheStorage; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasCaptureMediaStreamTrack) */ +/** + * The **`CanvasCaptureMediaStreamTrack`** interface of the Media Capture and Streams API represents the video track contained in a MediaStream being generated from a canvas following a call to HTMLCanvasElement.captureStream(). + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasCaptureMediaStreamTrack) + */ interface CanvasCaptureMediaStreamTrack extends MediaStreamTrack { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasCaptureMediaStreamTrack/canvas) */ readonly canvas: HTMLCanvasElement; @@ -5868,7 +6216,7 @@ interface CanvasFilters { } /** - * An opaque object describing a gradient. It is returned by the methods CanvasRenderingContext2D.createLinearGradient() or CanvasRenderingContext2D.createRadialGradient(). + * The **`CanvasGradient`** interface represents an opaque object describing a gradient. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasGradient) */ @@ -5891,12 +6239,12 @@ declare var CanvasGradient: { interface CanvasImageData { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createImageData) */ createImageData(sw: number, sh: number, settings?: ImageDataSettings): ImageData; - createImageData(imagedata: ImageData): ImageData; + createImageData(imageData: ImageData): ImageData; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/getImageData) */ getImageData(sx: number, sy: number, sw: number, sh: number, settings?: ImageDataSettings): ImageData; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/putImageData) */ - putImageData(imagedata: ImageData, dx: number, dy: number): void; - putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX: number, dirtyY: number, dirtyWidth: number, dirtyHeight: number): void; + putImageData(imageData: ImageData, dx: number, dy: number): void; + putImageData(imageData: ImageData, dx: number, dy: number, dirtyX: number, dirtyY: number, dirtyWidth: number, dirtyHeight: number): void; } interface CanvasImageSmoothing { @@ -5947,7 +6295,7 @@ interface CanvasPathDrawingStyles { } /** - * An opaque object describing a pattern, based on an image, a canvas, or a video, created by the CanvasRenderingContext2D.createPattern() method. + * The **`CanvasPattern`** interface represents an opaque object describing a pattern, based on an image, a canvas, or a video, created by the CanvasRenderingContext2D.createPattern() method. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasPattern) */ @@ -5975,7 +6323,7 @@ interface CanvasRect { } /** - * The CanvasRenderingContext2D interface, part of the Canvas API, provides the 2D rendering context for the drawing surface of a element. It is used for drawing shapes, text, images, and other objects. + * The **`CanvasRenderingContext2D`** interface, part of the Canvas API, provides the 2D rendering context for the drawing surface of a canvas element. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D) */ @@ -6072,7 +6420,11 @@ interface CanvasUserInterface { drawFocusIfNeeded(path: Path2D, element: Element): void; } -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CaretPosition) */ +/** + * The `CaretPosition` interface represents the caret position, an indicator for the text insertion point. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CaretPosition) + */ interface CaretPosition { readonly offset: number; readonly offsetNode: Node; @@ -6085,7 +6437,7 @@ declare var CaretPosition: { }; /** - * The ChannelMergerNode interface, often used in conjunction with its opposite, ChannelSplitterNode, reunites different mono inputs into a single output. Each input is used to fill a channel of the output. This is useful for accessing each channels separately, e.g. for performing channel mixing where gain must be separately controlled on each channel. + * The `ChannelMergerNode` interface, often used in conjunction with its opposite, ChannelSplitterNode, reunites different mono inputs into a single output. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ChannelMergerNode) */ @@ -6098,7 +6450,7 @@ declare var ChannelMergerNode: { }; /** - * The ChannelSplitterNode interface, often used in conjunction with its opposite, ChannelMergerNode, separates the different channels of an audio source into a set of mono outputs. This is useful for accessing each channel separately, e.g. for performing channel mixing where gain must be separately controlled on each channel. + * The `ChannelSplitterNode` interface, often used in conjunction with its opposite, ChannelMergerNode, separates the different channels of an audio source into a set of mono outputs. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ChannelSplitterNode) */ @@ -6111,7 +6463,7 @@ declare var ChannelSplitterNode: { }; /** - * The CharacterData abstract interface represents a Node object that contains characters. This is an abstract interface, meaning there aren't any object of type CharacterData: it is implemented by other interfaces, like Text, Comment, or ProcessingInstruction which aren't abstract. + * The **`CharacterData`** abstract interface represents a Node object that contains characters. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CharacterData) */ @@ -6176,6 +6528,7 @@ interface ClientRect extends DOMRect { } /** + * The **`Clipboard`** interface of the Clipboard API provides read and write access to the contents of the system clipboard. * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Clipboard) @@ -6197,7 +6550,7 @@ declare var Clipboard: { }; /** - * Events providing information related to modification of the clipboard, that is cut, copy, and paste events. + * The **`ClipboardEvent`** interface of the Clipboard API represents events providing information related to modification of the clipboard, that is Element/cut_event, Element/copy_event, and Element/paste_event events. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ClipboardEvent) */ @@ -6212,6 +6565,7 @@ declare var ClipboardEvent: { }; /** + * The **`ClipboardItem`** interface of the Clipboard API represents a single item format, used when reading or writing clipboard data using Clipboard.read() and Clipboard.write() respectively. * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ClipboardItem) @@ -6233,7 +6587,7 @@ declare var ClipboardItem: { }; /** - * A CloseEvent is sent to clients using WebSockets when the connection is closed. This is delivered to the listener indicated by the WebSocket object's onclose attribute. + * A `CloseEvent` is sent to clients using WebSockets when the connection is closed. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent) */ @@ -6264,7 +6618,7 @@ declare var CloseEvent: { }; /** - * Textual notations within markup; although it is generally not visually shown, such comments are available to be read in the source view. + * The **`Comment`** interface represents textual notations within markup; although it is generally not visually shown, such comments are available to be read in the source view. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Comment) */ @@ -6277,7 +6631,7 @@ declare var Comment: { }; /** - * The DOM CompositionEvent represents events that occur due to the user indirectly entering text. + * The DOM **`CompositionEvent`** represents events that occur due to the user indirectly entering text. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompositionEvent) */ @@ -6297,9 +6651,13 @@ declare var CompositionEvent: { new(type: string, eventInitDict?: CompositionEventInit): CompositionEvent; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream) */ +/** + * The **`CompressionStream`** interface of the Compression Streams API is an API for compressing a stream of data. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream) + */ interface CompressionStream extends GenericTransformStream { - readonly readable: ReadableStream; + readonly readable: ReadableStream>; readonly writable: WritableStream; } @@ -6308,7 +6666,11 @@ declare var CompressionStream: { new(format: CompressionFormat): CompressionStream; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ConstantSourceNode) */ +/** + * The `ConstantSourceNode` interface—part of the Web Audio API—represents an audio source (based upon AudioScheduledSourceNode) whose output is single unchanging value. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ConstantSourceNode) + */ interface ConstantSourceNode extends AudioScheduledSourceNode { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ConstantSourceNode/offset) */ readonly offset: AudioParam; @@ -6323,7 +6685,11 @@ declare var ConstantSourceNode: { new(context: BaseAudioContext, options?: ConstantSourceOptions): ConstantSourceNode; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ContentVisibilityAutoStateChangeEvent) */ +/** + * The **`ContentVisibilityAutoStateChangeEvent`** interface is the event object for the element/contentvisibilityautostatechange_event event, which fires on any element with content-visibility set on it when it starts or stops being relevant to the user and skipping its contents. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ContentVisibilityAutoStateChangeEvent) + */ interface ContentVisibilityAutoStateChangeEvent extends Event { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ContentVisibilityAutoStateChangeEvent/skipped) */ readonly skipped: boolean; @@ -6335,7 +6701,7 @@ declare var ContentVisibilityAutoStateChangeEvent: { }; /** - * An AudioNode that performs a Linear Convolution on a given AudioBuffer, often used to achieve a reverb effect. A ConvolverNode always has exactly one input and one output. + * The `ConvolverNode` interface is an AudioNode that performs a Linear Convolution on a given AudioBuffer, often used to achieve a reverb effect. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ConvolverNode) */ @@ -6352,7 +6718,61 @@ declare var ConvolverNode: { }; /** - * This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. + * The **`CookieChangeEvent`** interface of the Cookie Store API is the event type of the CookieStore/change_event event fired at a CookieStore when any cookies are created or deleted. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CookieChangeEvent) + */ +interface CookieChangeEvent extends Event { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CookieChangeEvent/changed) */ + readonly changed: ReadonlyArray; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CookieChangeEvent/deleted) */ + readonly deleted: ReadonlyArray; +} + +declare var CookieChangeEvent: { + prototype: CookieChangeEvent; + new(type: string, eventInitDict?: CookieChangeEventInit): CookieChangeEvent; +}; + +interface CookieStoreEventMap { + "change": CookieChangeEvent; +} + +/** + * The **`CookieStore`** interface of the Cookie Store API provides methods for getting and setting cookies asynchronously from either a page or a service worker. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CookieStore) + */ +interface CookieStore extends EventTarget { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CookieStore/change_event) */ + onchange: ((this: CookieStore, ev: CookieChangeEvent) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CookieStore/delete) */ + delete(name: string): Promise; + delete(options: CookieStoreDeleteOptions): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CookieStore/get) */ + get(name: string): Promise; + get(options?: CookieStoreGetOptions): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CookieStore/getAll) */ + getAll(name: string): Promise; + getAll(options?: CookieStoreGetOptions): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CookieStore/set) */ + set(name: string, value: string): Promise; + set(options: CookieInit): Promise; + addEventListener(type: K, listener: (this: CookieStore, ev: CookieStoreEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: CookieStore, ev: CookieStoreEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var CookieStore: { + prototype: CookieStore; + new(): CookieStore; +}; + +/** + * The **`CountQueuingStrategy`** interface of the Streams API provides a built-in chunk counting queuing strategy that can be used when constructing streams. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy) */ @@ -6369,6 +6789,7 @@ declare var CountQueuingStrategy: { }; /** + * The **`Credential`** interface of the Credential Management API provides information about an entity (usually a user) normally as a prerequisite to a trust decision. * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Credential) @@ -6386,6 +6807,7 @@ declare var Credential: { }; /** + * The **`CredentialsContainer`** interface of the Credential Management API exposes methods to request credentials and notify the user agent when events such as successful sign in or sign out happen. * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CredentialsContainer) @@ -6407,7 +6829,7 @@ declare var CredentialsContainer: { }; /** - * Basic cryptography features available in the current context. It allows access to a cryptographically strong random number generator and to cryptographic primitives. + * The **`Crypto`** interface represents basic cryptography features available in the current context. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto) */ @@ -6434,7 +6856,7 @@ declare var Crypto: { }; /** - * The CryptoKey dictionary of the Web Crypto API represents a cryptographic key. + * The **`CryptoKey`** interface of the Web Crypto API represents a cryptographic key obtained from one of the SubtleCrypto methods SubtleCrypto.generateKey, SubtleCrypto.deriveKey, SubtleCrypto.importKey, or SubtleCrypto.unwrapKey. * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey) @@ -6455,7 +6877,11 @@ declare var CryptoKey: { new(): CryptoKey; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomElementRegistry) */ +/** + * The **`CustomElementRegistry`** interface provides methods for registering custom elements and querying registered elements. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomElementRegistry) + */ interface CustomElementRegistry { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomElementRegistry/define) */ define(name: string, constructor: CustomElementConstructor, options?: ElementDefinitionOptions): void; @@ -6474,7 +6900,11 @@ declare var CustomElementRegistry: { new(): CustomElementRegistry; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent) */ +/** + * The **`CustomEvent`** interface represents events initialized by an application for any purpose. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent) + */ interface CustomEvent extends Event { /** * Returns any custom data event was created with. Typically used for synthetic events. @@ -6495,7 +6925,11 @@ declare var CustomEvent: { new(type: string, eventInitDict?: CustomEventInit): CustomEvent; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomStateSet) */ +/** + * The **`CustomStateSet`** interface of the Document Object Model stores a list of states for an autonomous custom element, and allows states to be added and removed from the set. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomStateSet) + */ interface CustomStateSet { forEach(callbackfn: (value: string, key: string, parent: CustomStateSet) => void, thisArg?: any): void; } @@ -6506,7 +6940,7 @@ declare var CustomStateSet: { }; /** - * An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API. + * The **`DOMException`** interface represents an abnormal event (called an **exception**) that occurs as a result of calling a method or accessing a property of a web API. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException) */ @@ -6579,7 +7013,7 @@ declare var DOMException: { }; /** - * An object providing methods which are not dependent on any particular document. Such an object is returned by the Document.implementation property. + * The **`DOMImplementation`** interface represents an object providing methods which are not dependent on any particular document. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMImplementation) */ @@ -6603,7 +7037,11 @@ declare var DOMImplementation: { new(): DOMImplementation; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix) */ +/** + * The **`DOMMatrix`** interface represents 4×4 matrices, suitable for 2D and 3D operations including rotation and translation. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix) + */ interface DOMMatrix extends DOMMatrixReadOnly { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ a: number; @@ -6655,11 +7093,15 @@ interface DOMMatrix extends DOMMatrixReadOnly { multiplySelf(other?: DOMMatrixInit): DOMMatrix; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix/preMultiplySelf) */ preMultiplySelf(other?: DOMMatrixInit): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix/rotateAxisAngleSelf) */ rotateAxisAngleSelf(x?: number, y?: number, z?: number, angle?: number): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix/rotateFromVectorSelf) */ rotateFromVectorSelf(x?: number, y?: number): DOMMatrix; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix/rotateSelf) */ rotateSelf(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix/scale3dSelf) */ scale3dSelf(scale?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix/scaleSelf) */ scaleSelf(scaleX?: number, scaleY?: number, scaleZ?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix/setMatrixValue) */ setMatrixValue(transformList: string): DOMMatrix; @@ -6674,8 +7116,8 @@ interface DOMMatrix extends DOMMatrixReadOnly { declare var DOMMatrix: { prototype: DOMMatrix; new(init?: string | number[]): DOMMatrix; - fromFloat32Array(array32: Float32Array): DOMMatrix; - fromFloat64Array(array64: Float64Array): DOMMatrix; + fromFloat32Array(array32: Float32Array): DOMMatrix; + fromFloat64Array(array64: Float64Array): DOMMatrix; fromMatrix(other?: DOMMatrixInit): DOMMatrix; }; @@ -6685,7 +7127,11 @@ declare var SVGMatrix: typeof DOMMatrix; type WebKitCSSMatrix = DOMMatrix; declare var WebKitCSSMatrix: typeof DOMMatrix; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly) */ +/** + * The **`DOMMatrixReadOnly`** interface represents a read-only 4×4 matrix, suitable for 2D and 3D operations. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly) + */ interface DOMMatrixReadOnly { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly a: number; @@ -6743,20 +7189,26 @@ interface DOMMatrixReadOnly { inverse(): DOMMatrix; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/multiply) */ multiply(other?: DOMMatrixInit): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/rotate) */ rotate(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/rotateAxisAngle) */ rotateAxisAngle(x?: number, y?: number, z?: number, angle?: number): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/rotateFromVector) */ rotateFromVector(x?: number, y?: number): DOMMatrix; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/scale) */ scale(scaleX?: number, scaleY?: number, scaleZ?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/scale3d) */ scale3d(scale?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix; /** @deprecated */ scaleNonUniform(scaleX?: number, scaleY?: number): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/skewX) */ skewX(sx?: number): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/skewY) */ skewY(sy?: number): DOMMatrix; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/toFloat32Array) */ - toFloat32Array(): Float32Array; + toFloat32Array(): Float32Array; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/toFloat64Array) */ - toFloat64Array(): Float64Array; + toFloat64Array(): Float64Array; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/toJSON) */ toJSON(): any; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/transformPoint) */ @@ -6769,13 +7221,13 @@ interface DOMMatrixReadOnly { declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; new(init?: string | number[]): DOMMatrixReadOnly; - fromFloat32Array(array32: Float32Array): DOMMatrixReadOnly; - fromFloat64Array(array64: Float64Array): DOMMatrixReadOnly; + fromFloat32Array(array32: Float32Array): DOMMatrixReadOnly; + fromFloat64Array(array64: Float64Array): DOMMatrixReadOnly; fromMatrix(other?: DOMMatrixInit): DOMMatrixReadOnly; }; /** - * Provides the ability to parse XML or HTML source code from a string into a DOM Document. + * The **`DOMParser`** interface provides the ability to parse XML or HTML source code from a string into a DOM Document. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMParser) */ @@ -6799,7 +7251,11 @@ declare var DOMParser: { new(): DOMParser; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPoint) */ +/** + * A **`DOMPoint`** object represents a 2D or 3D point in a coordinate system; it includes values for the coordinates in up to three dimensions, as well as an optional perspective value. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPoint) + */ interface DOMPoint extends DOMPointReadOnly { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPoint/w) */ w: number; @@ -6821,7 +7277,11 @@ declare var DOMPoint: { type SVGPoint = DOMPoint; declare var SVGPoint: typeof DOMPoint; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly) */ +/** + * The **`DOMPointReadOnly`** interface specifies the coordinate and perspective fields used by DOMPoint to define a 2D or 3D point in a coordinate system. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly) + */ interface DOMPointReadOnly { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/w) */ readonly w: number; @@ -6844,7 +7304,11 @@ declare var DOMPointReadOnly: { fromPoint(other?: DOMPointInit): DOMPointReadOnly; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad) */ +/** + * A `DOMQuad` is a collection of four `DOMPoint`s defining the corners of an arbitrary quadrilateral. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad) + */ interface DOMQuad { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad/p1) */ readonly p1: DOMPoint; @@ -6867,7 +7331,11 @@ declare var DOMQuad: { fromRect(other?: DOMRectInit): DOMQuad; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRect) */ +/** + * A **`DOMRect`** describes the size and position of a rectangle. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRect) + */ interface DOMRect extends DOMRectReadOnly { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRect/height) */ height: number; @@ -6889,7 +7357,11 @@ declare var DOMRect: { type SVGRect = DOMRect; declare var SVGRect: typeof DOMRect; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectList) */ +/** + * The **`DOMRectList`** interface represents a collection of DOMRect objects, typically used to hold the rectangles associated with a particular element, like bounding boxes returned by methods such as Element.getClientRects. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectList) + */ interface DOMRectList { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectList/length) */ readonly length: number; @@ -6903,7 +7375,11 @@ declare var DOMRectList: { new(): DOMRectList; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly) */ +/** + * The **`DOMRectReadOnly`** interface specifies the standard properties (also used by DOMRect) to define a rectangle whose properties are immutable. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly) + */ interface DOMRectReadOnly { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/bottom) */ readonly bottom: number; @@ -6933,7 +7409,7 @@ declare var DOMRectReadOnly: { }; /** - * A type returned by some APIs which contains a list of DOMString (strings). + * The **`DOMStringList`** interface is a legacy type returned by some APIs and represents a non-modifiable list of strings (`DOMString`). * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMStringList) */ @@ -6965,7 +7441,7 @@ declare var DOMStringList: { }; /** - * Used by the dataset HTML attribute to represent data for custom attributes added to elements. + * The **`DOMStringMap`** interface is used for the HTMLElement.dataset attribute, to represent data for custom attributes added to elements. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMStringMap) */ @@ -6979,7 +7455,7 @@ declare var DOMStringMap: { }; /** - * A set of space-separated tokens. Such a set is returned by Element.classList, HTMLLinkElement.relList, HTMLAnchorElement.relList, HTMLAreaElement.relList, HTMLIframeElement.sandbox, or HTMLOutputElement.htmlFor. It is indexed beginning with 0 as with JavaScript Array objects. DOMTokenList is always case-sensitive. + * The **`DOMTokenList`** interface represents a set of space-separated tokens. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMTokenList) */ @@ -7073,7 +7549,7 @@ declare var DOMTokenList: { }; /** - * Used to hold the data that is being dragged during a drag and drop operation. It may hold one or more data items, each of one or more data types. For more information about drag and drop, see HTML Drag and Drop API. + * The **`DataTransfer`** object is used to hold any data transferred between contexts, such as a drag and drop operation, or clipboard read/write. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DataTransfer) */ @@ -7148,7 +7624,7 @@ declare var DataTransfer: { }; /** - * One drag data item. During a drag operation, each drag event has a dataTransfer property which contains a list of drag data items. Each item in the list is a DataTransferItem object. + * The **`DataTransferItem`** object represents one drag data item. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DataTransferItem) */ @@ -7187,7 +7663,7 @@ declare var DataTransferItem: { }; /** - * A list of DataTransferItem objects representing items being dragged. During a drag operation, each DragEvent has a dataTransfer property and that property is a DataTransferItemList. + * The **`DataTransferItemList`** object is a list of DataTransferItem objects representing items being dragged. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DataTransferItemList) */ @@ -7225,9 +7701,13 @@ declare var DataTransferItemList: { new(): DataTransferItemList; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream) */ +/** + * The **`DecompressionStream`** interface of the Compression Streams API is an API for decompressing a stream of data. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream) + */ interface DecompressionStream extends GenericTransformStream { - readonly readable: ReadableStream; + readonly readable: ReadableStream>; readonly writable: WritableStream; } @@ -7237,7 +7717,7 @@ declare var DecompressionStream: { }; /** - * A delay-line; an AudioNode audio-processing module that causes a delay between the arrival of an input data and its propagation to the output. + * The **`DelayNode`** interface represents a delay-line; an AudioNode audio-processing module that causes a delay between the arrival of an input data and its propagation to the output. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DelayNode) */ @@ -7252,7 +7732,7 @@ declare var DelayNode: { }; /** - * The DeviceMotionEvent provides web developers with information about the speed of changes for the device's position and orientation. + * The **`DeviceMotionEvent`** interface of the Device Orientation Events provides web developers with information about the speed of changes for the device's position and orientation. * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DeviceMotionEvent) @@ -7274,6 +7754,7 @@ declare var DeviceMotionEvent: { }; /** + * The **`DeviceMotionEventAcceleration`** interface of the Device Orientation Events provides information about the amount of acceleration the device is experiencing along all three axes. * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DeviceMotionEventAcceleration) @@ -7288,6 +7769,7 @@ interface DeviceMotionEventAcceleration { } /** + * A **`DeviceMotionEventRotationRate`** interface of the Device Orientation Events provides information about the rate at which the device is rotating around all three axes. * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DeviceMotionEventRotationRate) @@ -7302,7 +7784,7 @@ interface DeviceMotionEventRotationRate { } /** - * The DeviceOrientationEvent provides web developers with information from the physical orientation of the device running the web page. + * The **`DeviceOrientationEvent`** interface of the Device Orientation Events provides web developers with information from the physical orientation of the device running the web page. * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DeviceOrientationEvent) @@ -7334,7 +7816,7 @@ interface DocumentEventMap extends GlobalEventHandlersEventMap { } /** - * Any web page loaded in the browser and serves as an entry point into the web page's content, which is the DOM tree. + * The **`Document`** interface represents any web page loaded in the browser and serves as an entry point into the web page's content, which is the DOM tree. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document) */ @@ -7729,6 +8211,7 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve createEvent(eventInterface: "CloseEvent"): CloseEvent; createEvent(eventInterface: "CompositionEvent"): CompositionEvent; createEvent(eventInterface: "ContentVisibilityAutoStateChangeEvent"): ContentVisibilityAutoStateChangeEvent; + createEvent(eventInterface: "CookieChangeEvent"): CookieChangeEvent; createEvent(eventInterface: "CustomEvent"): CustomEvent; createEvent(eventInterface: "DeviceMotionEvent"): DeviceMotionEvent; createEvent(eventInterface: "DeviceOrientationEvent"): DeviceOrientationEvent; @@ -7908,7 +8391,7 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/importNode) */ - importNode(node: T, subtree?: boolean): T; + importNode(node: T, options?: boolean | ImportNodeOptions): T; /** * Opens a new window and loads a document specified by a given URL. Also, opens a new window that uses the url parameter and the name parameter to collect the output of the write method and the writeln method. * @param url Specifies a MIME type for the document. @@ -7961,7 +8444,7 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/requestStorageAccess) */ requestStorageAccess(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/startViewTransition) */ - startViewTransition(callbackOptions?: ViewTransitionUpdateCallback): ViewTransition; + startViewTransition(callbackOptions?: ViewTransitionUpdateCallback | StartViewTransitionOptions): ViewTransition; /** * Writes one or more HTML expressions to a document in the specified window. * @param content Specifies the text and HTML tags to write. @@ -7991,7 +8474,7 @@ declare var Document: { }; /** - * A minimal document object that has no parent. It is used as a lightweight version of Document that stores a segment of a document structure comprised of nodes just like a standard document. The key difference is that because the document fragment isn't part of the active document tree structure, changes made to the fragment don't affect the document, cause reflow, or incur any performance impact that can occur when changes are made. + * The **`DocumentFragment`** interface represents a minimal document object that has no parent. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DocumentFragment) */ @@ -8045,7 +8528,11 @@ interface DocumentOrShadowRoot { getAnimations(): Animation[]; } -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DocumentTimeline) */ +/** + * The **`DocumentTimeline`** interface of the Web Animations API represents animation timelines, including the default document timeline (accessed via Document.timeline). + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DocumentTimeline) + */ interface DocumentTimeline extends AnimationTimeline { } @@ -8055,7 +8542,7 @@ declare var DocumentTimeline: { }; /** - * A Node containing a doctype. + * The **`DocumentType`** interface represents a Node containing a doctype. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DocumentType) */ @@ -8075,7 +8562,7 @@ declare var DocumentType: { }; /** - * A DOM event that represents a drag and drop interaction. The user initiates a drag by placing a pointer device (such as a mouse) on the touch surface and then dragging the pointer to a new location (such as another DOM element). Applications are free to interpret a drag and drop interaction in an application-specific way. + * The **`DragEvent`** interface is a DOM event that represents a drag and drop interaction. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DragEvent) */ @@ -8094,7 +8581,7 @@ declare var DragEvent: { }; /** - * Inherits properties from its parent, AudioNode. + * The `DynamicsCompressorNode` interface provides a compression effect, which lowers the volume of the loudest parts of the signal in order to help prevent clipping and distortion that can occur when multiple sounds are played and multiplexed together at once. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DynamicsCompressorNode) */ @@ -8118,17 +8605,29 @@ declare var DynamicsCompressorNode: { new(context: BaseAudioContext, options?: DynamicsCompressorOptions): DynamicsCompressorNode; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_blend_minmax) */ +/** + * The **`EXT_blend_minmax`** extension is part of the WebGL API and extends blending capabilities by adding two new blend equations: the minimum or maximum color components of the source and destination colors. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_blend_minmax) + */ interface EXT_blend_minmax { readonly MIN_EXT: 0x8007; readonly MAX_EXT: 0x8008; } -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_color_buffer_float) */ +/** + * The **`EXT_color_buffer_float`** extension is part of WebGL and adds the ability to render a variety of floating point formats. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_color_buffer_float) + */ interface EXT_color_buffer_float { } -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_color_buffer_half_float) */ +/** + * The **`EXT_color_buffer_half_float`** extension is part of the WebGL API and adds the ability to render to 16-bit floating-point color buffers. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_color_buffer_half_float) + */ interface EXT_color_buffer_half_float { readonly RGBA16F_EXT: 0x881A; readonly RGB16F_EXT: 0x881B; @@ -8136,19 +8635,27 @@ interface EXT_color_buffer_half_float { readonly UNSIGNED_NORMALIZED_EXT: 0x8C17; } -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_float_blend) */ +/** + * The WebGL API's `EXT_float_blend` extension allows blending and draw buffers with 32-bit floating-point components. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_float_blend) + */ interface EXT_float_blend { } /** - * The EXT_frag_depth extension is part of the WebGL API and enables to set a depth value of a fragment from within the fragment shader. + * The **`EXT_frag_depth`** extension is part of the WebGL API and enables to set a depth value of a fragment from within the fragment shader. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_frag_depth) */ interface EXT_frag_depth { } -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_sRGB) */ +/** + * The **`EXT_sRGB`** extension is part of the WebGL API and adds sRGB support to textures and framebuffer objects. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_sRGB) + */ interface EXT_sRGB { readonly SRGB_EXT: 0x8C40; readonly SRGB_ALPHA_EXT: 0x8C42; @@ -8156,11 +8663,19 @@ interface EXT_sRGB { readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT: 0x8210; } -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_shader_texture_lod) */ +/** + * The **`EXT_shader_texture_lod`** extension is part of the WebGL API and adds additional texture functions to the OpenGL ES Shading Language which provide the shader writer with explicit control of LOD (Level of detail). + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_shader_texture_lod) + */ interface EXT_shader_texture_lod { } -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_texture_compression_bptc) */ +/** + * The `EXT_texture_compression_bptc` extension is part of the WebGL API and exposes 4 BPTC compressed texture formats. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_texture_compression_bptc) + */ interface EXT_texture_compression_bptc { readonly COMPRESSED_RGBA_BPTC_UNORM_EXT: 0x8E8C; readonly COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT: 0x8E8D; @@ -8168,7 +8683,11 @@ interface EXT_texture_compression_bptc { readonly COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT: 0x8E8F; } -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_texture_compression_rgtc) */ +/** + * The `EXT_texture_compression_rgtc` extension is part of the WebGL API and exposes 4 RGTC compressed texture formats. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_texture_compression_rgtc) + */ interface EXT_texture_compression_rgtc { readonly COMPRESSED_RED_RGTC1_EXT: 0x8DBB; readonly COMPRESSED_SIGNED_RED_RGTC1_EXT: 0x8DBC; @@ -8177,7 +8696,7 @@ interface EXT_texture_compression_rgtc { } /** - * The EXT_texture_filter_anisotropic extension is part of the WebGL API and exposes two constants for anisotropic filtering (AF). + * The **`EXT_texture_filter_anisotropic`** extension is part of the WebGL API and exposes two constants for anisotropic filtering (AF). * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_texture_filter_anisotropic) */ @@ -8186,7 +8705,11 @@ interface EXT_texture_filter_anisotropic { readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: 0x84FF; } -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_texture_norm16) */ +/** + * The **`EXT_texture_norm16`** extension is part of the WebGL API and provides a set of new 16-bit signed normalized and unsigned normalized formats (fixed-point texture, renderbuffer and texture buffer). + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_texture_norm16) + */ interface EXT_texture_norm16 { readonly R16_EXT: 0x822A; readonly RG16_EXT: 0x822C; @@ -8204,7 +8727,7 @@ interface ElementEventMap { } /** - * Element is the most general base class from which all objects in a Document inherit. It only has methods and properties common to all kinds of elements. More specific classes inherit from Element. + * **`Element`** is the most general base class from which all element objects (i.e., objects that represent elements) in a Document inherit. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element) */ @@ -8494,7 +9017,11 @@ interface ElementContentEditable { readonly isContentEditable: boolean; } -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ElementInternals) */ +/** + * The **`ElementInternals`** interface of the Document Object Model gives web developers a way to allow custom elements to fully participate in HTML forms. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ElementInternals) + */ interface ElementInternals extends ARIAMixin { /** * Returns the form owner of internals's target element. @@ -8567,7 +9094,11 @@ declare var ElementInternals: { new(): ElementInternals; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedAudioChunk) */ +/** + * The **`EncodedAudioChunk`** interface of the WebCodecs API represents a chunk of encoded audio data. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedAudioChunk) + */ interface EncodedAudioChunk { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedAudioChunk/byteLength) */ readonly byteLength: number; @@ -8586,7 +9117,11 @@ declare var EncodedAudioChunk: { new(init: EncodedAudioChunkInit): EncodedAudioChunk; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedVideoChunk) */ +/** + * The **`EncodedVideoChunk`** interface of the WebCodecs API represents a chunk of encoded video data. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedVideoChunk) + */ interface EncodedVideoChunk { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedVideoChunk/byteLength) */ readonly byteLength: number; @@ -8606,7 +9141,7 @@ declare var EncodedVideoChunk: { }; /** - * Events providing information related to errors in scripts or in files. + * The **`ErrorEvent`** interface represents events providing information related to errors in scripts or in files. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent) */ @@ -8629,7 +9164,7 @@ declare var ErrorEvent: { }; /** - * An event which takes place in the DOM. + * The **`Event`** interface represents an event which takes place on an `EventTarget`. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event) */ @@ -8757,7 +9292,11 @@ declare var Event: { readonly BUBBLING_PHASE: 3; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventCounts) */ +/** + * The **`EventCounts`** interface of the Performance API provides the number of events that have been dispatched for each event type. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventCounts) + */ interface EventCounts { forEach(callbackfn: (value: number, key: string, parent: EventCounts) => void, thisArg?: any): void; } @@ -8781,7 +9320,11 @@ interface EventSourceEventMap { "open": Event; } -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource) */ +/** + * The **`EventSource`** interface is web content's interface to server-sent events. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource) + */ interface EventSource extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */ onerror: ((this: EventSource, ev: Event) => any) | null; @@ -8833,7 +9376,7 @@ declare var EventSource: { }; /** - * EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them. + * The **`EventTarget`** interface is implemented by objects that can receive events and may have listeners for them. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget) */ @@ -8890,7 +9433,7 @@ declare var External: { }; /** - * Provides information about files and allows JavaScript in a web page to access their content. + * The **`File`** interface provides information about files and allows JavaScript in a web page to access their content. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/File) */ @@ -8909,7 +9452,7 @@ declare var File: { }; /** - * An object of this type is returned by the files property of the HTML element; this lets you access the list of files selected with the element. It's also used for a list of files dropped into web content when using the drag and drop API; see the DataTransfer object for details on this usage. + * The **`FileList`** interface represents an object of this type returned by the `files` property of the HTML input element; this lets you access the list of files selected with the `` element. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileList) */ @@ -8936,7 +9479,7 @@ interface FileReaderEventMap { } /** - * Lets web applications asynchronously read the contents of files (or raw data buffers) stored on the user's computer, using File or Blob objects to specify the file or data to read. + * The **`FileReader`** interface lets web applications asynchronously read the contents of files (or raw data buffers) stored on the user's computer, using File or Blob objects to specify the file or data to read. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader) */ @@ -8990,7 +9533,11 @@ declare var FileReader: { readonly DONE: 2; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystem) */ +/** + * The File and Directory Entries API interface **`FileSystem`** is used to represent a file system. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystem) + */ interface FileSystem { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystem/name) */ readonly name: string; @@ -9003,7 +9550,11 @@ declare var FileSystem: { new(): FileSystem; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryEntry) */ +/** + * The **`FileSystemDirectoryEntry`** interface of the File and Directory Entries API represents a directory in a file system. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryEntry) + */ interface FileSystemDirectoryEntry extends FileSystemEntry { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryEntry/createReader) */ createReader(): FileSystemDirectoryReader; @@ -9019,6 +9570,7 @@ declare var FileSystemDirectoryEntry: { }; /** + * The **`FileSystemDirectoryHandle`** interface of the File System API provides a handle to a file system directory. * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryHandle) @@ -9040,7 +9592,11 @@ declare var FileSystemDirectoryHandle: { new(): FileSystemDirectoryHandle; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryReader) */ +/** + * The `FileSystemDirectoryReader` interface of the File and Directory Entries API lets you access the FileSystemFileEntry-based objects (generally FileSystemFileEntry or FileSystemDirectoryEntry) representing each entry in a directory. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryReader) + */ interface FileSystemDirectoryReader { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryReader/readEntries) */ readEntries(successCallback: FileSystemEntriesCallback, errorCallback?: ErrorCallback): void; @@ -9051,7 +9607,11 @@ declare var FileSystemDirectoryReader: { new(): FileSystemDirectoryReader; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemEntry) */ +/** + * The **`FileSystemEntry`** interface of the File and Directory Entries API represents a single entry in a file system. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemEntry) + */ interface FileSystemEntry { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemEntry/filesystem) */ readonly filesystem: FileSystem; @@ -9072,7 +9632,11 @@ declare var FileSystemEntry: { new(): FileSystemEntry; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemFileEntry) */ +/** + * The **`FileSystemFileEntry`** interface of the File and Directory Entries API represents a file in a file system. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemFileEntry) + */ interface FileSystemFileEntry extends FileSystemEntry { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemFileEntry/file) */ file(successCallback: FileCallback, errorCallback?: ErrorCallback): void; @@ -9084,6 +9648,7 @@ declare var FileSystemFileEntry: { }; /** + * The **`FileSystemFileHandle`** interface of the File System API represents a handle to a file system entry. * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemFileHandle) @@ -9102,6 +9667,7 @@ declare var FileSystemFileHandle: { }; /** + * The **`FileSystemHandle`** interface of the File System API is an object which represents a file or directory entry. * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemHandle) @@ -9121,6 +9687,7 @@ declare var FileSystemHandle: { }; /** + * The **`FileSystemWritableFileStream`** interface of the File System API is a WritableStream object with additional convenience methods, which operates on a single file on disk. * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream) @@ -9140,7 +9707,7 @@ declare var FileSystemWritableFileStream: { }; /** - * Focus-related events like focus, blur, focusin, or focusout. + * The **`FocusEvent`** interface represents focus-related events, including Element/focus_event, Element/blur_event, Element/focusin_event, and Element/focusout_event. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FocusEvent) */ @@ -9154,7 +9721,11 @@ declare var FocusEvent: { new(type: string, eventInitDict?: FocusEventInit): FocusEvent; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace) */ +/** + * The **`FontFace`** interface of the CSS Font Loading API represents a single usable font face. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace) + */ interface FontFace { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/ascentOverride) */ ascentOverride: string; @@ -9195,7 +9766,11 @@ interface FontFaceSetEventMap { "loadingerror": FontFaceSetLoadEvent; } -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet) */ +/** + * The **`FontFaceSet`** interface of the CSS Font Loading API manages the loading of font-faces and querying of their download status. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet) + */ interface FontFaceSet extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loading_event) */ onloading: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null; @@ -9223,7 +9798,11 @@ declare var FontFaceSet: { new(): FontFaceSet; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSetLoadEvent) */ +/** + * The **`FontFaceSetLoadEvent`** interface of the CSS Font Loading API represents events fired at a FontFaceSet after it starts loading font faces. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSetLoadEvent) + */ interface FontFaceSetLoadEvent extends Event { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSetLoadEvent/fontfaces) */ readonly fontfaces: ReadonlyArray; @@ -9240,7 +9819,7 @@ interface FontFaceSource { } /** - * Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data". + * The **`FormData`** interface provides a way to construct a set of key/value pairs representing form fields and their values, which can be sent using the Window/fetch, XMLHttpRequest.send() or navigator.sendBeacon() methods. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData) */ @@ -9269,7 +9848,11 @@ declare var FormData: { new(form?: HTMLFormElement, submitter?: HTMLElement | null): FormData; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormDataEvent) */ +/** + * The **`FormDataEvent`** interface represents a `formdata` event — such an event is fired on an HTMLFormElement object after the entry list representing the form's data is constructed. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormDataEvent) + */ interface FormDataEvent extends Event { /** * Returns a FormData object representing names and values of elements associated to the target form. Operations on the FormData object will affect form data to be submitted. @@ -9284,7 +9867,11 @@ declare var FormDataEvent: { new(type: string, eventInitDict: FormDataEventInit): FormDataEvent; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FragmentDirective) */ +/** + * The **`FragmentDirective`** interface is an object exposed to allow code to check whether or not a browser supports text fragments. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FragmentDirective) + */ interface FragmentDirective { } @@ -9294,6 +9881,7 @@ declare var FragmentDirective: { }; /** + * The **`GPUError`** interface of the WebGPU API is the base interface for errors surfaced by GPUDevice.popErrorScope and the GPUDevice.uncapturederror_event event. * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUError) @@ -9304,7 +9892,7 @@ interface GPUError { } /** - * A change in volume. It is an AudioNode audio-processing module that causes a given gain to be applied to the input data before its propagation to the output. A GainNode always has exactly one input and one output, both with the same number of channels. + * The `GainNode` interface represents a change in volume. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GainNode) */ @@ -9319,7 +9907,7 @@ declare var GainNode: { }; /** - * This Gamepad API interface defines an individual gamepad or other controller, allowing access to information such as button presses, axis positions, and id. + * The **`Gamepad`** interface of the Gamepad API defines an individual gamepad or other controller, allowing access to information such as button presses, axis positions, and id. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Gamepad) */ @@ -9348,7 +9936,7 @@ declare var Gamepad: { }; /** - * An individual button of a gamepad or other controller, allowing access to the current state of different types of buttons available on the control device. + * The **`GamepadButton`** interface defines an individual button of a gamepad or other controller, allowing access to the current state of different types of buttons available on the control device. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GamepadButton) */ @@ -9367,7 +9955,7 @@ declare var GamepadButton: { }; /** - * This Gamepad API interface contains references to gamepads connected to the system, which is what the gamepad events Window.gamepadconnected and Window.gamepaddisconnected are fired in response to. + * The GamepadEvent interface of the Gamepad API contains references to gamepads connected to the system, which is what the gamepad events Window.gamepadconnected_event and Window.gamepaddisconnected_event are fired in response to. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GamepadEvent) */ @@ -9382,7 +9970,7 @@ declare var GamepadEvent: { }; /** - * This Gamepad API interface represents hardware in the controller designed to provide haptic feedback to the user (if available), most commonly vibration hardware. + * The **`GamepadHapticActuator`** interface of the Gamepad API represents hardware in the controller designed to provide haptic feedback to the user (if available), most commonly vibration hardware. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GamepadHapticActuator) */ @@ -9406,7 +9994,7 @@ interface GenericTransformStream { } /** - * An object able to programmatically obtain the position of the device. It gives Web content access to the location of the device. This allows a Web site or app to offer customized results based on the user's location. + * The **`Geolocation`** interface represents an object able to obtain the position of the device programmatically. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Geolocation) */ @@ -9425,6 +10013,7 @@ declare var Geolocation: { }; /** + * The **`GeolocationCoordinates`** interface represents the position and altitude of the device on Earth, as well as the accuracy with which these properties are calculated. * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GeolocationCoordinates) @@ -9454,6 +10043,7 @@ declare var GeolocationCoordinates: { }; /** + * The **`GeolocationPosition`** interface represents the position of the concerned device at a given time. * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GeolocationPosition) @@ -9472,7 +10062,11 @@ declare var GeolocationPosition: { new(): GeolocationPosition; }; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GeolocationPositionError) */ +/** + * The **`GeolocationPositionError`** interface represents the reason of an error occurring when using the geolocating device. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GeolocationPositionError) + */ interface GeolocationPositionError { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GeolocationPositionError/code) */ readonly code: number; @@ -9497,9 +10091,9 @@ interface GlobalEventHandlersEventMap { "animationend": AnimationEvent; "animationiteration": AnimationEvent; "animationstart": AnimationEvent; - "auxclick": MouseEvent; + "auxclick": PointerEvent; "beforeinput": InputEvent; - "beforetoggle": Event; + "beforetoggle": ToggleEvent; "blur": FocusEvent; "cancel": Event; "canplay": Event; @@ -9511,7 +10105,7 @@ interface GlobalEventHandlersEventMap { "compositionstart": CompositionEvent; "compositionupdate": CompositionEvent; "contextlost": Event; - "contextmenu": MouseEvent; + "contextmenu": PointerEvent; "contextrestored": Event; "copy": ClipboardEvent; "cuechange": Event; @@ -9579,7 +10173,7 @@ interface GlobalEventHandlersEventMap { "submit": SubmitEvent; "suspend": Event; "timeupdate": Event; - "toggle": Event; + "toggle": ToggleEvent; "touchcancel": TouchEvent; "touchend": TouchEvent; "touchmove": TouchEvent; @@ -9614,11 +10208,11 @@ interface GlobalEventHandlers { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/animationstart_event) */ onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/auxclick_event) */ - onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null; + onauxclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/beforeinput_event) */ onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/beforetoggle_event) */ - onbeforetoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null; + onbeforetoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null; /** * Fires when the object loses the input focus. * @param ev The focus event. @@ -9661,7 +10255,7 @@ interface GlobalEventHandlers { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/contextmenu_event) */ - oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null; + oncontextmenu: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLCanvasElement/contextrestored_event) */ oncontextrestored: ((this: GlobalEventHandlers, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/copy_event) */ @@ -9790,7 +10384,7 @@ interface GlobalEventHandlers { * Fires immediately after the browser loads the object. * @param ev The event. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGElement/load_event) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/load_event) */ onload: ((this: GlobalEventHandlers, ev: Event) => any) | null; /** @@ -9979,7 +10573,7 @@ interface GlobalEventHandlers { */ ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/toggle_event) */ - ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null; + ontoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/touchcancel_event) */ ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/touchend_event) */ @@ -10042,7 +10636,11 @@ interface GlobalEventHandlers { removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLAllCollection) */ +/** + * The **`HTMLAllCollection`** interface represents a collection of _all_ of the document's elements, accessible by index (like an array) and by the element's `id`. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLAllCollection) + */ interface HTMLAllCollection { /** * Returns the number of elements in the collection. @@ -10075,7 +10673,7 @@ declare var HTMLAllCollection: { }; /** - * Hyperlink elements and provides special properties and methods (beyond those of the regular HTMLElement object interface that they inherit from) for manipulating the layout and presentation of such elements. + * The **`HTMLAnchorElement`** interface represents hyperlink elements and provides special properties and methods (beyond those of the regular HTMLElement object interface that they inherit from) for manipulating the layout and presentation of such elements. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement) */ @@ -10152,7 +10750,7 @@ declare var HTMLAnchorElement: { }; /** - * Provides special properties and methods (beyond those of the regular object HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of elements. + * The **`HTMLAreaElement`** interface provides special properties and methods (beyond those of the regular object HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of area elements. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLAreaElement) */ @@ -10209,7 +10807,7 @@ declare var HTMLAreaElement: { }; /** - * Provides access to the properties of