mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge remote-tracking branch 'origin/main' into release-5.7
This commit is contained in:
@@ -17,10 +17,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
|
||||
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
|
||||
|
||||
+30
-30
@@ -49,9 +49,9 @@ jobs:
|
||||
name: Test Node ${{ matrix.node-version }} on ${{ matrix.os }}${{ (!matrix.bundle && ' with --no-bundle') || '' }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- name: Use node version ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
check-latest: true
|
||||
@@ -80,8 +80,8 @@ jobs:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
- run: npm ci
|
||||
@@ -90,14 +90,14 @@ jobs:
|
||||
run: npm test -- --no-lint --coverage
|
||||
|
||||
- name: Upload coverage artifact
|
||||
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
|
||||
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
||||
with:
|
||||
name: coverage
|
||||
path: coverage
|
||||
|
||||
- uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
|
||||
- uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
|
||||
with:
|
||||
use_oidc: true
|
||||
use_oidc: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) }}
|
||||
disable_search: true
|
||||
files: ./coverage/codecov.json
|
||||
|
||||
@@ -105,8 +105,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
- run: npm ci
|
||||
@@ -118,8 +118,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
- run: npm ci
|
||||
@@ -131,13 +131,13 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
- run: npm ci
|
||||
|
||||
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
|
||||
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
|
||||
with:
|
||||
path: ~/.cache/dprint
|
||||
key: ${{ runner.os }}-dprint-${{ hashFiles('package-lock.json', '.dprint.jsonc') }}
|
||||
@@ -151,8 +151,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
- run: npm ci
|
||||
@@ -167,8 +167,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
- run: npm ci
|
||||
@@ -180,9 +180,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
- run: |
|
||||
@@ -221,16 +221,16 @@ jobs:
|
||||
if: github.event_name == 'pull_request'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
path: pr
|
||||
|
||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
path: base
|
||||
ref: ${{ github.base_ref }}
|
||||
|
||||
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
- run: |
|
||||
@@ -262,8 +262,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
- run: npm ci
|
||||
@@ -278,8 +278,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
- run: npm ci
|
||||
@@ -297,8 +297,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.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@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
|
||||
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
||||
with:
|
||||
name: fix_baselines.patch
|
||||
path: fix_baselines.patch
|
||||
|
||||
@@ -42,11 +42,11 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@461ef6c76dfe95d5c364de2f431ddbd31a417628 # v3.26.9
|
||||
uses: github/codeql-action/init@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
|
||||
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@461ef6c76dfe95d5c364de2f431ddbd31a417628 # v3.26.9
|
||||
uses: github/codeql-action/autobuild@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
|
||||
|
||||
# ℹ️ 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@461ef6c76dfe95d5c364de2f431ddbd31a417628 # v3.26.9
|
||||
uses: github/codeql-action/analyze@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
|
||||
|
||||
@@ -47,7 +47,7 @@ jobs:
|
||||
if: github.repository == 'microsoft/TypeScript'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
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.
|
||||
|
||||
@@ -20,8 +20,8 @@ jobs:
|
||||
if: github.repository == 'microsoft/TypeScript'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
- run: |
|
||||
@@ -42,8 +42,8 @@ jobs:
|
||||
if: github.repository == 'microsoft/TypeScript'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
# Use NODE_AUTH_TOKEN environment variable to authenticate to this registry.
|
||||
|
||||
@@ -27,11 +27,11 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
ref: ${{ inputs.branch_name }}
|
||||
token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
|
||||
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
- run: |
|
||||
|
||||
@@ -50,12 +50,12 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
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@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
- run: |
|
||||
|
||||
@@ -21,8 +21,8 @@ jobs:
|
||||
if: github.repository == 'microsoft/TypeScript'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
- run: |
|
||||
@@ -42,8 +42,8 @@ jobs:
|
||||
if: github.repository == 'microsoft/TypeScript'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
# Use NODE_AUTH_TOKEN environment variable to authenticate to this registry.
|
||||
|
||||
@@ -19,8 +19,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.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@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
|
||||
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
||||
with:
|
||||
name: tgz
|
||||
path: typescript.tgz
|
||||
|
||||
@@ -29,7 +29,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: 'Checkout code'
|
||||
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
@@ -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@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
|
||||
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
||||
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@461ef6c76dfe95d5c364de2f431ddbd31a417628 # v3.26.9
|
||||
uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
|
||||
@@ -49,11 +49,11 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
ref: ${{ inputs.branch_name }}
|
||||
token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
|
||||
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
- run: |
|
||||
|
||||
@@ -42,10 +42,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
ref: ${{ inputs.branch_name }}
|
||||
filter: blob:none # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
|
||||
|
||||
@@ -18,7 +18,7 @@ jobs:
|
||||
- name: Get repo name
|
||||
run: R=${GITHUB_REPOSITORY%?wiki}; echo "BASENAME=${R##*/}" >> $GITHUB_ENV
|
||||
- name: Checkout ${{ env.BASENAME }}-wiki
|
||||
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
repository: '${{ GITHUB.repository_owner }}/${{ env.BASENAME }}-wiki'
|
||||
token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
|
||||
|
||||
@@ -49,13 +49,13 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- if: ${{ github.event.inputs.bisect }}
|
||||
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
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.
|
||||
- if: ${{ !github.event.inputs.bisect }}
|
||||
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
- uses: microsoft/TypeScript-Twoslash-Repro-Action@8680b5b290d48a7badbc7ba65971d526c61b86b8 # master
|
||||
|
||||
@@ -22,10 +22,10 @@ jobs:
|
||||
if: github.repository == 'microsoft/TypeScript'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
|
||||
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
- run: |
|
||||
|
||||
+72
-45
@@ -171,6 +171,7 @@ import {
|
||||
EnumMember,
|
||||
EnumType,
|
||||
equateValues,
|
||||
ErrorOutputContainer,
|
||||
escapeLeadingUnderscores,
|
||||
escapeString,
|
||||
EvaluatorResult,
|
||||
@@ -5565,7 +5566,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
const cache = (links.accessibleChainCache ||= new Map());
|
||||
// Go from enclosingDeclaration to the first scope we check, so the cache is keyed off the scope and thus shared more
|
||||
const firstRelevantLocation = forEachSymbolTableInScope(enclosingDeclaration, (_, __, ___, node) => node);
|
||||
const key = `${useOnlyExternalAliasing ? 0 : 1}|${firstRelevantLocation && getNodeId(firstRelevantLocation)}|${meaning}`;
|
||||
const key = `${useOnlyExternalAliasing ? 0 : 1}|${firstRelevantLocation ? getNodeId(firstRelevantLocation) : 0}|${meaning}`;
|
||||
if (cache.has(key)) {
|
||||
return cache.get(key);
|
||||
}
|
||||
@@ -6240,6 +6241,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
}
|
||||
}
|
||||
let annotationType = getTypeFromTypeNodeWithoutContext(existing);
|
||||
if (isErrorType(annotationType)) {
|
||||
// allow "reusing" type nodes that resolve to error types
|
||||
// those can't truly be reused but it prevents cascading errors in isolatedDeclarations
|
||||
// for source with errors there is no guarantee to emit correct code anyway
|
||||
return true;
|
||||
}
|
||||
if (requiresAddingUndefined && annotationType) {
|
||||
annotationType = getOptionalType(annotationType, !isParameter(node));
|
||||
}
|
||||
@@ -7362,7 +7369,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
const signatures = getSignaturesOfType(filterType(propertyType, t => !(t.flags & TypeFlags.Undefined)), SignatureKind.Call);
|
||||
for (const signature of signatures) {
|
||||
const methodDeclaration = signatureToSignatureDeclarationHelper(signature, SyntaxKind.MethodSignature, context, { name: propertyName, questionToken: optionalToken }) as MethodSignature;
|
||||
typeElements.push(preserveCommentsOn(methodDeclaration));
|
||||
typeElements.push(preserveCommentsOn(methodDeclaration, signature.declaration || propertySymbol.valueDeclaration));
|
||||
}
|
||||
if (signatures.length || !optionalToken) {
|
||||
return;
|
||||
@@ -7394,9 +7401,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
propertyTypeNode,
|
||||
);
|
||||
|
||||
typeElements.push(preserveCommentsOn(propertySignature));
|
||||
typeElements.push(preserveCommentsOn(propertySignature, propertySymbol.valueDeclaration));
|
||||
|
||||
function preserveCommentsOn<T extends Node>(node: T) {
|
||||
function preserveCommentsOn<T extends Node>(node: T, range: Node | undefined) {
|
||||
const jsdocPropertyTag = propertySymbol.declarations?.find((d): d is JSDocPropertyTag => d.kind === SyntaxKind.JSDocPropertyTag);
|
||||
if (jsdocPropertyTag) {
|
||||
const commentText = getTextOfJSDocComment(jsdocPropertyTag.comment);
|
||||
@@ -7404,9 +7411,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
setSyntheticLeadingComments(node, [{ kind: SyntaxKind.MultiLineCommentTrivia, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]);
|
||||
}
|
||||
}
|
||||
else if (propertySymbol.valueDeclaration) {
|
||||
else if (range) {
|
||||
// Copy comments to node for declaration emit
|
||||
setCommentRange(context, node, propertySymbol.valueDeclaration);
|
||||
setCommentRange(context, node, range);
|
||||
}
|
||||
return node;
|
||||
}
|
||||
@@ -11633,7 +11640,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
// contextual type or, if the element itself is a binding pattern, with the type implied by that binding
|
||||
// pattern.
|
||||
const contextualType = isBindingPattern(element.name) ? getTypeFromBindingPattern(element.name, /*includePatternInType*/ true, /*reportErrors*/ false) : unknownType;
|
||||
return addOptionality(widenTypeInferredFromInitializer(element, checkDeclarationInitializer(element, CheckMode.Normal, contextualType)));
|
||||
return addOptionality(getWidenedLiteralTypeForInitializer(element, checkDeclarationInitializer(element, CheckMode.Normal, contextualType)));
|
||||
}
|
||||
if (isBindingPattern(element.name)) {
|
||||
return getTypeFromBindingPattern(element.name, includePatternInType, reportErrors);
|
||||
@@ -11670,7 +11677,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
const flags = SymbolFlags.Property | (e.initializer ? SymbolFlags.Optional : 0);
|
||||
const symbol = createSymbol(flags, text);
|
||||
symbol.links.type = getTypeFromBindingElement(e, includePatternInType, reportErrors);
|
||||
symbol.links.bindingElement = e;
|
||||
members.set(symbol.escapedName, symbol);
|
||||
});
|
||||
const result = createAnonymousType(/*symbol*/ undefined, members, emptyArray, emptyArray, stringIndexInfo ? [stringIndexInfo] : emptyArray);
|
||||
@@ -11999,7 +12005,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
getAnnotatedAccessorType(setter) ||
|
||||
getAnnotatedAccessorType(accessor) ||
|
||||
getter && getter.body && getReturnTypeFromBody(getter) ||
|
||||
accessor && accessor.initializer && getWidenedTypeForVariableLikeDeclaration(accessor, /*reportErrors*/ true);
|
||||
accessor && getWidenedTypeForVariableLikeDeclaration(accessor, /*reportErrors*/ true);
|
||||
if (!type) {
|
||||
if (setter && !isPrivateWithinAmbient(setter)) {
|
||||
errorOrSuggestion(noImplicitAny, setter, Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation, symbolToString(symbol));
|
||||
@@ -19355,7 +19361,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
if (!links.resolvedType) {
|
||||
// Deferred resolution of members is handled by resolveObjectTypeMembers
|
||||
const aliasSymbol = getAliasSymbolForTypeNode(node);
|
||||
if (getMembersOfSymbol(node.symbol).size === 0 && !aliasSymbol) {
|
||||
if (!node.symbol || getMembersOfSymbol(node.symbol).size === 0 && !aliasSymbol) {
|
||||
links.resolvedType = emptyTypeLiteralType;
|
||||
}
|
||||
else {
|
||||
@@ -20602,7 +20608,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
expr: Expression | undefined,
|
||||
headMessage: DiagnosticMessage | undefined,
|
||||
containingMessageChain: (() => DiagnosticMessageChain | undefined) | undefined,
|
||||
errorOutputContainer: { errors?: Diagnostic[]; skipLogging?: boolean; } | undefined,
|
||||
errorOutputContainer: ErrorOutputContainer | undefined,
|
||||
): boolean {
|
||||
if (isTypeRelatedTo(source, target, relation)) return true;
|
||||
if (!errorNode || !elaborateError(expr, source, target, relation, headMessage, containingMessageChain, errorOutputContainer)) {
|
||||
@@ -20622,7 +20628,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
relation: Map<string, RelationComparisonResult>,
|
||||
headMessage: DiagnosticMessage | undefined,
|
||||
containingMessageChain: (() => DiagnosticMessageChain | undefined) | undefined,
|
||||
errorOutputContainer: { errors?: Diagnostic[]; skipLogging?: boolean; } | undefined,
|
||||
errorOutputContainer: ErrorOutputContainer | undefined,
|
||||
): boolean {
|
||||
if (!node || isOrHasGenericConditional(target)) return false;
|
||||
if (
|
||||
@@ -20666,7 +20672,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
relation: Map<string, RelationComparisonResult>,
|
||||
headMessage: DiagnosticMessage | undefined,
|
||||
containingMessageChain: (() => DiagnosticMessageChain | undefined) | undefined,
|
||||
errorOutputContainer: { errors?: Diagnostic[]; skipLogging?: boolean; } | undefined,
|
||||
errorOutputContainer: ErrorOutputContainer | undefined,
|
||||
): boolean {
|
||||
const callSignatures = getSignaturesOfType(source, SignatureKind.Call);
|
||||
const constructSignatures = getSignaturesOfType(source, SignatureKind.Construct);
|
||||
@@ -20699,7 +20705,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
target: Type,
|
||||
relation: Map<string, RelationComparisonResult>,
|
||||
containingMessageChain: (() => DiagnosticMessageChain | undefined) | undefined,
|
||||
errorOutputContainer: { errors?: Diagnostic[]; skipLogging?: boolean; } | undefined,
|
||||
errorOutputContainer: ErrorOutputContainer | undefined,
|
||||
): boolean {
|
||||
// Don't elaborate blocks
|
||||
if (isBlock(node.body)) {
|
||||
@@ -20790,7 +20796,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
target: Type,
|
||||
relation: Map<string, RelationComparisonResult>,
|
||||
containingMessageChain: (() => DiagnosticMessageChain | undefined) | undefined,
|
||||
errorOutputContainer: { errors?: Diagnostic[]; skipLogging?: boolean; } | undefined,
|
||||
errorOutputContainer: ErrorOutputContainer | undefined,
|
||||
) {
|
||||
// Assignability failure - check each prop individually, and if that fails, fall back on the bad error span
|
||||
let reportedError = false;
|
||||
@@ -20870,7 +20876,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
target: Type,
|
||||
relation: Map<string, RelationComparisonResult>,
|
||||
containingMessageChain: (() => DiagnosticMessageChain | undefined) | undefined,
|
||||
errorOutputContainer: { errors?: Diagnostic[]; skipLogging?: boolean; } | undefined,
|
||||
errorOutputContainer: ErrorOutputContainer | undefined,
|
||||
) {
|
||||
const tupleOrArrayLikeTargetParts = filterType(target, isArrayOrTupleLikeType);
|
||||
const nonTupleOrArrayLikeTargetParts = filterType(target, t => !isArrayOrTupleLikeType(t));
|
||||
@@ -20972,7 +20978,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
target: Type,
|
||||
relation: Map<string, RelationComparisonResult>,
|
||||
containingMessageChain: (() => DiagnosticMessageChain | undefined) | undefined,
|
||||
errorOutputContainer: { errors?: Diagnostic[]; skipLogging?: boolean; } | undefined,
|
||||
errorOutputContainer: ErrorOutputContainer | undefined,
|
||||
) {
|
||||
let result = elaborateElementwise(generateJsxAttributes(node), source, target, relation, containingMessageChain, errorOutputContainer);
|
||||
let invalidTextDiagnostic: DiagnosticMessage | undefined;
|
||||
@@ -21086,7 +21092,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
target: Type,
|
||||
relation: Map<string, RelationComparisonResult>,
|
||||
containingMessageChain: (() => DiagnosticMessageChain | undefined) | undefined,
|
||||
errorOutputContainer: { errors?: Diagnostic[]; skipLogging?: boolean; } | undefined,
|
||||
errorOutputContainer: ErrorOutputContainer | undefined,
|
||||
) {
|
||||
if (target.flags & (TypeFlags.Primitive | TypeFlags.Never)) return false;
|
||||
if (isTupleLikeType(source)) {
|
||||
@@ -21133,7 +21139,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
target: Type,
|
||||
relation: Map<string, RelationComparisonResult>,
|
||||
containingMessageChain: (() => DiagnosticMessageChain | undefined) | undefined,
|
||||
errorOutputContainer: { errors?: Diagnostic[]; skipLogging?: boolean; } | undefined,
|
||||
errorOutputContainer: ErrorOutputContainer | undefined,
|
||||
) {
|
||||
if (target.flags & (TypeFlags.Primitive | TypeFlags.Never)) return false;
|
||||
return elaborateElementwise(generateObjectLiteralElements(node), source, target, relation, containingMessageChain, errorOutputContainer);
|
||||
@@ -21631,7 +21637,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
errorNode: Node | undefined,
|
||||
headMessage?: DiagnosticMessage,
|
||||
containingMessageChain?: () => DiagnosticMessageChain | undefined,
|
||||
errorOutputContainer?: { errors?: Diagnostic[]; skipLogging?: boolean; },
|
||||
errorOutputContainer?: ErrorOutputContainer,
|
||||
): boolean {
|
||||
let errorInfo: DiagnosticMessageChain | undefined;
|
||||
let relatedInfo: [DiagnosticRelatedInformation, ...DiagnosticRelatedInformation[]] | undefined;
|
||||
@@ -29873,10 +29879,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
const jsxFactoryNamespace = getJsxNamespace(node);
|
||||
const jsxFactoryLocation = isJsxOpeningLikeElement(node) ? node.tagName : node;
|
||||
|
||||
// allow null as jsxFragmentFactory
|
||||
// #38720/60122, allow null as jsxFragmentFactory
|
||||
let jsxFactorySym: Symbol | undefined;
|
||||
if (!(isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) {
|
||||
jsxFactorySym = resolveName(jsxFactoryLocation, jsxFactoryNamespace, SymbolFlags.Value, jsxFactoryRefErr, /*isUse*/ true);
|
||||
jsxFactorySym = resolveName(jsxFactoryLocation, jsxFactoryNamespace, compilerOptions.jsx === JsxEmit.Preserve ? SymbolFlags.Value & ~SymbolFlags.Enum : SymbolFlags.Value, jsxFactoryRefErr, /*isUse*/ true);
|
||||
}
|
||||
|
||||
if (jsxFactorySym) {
|
||||
@@ -29890,12 +29896,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
}
|
||||
}
|
||||
|
||||
// For JsxFragment, mark jsx pragma as referenced via resolveName
|
||||
// if JsxFragment, additionally mark jsx pragma as referenced, since `getJsxNamespace` above would have resolved to only the fragment factory if they are distinct
|
||||
if (isJsxOpeningFragment(node)) {
|
||||
const file = getSourceFileOfNode(node);
|
||||
const localJsxNamespace = getLocalJsxNamespace(file);
|
||||
if (localJsxNamespace) {
|
||||
resolveName(jsxFactoryLocation, localJsxNamespace, SymbolFlags.Value, jsxFactoryRefErr, /*isUse*/ true);
|
||||
resolveName(jsxFactoryLocation, localJsxNamespace, compilerOptions.jsx === JsxEmit.Preserve ? SymbolFlags.Value & ~SymbolFlags.Enum : SymbolFlags.Value, jsxFactoryRefErr, /*isUse*/ true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32918,7 +32924,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
}
|
||||
|
||||
checkJsxChildren(node);
|
||||
return getJsxElementTypeAt(node) || anyType;
|
||||
const jsxElementType = getJsxElementTypeAt(node);
|
||||
return isErrorType(jsxElementType) ? anyType : jsxElementType;
|
||||
}
|
||||
|
||||
function isHyphenatedJsxName(name: string | __String) {
|
||||
@@ -35179,7 +35186,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
checkMode: CheckMode,
|
||||
reportErrors: boolean,
|
||||
containingMessageChain: (() => DiagnosticMessageChain | undefined) | undefined,
|
||||
errorOutputContainer: { errors?: Diagnostic[]; skipLogging?: boolean; },
|
||||
errorOutputContainer: ErrorOutputContainer,
|
||||
) {
|
||||
// Stateless function components can have maximum of three arguments: "props", "context", and "updater".
|
||||
// However "context" and "updater" are implicit and can't be specify by users. Only the first parameter, props,
|
||||
@@ -35295,7 +35302,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
containingMessageChain: (() => DiagnosticMessageChain | undefined) | undefined,
|
||||
inferenceContext: InferenceContext | undefined,
|
||||
): readonly Diagnostic[] | undefined {
|
||||
const errorOutputContainer: { errors?: Diagnostic[]; skipLogging?: boolean; } = { errors: undefined, skipLogging: true };
|
||||
const errorOutputContainer: ErrorOutputContainer = { errors: undefined, skipLogging: true };
|
||||
if (isJsxCallLike(node)) {
|
||||
if (!checkApplicableSignatureForJsxCallLikeElement(node, signature, relation, checkMode, reportErrors, containingMessageChain, errorOutputContainer)) {
|
||||
Debug.assert(!reportErrors || !!errorOutputContainer.errors, "jsx should have errors when reporting errors");
|
||||
@@ -36643,9 +36650,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
if (sourceFileLinks.jsxFragmentType !== undefined) return sourceFileLinks.jsxFragmentType;
|
||||
|
||||
const jsxFragmentFactoryName = getJsxNamespace(node);
|
||||
// #38720/60122, allow null as jsxFragmentFactory
|
||||
if (jsxFragmentFactoryName === "null") return sourceFileLinks.jsxFragmentType = anyType;
|
||||
|
||||
const jsxFactoryRefErr = diagnostics ? Diagnostics.Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found : undefined;
|
||||
const jsxFactorySymbol = getJsxNamespaceContainerForImplicitImport(node) ??
|
||||
resolveName(node, jsxFragmentFactoryName, SymbolFlags.Value, /*nameNotFoundMessage*/ jsxFactoryRefErr, /*isUse*/ true);
|
||||
resolveName(node, jsxFragmentFactoryName, compilerOptions.jsx === JsxEmit.Preserve ? SymbolFlags.Value & ~SymbolFlags.Enum : SymbolFlags.Value, /*nameNotFoundMessage*/ jsxFactoryRefErr, /*isUse*/ true);
|
||||
|
||||
if (jsxFactorySymbol === undefined) return sourceFileLinks.jsxFragmentType = errorType;
|
||||
if (jsxFactorySymbol.escapedName === ReactNames.Fragment) return sourceFileLinks.jsxFragmentType = getTypeOfSymbol(jsxFactorySymbol);
|
||||
@@ -38617,7 +38627,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
}
|
||||
|
||||
function checkIfExpressionRefinesParameter(func: FunctionLikeDeclaration, expr: Expression, param: ParameterDeclaration, initType: Type): Type | undefined {
|
||||
const antecedent = (expr as Expression & { flowNode?: FlowNode; }).flowNode ||
|
||||
const antecedent = canHaveFlowNode(expr) && expr.flowNode ||
|
||||
expr.parent.kind === SyntaxKind.ReturnStatement && (expr.parent as ReturnStatement).flowNode ||
|
||||
createFlowNode(FlowFlags.Start, /*node*/ undefined, /*antecedent*/ undefined);
|
||||
const trueCondition = createFlowNode(FlowFlags.TrueCondition, expr, antecedent);
|
||||
@@ -40523,7 +40533,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
}
|
||||
|
||||
function widenTypeInferredFromInitializer(declaration: HasExpressionInitializer, type: Type) {
|
||||
const widened = getCombinedNodeFlagsCached(declaration) & NodeFlags.Constant || isDeclarationReadonly(declaration) ? type : getWidenedLiteralType(type);
|
||||
const widened = getWidenedLiteralTypeForInitializer(declaration, type);
|
||||
if (isInJSFile(declaration)) {
|
||||
if (isEmptyLiteralType(widened)) {
|
||||
reportImplicitAny(declaration, anyType);
|
||||
@@ -40537,6 +40547,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
return widened;
|
||||
}
|
||||
|
||||
function getWidenedLiteralTypeForInitializer(declaration: HasExpressionInitializer, type: Type) {
|
||||
return getCombinedNodeFlagsCached(declaration) & NodeFlags.Constant || isDeclarationReadonly(declaration) ? type : getWidenedLiteralType(type);
|
||||
}
|
||||
|
||||
function isLiteralOfContextualType(candidateType: Type, contextualType: Type | undefined): boolean {
|
||||
if (contextualType) {
|
||||
if (contextualType.flags & TypeFlags.UnionOrIntersection) {
|
||||
@@ -44920,7 +44934,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
}
|
||||
|
||||
if (!(type.flags & TypeFlags.Union)) {
|
||||
const errorOutputContainer: { errors: Diagnostic[] | undefined; } | undefined = errorNode ? { errors: undefined } : undefined;
|
||||
const errorOutputContainer: ErrorOutputContainer | undefined = errorNode ? { errors: undefined, skipLogging: true } : undefined;
|
||||
const iterationTypes = getIterationTypesOfIterableWorker(type, use, errorNode, errorOutputContainer);
|
||||
if (iterationTypes === noIterationTypes) {
|
||||
if (errorNode) {
|
||||
@@ -44945,7 +44959,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
|
||||
let allIterationTypes: IterationTypes[] | undefined;
|
||||
for (const constituent of (type as UnionType).types) {
|
||||
const errorOutputContainer: { errors: Diagnostic[] | undefined; } | undefined = errorNode ? { errors: undefined } : undefined;
|
||||
const errorOutputContainer: ErrorOutputContainer | undefined = errorNode ? { errors: undefined } : undefined;
|
||||
const iterationTypes = getIterationTypesOfIterableWorker(constituent, use, errorNode, errorOutputContainer);
|
||||
if (iterationTypes === noIterationTypes) {
|
||||
if (errorNode) {
|
||||
@@ -44996,7 +45010,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
* NOTE: You probably don't want to call this directly and should be calling
|
||||
* `getIterationTypesOfIterable` instead.
|
||||
*/
|
||||
function getIterationTypesOfIterableWorker(type: Type, use: IterationUse, errorNode: Node | undefined, errorOutputContainer: { errors: Diagnostic[] | undefined; } | undefined) {
|
||||
function getIterationTypesOfIterableWorker(type: Type, use: IterationUse, errorNode: Node | undefined, errorOutputContainer: ErrorOutputContainer | undefined) {
|
||||
if (isTypeAny(type)) {
|
||||
return anyIterationTypes;
|
||||
}
|
||||
@@ -45138,19 +45152,23 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
* NOTE: You probably don't want to call this directly and should be calling
|
||||
* `getIterationTypesOfIterable` instead.
|
||||
*/
|
||||
function getIterationTypesOfIterableSlow(type: Type, resolver: IterationTypesResolver, errorNode: Node | undefined, errorOutputContainer: { errors: Diagnostic[] | undefined; } | undefined, noCache: boolean) {
|
||||
function getIterationTypesOfIterableSlow(type: Type, resolver: IterationTypesResolver, errorNode: Node | undefined, errorOutputContainer: ErrorOutputContainer | undefined, noCache: boolean) {
|
||||
const method = getPropertyOfType(type, getPropertyNameForKnownSymbolName(resolver.iteratorSymbolName));
|
||||
const methodType = method && !(method.flags & SymbolFlags.Optional) ? getTypeOfSymbol(method) : undefined;
|
||||
if (isTypeAny(methodType)) {
|
||||
return noCache ? anyIterationTypes : setCachedIterationTypes(type, resolver.iterableCacheKey, anyIterationTypes);
|
||||
}
|
||||
|
||||
const signatures = methodType ? getSignaturesOfType(methodType, SignatureKind.Call) : undefined;
|
||||
if (!some(signatures)) {
|
||||
const allSignatures = methodType ? getSignaturesOfType(methodType, SignatureKind.Call) : undefined;
|
||||
const validSignatures = filter(allSignatures, sig => getMinArgumentCount(sig) === 0);
|
||||
if (!some(validSignatures)) {
|
||||
if (errorNode && some(allSignatures)) {
|
||||
checkTypeAssignableTo(type, resolver.getGlobalIterableType(/*reportErrors*/ true), errorNode, /*headMessage*/ undefined, /*containingMessageChain*/ undefined, errorOutputContainer);
|
||||
}
|
||||
return noCache ? noIterationTypes : setCachedIterationTypes(type, resolver.iterableCacheKey, noIterationTypes);
|
||||
}
|
||||
|
||||
const iteratorType = getIntersectionType(map(signatures, getReturnTypeOfSignature));
|
||||
const iteratorType = getIntersectionType(map(validSignatures, getReturnTypeOfSignature));
|
||||
const iterationTypes = getIterationTypesOfIteratorWorker(iteratorType, resolver, errorNode, errorOutputContainer, noCache) ?? noIterationTypes;
|
||||
return noCache ? iterationTypes : setCachedIterationTypes(type, resolver.iterableCacheKey, iterationTypes);
|
||||
}
|
||||
@@ -45179,7 +45197,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
* If we successfully found the *yield*, *return*, and *next* types, an `IterationTypes`
|
||||
* record is returned. Otherwise, `undefined` is returned.
|
||||
*/
|
||||
function getIterationTypesOfIterator(type: Type, resolver: IterationTypesResolver, errorNode: Node | undefined, errorOutputContainer: { errors: Diagnostic[] | undefined; } | undefined) {
|
||||
function getIterationTypesOfIterator(type: Type, resolver: IterationTypesResolver, errorNode: Node | undefined, errorOutputContainer: ErrorOutputContainer | undefined) {
|
||||
return getIterationTypesOfIteratorWorker(type, resolver, errorNode, errorOutputContainer, /*noCache*/ false);
|
||||
}
|
||||
|
||||
@@ -45192,7 +45210,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
* NOTE: You probably don't want to call this directly and should be calling
|
||||
* `getIterationTypesOfIterator` instead.
|
||||
*/
|
||||
function getIterationTypesOfIteratorWorker(type: Type, resolver: IterationTypesResolver, errorNode: Node | undefined, errorOutputContainer: { errors: Diagnostic[] | undefined; } | undefined, noCache: boolean) {
|
||||
function getIterationTypesOfIteratorWorker(type: Type, resolver: IterationTypesResolver, errorNode: Node | undefined, errorOutputContainer: ErrorOutputContainer | undefined, noCache: boolean) {
|
||||
if (isTypeAny(type)) {
|
||||
return anyIterationTypes;
|
||||
}
|
||||
@@ -45334,7 +45352,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
* If we successfully found the *yield*, *return*, and *next* types, an `IterationTypes`
|
||||
* record is returned. Otherwise, we return `undefined`.
|
||||
*/
|
||||
function getIterationTypesOfMethod(type: Type, resolver: IterationTypesResolver, methodName: "next" | "return" | "throw", errorNode: Node | undefined, errorOutputContainer: { errors: Diagnostic[] | undefined; } | undefined): IterationTypes | undefined {
|
||||
function getIterationTypesOfMethod(type: Type, resolver: IterationTypesResolver, methodName: "next" | "return" | "throw", errorNode: Node | undefined, errorOutputContainer: ErrorOutputContainer | undefined): IterationTypes | undefined {
|
||||
const method = getPropertyOfType(type, methodName as __String);
|
||||
|
||||
// Ignore 'return' or 'throw' if they are missing.
|
||||
@@ -45454,7 +45472,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
* NOTE: You probably don't want to call this directly and should be calling
|
||||
* `getIterationTypesOfIterator` instead.
|
||||
*/
|
||||
function getIterationTypesOfIteratorSlow(type: Type, resolver: IterationTypesResolver, errorNode: Node | undefined, errorOutputContainer: { errors: Diagnostic[] | undefined; } | undefined, noCache: boolean) {
|
||||
function getIterationTypesOfIteratorSlow(type: Type, resolver: IterationTypesResolver, errorNode: Node | undefined, errorOutputContainer: ErrorOutputContainer | undefined, noCache: boolean) {
|
||||
const iterationTypes = combineIterationTypes([
|
||||
getIterationTypesOfMethod(type, resolver, "next", errorNode, errorOutputContainer),
|
||||
getIterationTypesOfMethod(type, resolver, "return", errorNode, errorOutputContainer),
|
||||
@@ -46760,6 +46778,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
function checkInterfaceDeclaration(node: InterfaceDeclaration) {
|
||||
// Grammar checking
|
||||
if (!checkGrammarModifiers(node)) checkGrammarInterfaceDeclaration(node);
|
||||
if (!allowBlockDeclarations(node.parent)) {
|
||||
grammarErrorOnNode(node, Diagnostics._0_declarations_can_only_be_declared_inside_a_block, "interface");
|
||||
}
|
||||
|
||||
checkTypeParameters(node.typeParameters);
|
||||
addLazyDiagnostic(() => {
|
||||
@@ -46803,6 +46824,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
// Grammar checking
|
||||
checkGrammarModifiers(node);
|
||||
checkTypeNameIsReserved(node.name, Diagnostics.Type_alias_name_cannot_be_0);
|
||||
if (!allowBlockDeclarations(node.parent)) {
|
||||
grammarErrorOnNode(node, Diagnostics._0_declarations_can_only_be_declared_inside_a_block, "type");
|
||||
}
|
||||
checkExportsOnMergedDeclarations(node);
|
||||
checkTypeParameters(node.typeParameters);
|
||||
if (node.type.kind === SyntaxKind.IntrinsicKeyword) {
|
||||
@@ -49673,7 +49697,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
const typeNode = getNonlocalEffectiveTypeAnnotationNode(parameter);
|
||||
if (!typeNode) return false;
|
||||
const type = getTypeFromTypeNode(typeNode);
|
||||
return containsUndefinedType(type);
|
||||
// allow error type here to avoid confusing errors that the annotation has to contain undefined when it does in cases like this:
|
||||
//
|
||||
// export function fn(x?: Unresolved | undefined): void {}
|
||||
return isErrorType(type) || containsUndefinedType(type);
|
||||
}
|
||||
|
||||
function requiresAddingImplicitUndefined(parameter: ParameterDeclaration | JSDocParameterTag, enclosingDeclaration: Node | undefined) {
|
||||
@@ -52034,7 +52061,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
return false;
|
||||
}
|
||||
|
||||
function allowLetAndConstDeclarations(parent: Node): boolean {
|
||||
function allowBlockDeclarations(parent: Node): boolean {
|
||||
switch (parent.kind) {
|
||||
case SyntaxKind.IfStatement:
|
||||
case SyntaxKind.DoStatement:
|
||||
@@ -52045,14 +52072,14 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
case SyntaxKind.ForOfStatement:
|
||||
return false;
|
||||
case SyntaxKind.LabeledStatement:
|
||||
return allowLetAndConstDeclarations(parent.parent);
|
||||
return allowBlockDeclarations(parent.parent);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function checkGrammarForDisallowedBlockScopedVariableStatement(node: VariableStatement) {
|
||||
if (!allowLetAndConstDeclarations(node.parent)) {
|
||||
if (!allowBlockDeclarations(node.parent)) {
|
||||
const blockScopeKind = getCombinedNodeFlagsCached(node.declarationList) & NodeFlags.BlockScoped;
|
||||
if (blockScopeKind) {
|
||||
const keyword = blockScopeKind === NodeFlags.Let ? "let" :
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import {
|
||||
addToSeen,
|
||||
AlternateModeDiagnostics,
|
||||
append,
|
||||
arrayFrom,
|
||||
@@ -2629,7 +2630,7 @@ export function convertToTSConfig(configParseResult: ParsedCommandLine, configFi
|
||||
const providedKeys = new Set(optionMap.keys());
|
||||
const impliedCompilerOptions: Record<string, CompilerOptionsValue> = {};
|
||||
for (const option in computedOptions) {
|
||||
if (!providedKeys.has(option) && some(computedOptions[option].dependencies, dep => providedKeys.has(dep))) {
|
||||
if (!providedKeys.has(option) && optionDependsOn(option, providedKeys)) {
|
||||
const implied = computedOptions[option].computeValue(configParseResult.options);
|
||||
const defaultValue = computedOptions[option].computeValue({});
|
||||
if (implied !== defaultValue) {
|
||||
@@ -2641,6 +2642,18 @@ export function convertToTSConfig(configParseResult: ParsedCommandLine, configFi
|
||||
return config;
|
||||
}
|
||||
|
||||
function optionDependsOn(option: string, dependsOn: Set<string>): boolean {
|
||||
const seen = new Set<string>();
|
||||
return optionDependsOnRecursive(option);
|
||||
|
||||
function optionDependsOnRecursive(option: string): boolean {
|
||||
if (addToSeen(seen, option)) {
|
||||
return some(computedOptions[option]?.dependencies, dep => dependsOn.has(dep) || optionDependsOnRecursive(dep));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export function optionMapToObject(optionMap: Map<string, CompilerOptionsValue>): object {
|
||||
return Object.fromEntries(optionMap);
|
||||
|
||||
@@ -7058,7 +7058,7 @@
|
||||
"category": "Error",
|
||||
"code": 9023
|
||||
},
|
||||
"Declaration emit for this parameter requires implicitly adding undefined to it's type. This is not supported with --isolatedDeclarations.": {
|
||||
"Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations.": {
|
||||
"category": "Error",
|
||||
"code": 9025
|
||||
},
|
||||
|
||||
+83
-10
@@ -3226,17 +3226,90 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
|
||||
* Wraps an expression in parens if we would emit a leading comment that would introduce a line separator
|
||||
* between the node and its parent.
|
||||
*/
|
||||
function parenthesizeExpressionForNoAsi(node: Expression) {
|
||||
if (!commentsDisabled && isPartiallyEmittedExpression(node) && willEmitLeadingNewLine(node)) {
|
||||
const parseNode = getParseTreeNode(node);
|
||||
if (parseNode && isParenthesizedExpression(parseNode)) {
|
||||
// If the original node was a parenthesized expression, restore it to preserve comment and source map emit
|
||||
const parens = factory.createParenthesizedExpression(node.expression);
|
||||
setOriginalNode(parens, node);
|
||||
setTextRange(parens, parseNode);
|
||||
return parens;
|
||||
function parenthesizeExpressionForNoAsi(node: Expression): Expression {
|
||||
if (!commentsDisabled) {
|
||||
switch (node.kind) {
|
||||
case SyntaxKind.PartiallyEmittedExpression:
|
||||
if (willEmitLeadingNewLine(node)) {
|
||||
const parseNode = getParseTreeNode(node);
|
||||
if (parseNode && isParenthesizedExpression(parseNode)) {
|
||||
// If the original node was a parenthesized expression, restore it to preserve comment and source map emit
|
||||
const parens = factory.createParenthesizedExpression((node as PartiallyEmittedExpression).expression);
|
||||
setOriginalNode(parens, node);
|
||||
setTextRange(parens, parseNode);
|
||||
return parens;
|
||||
}
|
||||
return factory.createParenthesizedExpression(node);
|
||||
}
|
||||
return factory.updatePartiallyEmittedExpression(
|
||||
node as PartiallyEmittedExpression,
|
||||
parenthesizeExpressionForNoAsi((node as PartiallyEmittedExpression).expression),
|
||||
);
|
||||
case SyntaxKind.PropertyAccessExpression:
|
||||
return factory.updatePropertyAccessExpression(
|
||||
node as PropertyAccessExpression,
|
||||
parenthesizeExpressionForNoAsi((node as PropertyAccessExpression).expression),
|
||||
(node as PropertyAccessExpression).name,
|
||||
);
|
||||
case SyntaxKind.ElementAccessExpression:
|
||||
return factory.updateElementAccessExpression(
|
||||
node as ElementAccessExpression,
|
||||
parenthesizeExpressionForNoAsi((node as ElementAccessExpression).expression),
|
||||
(node as ElementAccessExpression).argumentExpression,
|
||||
);
|
||||
case SyntaxKind.CallExpression:
|
||||
return factory.updateCallExpression(
|
||||
node as CallExpression,
|
||||
parenthesizeExpressionForNoAsi((node as CallExpression).expression),
|
||||
(node as CallExpression).typeArguments,
|
||||
(node as CallExpression).arguments,
|
||||
);
|
||||
case SyntaxKind.TaggedTemplateExpression:
|
||||
return factory.updateTaggedTemplateExpression(
|
||||
node as TaggedTemplateExpression,
|
||||
parenthesizeExpressionForNoAsi((node as TaggedTemplateExpression).tag),
|
||||
(node as TaggedTemplateExpression).typeArguments,
|
||||
(node as TaggedTemplateExpression).template,
|
||||
);
|
||||
case SyntaxKind.PostfixUnaryExpression:
|
||||
return factory.updatePostfixUnaryExpression(
|
||||
node as PostfixUnaryExpression,
|
||||
parenthesizeExpressionForNoAsi((node as PostfixUnaryExpression).operand),
|
||||
);
|
||||
case SyntaxKind.BinaryExpression:
|
||||
return factory.updateBinaryExpression(
|
||||
node as BinaryExpression,
|
||||
parenthesizeExpressionForNoAsi((node as BinaryExpression).left),
|
||||
(node as BinaryExpression).operatorToken,
|
||||
(node as BinaryExpression).right,
|
||||
);
|
||||
case SyntaxKind.ConditionalExpression:
|
||||
return factory.updateConditionalExpression(
|
||||
node as ConditionalExpression,
|
||||
parenthesizeExpressionForNoAsi((node as ConditionalExpression).condition),
|
||||
(node as ConditionalExpression).questionToken,
|
||||
(node as ConditionalExpression).whenTrue,
|
||||
(node as ConditionalExpression).colonToken,
|
||||
(node as ConditionalExpression).whenFalse,
|
||||
);
|
||||
case SyntaxKind.AsExpression:
|
||||
return factory.updateAsExpression(
|
||||
node as AsExpression,
|
||||
parenthesizeExpressionForNoAsi((node as AsExpression).expression),
|
||||
(node as AsExpression).type,
|
||||
);
|
||||
case SyntaxKind.SatisfiesExpression:
|
||||
return factory.updateSatisfiesExpression(
|
||||
node as SatisfiesExpression,
|
||||
parenthesizeExpressionForNoAsi((node as SatisfiesExpression).expression),
|
||||
(node as SatisfiesExpression).type,
|
||||
);
|
||||
case SyntaxKind.NonNullExpression:
|
||||
return factory.updateNonNullExpression(
|
||||
node as NonNullExpression,
|
||||
parenthesizeExpressionForNoAsi((node as NonNullExpression).expression),
|
||||
);
|
||||
}
|
||||
return factory.createParenthesizedExpression(node);
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
@@ -1188,13 +1188,23 @@ const importStarHelper: UnscopedEmitHelper = {
|
||||
dependencies: [createBindingHelper, setModuleDefaultHelper],
|
||||
priority: 2,
|
||||
text: `
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};`,
|
||||
var __importStar = (this && this.__importStar) || (function () {
|
||||
var ownKeys = function(o) {
|
||||
ownKeys = Object.getOwnPropertyNames || function (o) {
|
||||
var ar = [];
|
||||
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
||||
return ar;
|
||||
};
|
||||
return ownKeys(o);
|
||||
};
|
||||
return function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
})();`,
|
||||
};
|
||||
|
||||
// emit helper for `import Name from "foo"`
|
||||
|
||||
@@ -1910,25 +1910,31 @@ function nodeModuleNameResolverWorker(
|
||||
}
|
||||
|
||||
if (!isExternalModuleNameRelative(moduleName)) {
|
||||
let resolved: SearchResult<Resolved> | undefined;
|
||||
if (features & NodeResolutionFeatures.Imports && startsWith(moduleName, "#")) {
|
||||
resolved = loadModuleFromImports(extensions, moduleName, containingDirectory, state, cache, redirectedReference);
|
||||
}
|
||||
if (!resolved && features & NodeResolutionFeatures.SelfName) {
|
||||
resolved = loadModuleFromSelfNameReference(extensions, moduleName, containingDirectory, state, cache, redirectedReference);
|
||||
}
|
||||
if (!resolved) {
|
||||
if (moduleName.includes(":")) {
|
||||
if (traceEnabled) {
|
||||
trace(host, Diagnostics.Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1, moduleName, formatExtensions(extensions));
|
||||
}
|
||||
return undefined;
|
||||
const resolved = loadModuleFromImports(extensions, moduleName, containingDirectory, state, cache, redirectedReference);
|
||||
if (resolved) {
|
||||
return resolved.value && { value: { resolved: resolved.value, isExternalLibraryImport: false } };
|
||||
}
|
||||
}
|
||||
|
||||
if (features & NodeResolutionFeatures.SelfName) {
|
||||
const resolved = loadModuleFromSelfNameReference(extensions, moduleName, containingDirectory, state, cache, redirectedReference);
|
||||
if (resolved) {
|
||||
return resolved.value && { value: { resolved: resolved.value, isExternalLibraryImport: false } };
|
||||
}
|
||||
}
|
||||
|
||||
if (moduleName.includes(":")) {
|
||||
if (traceEnabled) {
|
||||
trace(host, Diagnostics.Loading_module_0_from_node_modules_folder_target_file_types_Colon_1, moduleName, formatExtensions(extensions));
|
||||
trace(host, Diagnostics.Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1, moduleName, formatExtensions(extensions));
|
||||
}
|
||||
resolved = loadModuleFromNearestNodeModulesDirectory(extensions, moduleName, containingDirectory, state, cache, redirectedReference);
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if (traceEnabled) {
|
||||
trace(host, Diagnostics.Loading_module_0_from_node_modules_folder_target_file_types_Colon_1, moduleName, formatExtensions(extensions));
|
||||
}
|
||||
let resolved = loadModuleFromNearestNodeModulesDirectory(extensions, moduleName, containingDirectory, state, cache, redirectedReference);
|
||||
if (extensions & Extensions.Declaration) {
|
||||
resolved ??= resolveFromTypeRoot(moduleName, state);
|
||||
}
|
||||
@@ -2618,8 +2624,8 @@ function loadModuleFromExports(scope: PackageJsonInfo, extensions: Extensions, s
|
||||
mainExport = (scope.contents.packageJsonContent.exports as MapLike<unknown>)["."];
|
||||
}
|
||||
if (mainExport) {
|
||||
const loadModuleFromTargetImportOrExport = getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, subpath, scope, /*isImports*/ false);
|
||||
return loadModuleFromTargetImportOrExport(mainExport, "", /*pattern*/ false, ".");
|
||||
const loadModuleFromTargetExportOrImport = getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirectedReference, subpath, scope, /*isImports*/ false);
|
||||
return loadModuleFromTargetExportOrImport(mainExport, "", /*pattern*/ false, ".");
|
||||
}
|
||||
}
|
||||
else if (allKeysStartWithDot(scope.contents.packageJsonContent.exports as MapLike<unknown>)) {
|
||||
@@ -2629,7 +2635,7 @@ function loadModuleFromExports(scope: PackageJsonInfo, extensions: Extensions, s
|
||||
}
|
||||
return toSearchResult(/*value*/ undefined);
|
||||
}
|
||||
const result = loadModuleFromImportsOrExports(extensions, state, cache, redirectedReference, subpath, scope.contents.packageJsonContent.exports, scope, /*isImports*/ false);
|
||||
const result = loadModuleFromExportsOrImports(extensions, state, cache, redirectedReference, subpath, scope.contents.packageJsonContent.exports, scope, /*isImports*/ false);
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
@@ -2663,7 +2669,7 @@ function loadModuleFromImports(extensions: Extensions, moduleName: string, direc
|
||||
return toSearchResult(/*value*/ undefined);
|
||||
}
|
||||
|
||||
const result = loadModuleFromImportsOrExports(extensions, state, cache, redirectedReference, moduleName, scope.contents.packageJsonContent.imports, scope, /*isImports*/ true);
|
||||
const result = loadModuleFromExportsOrImports(extensions, state, cache, redirectedReference, moduleName, scope.contents.packageJsonContent.imports, scope, /*isImports*/ true);
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
@@ -2693,30 +2699,30 @@ export function comparePatternKeys(a: string, b: string): Comparison {
|
||||
return Comparison.EqualTo;
|
||||
}
|
||||
|
||||
function loadModuleFromImportsOrExports(extensions: Extensions, state: ModuleResolutionState, cache: ModuleResolutionCache | undefined, redirectedReference: ResolvedProjectReference | undefined, moduleName: string, lookupTable: object, scope: PackageJsonInfo, isImports: boolean): SearchResult<Resolved> | undefined {
|
||||
const loadModuleFromTargetImportOrExport = getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, moduleName, scope, isImports);
|
||||
function loadModuleFromExportsOrImports(extensions: Extensions, state: ModuleResolutionState, cache: ModuleResolutionCache | undefined, redirectedReference: ResolvedProjectReference | undefined, moduleName: string, lookupTable: object, scope: PackageJsonInfo, isImports: boolean): SearchResult<Resolved> | undefined {
|
||||
const loadModuleFromTargetExportOrImport = getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirectedReference, moduleName, scope, isImports);
|
||||
|
||||
if (!endsWith(moduleName, directorySeparator) && !moduleName.includes("*") && hasProperty(lookupTable, moduleName)) {
|
||||
const target = (lookupTable as { [idx: string]: unknown; })[moduleName];
|
||||
return loadModuleFromTargetImportOrExport(target, /*subpath*/ "", /*pattern*/ false, moduleName);
|
||||
const target = (lookupTable as MapLike<unknown>)[moduleName];
|
||||
return loadModuleFromTargetExportOrImport(target, /*subpath*/ "", /*pattern*/ false, moduleName);
|
||||
}
|
||||
const expandingKeys = toSorted(filter(getOwnKeys(lookupTable as MapLike<unknown>), k => hasOneAsterisk(k) || endsWith(k, "/")), comparePatternKeys);
|
||||
for (const potentialTarget of expandingKeys) {
|
||||
if (state.features & NodeResolutionFeatures.ExportsPatternTrailers && matchesPatternWithTrailer(potentialTarget, moduleName)) {
|
||||
const target = (lookupTable as { [idx: string]: unknown; })[potentialTarget];
|
||||
const target = (lookupTable as MapLike<unknown>)[potentialTarget];
|
||||
const starPos = potentialTarget.indexOf("*");
|
||||
const subpath = moduleName.substring(potentialTarget.substring(0, starPos).length, moduleName.length - (potentialTarget.length - 1 - starPos));
|
||||
return loadModuleFromTargetImportOrExport(target, subpath, /*pattern*/ true, potentialTarget);
|
||||
return loadModuleFromTargetExportOrImport(target, subpath, /*pattern*/ true, potentialTarget);
|
||||
}
|
||||
else if (endsWith(potentialTarget, "*") && startsWith(moduleName, potentialTarget.substring(0, potentialTarget.length - 1))) {
|
||||
const target = (lookupTable as { [idx: string]: unknown; })[potentialTarget];
|
||||
const target = (lookupTable as MapLike<unknown>)[potentialTarget];
|
||||
const subpath = moduleName.substring(potentialTarget.length - 1);
|
||||
return loadModuleFromTargetImportOrExport(target, subpath, /*pattern*/ true, potentialTarget);
|
||||
return loadModuleFromTargetExportOrImport(target, subpath, /*pattern*/ true, potentialTarget);
|
||||
}
|
||||
else if (startsWith(moduleName, potentialTarget)) {
|
||||
const target = (lookupTable as { [idx: string]: unknown; })[potentialTarget];
|
||||
const target = (lookupTable as MapLike<unknown>)[potentialTarget];
|
||||
const subpath = moduleName.substring(potentialTarget.length);
|
||||
return loadModuleFromTargetImportOrExport(target, subpath, /*pattern*/ false, potentialTarget);
|
||||
return loadModuleFromTargetExportOrImport(target, subpath, /*pattern*/ false, potentialTarget);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2736,9 +2742,9 @@ function hasOneAsterisk(patternKey: string): boolean {
|
||||
/**
|
||||
* Gets the self-recursive function specialized to retrieving the targeted import/export element for the given resolution configuration
|
||||
*/
|
||||
function getLoadModuleFromTargetImportOrExport(extensions: Extensions, state: ModuleResolutionState, cache: ModuleResolutionCache | undefined, redirectedReference: ResolvedProjectReference | undefined, moduleName: string, scope: PackageJsonInfo, isImports: boolean) {
|
||||
return loadModuleFromTargetImportOrExport;
|
||||
function loadModuleFromTargetImportOrExport(target: unknown, subpath: string, pattern: boolean, key: string): SearchResult<Resolved> | undefined {
|
||||
function getLoadModuleFromTargetExportOrImport(extensions: Extensions, state: ModuleResolutionState, cache: ModuleResolutionCache | undefined, redirectedReference: ResolvedProjectReference | undefined, moduleName: string, scope: PackageJsonInfo, isImports: boolean) {
|
||||
return loadModuleFromTargetExportOrImport;
|
||||
function loadModuleFromTargetExportOrImport(target: unknown, subpath: string, pattern: boolean, key: string): SearchResult<Resolved> | undefined {
|
||||
if (typeof target === "string") {
|
||||
if (!pattern && subpath.length > 0 && !endsWith(target, "/")) {
|
||||
if (state.traceEnabled) {
|
||||
@@ -2801,7 +2807,7 @@ function getLoadModuleFromTargetImportOrExport(extensions: Extensions, state: Mo
|
||||
if (condition === "default" || state.conditions.includes(condition) || isApplicableVersionedTypesKey(state.conditions, condition)) {
|
||||
traceIfEnabled(state, Diagnostics.Matched_0_condition_1, isImports ? "imports" : "exports", condition);
|
||||
const subTarget = (target as MapLike<unknown>)[condition];
|
||||
const result = loadModuleFromTargetImportOrExport(subTarget, subpath, pattern, key);
|
||||
const result = loadModuleFromTargetExportOrImport(subTarget, subpath, pattern, key);
|
||||
if (result) {
|
||||
traceIfEnabled(state, Diagnostics.Resolved_under_condition_0, condition);
|
||||
traceIfEnabled(state, Diagnostics.Exiting_conditional_exports);
|
||||
@@ -2826,7 +2832,7 @@ function getLoadModuleFromTargetImportOrExport(extensions: Extensions, state: Mo
|
||||
return toSearchResult(/*value*/ undefined);
|
||||
}
|
||||
for (const elem of target) {
|
||||
const result = loadModuleFromTargetImportOrExport(elem, subpath, pattern, key);
|
||||
const result = loadModuleFromTargetExportOrImport(elem, subpath, pattern, key);
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -508,46 +508,44 @@ function computeModuleSpecifiers(
|
||||
}
|
||||
}
|
||||
|
||||
if (!specifier) {
|
||||
const local = getLocalModuleSpecifier(
|
||||
modulePath.path,
|
||||
info,
|
||||
compilerOptions,
|
||||
host,
|
||||
options.overrideImportMode || importingSourceFile.impliedNodeFormat,
|
||||
preferences,
|
||||
/*pathsOnly*/ modulePath.isRedirect,
|
||||
);
|
||||
if (!local || forAutoImport && isExcludedByRegex(local, preferences.excludeRegexes)) {
|
||||
continue;
|
||||
}
|
||||
if (modulePath.isRedirect) {
|
||||
redirectPathsSpecifiers = append(redirectPathsSpecifiers, local);
|
||||
}
|
||||
else if (pathIsBareSpecifier(local)) {
|
||||
if (pathContainsNodeModules(local)) {
|
||||
// We could be in this branch due to inappropriate use of `baseUrl`, not intentional `paths`
|
||||
// usage. It's impossible to reason about where to prioritize baseUrl-generated module
|
||||
// specifiers, but if they contain `/node_modules/`, they're going to trigger a portability
|
||||
// error, so *at least* don't prioritize those.
|
||||
relativeSpecifiers = append(relativeSpecifiers, local);
|
||||
}
|
||||
else {
|
||||
pathsSpecifiers = append(pathsSpecifiers, local);
|
||||
}
|
||||
}
|
||||
else if (forAutoImport || !importedFileIsInNodeModules || modulePath.isInNodeModules) {
|
||||
// Why this extra conditional, not just an `else`? If some path to the file contained
|
||||
// 'node_modules', but we can't create a non-relative specifier (e.g. "@foo/bar/path/to/file"),
|
||||
// that means we had to go through a *sibling's* node_modules, not one we can access directly.
|
||||
// If some path to the file was in node_modules but another was not, this likely indicates that
|
||||
// we have a monorepo structure with symlinks. In this case, the non-node_modules path is
|
||||
// probably the realpath, e.g. "../bar/path/to/file", but a relative path to another package
|
||||
// in a monorepo is probably not portable. So, the module specifier we actually go with will be
|
||||
// the relative path through node_modules, so that the declaration emitter can produce a
|
||||
// portability error. (See declarationEmitReexportedSymlinkReference3)
|
||||
const local = getLocalModuleSpecifier(
|
||||
modulePath.path,
|
||||
info,
|
||||
compilerOptions,
|
||||
host,
|
||||
options.overrideImportMode || importingSourceFile.impliedNodeFormat,
|
||||
preferences,
|
||||
/*pathsOnly*/ modulePath.isRedirect || !!specifier,
|
||||
);
|
||||
if (!local || forAutoImport && isExcludedByRegex(local, preferences.excludeRegexes)) {
|
||||
continue;
|
||||
}
|
||||
if (modulePath.isRedirect) {
|
||||
redirectPathsSpecifiers = append(redirectPathsSpecifiers, local);
|
||||
}
|
||||
else if (pathIsBareSpecifier(local)) {
|
||||
if (pathContainsNodeModules(local)) {
|
||||
// We could be in this branch due to inappropriate use of `baseUrl`, not intentional `paths`
|
||||
// usage. It's impossible to reason about where to prioritize baseUrl-generated module
|
||||
// specifiers, but if they contain `/node_modules/`, they're going to trigger a portability
|
||||
// error, so *at least* don't prioritize those.
|
||||
relativeSpecifiers = append(relativeSpecifiers, local);
|
||||
}
|
||||
else {
|
||||
pathsSpecifiers = append(pathsSpecifiers, local);
|
||||
}
|
||||
}
|
||||
else if (forAutoImport || !importedFileIsInNodeModules || modulePath.isInNodeModules) {
|
||||
// Why this extra conditional, not just an `else`? If some path to the file contained
|
||||
// 'node_modules', but we can't create a non-relative specifier (e.g. "@foo/bar/path/to/file"),
|
||||
// that means we had to go through a *sibling's* node_modules, not one we can access directly.
|
||||
// If some path to the file was in node_modules but another was not, this likely indicates that
|
||||
// we have a monorepo structure with symlinks. In this case, the non-node_modules path is
|
||||
// probably the realpath, e.g. "../bar/path/to/file", but a relative path to another package
|
||||
// in a monorepo is probably not portable. So, the module specifier we actually go with will be
|
||||
// the relative path through node_modules, so that the declaration emitter can produce a
|
||||
// portability error. (See declarationEmitReexportedSymlinkReference3)
|
||||
relativeSpecifiers = append(relativeSpecifiers, local);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -613,7 +611,7 @@ function getLocalModuleSpecifier(moduleFileName: string, info: Info, compilerOpt
|
||||
prefersTsExtension(allowedEndings),
|
||||
);
|
||||
|
||||
const fromPaths = pathsOnly || fromPackageJsonImports === undefined ? paths && tryGetModuleNameFromPaths(relativeToBaseUrl, paths, allowedEndings, host, compilerOptions) : undefined;
|
||||
const fromPaths = pathsOnly || fromPackageJsonImports === undefined ? paths && tryGetModuleNameFromPaths(relativeToBaseUrl, paths, allowedEndings, baseDirectory, getCanonicalFileName, host, compilerOptions) : undefined;
|
||||
if (pathsOnly) {
|
||||
return fromPaths;
|
||||
}
|
||||
@@ -925,10 +923,11 @@ function tryGetModuleNameFromAmbientModule(moduleSymbol: Symbol, checker: TypeCh
|
||||
}
|
||||
}
|
||||
|
||||
function tryGetModuleNameFromPaths(relativeToBaseUrl: string, paths: MapLike<readonly string[]>, allowedEndings: ModuleSpecifierEnding[], host: ModuleSpecifierResolutionHost, compilerOptions: CompilerOptions): string | undefined {
|
||||
function tryGetModuleNameFromPaths(relativeToBaseUrl: string, paths: MapLike<readonly string[]>, allowedEndings: ModuleSpecifierEnding[], baseDirectory: string, getCanonicalFileName: GetCanonicalFileName, host: ModuleSpecifierResolutionHost, compilerOptions: CompilerOptions): string | undefined {
|
||||
for (const key in paths) {
|
||||
for (const patternText of paths[key]) {
|
||||
const pattern = normalizePath(patternText);
|
||||
const normalized = normalizePath(patternText);
|
||||
const pattern = getRelativePathIfInSameVolume(normalized, baseDirectory, getCanonicalFileName) ?? normalized;
|
||||
const indexOfStar = pattern.indexOf("*");
|
||||
// In module resolution, if `pattern` itself has an extension, a file with that extension is looked up directly,
|
||||
// meaning a '.ts' or '.d.ts' extension is allowed to resolve. This is distinct from the case where a '*' substitution
|
||||
@@ -1290,6 +1289,8 @@ function tryGetModuleNameAsNodeModule({ path, isRedirect }: ModulePath, { getCan
|
||||
subModuleName,
|
||||
versionPaths.paths,
|
||||
allowedEndings,
|
||||
packageRootPath,
|
||||
getCanonicalFileName,
|
||||
host,
|
||||
options,
|
||||
);
|
||||
|
||||
@@ -2779,10 +2779,12 @@ namespace Parser {
|
||||
case SyntaxKind.DefaultKeyword:
|
||||
return nextTokenCanFollowDefaultKeyword();
|
||||
case SyntaxKind.StaticKeyword:
|
||||
nextToken();
|
||||
return canFollowModifier();
|
||||
case SyntaxKind.GetKeyword:
|
||||
case SyntaxKind.SetKeyword:
|
||||
nextToken();
|
||||
return canFollowModifier();
|
||||
return canFollowGetOrSetKeyword();
|
||||
default:
|
||||
return nextTokenIsOnSameLineAndCanFollowModifier();
|
||||
}
|
||||
@@ -2813,6 +2815,11 @@ namespace Parser {
|
||||
|| isLiteralPropertyName();
|
||||
}
|
||||
|
||||
function canFollowGetOrSetKeyword(): boolean {
|
||||
return token() === SyntaxKind.OpenBracketToken
|
||||
|| isLiteralPropertyName();
|
||||
}
|
||||
|
||||
function nextTokenCanFollowDefaultKeyword(): boolean {
|
||||
nextToken();
|
||||
return token() === SyntaxKind.ClassKeyword
|
||||
|
||||
@@ -772,7 +772,7 @@ export function createGetIsolatedDeclarationErrors(resolver: EmitResolver): (nod
|
||||
return createExpressionError(node.initializer);
|
||||
}
|
||||
const message = addUndefined ?
|
||||
Diagnostics.Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_supported_with_isolatedDeclarations :
|
||||
Diagnostics.Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_supported_with_isolatedDeclarations :
|
||||
errorByDeclarationKind[node.kind];
|
||||
const diag = createDiagnosticForNode(node, message);
|
||||
const targetStr = getTextOfNode(node.name, /*includeTrivia*/ false);
|
||||
|
||||
@@ -686,7 +686,7 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc
|
||||
let shouldTransformPrivateStaticElementsInClass = false;
|
||||
|
||||
// 1. Class decorators are evaluated outside of the private name scope of the class.
|
||||
const classDecorators = transformAllDecoratorsOfDeclaration(getAllDecoratorsOfClass(node));
|
||||
const classDecorators = transformAllDecoratorsOfDeclaration(getAllDecoratorsOfClass(node, /*useLegacyDecorators*/ false));
|
||||
if (classDecorators) {
|
||||
// - Since class decorators don't have privileged access to private names defined inside the class,
|
||||
// they must be evaluated outside of the class body.
|
||||
|
||||
@@ -679,7 +679,7 @@ export function transformLegacyDecorators(context: TransformationContext): (x: S
|
||||
* @param node The class node.
|
||||
*/
|
||||
function generateConstructorDecorationExpression(node: ClassExpression | ClassDeclaration) {
|
||||
const allDecorators = getAllDecoratorsOfClass(node);
|
||||
const allDecorators = getAllDecoratorsOfClass(node, /*useLegacyDecorators*/ true);
|
||||
const decoratorExpressions = transformAllDecoratorsOfDeclaration(allDecorators);
|
||||
if (!decoratorExpressions) {
|
||||
return undefined;
|
||||
|
||||
@@ -679,9 +679,9 @@ function getDecoratorsOfParameters(node: FunctionLikeDeclaration | undefined) {
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
export function getAllDecoratorsOfClass(node: ClassLikeDeclaration): AllDecorators | undefined {
|
||||
export function getAllDecoratorsOfClass(node: ClassLikeDeclaration, useLegacyDecorators: boolean): AllDecorators | undefined {
|
||||
const decorators = getDecorators(node);
|
||||
const parameters = getDecoratorsOfParameters(getFirstConstructorWithBody(node));
|
||||
const parameters = useLegacyDecorators ? getDecoratorsOfParameters(getFirstConstructorWithBody(node)) : undefined;
|
||||
if (!some(decorators) && !some(parameters)) {
|
||||
return undefined;
|
||||
}
|
||||
@@ -705,12 +705,12 @@ export function getAllDecoratorsOfClassElement(member: ClassElement, parent: Cla
|
||||
case SyntaxKind.GetAccessor:
|
||||
case SyntaxKind.SetAccessor:
|
||||
if (!useLegacyDecorators) {
|
||||
return getAllDecoratorsOfMethod(member as AccessorDeclaration);
|
||||
return getAllDecoratorsOfMethod(member as AccessorDeclaration, /*useLegacyDecorators*/ false);
|
||||
}
|
||||
return getAllDecoratorsOfAccessors(member as AccessorDeclaration, parent);
|
||||
return getAllDecoratorsOfAccessors(member as AccessorDeclaration, parent, /*useLegacyDecorators*/ true);
|
||||
|
||||
case SyntaxKind.MethodDeclaration:
|
||||
return getAllDecoratorsOfMethod(member as MethodDeclaration);
|
||||
return getAllDecoratorsOfMethod(member as MethodDeclaration, useLegacyDecorators);
|
||||
|
||||
case SyntaxKind.PropertyDeclaration:
|
||||
return getAllDecoratorsOfProperty(member as PropertyDeclaration);
|
||||
@@ -726,7 +726,7 @@ export function getAllDecoratorsOfClassElement(member: ClassElement, parent: Cla
|
||||
* @param parent The class node that contains the accessor.
|
||||
* @param accessor The class accessor member.
|
||||
*/
|
||||
function getAllDecoratorsOfAccessors(accessor: AccessorDeclaration, parent: ClassExpression | ClassDeclaration): AllDecorators | undefined {
|
||||
function getAllDecoratorsOfAccessors(accessor: AccessorDeclaration, parent: ClassExpression | ClassDeclaration, useLegacyDecorators: boolean): AllDecorators | undefined {
|
||||
if (!accessor.body) {
|
||||
return undefined;
|
||||
}
|
||||
@@ -741,7 +741,7 @@ function getAllDecoratorsOfAccessors(accessor: AccessorDeclaration, parent: Clas
|
||||
}
|
||||
|
||||
const decorators = getDecorators(firstAccessorWithDecorators);
|
||||
const parameters = getDecoratorsOfParameters(setAccessor);
|
||||
const parameters = useLegacyDecorators ? getDecoratorsOfParameters(setAccessor) : undefined;
|
||||
if (!some(decorators) && !some(parameters)) {
|
||||
return undefined;
|
||||
}
|
||||
@@ -759,13 +759,13 @@ function getAllDecoratorsOfAccessors(accessor: AccessorDeclaration, parent: Clas
|
||||
*
|
||||
* @param method The class method member.
|
||||
*/
|
||||
function getAllDecoratorsOfMethod(method: MethodDeclaration | AccessorDeclaration): AllDecorators | undefined {
|
||||
function getAllDecoratorsOfMethod(method: MethodDeclaration | AccessorDeclaration, useLegacyDecorators: boolean): AllDecorators | undefined {
|
||||
if (!method.body) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const decorators = getDecorators(method);
|
||||
const parameters = getDecoratorsOfParameters(method);
|
||||
const parameters = useLegacyDecorators ? getDecoratorsOfParameters(method) : undefined;
|
||||
if (!some(decorators) && !some(parameters)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -6016,7 +6016,6 @@ export interface SymbolLinks {
|
||||
exportsChecked?: boolean; // True if exports of external module have been checked
|
||||
typeParametersChecked?: boolean; // True if type parameters of merged class and interface declarations have been checked.
|
||||
isDeclarationWithCollidingName?: boolean; // True if symbol is block scoped redeclaration
|
||||
bindingElement?: BindingElement; // Binding element associated with property symbol
|
||||
originatingImport?: ImportDeclaration | ImportCall; // Import declaration which produced the symbol, present if the symbol is marked as uncallable but had call signatures in `resolveESModuleSymbol`
|
||||
lateSymbol?: Symbol; // Late-bound symbol for a computed property
|
||||
specifierCache?: Map<ModeAwareCacheKey, string>; // For symbols corresponding to external modules, a cache of incoming path -> module specifier name mappings
|
||||
@@ -9981,6 +9980,12 @@ export interface TextChangeRange {
|
||||
newLength: number;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export interface ErrorOutputContainer {
|
||||
errors?: Diagnostic[];
|
||||
skipLogging?: boolean;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export interface DiagnosticCollection {
|
||||
// Adds a diagnostic to this diagnostic collection.
|
||||
|
||||
@@ -201,6 +201,7 @@ import {
|
||||
getParseTreeNode,
|
||||
getPathComponents,
|
||||
getPathFromPathComponents,
|
||||
getRelativePathFromDirectory,
|
||||
getRelativePathToDirectoryOrUrl,
|
||||
getResolutionModeOverride,
|
||||
getRootLength,
|
||||
@@ -498,6 +499,7 @@ import {
|
||||
ResolvedModuleWithFailedLookupLocations,
|
||||
ResolvedTypeReferenceDirective,
|
||||
ResolvedTypeReferenceDirectiveWithFailedLookupLocations,
|
||||
resolvePath,
|
||||
returnFalse,
|
||||
ReturnStatement,
|
||||
returnUndefined,
|
||||
@@ -6064,7 +6066,7 @@ export function hasInvalidEscape(template: TemplateLiteral): boolean {
|
||||
const doubleQuoteEscapedCharsRegExp = /[\\"\u0000-\u001f\u2028\u2029\u0085]/g;
|
||||
const singleQuoteEscapedCharsRegExp = /[\\'\u0000-\u001f\u2028\u2029\u0085]/g;
|
||||
// Template strings preserve simple LF newlines, still encode CRLF (or CR)
|
||||
const backtickQuoteEscapedCharsRegExp = /\r\n|[\\`\u0000-\u001f\u2028\u2029\u0085]/g;
|
||||
const backtickQuoteEscapedCharsRegExp = /\r\n|[\\`\u0000-\u0009\u000b-\u001f\u2028\u2029\u0085]/g;
|
||||
const escapedCharsMap = new Map(Object.entries({
|
||||
"\t": "\\t",
|
||||
"\v": "\\v",
|
||||
@@ -6490,6 +6492,21 @@ export function getPossibleOriginalInputExtensionForExtension(path: string): Ext
|
||||
[Extension.Tsx, Extension.Ts, Extension.Jsx, Extension.Js];
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export function getPossibleOriginalInputPathWithoutChangingExt(
|
||||
filePath: string,
|
||||
ignoreCase: boolean,
|
||||
outputDir: string | undefined,
|
||||
getCommonSourceDirectory: () => string,
|
||||
): string {
|
||||
return outputDir ?
|
||||
resolvePath(
|
||||
getCommonSourceDirectory(),
|
||||
getRelativePathFromDirectory(outputDir, filePath, ignoreCase),
|
||||
) :
|
||||
filePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns 'undefined' if and only if 'options.paths' is undefined.
|
||||
*
|
||||
@@ -8193,15 +8210,11 @@ export function getLastChild(node: Node): Node | undefined {
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
export function addToSeen<K>(seen: Map<K, true>, key: K): boolean;
|
||||
/** @internal */
|
||||
export function addToSeen<K, T>(seen: Map<K, T>, key: K, value: T): boolean;
|
||||
/** @internal */
|
||||
export function addToSeen<K, T>(seen: Map<K, T>, key: K, value: T = true as any): boolean {
|
||||
export function addToSeen<K>(seen: Set<K>, key: K): boolean {
|
||||
if (seen.has(key)) {
|
||||
return false;
|
||||
}
|
||||
seen.set(key, value);
|
||||
seen.add(key);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -3069,7 +3069,7 @@ export class TestState {
|
||||
private verifyFileContent(fileName: string, text: string) {
|
||||
const actual = this.getFileContent(fileName);
|
||||
if (actual !== text) {
|
||||
throw new Error(`verifyFileContent failed:\n${showTextDiff(text, actual)}`);
|
||||
throw new Error(`verifyFileContent in file '${fileName}' failed:\n${showTextDiff(text, actual)}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3404,10 +3404,11 @@ export class TestState {
|
||||
return ts.first(ranges);
|
||||
}
|
||||
|
||||
private verifyTextMatches(actualText: string, includeWhitespace: boolean, expectedText: string) {
|
||||
private verifyTextMatches(actualText: string, includeWhitespace: boolean, expectedText: string, fileName?: string) {
|
||||
const removeWhitespace = (s: string): string => includeWhitespace ? s : this.removeWhitespace(s);
|
||||
if (removeWhitespace(actualText) !== removeWhitespace(expectedText)) {
|
||||
this.raiseError(`Actual range text doesn't match expected text.\n${showTextDiff(expectedText, actualText)}`);
|
||||
const addFileName = fileName ? ` in file '${fileName}'` : "";
|
||||
this.raiseError(`Actual range text${addFileName} doesn't match expected text.\n${showTextDiff(expectedText, actualText)}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3485,7 +3486,7 @@ export class TestState {
|
||||
const newText = ts.textChanges.applyChanges(this.getFileContent(this.activeFile.fileName), change.textChanges);
|
||||
const newRange = updateTextRangeForTextChanges(this.getOnlyRange(this.activeFile.fileName), change.textChanges);
|
||||
const actualText = newText.slice(newRange.pos, newRange.end);
|
||||
this.verifyTextMatches(actualText, /*includeWhitespace*/ true, newRangeContent);
|
||||
this.verifyTextMatches(actualText, /*includeWhitespace*/ true, newRangeContent, change.fileName);
|
||||
}
|
||||
else {
|
||||
if (newFileContent === undefined) throw ts.Debug.fail();
|
||||
@@ -3497,7 +3498,7 @@ export class TestState {
|
||||
}
|
||||
const oldText = this.tryGetFileContent(change.fileName);
|
||||
const newContent = change.isNewFile ? ts.first(change.textChanges).newText : ts.textChanges.applyChanges(oldText!, change.textChanges);
|
||||
this.verifyTextMatches(newContent, /*includeWhitespace*/ true, expectedNewContent);
|
||||
this.verifyTextMatches(newContent, /*includeWhitespace*/ true, expectedNewContent, change.fileName);
|
||||
}
|
||||
for (const newFileName in newFileContent) {
|
||||
ts.Debug.assert(changes.some(c => c.fileName === newFileName), "No change in file", () => newFileName);
|
||||
|
||||
@@ -1148,7 +1148,7 @@ export class FileSystem {
|
||||
for (const key of Object.keys(files)) {
|
||||
const value = normalizeFileSetEntry(files[key]);
|
||||
const path = dirname ? vpath.resolve(dirname, key) : key;
|
||||
vpath.validate(path, vpath.ValidationFlags.Absolute);
|
||||
vpath.validate(path, vpath.ValidationFlags.Absolute | vpath.ValidationFlags.AllowWildcard);
|
||||
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
if (value === null || value === undefined || value instanceof Rmdir || value instanceof Unlink) {
|
||||
|
||||
Vendored
+13
-15
@@ -92,9 +92,9 @@ interface ClassMethodDecoratorContext<
|
||||
};
|
||||
|
||||
/**
|
||||
* Adds a callback to be invoked either before static initializers are run (when
|
||||
* decorating a `static` element), or before instance initializers are run (when
|
||||
* decorating a non-`static` element).
|
||||
* Adds a callback to be invoked either after static methods are defined but before
|
||||
* static initializers are run (when decorating a `static` element), or before instance
|
||||
* initializers are run (when decorating a non-`static` element).
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
@@ -158,9 +158,9 @@ interface ClassGetterDecoratorContext<
|
||||
};
|
||||
|
||||
/**
|
||||
* Adds a callback to be invoked either before static initializers are run (when
|
||||
* decorating a `static` element), or before instance initializers are run (when
|
||||
* decorating a non-`static` element).
|
||||
* Adds a callback to be invoked either after static methods are defined but before
|
||||
* static initializers are run (when decorating a `static` element), or before instance
|
||||
* initializers are run (when decorating a non-`static` element).
|
||||
*/
|
||||
addInitializer(initializer: (this: This) => void): void;
|
||||
|
||||
@@ -205,9 +205,9 @@ interface ClassSetterDecoratorContext<
|
||||
};
|
||||
|
||||
/**
|
||||
* Adds a callback to be invoked either before static initializers are run (when
|
||||
* decorating a `static` element), or before instance initializers are run (when
|
||||
* decorating a non-`static` element).
|
||||
* Adds a callback to be invoked either after static methods are defined but before
|
||||
* static initializers are run (when decorating a `static` element), or before instance
|
||||
* initializers are run (when decorating a non-`static` element).
|
||||
*/
|
||||
addInitializer(initializer: (this: This) => void): void;
|
||||
|
||||
@@ -261,9 +261,8 @@ interface ClassAccessorDecoratorContext<
|
||||
};
|
||||
|
||||
/**
|
||||
* Adds a callback to be invoked either before static initializers are run (when
|
||||
* decorating a `static` element), or before instance initializers are run (when
|
||||
* decorating a non-`static` element).
|
||||
* Adds a callback to be invoked immediately after the auto `accessor` being
|
||||
* decorated is initialized (regardless if the `accessor` is `static` or not).
|
||||
*/
|
||||
addInitializer(initializer: (this: This) => void): void;
|
||||
|
||||
@@ -358,9 +357,8 @@ interface ClassFieldDecoratorContext<
|
||||
};
|
||||
|
||||
/**
|
||||
* Adds a callback to be invoked either before static initializers are run (when
|
||||
* decorating a `static` element), or before instance initializers are run (when
|
||||
* decorating a non-`static` element).
|
||||
* Adds a callback to be invoked immediately after the field being decorated
|
||||
* is initialized (regardless if the field is `static` or not).
|
||||
*/
|
||||
addInitializer(initializer: (this: This) => void): void;
|
||||
|
||||
|
||||
Vendored
+2
@@ -373,6 +373,7 @@ interface BigInt64ArrayConstructor {
|
||||
new (length?: number): BigInt64Array<ArrayBuffer>;
|
||||
new (array: ArrayLike<bigint> | Iterable<bigint>): BigInt64Array<ArrayBuffer>;
|
||||
new <TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer, byteOffset?: number, length?: number): BigInt64Array<TArrayBuffer>;
|
||||
new (array: ArrayLike<bigint> | ArrayBuffer): BigInt64Array<ArrayBuffer>;
|
||||
|
||||
/** The size in bytes of each element in the array. */
|
||||
readonly BYTES_PER_ELEMENT: number;
|
||||
@@ -649,6 +650,7 @@ interface BigUint64ArrayConstructor {
|
||||
new (length?: number): BigUint64Array<ArrayBuffer>;
|
||||
new (array: ArrayLike<bigint> | Iterable<bigint>): BigUint64Array<ArrayBuffer>;
|
||||
new <TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer, byteOffset?: number, length?: number): BigUint64Array<TArrayBuffer>;
|
||||
new (array: ArrayLike<bigint> | ArrayBuffer): BigUint64Array<ArrayBuffer>;
|
||||
|
||||
/** The size in bytes of each element in the array. */
|
||||
readonly BYTES_PER_ELEMENT: number;
|
||||
|
||||
Vendored
+1
-1
@@ -28,7 +28,7 @@ interface SharedArrayBuffer {
|
||||
*
|
||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/growable)
|
||||
*/
|
||||
get growable(): number;
|
||||
get growable(): boolean;
|
||||
|
||||
/**
|
||||
* If this SharedArrayBuffer is growable, returns the maximum byte length given during construction; returns the byte length if not.
|
||||
|
||||
@@ -2784,11 +2784,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[At least one accessor must have an explicit return type annotation with --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[At least one accessor must have an explicit type annotation with --isolatedDeclarations.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[至少一个访问器必须具有带有 --isolatedDeclarations 的显式返回类型注释。]]></Val>
|
||||
<Val><![CDATA[至少一个访问器必须具有带有 --isolatedDeclarations 的显式类型注释。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -5040,11 +5040,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_su_9025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_sup_9025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declaration emit for this parameter requires implicitly adding undefined to it's type. This is not supported with --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[为此参数发出的声明要求隐式添加未定义的类型。--isolatedDeclarations 不支持此功能。]]></Val>
|
||||
<Val><![CDATA[为此参数发出的声明要求将未定义隐式添加到其类型。--isolatedDeclarations 不支持此功能。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -7884,11 +7884,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation_7025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation.]]></Val>
|
||||
<Val><![CDATA[Generator implicitly has yield type '{0}'. Consider supplying a return type annotation.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[生成器隐式具有产出类型 "{0}" ,因为它不生成任何值。请考虑提供一个返回类型注释。]]></Val>
|
||||
<Val><![CDATA[生成器隐式具有 yield 类型 ‘{0}’。请考虑提供一个返回类型注释。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -8424,6 +8424,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_mod_1543" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Importing a JSON file into an ECMAScript module requires a 'type: "json"' import attribute when 'module' is set to '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[当 ‘module’ 设置为 ‘{0}’ 时,将 JSON 文件导入 ECMAScript 模块需要 ‘type: “json”’ 导入属性。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.]]></Val>
|
||||
@@ -9840,6 +9849,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0_1544" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Named imports from a JSON file into an ECMAScript module are not allowed when 'module' is set to '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[当 ‘module’ 设置为 ‘{0}’ 时,不允许从 JSON 文件到 ECMAScript 模块中的命名导入。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Named_property_0_of_types_1_and_2_are_not_identical_2319" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Named property '{0}' of types '{1}' and '{2}' are not identical.]]></Val>
|
||||
@@ -10602,15 +10620,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Option_tsBuildInfoFile_cannot_be_specified_without_specifying_option_incremental_or_composite_or_if__5111" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Option 'tsBuildInfoFile' cannot be specified without specifying option 'incremental' or 'composite' or if not running 'tsc -b'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[如果未指定选项“incremental”或“composite”或未运行“tsc -b”,则无法指定选项“tsBuildInfoFile”。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'.]]></Val>
|
||||
@@ -11539,7 +11548,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Property '{0}' cannot have an initializer because it is marked abstract.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[属性“{0}”不能具有初始化表杰式,因为它标记为摘要。]]></Val>
|
||||
<Val><![CDATA[属性“{0}”不能具有初始化表达式,因为它标记为摘要。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -13059,6 +13068,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_i_6421" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[将相对导入路径中的 ‘.ts’、‘.tsx’、‘.mts’ 和 ‘.cts’ 文件扩展名改写为其在输出文件中的 JavaScript 等效项。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish_2869" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Right operand of ?? is unreachable because the left operand is never nullish.]]></Val>
|
||||
@@ -15090,6 +15108,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found_2874" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag requires '{0}' to be in scope, but it could not be found.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[此 JSX 标记要求 ‘{0}’ 在范围内,但找不到它。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_fo_2875" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag requires the module path '{0}' to exist, but none could be found. Make sure you have types for the appropriate package installed.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[此 JSX 标记要求模块路径 ‘{0}’ 存在,但找不到任何路径。请确保已安装相应包的类型。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided.]]></Val>
|
||||
@@ -15243,6 +15279,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_b_2878" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is not the same as the relative path between its input files.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[重写此导入路径并不安全,因为它会解析为另一个项目,并且项目的输出文件之间的相对路径与其输入文件之间的相对路径不同。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_duri_2877" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This import uses a '{0}' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[此导入使用 ‘{0}’ 扩展解析为输入 TypeScript 文件,但不会在发出期间重写,因为它不是相对路径。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This is the declaration being augmented. Consider moving the augmenting declaration into the same file.]]></Val>
|
||||
@@ -15450,6 +15504,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolv_2876" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to "{0}".]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[重写此相对导入路径并不安全,因为它看起来像文件名,但实际上解析为 ‘{0}’。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_spread_always_overwrites_this_property_2785" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This spread always overwrites this property.]]></Val>
|
||||
@@ -17025,6 +17088,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found_2879" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[使用 JSX 片段需要片段工厂 ‘{0}’ 在范围内,但找不到它。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher.]]></Val>
|
||||
|
||||
@@ -2784,11 +2784,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[At least one accessor must have an explicit return type annotation with --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[At least one accessor must have an explicit type annotation with --isolatedDeclarations.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[至少一個存取子必須有具備 --isolatedDeclarations 的明確傳回類型註解。]]></Val>
|
||||
<Val><![CDATA[至少一個存取子必須有具備 --isolatedDeclarations 的明確型別註釋。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -5040,11 +5040,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_su_9025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_sup_9025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declaration emit for this parameter requires implicitly adding undefined to it's type. This is not supported with --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[此參數發出的宣告需要隱含地新增未定義值至其類型。該情況不受 --isolatedDeclarations 支援。]]></Val>
|
||||
<Val><![CDATA[此參數發出的宣告需要隱含地新增未定義值至其類型。此情況不受 --isolatedDeclarations 支援。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -7884,11 +7884,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation_7025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation.]]></Val>
|
||||
<Val><![CDATA[Generator implicitly has yield type '{0}'. Consider supplying a return type annotation.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[因為產生器未產生任何值,所以其隱含產生類型 '{0}'。請考慮提供傳回型別註解。]]></Val>
|
||||
<Val><![CDATA[產生器隱含的 yield 類型為 '{0}'。請考慮提供傳回型別註解。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -8424,6 +8424,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_mod_1543" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Importing a JSON file into an ECMAScript module requires a 'type: "json"' import attribute when 'module' is set to '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[當 'module' 設定為 '{0}' 時,匯入 JSON 檔案至 ECMAScript 模組需要 'type: "json"' 匯入屬性。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.]]></Val>
|
||||
@@ -9840,6 +9849,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0_1544" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Named imports from a JSON file into an ECMAScript module are not allowed when 'module' is set to '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[當 'module' 設定為 '{0}' 時,不允許從 JSON 檔案具名匯入 ECMAScript 模組。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Named_property_0_of_types_1_and_2_are_not_identical_2319" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Named property '{0}' of types '{1}' and '{2}' are not identical.]]></Val>
|
||||
@@ -10602,15 +10620,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Option_tsBuildInfoFile_cannot_be_specified_without_specifying_option_incremental_or_composite_or_if__5111" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Option 'tsBuildInfoFile' cannot be specified without specifying option 'incremental' or 'composite' or if not running 'tsc -b'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[在未指定選項 'incremental' 或 'composite',或未執行 'tsc -b' 的情況下,無法指定選項 'tsBuildInfoFile'。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'.]]></Val>
|
||||
@@ -13059,6 +13068,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_i_6421" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[將相對匯入路徑中的 '.ts'、'.tsx'、'.mts'、'.cts' 檔案副檔名重寫為輸出檔案中的 JavaScript 對應檔名。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish_2869" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Right operand of ?? is unreachable because the left operand is never nullish.]]></Val>
|
||||
@@ -15090,6 +15108,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found_2874" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag requires '{0}' to be in scope, but it could not be found.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[此 JSX 標籤需要 '{0}' 在範圍內,但無法找到。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_fo_2875" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag requires the module path '{0}' to exist, but none could be found. Make sure you have types for the appropriate package installed.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[此 JSX 標籤需要模組路徑 '{0}' 存在,但無法找到。請確定您已安裝適當的套件類型。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided.]]></Val>
|
||||
@@ -15243,6 +15279,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_b_2878" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is not the same as the relative path between its input files.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[重寫此匯入路徑並不安全,因為其解析到另一個專案,而專案輸出檔案之間的相對路徑與其輸入檔案之間的相對路徑不同。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_duri_2877" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This import uses a '{0}' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[這個匯入使用 '{0}' 副檔名來解析到輸入的 TypeScript 檔案,但在發出時不會重寫,因為其不是相對路徑。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This is the declaration being augmented. Consider moving the augmenting declaration into the same file.]]></Val>
|
||||
@@ -15450,6 +15504,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolv_2876" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to "{0}".]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[此相對匯入路徑在重寫時是不安全的,因為其看起來像檔案名稱,但實際上解析為 "{0}"。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_spread_always_overwrites_this_property_2785" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This spread always overwrites this property.]]></Val>
|
||||
@@ -17025,6 +17088,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found_2879" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[使用 JSX 片段需要片段中心 '{0}' 在範圍內,但無法找到。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher.]]></Val>
|
||||
|
||||
@@ -2793,11 +2793,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[At least one accessor must have an explicit return type annotation with --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[At least one accessor must have an explicit type annotation with --isolatedDeclarations.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Alespoň jeden přistupující objekt musí mít explicitní anotaci návratového typu s možností --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[Minimálně jeden přistupující objekt musí mít explicitní anotaci typu s možností --isolatedDeclarations.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -5049,11 +5049,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_su_9025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_sup_9025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declaration emit for this parameter requires implicitly adding undefined to it's type. This is not supported with --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Generování deklarace pro tento parametr vyžaduje implicitně přidání možnosti „undefined“ do jeho typu. Toto není podporováno s možností --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[Generování deklarace pro tento parametr vyžaduje implicitní přidání možnosti „undefined“ do jeho typu. Není podporováno s možností „--isolatedDeclarations“.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -7893,11 +7893,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation_7025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation.]]></Val>
|
||||
<Val><![CDATA[Generator implicitly has yield type '{0}'. Consider supplying a return type annotation.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Generátor má implicitně typ yield {0}, protože nevydává žádné hodnoty. Zvažte možnost přidat anotaci návratového typu.]]></Val>
|
||||
<Val><![CDATA[Generátor má implicitně typ yield {0}. Zvažte možnost přidat anotaci návratového typu.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -8433,6 +8433,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_mod_1543" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Importing a JSON file into an ECMAScript module requires a 'type: "json"' import attribute when 'module' is set to '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Import souboru JSON do modulu ECMAScript vyžaduje atribut importu type: "json", pokud je možnost module nastavená na {0}.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.]]></Val>
|
||||
@@ -9849,6 +9858,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0_1544" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Named imports from a JSON file into an ECMAScript module are not allowed when 'module' is set to '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Pojmenované importy ze souboru JSON do modulu ECMAScript nejsou povolené, když je možnost module nastavená na {0}.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Named_property_0_of_types_1_and_2_are_not_identical_2319" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Named property '{0}' of types '{1}' and '{2}' are not identical.]]></Val>
|
||||
@@ -10611,15 +10629,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Option_tsBuildInfoFile_cannot_be_specified_without_specifying_option_incremental_or_composite_or_if__5111" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Option 'tsBuildInfoFile' cannot be specified without specifying option 'incremental' or 'composite' or if not running 'tsc -b'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Možnost „tsBuildInfoFile“ nelze zadat bez zadání možnosti „incremental“ nebo „composite“ nebo pokud není spuštěno „tsc -b“.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'.]]></Val>
|
||||
@@ -13068,6 +13077,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_i_6421" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Přepište přípony souborů .ts, .tsx, .mts a .cts v relativních cestách importu na jejich javascriptový ekvivalent ve výstupních souborech.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish_2869" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Right operand of ?? is unreachable because the left operand is never nullish.]]></Val>
|
||||
@@ -15099,6 +15117,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found_2874" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag requires '{0}' to be in scope, but it could not be found.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Tato značka JSX vyžaduje, aby objekt pro vytváření fragmentů {0} byl v oboru, ale nepovedlo se ho najít.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_fo_2875" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag requires the module path '{0}' to exist, but none could be found. Make sure you have types for the appropriate package installed.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Tato značka JSX vyžaduje, aby existovala cesta k modulu {0}, ale žádná nebyla nalezena. Ujistěte se, že máte nainstalované typy pro příslušný balíček.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided.]]></Val>
|
||||
@@ -15252,6 +15288,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_b_2878" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is not the same as the relative path between its input files.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Přepsání této cesty importu není bezpečné, protože cesta se překládá na jiný projekt a relativní cesta mezi výstupními soubory projektů není stejná jako relativní cesta mezi příslušnými vstupními soubory.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_duri_2877" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This import uses a '{0}' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Tento import používá k překladu na vstupní soubor TypeScript rozšíření {0}, ale během generování se nepřepíše, protože se nejedná o relativní cestu.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This is the declaration being augmented. Consider moving the augmenting declaration into the same file.]]></Val>
|
||||
@@ -15459,6 +15513,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolv_2876" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to "{0}".]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Přepsání této relativní cesty importu není bezpečné, protože cesta vypadá jako název souboru, ale ve skutečnosti se překládá na {0}.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_spread_always_overwrites_this_property_2785" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This spread always overwrites this property.]]></Val>
|
||||
@@ -17034,6 +17097,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found_2879" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Použití fragmentů JSX vyžaduje, aby objekt pro vytváření fragmentů {0} byl v oboru, ale nepovedlo se ho najít.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher.]]></Val>
|
||||
|
||||
@@ -2781,11 +2781,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[At least one accessor must have an explicit return type annotation with --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[At least one accessor must have an explicit type annotation with --isolatedDeclarations.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Mindestens ein Accessor muss eine explizite Rückgabetypanmerkung mit "--isolatedDeclarations" aufweisen.]]></Val>
|
||||
<Val><![CDATA[Mindestens ein Accessor muss über eine explizite Typanmerkung mit „--isolatedDeclarations“ verfügen.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -5037,11 +5037,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_su_9025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_sup_9025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declaration emit for this parameter requires implicitly adding undefined to it's type. This is not supported with --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Die Deklarationsausgabe für diesen Parameter erfordert das implizit undefinierte Hinzufügen zum Typ. Dies wird mit "--isolatedDeclarations" nicht unterstützt.]]></Val>
|
||||
<Val><![CDATA[Die Deklarationsausgabe für diesen Parameter erfordert das implizit undefinierte Hinzufügen zum Typ. Dies wird mit „--isolatedDeclarations“ nicht unterstützt.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -7881,11 +7881,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation_7025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation.]]></Val>
|
||||
<Val><![CDATA[Generator implicitly has yield type '{0}'. Consider supplying a return type annotation.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Der Generator weist implizit den yield-Typ "{0}" auf, weil er keine Werte ausgibt. Erwägen Sie die Angabe einer Rückgabetypanmerkung.]]></Val>
|
||||
<Val><![CDATA[Der Generator hat implizit den Yield-Typ '{0}'. Erwägen Sie die Angabe eines Rückgabetyps.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -8421,6 +8421,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_mod_1543" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Importing a JSON file into an ECMAScript module requires a 'type: "json"' import attribute when 'module' is set to '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA["Das Importieren einer JSON-Datei in ein ECMAScript-Modul erfordert ein Importattribut 'type: "json"', wenn 'module' auf '{0}' gesetzt ist.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.]]></Val>
|
||||
@@ -9837,6 +9846,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0_1544" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Named imports from a JSON file into an ECMAScript module are not allowed when 'module' is set to '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Benannte Importe aus einer JSON-Datei in ein ECMAScript-Modul sind nicht erlaubt, wenn 'module' auf '{0}'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Named_property_0_of_types_1_and_2_are_not_identical_2319" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Named property '{0}' of types '{1}' and '{2}' are not identical.]]></Val>
|
||||
@@ -10599,15 +10617,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Option_tsBuildInfoFile_cannot_be_specified_without_specifying_option_incremental_or_composite_or_if__5111" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Option 'tsBuildInfoFile' cannot be specified without specifying option 'incremental' or 'composite' or if not running 'tsc -b'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Die Option "tsBuildInfoFile" kann nicht angegeben werden, ohne die Option "incremental" oder "composite" anzugeben oder "tsc -b" auszuführen.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'.]]></Val>
|
||||
@@ -13053,6 +13062,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_i_6421" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Schreiben Sie die Dateiendungen '.ts', '.tsx', '.mts' und '.cts' in relativen Importpfaden in ihren JavaScript-Äquivalenten in den Ausgabedateien um.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish_2869" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Right operand of ?? is unreachable because the left operand is never nullish.]]></Val>
|
||||
@@ -15084,6 +15102,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found_2874" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag requires '{0}' to be in scope, but it could not be found.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Dieses JSX-Tag erfordert, dass '{0}' im Geltungsbereich ist, konnte jedoch nicht gefunden werden.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_fo_2875" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag requires the module path '{0}' to exist, but none could be found. Make sure you have types for the appropriate package installed.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Für dieses JSX-Tag muss der Modulpfad '{0}' vorhanden sein, aber es wurde keiner gefunden. Stellen Sie sicher, dass die Typen für das entsprechende Paket installiert sind.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided.]]></Val>
|
||||
@@ -15237,6 +15273,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_b_2878" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is not the same as the relative path between its input files.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Dieser Importpfad ist unsicher umzuschreiben, da er auf ein anderes Projekt verweist und der relative Pfad zwischen den Ausgabedateien der Projekte nicht derselbe ist wie der relative Pfad zwischen den Eingabedateien.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_duri_2877" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This import uses a '{0}' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Dieser Import verwendet eine '{0}' Erweiterung, um auf eine TypeScript-Eingabedatei zu verweisen, wird jedoch beim Ausgeben nicht umgeschrieben, da es sich nicht um einen relativen Pfad handelt.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This is the declaration being augmented. Consider moving the augmenting declaration into the same file.]]></Val>
|
||||
@@ -15444,6 +15498,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolv_2876" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to "{0}".]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Dieser relative Importpfad ist unsicher umzuschreiben, da er wie ein Dateiname aussieht, aber tatsächlich auf "{0}" verweist.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_spread_always_overwrites_this_property_2785" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This spread always overwrites this property.]]></Val>
|
||||
@@ -17019,6 +17082,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found_2879" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Die Verwendung von JSX-Fragmenten erfordert, dass die Fragmentfabrik '{0}' im Geltungsbereich ist, aber sie konnte nicht gefunden werden.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher.]]></Val>
|
||||
|
||||
@@ -2796,11 +2796,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[At least one accessor must have an explicit return type annotation with --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[At least one accessor must have an explicit type annotation with --isolatedDeclarations.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Al menos un descriptor de acceso debe tener una anotación de tipo de valor devuelto explícita con --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[Al menos un descriptor de acceso debe tener una anotación de tipo explícita con --isolatedDeclarations.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -5052,9 +5052,9 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_su_9025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_sup_9025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declaration emit for this parameter requires implicitly adding undefined to it's type. This is not supported with --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[La emisión de declaración para este parámetro requiere agregar implícitamente un elemento no definido a su tipo. Esto no se admite con --isolatedDeclarations.]]></Val>
|
||||
</Tgt>
|
||||
@@ -7896,11 +7896,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation_7025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation.]]></Val>
|
||||
<Val><![CDATA[Generator implicitly has yield type '{0}'. Consider supplying a return type annotation.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[El generador tiene el tipo yield "{0}" implícitamente porque no produce ningún valor. Considere la posibilidad de proporcionar una anotación de tipo de valor devuelto.]]></Val>
|
||||
<Val><![CDATA[El generador tiene implícitamente el tipo de retorno "{0}". Considere la posibilidad de proporcionar una anotación de tipo de valor devuelto.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -8436,6 +8436,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_mod_1543" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Importing a JSON file into an ECMAScript module requires a 'type: "json"' import attribute when 'module' is set to '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[La importación de un archivo JSON en un módulo ECMAScript requiere un atributo de importación "type: "json"" cuando "module" se establece en "{0}".]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.]]></Val>
|
||||
@@ -9852,6 +9861,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0_1544" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Named imports from a JSON file into an ECMAScript module are not allowed when 'module' is set to '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[No se permiten las importaciones con nombre de un archivo JSON en un módulo ECMAScript cuando "module" está establecido en "{0}".]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Named_property_0_of_types_1_and_2_are_not_identical_2319" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Named property '{0}' of types '{1}' and '{2}' are not identical.]]></Val>
|
||||
@@ -10614,15 +10632,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Option_tsBuildInfoFile_cannot_be_specified_without_specifying_option_incremental_or_composite_or_if__5111" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Option 'tsBuildInfoFile' cannot be specified without specifying option 'incremental' or 'composite' or if not running 'tsc -b'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[No se puede especificar la opción “tsBuildInfoFile” sin especificar la opción “incremental” o “composite” o si no se ejecuta “tsc -b”.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'.]]></Val>
|
||||
@@ -13071,6 +13080,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_i_6421" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Vuelva a escribir las extensiones de archivo ".ts", ".tsx", ".mts" y ".cts" en rutas de acceso de importación relativas a su equivalente de JavaScript en los archivos de salida.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish_2869" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Right operand of ?? is unreachable because the left operand is never nullish.]]></Val>
|
||||
@@ -15102,6 +15120,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found_2874" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag requires '{0}' to be in scope, but it could not be found.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Esta etiqueta JSX requiere que "{0}" esté en el ámbito, pero no se encontró.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_fo_2875" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag requires the module path '{0}' to exist, but none could be found. Make sure you have types for the appropriate package installed.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Esta etiqueta JSX requiere que exista la ruta de acceso del módulo "{0}", pero no se encontró ninguna. Asegúrese de que tiene instalados los tipos para el paquete adecuado.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided.]]></Val>
|
||||
@@ -15255,6 +15291,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_b_2878" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is not the same as the relative path between its input files.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Esta ruta de acceso de importación no es segura de reescribir porque se resuelve en otro proyecto y la ruta de acceso relativa entre los archivos de salida de los proyectos no es la misma que la ruta de acceso relativa entre sus archivos de entrada.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_duri_2877" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This import uses a '{0}' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Esta importación usa una extensión "{0}" para resolver en un archivo TypeScript de entrada, pero no se reescribe durante la emisión porque no es una ruta de acceso relativa.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This is the declaration being augmented. Consider moving the augmenting declaration into the same file.]]></Val>
|
||||
@@ -15462,6 +15516,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolv_2876" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to "{0}".]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Esta ruta de acceso de importación relativa no es segura de reescribir porque parece un nombre de archivo, pero realmente se resuelve en "{0}".]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_spread_always_overwrites_this_property_2785" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This spread always overwrites this property.]]></Val>
|
||||
@@ -17037,6 +17100,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found_2879" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[El uso de fragmentos JSX requiere que el generador de fragmentos "{0}" esté en el ámbito, pero no se encontró.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher.]]></Val>
|
||||
|
||||
@@ -2796,11 +2796,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[At least one accessor must have an explicit return type annotation with --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[At least one accessor must have an explicit type annotation with --isolatedDeclarations.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Au moins un accesseur doit avoir une annotation de type de retour explicite avec --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[Au moins un accesseur doit avoir une annotation de type explicite avec --isolatedDeclarations.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -5052,11 +5052,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_su_9025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_sup_9025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declaration emit for this parameter requires implicitly adding undefined to it's type. This is not supported with --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[L’émission de déclaration pour ce paramètre nécessite l’ajout implicite non défini à son type. Cette opération n’est pas pris en charge avec --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[L’émission de déclaration pour ce paramètre nécessite l’ajout implicite de « non défini » à son type. Cette opération n’est pas pris en charge avec --isolatedDeclarations.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -7896,11 +7896,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation_7025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation.]]></Val>
|
||||
<Val><![CDATA[Generator implicitly has yield type '{0}'. Consider supplying a return type annotation.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Le générateur a implicitement le type '{0}', car il ne génère aucune valeur. Indiquez une annotation de type de retour.]]></Val>
|
||||
<Val><![CDATA[Le générateur a implicitement un type de rendement « {0} ». Envisagez de fournir une annotation de type de retour.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -8436,6 +8436,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_mod_1543" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Importing a JSON file into an ECMAScript module requires a 'type: "json"' import attribute when 'module' is set to '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[L'importation d'un fichier JSON dans un module ECMAScript nécessite un attribut d'importation « type : « json » » lorsque « module » est défini sur « {0} ».]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.]]></Val>
|
||||
@@ -9852,6 +9861,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0_1544" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Named imports from a JSON file into an ECMAScript module are not allowed when 'module' is set to '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Les importations nommées d'un fichier JSON dans un module ECMAScript ne sont pas autorisées lorsque « module » est défini sur '{0}'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Named_property_0_of_types_1_and_2_are_not_identical_2319" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Named property '{0}' of types '{1}' and '{2}' are not identical.]]></Val>
|
||||
@@ -10614,15 +10632,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Option_tsBuildInfoFile_cannot_be_specified_without_specifying_option_incremental_or_composite_or_if__5111" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Option 'tsBuildInfoFile' cannot be specified without specifying option 'incremental' or 'composite' or if not running 'tsc -b'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Impossible de spécifier l’option 'tsBuildInfoFile' sans spécifier l’option 'incremental' ou 'composite' ou si elle n’exécute pas 'tsc -b'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'.]]></Val>
|
||||
@@ -13071,6 +13080,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_i_6421" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Réécrivez les extensions de fichier « .ts », « .tsx », « .mts » et « .cts » dans les chemins d'importation relatifs vers leur équivalent JavaScript dans les fichiers de sortie.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish_2869" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Right operand of ?? is unreachable because the left operand is never nullish.]]></Val>
|
||||
@@ -15102,6 +15120,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found_2874" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag requires '{0}' to be in scope, but it could not be found.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Cette balise JSX nécessite que « {0} » soit dans la portée, mais elle n'a pas pu être trouvée.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_fo_2875" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag requires the module path '{0}' to exist, but none could be found. Make sure you have types for the appropriate package installed.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Cette balise JSX nécessite que le chemin du module '{0}' existe, mais aucun n'a pu être trouvé. Assurez-vous que les types pour le package approprié sont installés.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided.]]></Val>
|
||||
@@ -15255,6 +15291,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_b_2878" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is not the same as the relative path between its input files.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Ce chemin d'importation n'est pas sûr à réécrire car il renvoie à un autre projet et le chemin relatif entre les fichiers de sortie des projets n'est pas le même que le chemin relatif entre ses fichiers d'entrée.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_duri_2877" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This import uses a '{0}' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Cette importation utilise une extension '{0}' pour résoudre un fichier TypeScript d'entrée, mais ne sera pas réécrite pendant l'émission car il ne s'agit pas d'un chemin relatif.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This is the declaration being augmented. Consider moving the augmenting declaration into the same file.]]></Val>
|
||||
@@ -15462,6 +15516,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolv_2876" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to "{0}".]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Ce chemin d'importation relatif n'est pas sûr à réécrire car il ressemble à un nom de fichier, mais se résout en réalité en « {0} ».]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_spread_always_overwrites_this_property_2785" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This spread always overwrites this property.]]></Val>
|
||||
@@ -17037,6 +17100,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found_2879" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[L'utilisation de fragments JSX nécessite que la fabrique de fragments '{0}' soit dans la portée, mais elle n'a pas pu être trouvée.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher.]]></Val>
|
||||
|
||||
@@ -2784,11 +2784,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[At least one accessor must have an explicit return type annotation with --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[At least one accessor must have an explicit type annotation with --isolatedDeclarations.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Almeno una funzione di accesso deve avere un'annotazione di tipo restituito esplicita con --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[Almeno una funzione di accesso deve avere un'annotazione di tipo esplicita con --isolatedDeclarations.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -5040,9 +5040,9 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_su_9025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_sup_9025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declaration emit for this parameter requires implicitly adding undefined to it's type. This is not supported with --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[La creazione di dichiarazioni per questo parametro richiede l'aggiunta implicita di elementi non definiti al relativo tipo. Funzionalità non supportata con --isolatedDeclarations.]]></Val>
|
||||
</Tgt>
|
||||
@@ -7884,11 +7884,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation_7025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation.]]></Val>
|
||||
<Val><![CDATA[Generator implicitly has yield type '{0}'. Consider supplying a return type annotation.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Al generatore è assegnato in modo implicito il tipo yield '{0}' perché non contiene alcun valore. Provare a specificare un'annotazione di tipo restituito.]]></Val>
|
||||
<Val><![CDATA[Il generatore ha implicitamente il tipo yield "{0}". Provare a specificare un'annotazione di tipo restituito.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -8424,6 +8424,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_mod_1543" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Importing a JSON file into an ECMAScript module requires a 'type: "json"' import attribute when 'module' is set to '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[L'importazione di un file JSON in un modulo ECMAScript richiede un attributo di importazione "type: "json"" quando "module" è impostato su "{0}".]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.]]></Val>
|
||||
@@ -9840,6 +9849,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0_1544" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Named imports from a JSON file into an ECMAScript module are not allowed when 'module' is set to '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Le importazioni denominate da un file JSON in un modulo ECMAScript non sono consentite quando "module" è impostato su "{0}".]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Named_property_0_of_types_1_and_2_are_not_identical_2319" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Named property '{0}' of types '{1}' and '{2}' are not identical.]]></Val>
|
||||
@@ -10602,15 +10620,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Option_tsBuildInfoFile_cannot_be_specified_without_specifying_option_incremental_or_composite_or_if__5111" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Option 'tsBuildInfoFile' cannot be specified without specifying option 'incremental' or 'composite' or if not running 'tsc -b'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Non è possibile specificare l'opzione 'tsBuildInfoFile' senza specificare l'opzione 'incremental' o 'composite' oppure se non è in esecuzione 'tsc -b'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'.]]></Val>
|
||||
@@ -13059,6 +13068,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_i_6421" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Riscrivere le estensioni di file ".ts", ".tsx", ".mts" e ".cts" nei percorsi di importazione relativi dell'equivalente JavaScript nei file di output.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish_2869" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Right operand of ?? is unreachable because the left operand is never nullish.]]></Val>
|
||||
@@ -15090,6 +15108,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found_2874" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag requires '{0}' to be in scope, but it could not be found.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Questo tag JSX richiede che "{0}" sia incluso nell'ambito, ma non è stato trovato.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_fo_2875" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag requires the module path '{0}' to exist, but none could be found. Make sure you have types for the appropriate package installed.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Questo tag JSX richiede che il percorso del modulo "{0}" esista, ma non è stato trovato alcun tag. Assicurarsi di avere i tipi per il pacchetto appropriato installati.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided.]]></Val>
|
||||
@@ -15243,6 +15279,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_b_2878" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is not the same as the relative path between its input files.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Questo percorso di importazione non è sicuro da riscrivere, perché viene risolto in un altro progetto e il percorso relativo tra i file di output dei progetti non corrisponde al percorso relativo tra i file di input.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_duri_2877" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This import uses a '{0}' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Questa importazione usa un'estensione "{0}" per la risoluzione in un file TypeScript di input, ma non verrà riscritta durante la creazione perché non è un percorso relativo.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This is the declaration being augmented. Consider moving the augmenting declaration into the same file.]]></Val>
|
||||
@@ -15450,6 +15504,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolv_2876" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to "{0}".]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Questo percorso di importazione relativo non è sicuro da riscrivere perché sembra un nome di file, ma in realtà si risolve in "{0}".]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_spread_always_overwrites_this_property_2785" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This spread always overwrites this property.]]></Val>
|
||||
@@ -17025,6 +17088,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found_2879" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[L'uso di frammenti JSX richiede che la factory di frammenti "{0}" sia nell'ambito, ma non è stata trovata.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher.]]></Val>
|
||||
|
||||
@@ -2784,11 +2784,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[At least one accessor must have an explicit return type annotation with --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[At least one accessor must have an explicit type annotation with --isolatedDeclarations.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[少なくとも 1 つのアクセサーに、--isolatedDeclarations を含む明示的な戻り値の型の注釈が必要です。]]></Val>
|
||||
<Val><![CDATA[少なくとも 1 つのアクセサーに、--isolatedDeclarations を含む明示的な型の注釈が必要です。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -5040,9 +5040,9 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_su_9025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_sup_9025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declaration emit for this parameter requires implicitly adding undefined to it's type. This is not supported with --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[このパラメーターの宣言を生成するには、その型に未定義の値を暗黙的に追加する必要があります。これは --isolatedDeclarations ではサポートされていません。]]></Val>
|
||||
</Tgt>
|
||||
@@ -7884,11 +7884,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation_7025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation.]]></Val>
|
||||
<Val><![CDATA[Generator implicitly has yield type '{0}'. Consider supplying a return type annotation.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[ジェネレーターは値を生成しないため、暗黙的に yield 型 '{0}' になります。戻り値の型の注釈を指定することを検討してください。]]></Val>
|
||||
<Val><![CDATA[ジェネレーターは暗黙的に yield 型 '{0}' を持っています。戻り値の型の注釈を指定することを検討してください。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -8424,6 +8424,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_mod_1543" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Importing a JSON file into an ECMAScript module requires a 'type: "json"' import attribute when 'module' is set to '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[ECMAScript モジュールに JSON ファイルをインポートするには、'module' が '{0}' に設定されている場合、'type: "json"' インポート属性が必要です。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.]]></Val>
|
||||
@@ -9840,6 +9849,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0_1544" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Named imports from a JSON file into an ECMAScript module are not allowed when 'module' is set to '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA['module' が '{0}' に設定されている場合、JSON ファイルから ECMAScript モジュールへの名前付きインポートは許可されません。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Named_property_0_of_types_1_and_2_are_not_identical_2319" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Named property '{0}' of types '{1}' and '{2}' are not identical.]]></Val>
|
||||
@@ -10602,15 +10620,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Option_tsBuildInfoFile_cannot_be_specified_without_specifying_option_incremental_or_composite_or_if__5111" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Option 'tsBuildInfoFile' cannot be specified without specifying option 'incremental' or 'composite' or if not running 'tsc -b'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[オプション 'tsBuildInfoFile' は、オプション 'incremental' または 'composite' を指定せずに、または 'tsc -b' を実行していない場合は指定できません。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'.]]></Val>
|
||||
@@ -13059,6 +13068,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_i_6421" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[相対インポート パスの '.ts'、'.tsx'、'.mts'、および '.cts' ファイル拡張子を、出力ファイルの JavaScript と同等の拡張子に書き換えます。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish_2869" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Right operand of ?? is unreachable because the left operand is never nullish.]]></Val>
|
||||
@@ -15090,6 +15108,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found_2874" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag requires '{0}' to be in scope, but it could not be found.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[この JSX タグでは '{0}' がスコープ内に存在する必要がありますが、見つかりませんでした。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_fo_2875" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag requires the module path '{0}' to exist, but none could be found. Make sure you have types for the appropriate package installed.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[この JSX タグにはモジュール パス '{0}' が存在する必要がありますが、見つかりませんでした。適切なパッケージの種類がインストールされていることを確認してください。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided.]]></Val>
|
||||
@@ -15243,6 +15279,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_b_2878" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is not the same as the relative path between its input files.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[このインポート パスは別のプロジェクトに解決され、プロジェクトの出力ファイル間の相対パスが入力ファイル間の相対パスと同じではないため、書き換えは安全ではありません。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_duri_2877" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This import uses a '{0}' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[このインポートでは、'{0}' 拡張子を使用して入力 TypeScript ファイルに解決されますが、生成中に書き換えられるのは相対パスではないためです。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This is the declaration being augmented. Consider moving the augmenting declaration into the same file.]]></Val>
|
||||
@@ -15450,6 +15504,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolv_2876" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to "{0}".]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[この相対インポート パスは、ファイル名のようですが、実際には "{0}" に解決されるため、書き換えは安全ではありません。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_spread_always_overwrites_this_property_2785" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This spread always overwrites this property.]]></Val>
|
||||
@@ -17025,6 +17088,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found_2879" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[JSX フラグメントを使用するには、フラグメント ファクトリ '{0}' がスコープ内に存在する必要がありますが、見つかりませんでした。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher.]]></Val>
|
||||
|
||||
@@ -2784,11 +2784,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[At least one accessor must have an explicit return type annotation with --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[At least one accessor must have an explicit type annotation with --isolatedDeclarations.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[하나 이상의 접근자에는 --isolatedDeclarations가 있는 명시적 반환 형식 주석이 있어야 합니다.]]></Val>
|
||||
<Val><![CDATA[하나 이상의 접근자에 --isolatedDeclarations를 사용하는 명시적 형식 주석이 있어야 합니다.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -5040,9 +5040,9 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_su_9025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_sup_9025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declaration emit for this parameter requires implicitly adding undefined to it's type. This is not supported with --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[이 매개 변수에 대한 선언 내보내기를 사용하려면 정의되지 않은 형식을 암시적으로 추가해야 합니다. 이는 --isolatedDeclarations에서는 지원되지 않습니다.]]></Val>
|
||||
</Tgt>
|
||||
@@ -7884,11 +7884,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation_7025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation.]]></Val>
|
||||
<Val><![CDATA[Generator implicitly has yield type '{0}'. Consider supplying a return type annotation.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[생성기는 값을 생성하지 않으므로 암시적으로 yield 형식 '{0}'입니다. 반환 형식 주석을 제공하는 것이 좋습니다.]]></Val>
|
||||
<Val><![CDATA[생성기에 암시적으로 '{0}' yield 형식이 있습니다. 반환 형식 주석을 제공하는 것이 좋습니다.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -8424,6 +8424,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_mod_1543" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Importing a JSON file into an ECMAScript module requires a 'type: "json"' import attribute when 'module' is set to '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA['module'이 '{0}'(으)로 설정된 경우 JSON 파일을 ECMAScript 모듈로 가져오려면 'type: "json"' 가져오기 특성이 필요합니다.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.]]></Val>
|
||||
@@ -9840,6 +9849,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0_1544" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Named imports from a JSON file into an ECMAScript module are not allowed when 'module' is set to '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA['module'이 '{0}'(으)로 설정된 경우 JSON 파일에서 ECMAScript 모듈로 명명된 가져오기를 사용할 수 없습니다.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Named_property_0_of_types_1_and_2_are_not_identical_2319" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Named property '{0}' of types '{1}' and '{2}' are not identical.]]></Val>
|
||||
@@ -10602,15 +10620,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Option_tsBuildInfoFile_cannot_be_specified_without_specifying_option_incremental_or_composite_or_if__5111" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Option 'tsBuildInfoFile' cannot be specified without specifying option 'incremental' or 'composite' or if not running 'tsc -b'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA['incremental' 또는 'composite' 옵션을 지정하지 않거나 'tsc -b'를 실행하지 않는 경우 'tsBuildInfoFile' 옵션을 지정할 수 없습니다.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'.]]></Val>
|
||||
@@ -13059,6 +13068,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_i_6421" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[출력 파일의 해당 JavaScript에 해당하는 상대 가져오기 경로에서 '.ts', '.tsx', '.mts' 및 '.cts' 파일 확장자를 다시 작성합니다.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish_2869" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Right operand of ?? is unreachable because the left operand is never nullish.]]></Val>
|
||||
@@ -15090,6 +15108,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found_2874" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag requires '{0}' to be in scope, but it could not be found.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[이 JSX 태그를 사용하려면 '{0}'이(가) 범위에 있어야 하지만 찾을 수 없습니다.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_fo_2875" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag requires the module path '{0}' to exist, but none could be found. Make sure you have types for the appropriate package installed.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[이 JSX 태그를 사용하려면 모듈 경로 '{0}'이(가) 있어야 하지만 찾을 수 없습니다. 적절한 패키지에 대해 형식이 설치되어 있는지 확인합니다.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided.]]></Val>
|
||||
@@ -15243,6 +15279,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_b_2878" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is not the same as the relative path between its input files.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[이 가져오기 경로는 다른 프로젝트로 확인되고 프로젝트의 출력 파일 간의 상대 경로가 입력 파일 간의 상대 경로와 동일하지 않으므로 다시 쓰기에는 안전하지 않습니다.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_duri_2877" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This import uses a '{0}' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[이 가져오기는 '{0}' 확장을 사용하여 입력 TypeScript 파일로 확인하지만 상대 경로가 아니므로 내보내는 동안 다시 작성되지 않습니다.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This is the declaration being augmented. Consider moving the augmenting declaration into the same file.]]></Val>
|
||||
@@ -15450,6 +15504,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolv_2876" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to "{0}".]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[이 상대 가져오기 경로는 파일 이름처럼 보이지만 실제로는 "{0}"(으)로 확인되므로 다시 작성하는 것이 안전하지 않습니다.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_spread_always_overwrites_this_property_2785" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This spread always overwrites this property.]]></Val>
|
||||
@@ -17025,6 +17088,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found_2879" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[JSX 조각을 사용하려면 조각 팩터리 '{0}'이(가) 범위에 있어야 하지만 찾을 수 없습니다.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher.]]></Val>
|
||||
|
||||
@@ -2774,11 +2774,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[At least one accessor must have an explicit return type annotation with --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[At least one accessor must have an explicit type annotation with --isolatedDeclarations.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Co najmniej jedna metoda dostępu musi mieć jawną adnotację zwracanego typu z wyrażeniem --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[Co najmniej jeden akcesor musi mieć jawną adnotację typu z parametrem --isolatedDeclarations.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -5030,11 +5030,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_su_9025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_sup_9025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declaration emit for this parameter requires implicitly adding undefined to it's type. This is not supported with --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Emisja deklaracji dla tego parametru wymaga niejawnego dodania niezdefiniowanego do jego typu. Nie jest to obsługiwane w przypadku parametru --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[Emisja deklaracji dla tego parametru wymaga niejawnego dodania parametru undefined do jego typu. Nie jest to obsługiwane w przypadku parametru --isolatedDeclarations.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -7874,11 +7874,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation_7025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation.]]></Val>
|
||||
<Val><![CDATA[Generator implicitly has yield type '{0}'. Consider supplying a return type annotation.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Dla generatora niejawnie określono zwracany typ „{0}”, ponieważ nie zwraca on żadnych wartości. Rozważ podanie adnotacji zwracanego typu.]]></Val>
|
||||
<Val><![CDATA[Generator niejawnie ma typ wstrzymania „{0}”. Rozważ podanie adnotacji zwracanego typu.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -8414,6 +8414,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_mod_1543" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Importing a JSON file into an ECMAScript module requires a 'type: "json"' import attribute when 'module' is set to '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Importowanie pliku JSON do modułu ECMAScript wymaga atrybutu importu „type: „json””, gdy parametr „module” ma wartość „{0}”.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.]]></Val>
|
||||
@@ -9830,6 +9839,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0_1544" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Named imports from a JSON file into an ECMAScript module are not allowed when 'module' is set to '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Nazwane importy z pliku JSON do modułu ECMAScript są niedozwolone, gdy parametr „module” ma wartość „{0}”.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Named_property_0_of_types_1_and_2_are_not_identical_2319" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Named property '{0}' of types '{1}' and '{2}' are not identical.]]></Val>
|
||||
@@ -10592,15 +10610,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Option_tsBuildInfoFile_cannot_be_specified_without_specifying_option_incremental_or_composite_or_if__5111" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Option 'tsBuildInfoFile' cannot be specified without specifying option 'incremental' or 'composite' or if not running 'tsc -b'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Nie można określić opcji „tsBuildInfoFile” bez określenia opcji „incremental” lub „composite” albo jeśli nie jest uruchomiona opcja „tsc -b”.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'.]]></Val>
|
||||
@@ -13046,6 +13055,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_i_6421" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Ponownie zapisz rozszerzenia plików „.ts”, „.tsx”, „.mts” i „.cts” we względnych ścieżkach importu do ich odpowiedników języka JavaScript w plikach wyjściowych.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish_2869" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Right operand of ?? is unreachable because the left operand is never nullish.]]></Val>
|
||||
@@ -15077,6 +15095,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found_2874" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag requires '{0}' to be in scope, but it could not be found.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Ten tag rozszerzenia JSX wymaga, aby element „{0}” był w zakresie, ale nie można go znaleźć.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_fo_2875" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag requires the module path '{0}' to exist, but none could be found. Make sure you have types for the appropriate package installed.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Ten tag rozszerzenia JSX wymaga, aby ścieżka modułu „{0}” istniała, ale nie można jej znaleźć. Upewnij się, że masz zainstalowane typy dla odpowiedniego pakietu.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided.]]></Val>
|
||||
@@ -15230,6 +15266,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_b_2878" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is not the same as the relative path between its input files.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Ponowne zapisanie tej ścieżki importu jest niebezpieczne, ponieważ jest rozpoznawana jako inny projekt, a ścieżka względna między plikami wyjściowymi projektów nie jest taka sama jak ścieżka względna między plikami wejściowymi.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_duri_2877" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This import uses a '{0}' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Ten import używa rozszerzenia „{0}” do rozpoznania jako wejściowego pliku TypeScript, ale nie zostanie ponownie zapisany podczas emitowania, ponieważ nie jest ścieżką względną.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This is the declaration being augmented. Consider moving the augmenting declaration into the same file.]]></Val>
|
||||
@@ -15437,6 +15491,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolv_2876" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to "{0}".]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Ta względna ścieżka importu jest niebezpieczna do ponownego zapisania, ponieważ wygląda jak nazwa pliku, ale w rzeczywistości jest rozpoznawana jako „{0}”.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_spread_always_overwrites_this_property_2785" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This spread always overwrites this property.]]></Val>
|
||||
@@ -17012,6 +17075,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found_2879" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Użycie fragmentów rozszerzenia JSX wymaga, aby fabryka fragmentów „{0}” była w zakresie, ale nie można jej znaleźć.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher.]]></Val>
|
||||
|
||||
@@ -2777,11 +2777,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[At least one accessor must have an explicit return type annotation with --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[At least one accessor must have an explicit type annotation with --isolatedDeclarations.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Pelo menos um acessório deve ter uma anotação de tipo de retorno explícita com --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[Pelo menos um acessor deve ter uma anotação de tipo explícita com `--isolatedDeclarations.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -5033,11 +5033,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_su_9025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_sup_9025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declaration emit for this parameter requires implicitly adding undefined to it's type. This is not supported with --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[A declaração emit para esse parâmetro requer a adição implícita de undefined ao seu tipo. Não há suporte para isso com --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[A declaração emit para esse parâmetro requer a adição implícita de indefinido ao seu tipo. Não há suporte para isso com --isolatedDeclarations.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -7877,11 +7877,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation_7025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation.]]></Val>
|
||||
<Val><![CDATA[Generator implicitly has yield type '{0}'. Consider supplying a return type annotation.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Implicitamente, o gerador tem o tipo de rendimento '{0}' porque não produz nenhum valor. Considere fornecer uma anotação de tipo de retorno.]]></Val>
|
||||
<Val><![CDATA[O gerador tem implicitamente o tipo de rendimento "{0}". Considere fornecer uma anotação de tipo de retorno.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -8417,6 +8417,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_mod_1543" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Importing a JSON file into an ECMAScript module requires a 'type: "json"' import attribute when 'module' is set to '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[A importação de um arquivo JSON para um módulo ECMAScript requer um 'type: "json"' quando o atributo de importação "module" estiver definido como "{0}".]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.]]></Val>
|
||||
@@ -9833,6 +9842,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0_1544" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Named imports from a JSON file into an ECMAScript module are not allowed when 'module' is set to '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[As importações nomeadas de um arquivo JSON para um módulo ECMAScript não são permitidas quando "module" é definido como "{0}".]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Named_property_0_of_types_1_and_2_are_not_identical_2319" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Named property '{0}' of types '{1}' and '{2}' are not identical.]]></Val>
|
||||
@@ -10595,15 +10613,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Option_tsBuildInfoFile_cannot_be_specified_without_specifying_option_incremental_or_composite_or_if__5111" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Option 'tsBuildInfoFile' cannot be specified without specifying option 'incremental' or 'composite' or if not running 'tsc -b'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[A opção 'tsBuildInfoFile' não pode ser especificada sem especificar a opção 'incremental' ou 'composite' ou se não estiver executando 'tsc -b'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'.]]></Val>
|
||||
@@ -13049,6 +13058,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_i_6421" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Reescreva as extensões de arquivo ".ts", ".tsx", ".mts" e ".cts" em caminhos de importação relativos para seu equivalente em JavaScript nos arquivos de saída.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish_2869" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Right operand of ?? is unreachable because the left operand is never nullish.]]></Val>
|
||||
@@ -15080,6 +15098,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found_2874" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag requires '{0}' to be in scope, but it could not be found.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Essa marca JSX requer que "{0}" esteja no escopo, mas não foi possível encontrá-la.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_fo_2875" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag requires the module path '{0}' to exist, but none could be found. Make sure you have types for the appropriate package installed.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Essa marca JSX requer a existência do caminho do módulo "{0}", mas não foi possível encontrar nenhum. Verifique se você tem os tipos do pacote apropriado instalados.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided.]]></Val>
|
||||
@@ -15233,6 +15269,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_b_2878" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is not the same as the relative path between its input files.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Não é seguro reescrever esse caminho de importação porque ele é resolvido em outro projeto, e o caminho relativo entre os arquivos de saída dos projetos não é o mesmo que o caminho relativo entre seus arquivos de entrada.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_duri_2877" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This import uses a '{0}' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Essa importação usa uma extensão "{0}" para resolver um arquivo TypeScript de entrada, mas não será reescrita durante a emissão porque não é um caminho relativo.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This is the declaration being augmented. Consider moving the augmenting declaration into the same file.]]></Val>
|
||||
@@ -15440,6 +15494,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolv_2876" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to "{0}".]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Não é seguro reescrever esse caminho de importação relativo porque ele se parece com um nome de arquivo, mas, na verdade, é resolvido como "{0}".]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_spread_always_overwrites_this_property_2785" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This spread always overwrites this property.]]></Val>
|
||||
@@ -17015,6 +17078,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found_2879" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[O uso de fragmentos JSX requer que a fábrica de fragmentos "{0}" esteja no escopo, mas não foi possível encontrá-la.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher.]]></Val>
|
||||
|
||||
@@ -2783,11 +2783,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[At least one accessor must have an explicit return type annotation with --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[At least one accessor must have an explicit type annotation with --isolatedDeclarations.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[По крайней мере один метод доступа должен иметь явную аннотацию возвращаемого типа с --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[По крайней мере один метод доступа должен иметь явную аннотацию типа с параметром --isolatedDeclarations.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -5039,9 +5039,9 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_su_9025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_sup_9025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declaration emit for this parameter requires implicitly adding undefined to it's type. This is not supported with --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Выдача объявления для этого параметра требует неявного добавления неопределенного значения к его типу. Это не поддерживается с помощью --isolatedDeclarations.]]></Val>
|
||||
</Tgt>
|
||||
@@ -7883,11 +7883,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation_7025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation.]]></Val>
|
||||
<Val><![CDATA[Generator implicitly has yield type '{0}'. Consider supplying a return type annotation.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Генератор неявно имеет тип yield "{0}", так как он не предоставляет никаких значений. Рекомендуется указать заметку с типом возвращаемого значения.]]></Val>
|
||||
<Val><![CDATA[Генератор неявно имеет тип ресурса "{0}". Рекомендуется предоставить аннотацию возвращаемого типа.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -8423,6 +8423,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_mod_1543" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Importing a JSON file into an ECMAScript module requires a 'type: "json"' import attribute when 'module' is set to '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Для импорта JSON-файла в модуль ECMAScript требуется атрибут импорта "type: json", если для "module" задано значение "{0}".]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.]]></Val>
|
||||
@@ -9839,6 +9848,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0_1544" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Named imports from a JSON file into an ECMAScript module are not allowed when 'module' is set to '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Именованный импорт из файла JSON в модуль ECMAScript не допускается, если для параметра "module" установлено значение "{0}".]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Named_property_0_of_types_1_and_2_are_not_identical_2319" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Named property '{0}' of types '{1}' and '{2}' are not identical.]]></Val>
|
||||
@@ -10601,15 +10619,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Option_tsBuildInfoFile_cannot_be_specified_without_specifying_option_incremental_or_composite_or_if__5111" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Option 'tsBuildInfoFile' cannot be specified without specifying option 'incremental' or 'composite' or if not running 'tsc -b'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Параметр "tsBuildInfoFile" нельзя указать без указания параметра "incremental" или "composite" или, если не запущен "tsc -b".]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'.]]></Val>
|
||||
@@ -13058,6 +13067,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_i_6421" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Перепишите расширения файлов ".ts", ".tsx", ".mts" и ".cts" в относительных путях импорта на их эквиваленты JavaScript в выходных файлах.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish_2869" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Right operand of ?? is unreachable because the left operand is never nullish.]]></Val>
|
||||
@@ -15089,6 +15107,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found_2874" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag requires '{0}' to be in scope, but it could not be found.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Для этого тега JSX требуется, чтобы "{0}" был в области видимости, но его не удалось найти.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_fo_2875" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag requires the module path '{0}' to exist, but none could be found. Make sure you have types for the appropriate package installed.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Для этого тега JSX требуется наличие пути модуля "{0}", но его не удалось найти. Убедитесь, что у вас установлены типы для соответствующего пакета.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided.]]></Val>
|
||||
@@ -15242,6 +15278,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_b_2878" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is not the same as the relative path between its input files.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Этот путь импорта небезопасен для перезаписи, поскольку он разрешается в другой проект, а относительный путь между выходными файлами проекта не совпадает с относительным путем между входными файлами.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_duri_2877" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This import uses a '{0}' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Этот импорт использует расширение "{0}" для разрешения во входной файл TypeScript, но не будет перезаписан во время выпуска, поскольку это не является относительным путем.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This is the declaration being augmented. Consider moving the augmenting declaration into the same file.]]></Val>
|
||||
@@ -15449,6 +15503,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolv_2876" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to "{0}".]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Этот относительный путь импорта небезопасен для перезаписи, потому что он выглядит как имя файла, но на самом деле разрешается как "{0}".]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_spread_always_overwrites_this_property_2785" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This spread always overwrites this property.]]></Val>
|
||||
@@ -17024,6 +17087,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found_2879" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Использование фрагментов JSX требует, чтобы фабрика фрагментов "{0}" была в области видимости, но ее не удалось найти.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher.]]></Val>
|
||||
|
||||
@@ -2777,11 +2777,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[At least one accessor must have an explicit return type annotation with --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[At least one accessor must have an explicit type annotation with --isolatedDeclarations.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[En az bir erişimcinin --isolatedDeclarations ile açık bir dönüş türü ek açıklamasına sahip olması gereklidir.]]></Val>
|
||||
<Val><![CDATA[En az bir erişimcinin --isolatedDeclarations ile açık bir tür ek açıklamasına sahip olması gereklidir.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -5033,11 +5033,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_su_9025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_sup_9025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declaration emit for this parameter requires implicitly adding undefined to it's type. This is not supported with --isolatedDeclarations.]]></Val>
|
||||
<Val><![CDATA[Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Bu parametrenin bildirimi, türüne örtülü olarak tanımsız eklenmesini gerektirir. Bu, --isolatedDeclarations ile desteklenmez.]]></Val>
|
||||
<Val><![CDATA[Bu parametre için bildirim gösterme, türüne örtülü olarak tanımsız eklenmesini gerektirir. Bu, --isolatedDeclarations ile desteklenmez.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -7877,11 +7877,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation_7025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation.]]></Val>
|
||||
<Val><![CDATA[Generator implicitly has yield type '{0}'. Consider supplying a return type annotation.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Oluşturucu herhangi bir değer sağlamadığından örtük olarak '{0}' türüne sahip. Bir dönüş türü ek açıklaması sağlamayı deneyin.]]></Val>
|
||||
<Val><![CDATA[Oluşturucu örtük olarak '{0}' bekletme türüne sahip. Bir dönüş türü ek açıklaması sağlamayı deneyin.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -8417,6 +8417,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_mod_1543" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Importing a JSON file into an ECMAScript module requires a 'type: "json"' import attribute when 'module' is set to '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Bir JSON dosyasının ECMAScript modülüne aktarılması, 'module' değeri '{0}' olarak ayarlandığında 'type: "json"' içeri aktarma özniteliği gerektirir.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.]]></Val>
|
||||
@@ -9833,6 +9842,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0_1544" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Named imports from a JSON file into an ECMAScript module are not allowed when 'module' is set to '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA['module', '{0}' olarak ayarlandığında JSON dosyasından ECMAScript modülüne adlandırılmış içeri aktarmalara izin verilmez.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Named_property_0_of_types_1_and_2_are_not_identical_2319" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Named property '{0}' of types '{1}' and '{2}' are not identical.]]></Val>
|
||||
@@ -10595,15 +10613,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Option_tsBuildInfoFile_cannot_be_specified_without_specifying_option_incremental_or_composite_or_if__5111" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Option 'tsBuildInfoFile' cannot be specified without specifying option 'incremental' or 'composite' or if not running 'tsc -b'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA['tsBuildInfoFile' seçeneği, 'incremental' veya 'composite' seçeneği belirtilmeden veya 'tsc -b' çalıştırmadan belirtilemez.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'.]]></Val>
|
||||
@@ -13052,6 +13061,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_i_6421" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA['.ts', '.tsx', '.mts' ve '.cts' dosya uzantılarını, çıkış dosyalarındaki JavaScript eşdeğerlerine göreli içeri aktarma yollarında yeniden yazın.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish_2869" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Right operand of ?? is unreachable because the left operand is never nullish.]]></Val>
|
||||
@@ -15083,6 +15101,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found_2874" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag requires '{0}' to be in scope, but it could not be found.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Bu JSX etiketi '{0}' öğesinin kapsamda olmasını gerektiriyor, ancak bulunamadı.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_fo_2875" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag requires the module path '{0}' to exist, but none could be found. Make sure you have types for the appropriate package installed.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Bu JSX etiketi, '{0}' modül yolunun mevcut olmasını gerektiriyor, ancak hiçbiri bulunamadı. Uygun paket için türlerin yüklü olduğundan emin olun.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided.]]></Val>
|
||||
@@ -15236,6 +15272,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_b_2878" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is not the same as the relative path between its input files.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Başka bir projeye çözümlendiğinden ve projelerin çıkış dosyaları arasındaki göreli yol, giriş dosyaları arasındaki göreli yol ile aynı olmadığından, bu içeri aktarma yolunun yeniden yazılması güvenli değildir.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_duri_2877" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This import uses a '{0}' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Bu içeri aktarma, giriş TypeScript dosyasına çözümlemek için bir '{0}' uzantısı kullanıyor, ancak göreli bir yol olmadığından yayın sırasında yeniden yazılmayacak.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This is the declaration being augmented. Consider moving the augmenting declaration into the same file.]]></Val>
|
||||
@@ -15443,6 +15497,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolv_2876" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to "{0}".]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Bu göreli içeri aktarma yolu bir dosya adı gibi görünse de aslında "{0}" olarak çözümlendiğinden yolun yeniden yazılması güvenli değildir.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_spread_always_overwrites_this_property_2785" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This spread always overwrites this property.]]></Val>
|
||||
@@ -17018,6 +17081,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found_2879" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[JSX parçalarının kullanımı '{0}' parça fabrikasının kapsamda olmasını gerektiriyor, ancak bulunamadı.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher.]]></Val>
|
||||
|
||||
@@ -1297,7 +1297,7 @@ export class ProjectService {
|
||||
*/
|
||||
private readonly filenameToScriptInfoVersion = new Map<Path, number>();
|
||||
// Set of all '.js' files ever opened.
|
||||
private readonly allJsFilesForOpenFileTelemetry = new Map<string, true>();
|
||||
private readonly allJsFilesForOpenFileTelemetry = new Set<string>();
|
||||
|
||||
/**
|
||||
* Map to the real path of the infos
|
||||
|
||||
@@ -632,6 +632,7 @@ export class LineNode implements LineCollection {
|
||||
|
||||
walk(rangeStart: number, rangeLength: number, walkFns: LineIndexWalker): void {
|
||||
// assume (rangeStart < this.totalChars) && (rangeLength <= this.totalChars)
|
||||
if (this.children.length === 0) return;
|
||||
let childIndex = 0;
|
||||
let childCharCount = this.children[childIndex].charCount();
|
||||
// find sub-tree containing start
|
||||
|
||||
@@ -156,6 +156,7 @@ import {
|
||||
indent,
|
||||
isConfigFile,
|
||||
isConfiguredProject,
|
||||
isDynamicFileName,
|
||||
isExternalProject,
|
||||
isInferredProject,
|
||||
ITypingsInstaller,
|
||||
@@ -2981,6 +2982,7 @@ export class Session<TMessage = string> implements EventSender {
|
||||
}
|
||||
private getPasteEdits(args: protocol.GetPasteEditsRequestArgs): protocol.PasteEditsAction | undefined {
|
||||
const { file, project } = this.getFileAndProject(args);
|
||||
if (isDynamicFileName(file)) return undefined;
|
||||
const copiedFrom = args.copiedFrom
|
||||
? { file: args.copiedFrom.file, range: args.copiedFrom.spans.map(copies => this.getRange({ file: args.copiedFrom!.file, startLine: copies.start.line, startOffset: copies.start.offset, endLine: copies.end.line, endOffset: copies.end.offset }, project.getScriptInfoForNormalizedPath(toNormalizedPath(args.copiedFrom!.file))!)) }
|
||||
: undefined;
|
||||
|
||||
@@ -36,7 +36,7 @@ registerCodeFix({
|
||||
},
|
||||
getAllCodeActions: context => {
|
||||
const { program } = context;
|
||||
const seen = new Map<number, true>();
|
||||
const seen = new Set<number>();
|
||||
|
||||
return createCombinedCodeActions(textChanges.ChangeTracker.with(context, changes => {
|
||||
eachDiagnostic(context, errorCodes, diag => {
|
||||
|
||||
@@ -36,7 +36,7 @@ registerCodeFix({
|
||||
},
|
||||
fixIds: [fixId],
|
||||
getAllCodeActions: function getAllCodeActionsToConvertToTypeOnlyExport(context) {
|
||||
const fixedExportDeclarations = new Map<number, true>();
|
||||
const fixedExportDeclarations = new Set<number>();
|
||||
return codeFixAll(context, errorCodes, (changes, diag) => {
|
||||
const exportSpecifier = getExportSpecifierForDiagnosticSpan(diag, context.sourceFile);
|
||||
if (exportSpecifier && addToSeen(fixedExportDeclarations, getNodeId(exportSpecifier.parent.parent))) {
|
||||
|
||||
@@ -63,7 +63,7 @@ registerCodeFix({
|
||||
fixIds: [fixId],
|
||||
getAllCodeActions: context => {
|
||||
const { program, preferences, host } = context;
|
||||
const seen = new Map<number, true>();
|
||||
const seen = new Set<number>();
|
||||
|
||||
return createCombinedCodeActions(textChanges.ChangeTracker.with(context, changes => {
|
||||
eachDiagnostic(context, errorCodes, diag => {
|
||||
|
||||
@@ -182,7 +182,7 @@ registerCodeFix({
|
||||
getAllCodeActions: context => {
|
||||
const { program, fixId } = context;
|
||||
const checker = program.getTypeChecker();
|
||||
const seen = new Map<string, true>();
|
||||
const seen = new Set<string>();
|
||||
const typeDeclToMembers = new Map<ClassLikeDeclaration | InterfaceDeclaration | TypeLiteralNode, TypeLikeDeclarationInfo[]>();
|
||||
|
||||
return createCombinedCodeActions(textChanges.ChangeTracker.with(context, changes => {
|
||||
@@ -315,13 +315,13 @@ function getInfo(sourceFile: SourceFile, tokenPos: number, errorCode: number, ch
|
||||
const param = signature.parameters[argIndex].valueDeclaration;
|
||||
if (!(param && isParameter(param) && isIdentifier(param.name))) return undefined;
|
||||
|
||||
const properties = arrayFrom(checker.getUnmatchedProperties(checker.getTypeAtLocation(parent), checker.getParameterType(signature, argIndex), /*requireOptionalProperties*/ false, /*matchDiscriminantProperties*/ false));
|
||||
const properties = arrayFrom(checker.getUnmatchedProperties(checker.getTypeAtLocation(parent), checker.getParameterType(signature, argIndex).getNonNullableType(), /*requireOptionalProperties*/ false, /*matchDiscriminantProperties*/ false));
|
||||
if (!length(properties)) return undefined;
|
||||
return { kind: InfoKind.ObjectLiteral, token: param.name, identifier: param.name.text, properties, parentDeclaration: parent };
|
||||
}
|
||||
|
||||
if (token.kind === SyntaxKind.OpenBraceToken && isObjectLiteralExpression(parent)) {
|
||||
const targetType = checker.getContextualType(parent) || checker.getTypeAtLocation(parent);
|
||||
const targetType = (checker.getContextualType(parent) || checker.getTypeAtLocation(parent))?.getNonNullableType();
|
||||
const properties = arrayFrom(checker.getUnmatchedProperties(checker.getTypeAtLocation(parent), targetType, /*requireOptionalProperties*/ false, /*matchDiscriminantProperties*/ false));
|
||||
if (!length(properties)) return undefined;
|
||||
|
||||
@@ -334,7 +334,7 @@ function getInfo(sourceFile: SourceFile, tokenPos: number, errorCode: number, ch
|
||||
if (!isMemberName(token)) return undefined;
|
||||
|
||||
if (isIdentifier(token) && hasInitializer(parent) && parent.initializer && isObjectLiteralExpression(parent.initializer)) {
|
||||
const targetType = checker.getContextualType(token) || checker.getTypeAtLocation(token);
|
||||
const targetType = (checker.getContextualType(token) || checker.getTypeAtLocation(token))?.getNonNullableType();
|
||||
const properties = arrayFrom(checker.getUnmatchedProperties(checker.getTypeAtLocation(parent.initializer), targetType, /*requireOptionalProperties*/ false, /*matchDiscriminantProperties*/ false));
|
||||
if (!length(properties)) return undefined;
|
||||
|
||||
@@ -681,7 +681,8 @@ function tryGetValueFromType(context: CodeFixContextBase, checker: TypeChecker,
|
||||
}
|
||||
if (type.flags & TypeFlags.EnumLike) {
|
||||
const enumMember = type.symbol.exports ? firstOrUndefinedIterator(type.symbol.exports.values()) : type.symbol;
|
||||
const name = checker.symbolToExpression(type.symbol.parent ? type.symbol.parent : type.symbol, SymbolFlags.Value, /*enclosingDeclaration*/ undefined, /*flags*/ NodeBuilderFlags.UseFullyQualifiedType);
|
||||
const symbol = type.symbol.parent && type.symbol.parent.flags & SymbolFlags.RegularEnum ? type.symbol.parent : type.symbol;
|
||||
const name = checker.symbolToExpression(symbol, SymbolFlags.Value, /*enclosingDeclaration*/ undefined, /*flags*/ NodeBuilderFlags.UseFullyQualifiedType);
|
||||
return enumMember === undefined || name === undefined ? factory.createNumericLiteral(0) : factory.createPropertyAccessExpression(name, checker.symbolToString(enumMember));
|
||||
}
|
||||
if (type.flags & TypeFlags.NumberLiteral) {
|
||||
|
||||
@@ -44,7 +44,7 @@ registerCodeFix({
|
||||
},
|
||||
fixIds: [fixId],
|
||||
getAllCodeActions: function getAllCodeActionsToFixAwaitInSyncFunction(context) {
|
||||
const seen = new Map<number, true>();
|
||||
const seen = new Set<number>();
|
||||
return codeFixAll(context, errorCodes, (changes, diag) => {
|
||||
const nodes = getNodes(diag.file, diag.start);
|
||||
if (!nodes || !addToSeen(seen, getNodeId(nodes.insertBefore))) return;
|
||||
|
||||
@@ -44,7 +44,7 @@ registerCodeFix({
|
||||
},
|
||||
fixIds: [fixId],
|
||||
getAllCodeActions: function getAllCodeActionsToFixClassDoesntImplementInheritedAbstractMember(context) {
|
||||
const seenClassDeclarations = new Map<number, true>();
|
||||
const seenClassDeclarations = new Set<number>();
|
||||
return codeFixAll(context, errorCodes, (changes, diag) => {
|
||||
const classDeclaration = getClass(diag.file, diag.start);
|
||||
if (addToSeen(seenClassDeclarations, getNodeId(classDeclaration))) {
|
||||
|
||||
@@ -55,7 +55,7 @@ registerCodeFix({
|
||||
},
|
||||
fixIds: [fixId],
|
||||
getAllCodeActions(context) {
|
||||
const seenClassDeclarations = new Map<number, true>();
|
||||
const seenClassDeclarations = new Set<number>();
|
||||
return codeFixAll(context, errorCodes, (changes, diag) => {
|
||||
const classDeclaration = getClass(diag.file, diag.start);
|
||||
if (addToSeen(seenClassDeclarations, getNodeId(classDeclaration))) {
|
||||
|
||||
@@ -38,7 +38,7 @@ registerCodeFix({
|
||||
fixIds: [fixId],
|
||||
getAllCodeActions(context) {
|
||||
const { sourceFile } = context;
|
||||
const seenClasses = new Map<number, true>(); // Ensure we only do this once per class.
|
||||
const seenClasses = new Set<number>(); // Ensure we only do this once per class.
|
||||
return codeFixAll(context, errorCodes, (changes, diag) => {
|
||||
const nodes = getNodes(diag.file, diag.start);
|
||||
if (!nodes) return;
|
||||
|
||||
@@ -135,7 +135,7 @@ const errorCodes = [
|
||||
Diagnostics.Default_exports_can_t_be_inferred_with_isolatedDeclarations.code,
|
||||
Diagnostics.Only_const_arrays_can_be_inferred_with_isolatedDeclarations.code,
|
||||
Diagnostics.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function.code,
|
||||
Diagnostics.Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_supported_with_isolatedDeclarations.code,
|
||||
Diagnostics.Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_supported_with_isolatedDeclarations.code,
|
||||
Diagnostics.Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations.code,
|
||||
Diagnostics.Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit.code,
|
||||
];
|
||||
|
||||
@@ -80,12 +80,15 @@ import {
|
||||
ImportSpecifier,
|
||||
insertImports,
|
||||
InternalSymbolName,
|
||||
isDefaultImport,
|
||||
isExternalModuleReference,
|
||||
isFullSourceFile,
|
||||
isIdentifier,
|
||||
isImportable,
|
||||
isImportClause,
|
||||
isImportDeclaration,
|
||||
isImportEqualsDeclaration,
|
||||
isImportSpecifier,
|
||||
isIntrinsicJsxName,
|
||||
isJSDocImportTag,
|
||||
isJsxClosingElement,
|
||||
@@ -228,6 +231,7 @@ export interface ImportAdder {
|
||||
addImportFromDiagnostic: (diagnostic: DiagnosticWithLocation, context: CodeFixContextBase) => void;
|
||||
addImportFromExportedSymbol: (exportedSymbol: Symbol, isValidTypeOnlyUseSite?: boolean, referenceImport?: ImportOrRequireAliasDeclaration) => void;
|
||||
addImportForNonExistentExport: (exportName: string, exportingFileName: string, exportKind: ExportKind, exportedMeanings: SymbolFlags, isImportUsageValidAsTypeOnly: boolean) => void;
|
||||
addImportForModuleSymbol: (symbolAlias: Symbol, isValidTypeOnlyUseSite: boolean, referenceImport: ImportOrRequireAliasDeclaration) => void;
|
||||
addImportForUnresolvedIdentifier: (context: CodeFixContextBase, symbolToken: Identifier, useAutoImportProvider: boolean) => void;
|
||||
addVerbatimImport: (declaration: AnyImportOrRequireStatement | ImportOrRequireAliasDeclaration) => void;
|
||||
removeExistingImport: (declaration: ImportOrRequireAliasDeclaration) => void;
|
||||
@@ -257,7 +261,7 @@ function createImportAdderWorker(sourceFile: SourceFile | FutureSourceFile, prog
|
||||
type NewImportsKey = `${0 | 1}|${string}`;
|
||||
/** Use `getNewImportEntry` for access */
|
||||
const newImports = new Map<NewImportsKey, Mutable<ImportsCollection & { useRequire: boolean; }>>();
|
||||
return { addImportFromDiagnostic, addImportFromExportedSymbol, writeFixes, hasFixes, addImportForUnresolvedIdentifier, addImportForNonExistentExport, removeExistingImport, addVerbatimImport };
|
||||
return { addImportFromDiagnostic, addImportFromExportedSymbol, addImportForModuleSymbol, writeFixes, hasFixes, addImportForUnresolvedIdentifier, addImportForNonExistentExport, removeExistingImport, addVerbatimImport };
|
||||
|
||||
function addVerbatimImport(declaration: AnyImportOrRequireStatement | ImportOrRequireAliasDeclaration) {
|
||||
verbatimImports.add(declaration);
|
||||
@@ -276,7 +280,7 @@ function createImportAdderWorker(sourceFile: SourceFile | FutureSourceFile, prog
|
||||
}
|
||||
|
||||
function addImportFromExportedSymbol(exportedSymbol: Symbol, isValidTypeOnlyUseSite?: boolean, referenceImport?: ImportOrRequireAliasDeclaration) {
|
||||
const moduleSymbol = Debug.checkDefined(exportedSymbol.parent);
|
||||
const moduleSymbol = Debug.checkDefined(exportedSymbol.parent, "Expected exported symbol to have module symbol as parent");
|
||||
const symbolName = getNameForExportedSymbol(exportedSymbol, getEmitScriptTarget(compilerOptions));
|
||||
const checker = program.getTypeChecker();
|
||||
const symbol = checker.getMergedSymbol(skipAlias(exportedSymbol, checker));
|
||||
@@ -317,6 +321,74 @@ function createImportAdderWorker(sourceFile: SourceFile | FutureSourceFile, prog
|
||||
}
|
||||
}
|
||||
|
||||
function addImportForModuleSymbol(symbolAlias: Symbol, isValidTypeOnlyUseSite: boolean, referenceImport: ImportOrRequireAliasDeclaration) {
|
||||
// Adds import for module, import alias will be symbolAlias.name
|
||||
const checker = program.getTypeChecker();
|
||||
const moduleSymbol = checker.getAliasedSymbol(symbolAlias);
|
||||
Debug.assert(moduleSymbol.flags & SymbolFlags.Module, "Expected symbol to be a module");
|
||||
const moduleSpecifierResolutionHost = createModuleSpecifierResolutionHost(program, host);
|
||||
const moduleSpecifierResult = moduleSpecifiers.getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, sourceFile, moduleSpecifierResolutionHost, preferences, /*options*/ undefined, /*forAutoImport*/ true);
|
||||
|
||||
const useRequire = shouldUseRequire(sourceFile, program);
|
||||
|
||||
// Copy the type-only status from the reference import
|
||||
let addAsTypeOnly = getAddAsTypeOnly(
|
||||
isValidTypeOnlyUseSite,
|
||||
/*isForNewImportDeclaration*/ true,
|
||||
/*symbol*/ undefined,
|
||||
symbolAlias.flags,
|
||||
program.getTypeChecker(),
|
||||
compilerOptions,
|
||||
);
|
||||
addAsTypeOnly = addAsTypeOnly === AddAsTypeOnly.Allowed && isTypeOnlyImportDeclaration(referenceImport) ? AddAsTypeOnly.Required : AddAsTypeOnly.Allowed;
|
||||
|
||||
// Copy the kind of import
|
||||
const importKind = isImportDeclaration(referenceImport) ?
|
||||
isDefaultImport(referenceImport) ? ImportKind.Default : ImportKind.Namespace :
|
||||
isImportSpecifier(referenceImport) ? ImportKind.Named :
|
||||
isImportClause(referenceImport) && !!referenceImport.name ? ImportKind.Default : ImportKind.Namespace;
|
||||
|
||||
const exportInfo = [{
|
||||
symbol: symbolAlias,
|
||||
moduleSymbol,
|
||||
moduleFileName: moduleSymbol.declarations?.[0]?.getSourceFile()?.fileName,
|
||||
exportKind: ExportKind.Module,
|
||||
targetFlags: symbolAlias.flags,
|
||||
isFromPackageJson: false,
|
||||
}];
|
||||
|
||||
const existingFix = getImportFixForSymbol(
|
||||
sourceFile,
|
||||
exportInfo,
|
||||
program,
|
||||
/*position*/ undefined,
|
||||
!!isValidTypeOnlyUseSite,
|
||||
useRequire,
|
||||
host,
|
||||
preferences,
|
||||
);
|
||||
|
||||
let fix: FixAddNewImport | ImportFixWithModuleSpecifier;
|
||||
if (existingFix && importKind !== ImportKind.Namespace) {
|
||||
fix = {
|
||||
...existingFix,
|
||||
addAsTypeOnly,
|
||||
importKind,
|
||||
};
|
||||
}
|
||||
else {
|
||||
fix = {
|
||||
kind: ImportFixKind.AddNew,
|
||||
moduleSpecifierKind: existingFix !== undefined ? existingFix.moduleSpecifierKind : moduleSpecifierResult.kind,
|
||||
moduleSpecifier: existingFix !== undefined ? existingFix.moduleSpecifier : first(moduleSpecifierResult.moduleSpecifiers),
|
||||
importKind,
|
||||
addAsTypeOnly,
|
||||
useRequire,
|
||||
};
|
||||
}
|
||||
addImport({ fix, symbolName: symbolAlias.name, errorIdentifierText: undefined });
|
||||
}
|
||||
|
||||
function addImportForNonExistentExport(exportName: string, exportingFileName: string, exportKind: ExportKind, exportedMeanings: SymbolFlags, isImportUsageValidAsTypeOnly: boolean) {
|
||||
const exportingSourceFile = program.getSourceFile(exportingFileName);
|
||||
const useRequire = shouldUseRequire(sourceFile, program);
|
||||
@@ -494,8 +566,8 @@ function createImportAdderWorker(sourceFile: SourceFile | FutureSourceFile, prog
|
||||
|
||||
function writeFixes(changeTracker: textChanges.ChangeTracker, oldFileQuotePreference?: QuotePreference) {
|
||||
let quotePreference: QuotePreference;
|
||||
if (isFullSourceFile(sourceFile) && sourceFile.imports.length === 0 && oldFileQuotePreference !== undefined) {
|
||||
// If the target file has no imports, we must use the same quote preference as the file we are importing from.
|
||||
if (sourceFile.imports !== undefined && sourceFile.imports.length === 0 && oldFileQuotePreference !== undefined) {
|
||||
// If the target file (including future files) has no imports, we must use the same quote preference as the file we are importing from.
|
||||
quotePreference = oldFileQuotePreference;
|
||||
}
|
||||
else {
|
||||
@@ -891,9 +963,10 @@ function getAllExportInfoForSymbol(importingFile: SourceFile | FutureSourceFile,
|
||||
const moduleSymbolExcluded = moduleSourceFile && isFileExcluded(moduleSourceFile as SourceFile);
|
||||
return getExportInfoMap(importingFile, host, program, preferences, cancellationToken)
|
||||
.search(importingFile.path, preferCapitalized, name => name === symbolName, info => {
|
||||
const checker = getChecker(info[0].isFromPackageJson);
|
||||
if (
|
||||
getChecker(info[0].isFromPackageJson).getMergedSymbol(skipAlias(info[0].symbol, getChecker(info[0].isFromPackageJson))) === symbol
|
||||
&& (moduleSymbolExcluded || info.some(i => i.moduleSymbol === moduleSymbol || i.symbol.parent === moduleSymbol))
|
||||
checker.getMergedSymbol(skipAlias(info[0].symbol, checker)) === symbol
|
||||
&& (moduleSymbolExcluded || info.some(i => checker.getMergedSymbol(i.moduleSymbol) === moduleSymbol || i.symbol.parent === moduleSymbol))
|
||||
) {
|
||||
return info;
|
||||
}
|
||||
@@ -1451,6 +1524,8 @@ export function getImportKind(importingFile: SourceFile | FutureSourceFile, expo
|
||||
return getExportEqualsImportKind(importingFile, program.getCompilerOptions(), !!forceImportKeyword);
|
||||
case ExportKind.UMD:
|
||||
return getUmdImportKind(importingFile, program, !!forceImportKeyword);
|
||||
case ExportKind.Module:
|
||||
return ImportKind.Namespace;
|
||||
default:
|
||||
return Debug.assertNever(exportKind);
|
||||
}
|
||||
|
||||
@@ -3585,7 +3585,7 @@ function getCompletionData(
|
||||
let importSpecifierResolver: codefix.ImportSpecifierResolver | undefined;
|
||||
const symbolToOriginInfoMap: SymbolOriginInfoMap = [];
|
||||
const symbolToSortTextMap: SymbolSortTextMap = [];
|
||||
const seenPropertySymbols = new Map<SymbolId, true>();
|
||||
const seenPropertySymbols = new Set<SymbolId>();
|
||||
const isTypeOnlyLocation = isTypeOnlyCompletion();
|
||||
const getModuleSpecifierResolutionHost = memoizeOne((isFromPackageJson: boolean) => {
|
||||
return createModuleSpecifierResolutionHost(isFromPackageJson ? host.getPackageJsonAutoImportProvider!()! : program, host);
|
||||
@@ -6051,14 +6051,14 @@ function isArrowFunctionBody(node: Node) {
|
||||
}
|
||||
|
||||
/** True if symbol is a type or a module containing at least one type. */
|
||||
function symbolCanBeReferencedAtTypeLocation(symbol: Symbol, checker: TypeChecker, seenModules = new Map<SymbolId, true>()): boolean {
|
||||
function symbolCanBeReferencedAtTypeLocation(symbol: Symbol, checker: TypeChecker, seenModules = new Set<Symbol>()): boolean {
|
||||
// Since an alias can be merged with a local declaration, we need to test both the alias and its target.
|
||||
// This code used to just test the result of `skipAlias`, but that would ignore any locally introduced meanings.
|
||||
return nonAliasCanBeReferencedAtTypeLocation(symbol) || nonAliasCanBeReferencedAtTypeLocation(skipAlias(symbol.exportSymbol || symbol, checker));
|
||||
|
||||
function nonAliasCanBeReferencedAtTypeLocation(symbol: Symbol): boolean {
|
||||
return !!(symbol.flags & SymbolFlags.Type) || checker.isUnknownSymbol(symbol) ||
|
||||
!!(symbol.flags & SymbolFlags.Module) && addToSeen(seenModules, getSymbolId(symbol)) &&
|
||||
!!(symbol.flags & SymbolFlags.Module) && addToSeen(seenModules, symbol) &&
|
||||
checker.getExportsOfModule(symbol).some(e => symbolCanBeReferencedAtTypeLocation(e, checker, seenModules));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,6 +74,7 @@ export const enum ExportKind {
|
||||
Default,
|
||||
ExportEquals,
|
||||
UMD,
|
||||
Module,
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
@@ -555,7 +556,7 @@ export function getExportInfoMap(importingFile: SourceFile | FutureSourceFile, h
|
||||
try {
|
||||
forEachExternalModuleToImportFrom(program, host, preferences, /*useAutoImportProvider*/ true, (moduleSymbol, moduleFile, program, isFromPackageJson) => {
|
||||
if (++moduleCount % 100 === 0) cancellationToken?.throwIfCancellationRequested();
|
||||
const seenExports = new Map<__String, true>();
|
||||
const seenExports = new Set<__String>();
|
||||
const checker = program.getTypeChecker();
|
||||
const defaultInfo = getDefaultLikeExportInfo(moduleSymbol, checker);
|
||||
// Note: I think we shouldn't actually see resolved module symbols here, but weird merges
|
||||
@@ -604,7 +605,11 @@ export function getDefaultLikeExportInfo(moduleSymbol: Symbol, checker: TypeChec
|
||||
exportKind: ExportKind;
|
||||
} | undefined {
|
||||
const exportEquals = checker.resolveExternalModuleSymbol(moduleSymbol);
|
||||
if (exportEquals !== moduleSymbol) return { symbol: exportEquals, exportKind: ExportKind.ExportEquals };
|
||||
if (exportEquals !== moduleSymbol) {
|
||||
const defaultExport = checker.tryGetMemberInModuleExports(InternalSymbolName.Default, exportEquals);
|
||||
if (defaultExport) return { symbol: defaultExport, exportKind: ExportKind.Default };
|
||||
return { symbol: exportEquals, exportKind: ExportKind.ExportEquals };
|
||||
}
|
||||
const defaultExport = checker.tryGetMemberInModuleExports(InternalSymbolName.Default, moduleSymbol);
|
||||
if (defaultExport) return { symbol: defaultExport, exportKind: ExportKind.Default };
|
||||
}
|
||||
@@ -630,7 +635,7 @@ function getNamesForExportedSymbol(defaultExport: Symbol, checker: TypeChecker,
|
||||
export function forEachNameOfDefaultExport<T>(defaultExport: Symbol, checker: TypeChecker, scriptTarget: ScriptTarget | undefined, cb: (name: string, capitalizedName?: string) => T | undefined): T | undefined {
|
||||
let chain: Symbol[] | undefined;
|
||||
let current: Symbol | undefined = defaultExport;
|
||||
const seen = new Map<Symbol, true>();
|
||||
const seen = new Set<Symbol>();
|
||||
|
||||
while (current) {
|
||||
// The predecessor to this function also looked for a name on the `localSymbol`
|
||||
|
||||
@@ -251,7 +251,6 @@ import {
|
||||
SymbolDisplayPart,
|
||||
SymbolDisplayPartKind,
|
||||
SymbolFlags,
|
||||
SymbolId,
|
||||
symbolName,
|
||||
SyntaxKind,
|
||||
textPart,
|
||||
@@ -544,7 +543,7 @@ export function getImplementationsAtPosition(program: Program, cancellationToken
|
||||
}
|
||||
else if (entries) {
|
||||
const queue = createQueue(entries);
|
||||
const seenNodes = new Map<number, true>();
|
||||
const seenNodes = new Set<number>();
|
||||
while (!queue.isEmpty()) {
|
||||
const entry = queue.dequeue() as NodeEntry;
|
||||
if (!addToSeen(seenNodes, getNodeId(entry.node))) {
|
||||
@@ -2666,7 +2665,7 @@ export namespace Core {
|
||||
* The value of previousIterationSymbol is undefined when the function is first called.
|
||||
*/
|
||||
function getPropertySymbolsFromBaseTypes<T>(symbol: Symbol, propertyName: string, checker: TypeChecker, cb: (symbol: Symbol) => T | undefined): T | undefined {
|
||||
const seen = new Map<SymbolId, true>();
|
||||
const seen = new Set<Symbol>();
|
||||
return recur(symbol);
|
||||
|
||||
function recur(symbol: Symbol): T | undefined {
|
||||
@@ -2674,7 +2673,7 @@ export namespace Core {
|
||||
// interface C extends C {
|
||||
// /*findRef*/propName: string;
|
||||
// }
|
||||
if (!(symbol.flags & (SymbolFlags.Class | SymbolFlags.Interface)) || !addToSeen(seen, getSymbolId(symbol))) return;
|
||||
if (!(symbol.flags & (SymbolFlags.Class | SymbolFlags.Interface)) || !addToSeen(seen, symbol)) return;
|
||||
|
||||
return firstDefined(symbol.declarations, declaration =>
|
||||
firstDefined(getAllSuperTypeNodes(declaration), typeReference => {
|
||||
|
||||
@@ -933,6 +933,13 @@ function isSemicolonDeletionContext(context: FormattingContext): boolean {
|
||||
|| nextTokenKind === SyntaxKind.EndOfFileToken;
|
||||
}
|
||||
|
||||
if (
|
||||
nextTokenKind === SyntaxKind.SemicolonToken &&
|
||||
context.currentTokenSpan.kind === SyntaxKind.SemicolonToken
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (
|
||||
nextTokenKind === SyntaxKind.SemicolonClassElement ||
|
||||
nextTokenKind === SyntaxKind.SemicolonToken
|
||||
|
||||
@@ -106,7 +106,6 @@ import {
|
||||
PrefixUnaryExpression,
|
||||
PropertyDeclaration,
|
||||
QuotePreference,
|
||||
Signature,
|
||||
SignatureDeclarationBase,
|
||||
skipParentheses,
|
||||
some,
|
||||
@@ -296,11 +295,8 @@ export function provideInlayHints(context: InlayHintsContext): InlayHint[] {
|
||||
return;
|
||||
}
|
||||
|
||||
const candidates: Signature[] = [];
|
||||
const signature = checker.getResolvedSignatureForSignatureHelp(expr, candidates);
|
||||
if (!signature || !candidates.length) {
|
||||
return;
|
||||
}
|
||||
const signature = checker.getResolvedSignature(expr);
|
||||
if (signature === undefined) return;
|
||||
|
||||
let signatureParamPos = 0;
|
||||
for (const originalArg of args) {
|
||||
|
||||
@@ -760,6 +760,7 @@ function isSynthesized(node: Node) {
|
||||
// We want to merge own children like `I` in in `module A { interface I {} } module A { interface I {} }`
|
||||
// We don't want to merge unrelated children like `m` in `const o = { a: { m() {} }, b: { m() {} } };`
|
||||
function isOwnChild(n: Node, parent: NavigationBarNode): boolean {
|
||||
if (n.parent === undefined) return false;
|
||||
const par = isModuleBlock(n.parent) ? n.parent.parent : n.parent;
|
||||
return par === parent.node || contains(parent.additionalNodes, par);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
fileShouldUseJavaScriptRequire,
|
||||
findAncestor,
|
||||
findIndex,
|
||||
findTokenOnLeftOfPosition,
|
||||
forEachChild,
|
||||
formatting,
|
||||
getNewLineOrDefaultFromHost,
|
||||
@@ -50,11 +51,16 @@ export function pasteEditsProvider(
|
||||
return { edits: changes, fixId };
|
||||
}
|
||||
|
||||
interface CopiedFromInfo {
|
||||
file: SourceFile;
|
||||
range: TextRange[];
|
||||
}
|
||||
|
||||
function pasteEdits(
|
||||
targetFile: SourceFile,
|
||||
pastedText: string[],
|
||||
pasteLocations: TextRange[],
|
||||
copiedFrom: { file: SourceFile; range: TextRange[]; } | undefined,
|
||||
copiedFrom: CopiedFromInfo | undefined,
|
||||
host: LanguageServiceHost,
|
||||
preferences: UserPreferences,
|
||||
formatContext: formatting.FormatContext,
|
||||
@@ -93,11 +99,13 @@ function pasteEdits(
|
||||
}
|
||||
statements.push(...statementsInSourceFile.slice(startNodeIndex, endNodeIndex === -1 ? statementsInSourceFile.length : endNodeIndex + 1));
|
||||
});
|
||||
const usage = getUsageInfo(copiedFrom.file, statements, originalProgram!.getTypeChecker(), getExistingLocals(updatedFile, statements, originalProgram!.getTypeChecker()), { pos: copiedFrom.range[0].pos, end: copiedFrom.range[copiedFrom.range.length - 1].end });
|
||||
Debug.assertIsDefined(originalProgram);
|
||||
Debug.assertIsDefined(originalProgram, "no original program found");
|
||||
const originalProgramTypeChecker = originalProgram.getTypeChecker();
|
||||
const usageInfoRange = getUsageInfoRangeForPasteEdits(copiedFrom);
|
||||
const usage = getUsageInfo(copiedFrom.file, statements, originalProgramTypeChecker, getExistingLocals(updatedFile, statements, originalProgramTypeChecker), usageInfoRange);
|
||||
const useEsModuleSyntax = !fileShouldUseJavaScriptRequire(targetFile.fileName, originalProgram, host, !!copiedFrom.file.commonJsModuleIndicator);
|
||||
addExportsInOldFile(copiedFrom.file, usage.targetFileImportsFromOldFile, changes, useEsModuleSyntax);
|
||||
addTargetFileImports(copiedFrom.file, usage.oldImportsNeededByTargetFile, usage.targetFileImportsFromOldFile, originalProgram.getTypeChecker(), updatedProgram, importAdder);
|
||||
addTargetFileImports(copiedFrom.file, usage.oldImportsNeededByTargetFile, usage.targetFileImportsFromOldFile, originalProgramTypeChecker, updatedProgram, importAdder);
|
||||
}
|
||||
else {
|
||||
const context: CodeFixContextBase = {
|
||||
@@ -167,3 +175,18 @@ function pasteEdits(
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Adjusts the range for `getUsageInfo` to correctly include identifiers at the edges of the copied text.
|
||||
*/
|
||||
function getUsageInfoRangeForPasteEdits({ file: sourceFile, range }: CopiedFromInfo) {
|
||||
const pos = range[0].pos;
|
||||
const end = range[range.length - 1].end;
|
||||
const startToken = getTokenAtPosition(sourceFile, pos);
|
||||
const endToken = findTokenOnLeftOfPosition(sourceFile, pos) ?? getTokenAtPosition(sourceFile, end);
|
||||
// Since the range is only used to check identifiers, we do not need to adjust range when the tokens at the edges are not identifiers.
|
||||
return {
|
||||
pos: isIdentifier(startToken) && pos <= startToken.getStart(sourceFile) ? startToken.getFullStart() : pos,
|
||||
end: isIdentifier(endToken) && end === endToken.getEnd() ? textChanges.getAdjustedEndPosition(sourceFile, endToken, {}) : end,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -247,7 +247,7 @@ function flattenTypeLiteralNodeReference(checker: TypeChecker, selection: TypeNo
|
||||
}
|
||||
if (isIntersectionTypeNode(selection)) {
|
||||
const result: TypeElement[] = [];
|
||||
const seen = new Map<string, true>();
|
||||
const seen = new Set<string>();
|
||||
for (const type of selection.types) {
|
||||
const flattenedTypeMembers = flattenTypeLiteralNodeReference(checker, type);
|
||||
if (!flattenedTypeMembers || !flattenedTypeMembers.every(type => type.name && addToSeen(seen, getNameFromPropertyName(type.name) as string))) {
|
||||
|
||||
@@ -80,6 +80,10 @@ export function addTargetFileImports(
|
||||
if (checker.isUnknownSymbol(targetSymbol)) {
|
||||
importAdder.addVerbatimImport(Debug.checkDefined(declaration ?? findAncestor(symbol.declarations?.[0], isAnyImportOrRequireStatement)));
|
||||
}
|
||||
else if (targetSymbol.parent === undefined) {
|
||||
Debug.assert(declaration !== undefined, "expected module symbol to have a declaration");
|
||||
importAdder.addImportForModuleSymbol(symbol, isValidTypeOnlyUseSite, declaration);
|
||||
}
|
||||
else {
|
||||
importAdder.addImportFromExportedSymbol(targetSymbol, isValidTypeOnlyUseSite, declaration);
|
||||
}
|
||||
|
||||
@@ -27,9 +27,11 @@ import {
|
||||
CompletionEntry,
|
||||
CompletionEntryDetails,
|
||||
CompletionInfo,
|
||||
concatenate,
|
||||
contains,
|
||||
containsPath,
|
||||
ContextFlags,
|
||||
createModuleSpecifierResolutionHost,
|
||||
createSortedArray,
|
||||
createTextSpan,
|
||||
createTextSpanFromStringLiteralLikeContent,
|
||||
@@ -66,8 +68,11 @@ import {
|
||||
getPackageJsonTypesVersionsPaths,
|
||||
getPathComponents,
|
||||
getPathsBasePath,
|
||||
getPossibleOriginalInputExtensionForExtension,
|
||||
getPossibleOriginalInputPathWithoutChangingExt,
|
||||
getReplacementSpanForContextToken,
|
||||
getResolvePackageJsonExports,
|
||||
getResolvePackageJsonImports,
|
||||
getSupportedExtensions,
|
||||
getSupportedExtensionsWithJsonIfResolveJsonModule,
|
||||
getTextOfJsxAttributeName,
|
||||
@@ -77,6 +82,7 @@ import {
|
||||
hasProperty,
|
||||
hasTrailingDirectorySeparator,
|
||||
hostGetCanonicalFileName,
|
||||
hostUsesCaseSensitiveFileNames,
|
||||
ImportOrExportSpecifier,
|
||||
IndexedAccessTypeNode,
|
||||
InternalSymbolName,
|
||||
@@ -109,6 +115,7 @@ import {
|
||||
moduleExportNameTextEscaped,
|
||||
moduleResolutionUsesNodeModules,
|
||||
ModuleSpecifierEnding,
|
||||
ModuleSpecifierResolutionHost,
|
||||
moduleSpecifiers,
|
||||
newCaseClauseTracker,
|
||||
Node,
|
||||
@@ -200,7 +207,7 @@ export function getStringLiteralCompletions(
|
||||
includeSymbol: boolean,
|
||||
): CompletionInfo | undefined {
|
||||
if (isInReferenceComment(sourceFile, position)) {
|
||||
const entries = getTripleSlashReferenceCompletion(sourceFile, position, program, host);
|
||||
const entries = getTripleSlashReferenceCompletion(sourceFile, position, program, host, createModuleSpecifierResolutionHost(program, host));
|
||||
return entries && convertPathCompletions(entries);
|
||||
}
|
||||
if (isInString(sourceFile, position, contextToken)) {
|
||||
@@ -555,7 +562,7 @@ function getAlreadyUsedTypesInStringLiteralUnion(union: UnionTypeNode, current:
|
||||
|
||||
function getStringLiteralCompletionsFromSignature(call: CallLikeExpression, arg: StringLiteralLike, argumentInfo: SignatureHelp.ArgumentInfoForCompletions, checker: TypeChecker): StringLiteralCompletionsFromTypes | undefined {
|
||||
let isNewIdentifier = false;
|
||||
const uniques = new Map<string, true>();
|
||||
const uniques = new Set<string>();
|
||||
const editingArgument = isJsxOpeningLikeElement(call) ? Debug.checkDefined(findAncestor(arg.parent, isJsxAttribute)) : arg;
|
||||
const candidates = checker.getCandidateSignaturesForStringLiteralCompletions(call, editingArgument);
|
||||
const types = flatMap(candidates, candidate => {
|
||||
@@ -600,7 +607,7 @@ function stringLiteralCompletionsForObjectLiteral(checker: TypeChecker, objectLi
|
||||
};
|
||||
}
|
||||
|
||||
function getStringLiteralTypes(type: Type | undefined, uniques = new Map<string, true>()): readonly StringLiteralType[] {
|
||||
function getStringLiteralTypes(type: Type | undefined, uniques = new Set<string>()): readonly StringLiteralType[] {
|
||||
if (!type) return emptyArray;
|
||||
type = skipConstraint(type);
|
||||
return type.isUnion() ? flatMap(type.types, t => getStringLiteralTypes(t, uniques)) :
|
||||
@@ -641,11 +648,12 @@ function getStringLiteralCompletionsFromModuleNamesWorker(sourceFile: SourceFile
|
||||
const scriptDirectory = getDirectoryPath(scriptPath);
|
||||
const compilerOptions = program.getCompilerOptions();
|
||||
const typeChecker = program.getTypeChecker();
|
||||
const moduleSpecifierResolutionHost = createModuleSpecifierResolutionHost(program, host);
|
||||
const extensionOptions = getExtensionOptions(compilerOptions, ReferenceKind.ModuleSpecifier, sourceFile, typeChecker, preferences, mode);
|
||||
|
||||
return isPathRelativeToScript(literalValue) || !compilerOptions.baseUrl && !compilerOptions.paths && (isRootedDiskPath(literalValue) || isUrl(literalValue))
|
||||
? getCompletionEntriesForRelativeModules(literalValue, scriptDirectory, program, host, scriptPath, extensionOptions)
|
||||
: getCompletionEntriesForNonRelativeModules(literalValue, scriptDirectory, mode, program, host, extensionOptions);
|
||||
? getCompletionEntriesForRelativeModules(literalValue, scriptDirectory, program, host, moduleSpecifierResolutionHost, scriptPath, extensionOptions)
|
||||
: getCompletionEntriesForNonRelativeModules(literalValue, scriptDirectory, mode, program, host, moduleSpecifierResolutionHost, extensionOptions);
|
||||
}
|
||||
|
||||
interface ExtensionOptions {
|
||||
@@ -665,7 +673,7 @@ function getExtensionOptions(compilerOptions: CompilerOptions, referenceKind: Re
|
||||
resolutionMode,
|
||||
};
|
||||
}
|
||||
function getCompletionEntriesForRelativeModules(literalValue: string, scriptDirectory: string, program: Program, host: LanguageServiceHost, scriptPath: Path, extensionOptions: ExtensionOptions) {
|
||||
function getCompletionEntriesForRelativeModules(literalValue: string, scriptDirectory: string, program: Program, host: LanguageServiceHost, moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost, scriptPath: Path, extensionOptions: ExtensionOptions) {
|
||||
const compilerOptions = program.getCompilerOptions();
|
||||
if (compilerOptions.rootDirs) {
|
||||
return getCompletionEntriesForDirectoryFragmentWithRootDirs(
|
||||
@@ -675,11 +683,12 @@ function getCompletionEntriesForRelativeModules(literalValue: string, scriptDire
|
||||
extensionOptions,
|
||||
program,
|
||||
host,
|
||||
moduleSpecifierResolutionHost,
|
||||
scriptPath,
|
||||
);
|
||||
}
|
||||
else {
|
||||
return arrayFrom(getCompletionEntriesForDirectoryFragment(literalValue, scriptDirectory, extensionOptions, program, host, /*moduleSpecifierIsRelative*/ true, scriptPath).values());
|
||||
return arrayFrom(getCompletionEntriesForDirectoryFragment(literalValue, scriptDirectory, extensionOptions, program, host, moduleSpecifierResolutionHost, /*moduleSpecifierIsRelative*/ true, scriptPath).values());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -717,13 +726,13 @@ function getBaseDirectoriesFromRootDirs(rootDirs: string[], basePath: string, sc
|
||||
);
|
||||
}
|
||||
|
||||
function getCompletionEntriesForDirectoryFragmentWithRootDirs(rootDirs: string[], fragment: string, scriptDirectory: string, extensionOptions: ExtensionOptions, program: Program, host: LanguageServiceHost, exclude: string): readonly NameAndKind[] {
|
||||
function getCompletionEntriesForDirectoryFragmentWithRootDirs(rootDirs: string[], fragment: string, scriptDirectory: string, extensionOptions: ExtensionOptions, program: Program, host: LanguageServiceHost, moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost, exclude: string): readonly NameAndKind[] {
|
||||
const compilerOptions = program.getCompilerOptions();
|
||||
const basePath = compilerOptions.project || host.getCurrentDirectory();
|
||||
const ignoreCase = !(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames());
|
||||
const baseDirectories = getBaseDirectoriesFromRootDirs(rootDirs, basePath, scriptDirectory, ignoreCase);
|
||||
return deduplicate<NameAndKind>(
|
||||
flatMap(baseDirectories, baseDirectory => arrayFrom(getCompletionEntriesForDirectoryFragment(fragment, baseDirectory, extensionOptions, program, host, /*moduleSpecifierIsRelative*/ true, exclude).values())),
|
||||
flatMap(baseDirectories, baseDirectory => arrayFrom(getCompletionEntriesForDirectoryFragment(fragment, baseDirectory, extensionOptions, program, host, moduleSpecifierResolutionHost, /*moduleSpecifierIsRelative*/ true, exclude).values())),
|
||||
(itemA, itemB) => itemA.name === itemB.name && itemA.kind === itemB.kind && itemA.extension === itemB.extension,
|
||||
);
|
||||
}
|
||||
@@ -741,6 +750,7 @@ function getCompletionEntriesForDirectoryFragment(
|
||||
extensionOptions: ExtensionOptions,
|
||||
program: Program,
|
||||
host: LanguageServiceHost,
|
||||
moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost,
|
||||
moduleSpecifierIsRelative: boolean,
|
||||
exclude?: string,
|
||||
result = createNameAndKindSet(),
|
||||
@@ -779,7 +789,7 @@ function getCompletionEntriesForDirectoryFragment(
|
||||
if (versionPaths) {
|
||||
const packageDirectory = getDirectoryPath(packageJsonPath);
|
||||
const pathInPackage = absolutePath.slice(ensureTrailingDirectorySeparator(packageDirectory).length);
|
||||
if (addCompletionEntriesFromPaths(result, pathInPackage, packageDirectory, extensionOptions, program, host, versionPaths)) {
|
||||
if (addCompletionEntriesFromPaths(result, pathInPackage, packageDirectory, extensionOptions, program, host, moduleSpecifierResolutionHost, versionPaths)) {
|
||||
// A true result means one of the `versionPaths` was matched, which will block relative resolution
|
||||
// to files and folders from here. All reachable paths given the pattern match are already added.
|
||||
return result;
|
||||
@@ -802,7 +812,7 @@ function getCompletionEntriesForDirectoryFragment(
|
||||
continue;
|
||||
}
|
||||
|
||||
const { name, extension } = getFilenameWithExtensionOption(getBaseFileName(filePath), program, extensionOptions, /*isExportsWildcard*/ false);
|
||||
const { name, extension } = getFilenameWithExtensionOption(getBaseFileName(filePath), program, extensionOptions, /*isExportsOrImportsWildcard*/ false);
|
||||
result.add(nameAndKind(name, ScriptElementKind.scriptElement, extension));
|
||||
}
|
||||
}
|
||||
@@ -822,7 +832,7 @@ function getCompletionEntriesForDirectoryFragment(
|
||||
return result;
|
||||
}
|
||||
|
||||
function getFilenameWithExtensionOption(name: string, program: Program, extensionOptions: ExtensionOptions, isExportsWildcard: boolean): { name: string; extension: Extension | undefined; } {
|
||||
function getFilenameWithExtensionOption(name: string, program: Program, extensionOptions: ExtensionOptions, isExportsOrImportsWildcard: boolean): { name: string; extension: Extension | undefined; } {
|
||||
const nonJsResult = moduleSpecifiers.tryGetRealFileNameForNonJsDeclarationFileName(name);
|
||||
if (nonJsResult) {
|
||||
return { name: nonJsResult, extension: tryGetExtensionFromPath(nonJsResult) };
|
||||
@@ -838,7 +848,7 @@ function getFilenameWithExtensionOption(name: string, program: Program, extensio
|
||||
extensionOptions.importingSourceFile,
|
||||
).getAllowedEndingsInPreferredOrder(extensionOptions.resolutionMode);
|
||||
|
||||
if (isExportsWildcard) {
|
||||
if (isExportsOrImportsWildcard) {
|
||||
// If we're completing `import {} from "foo/|"` and subpaths are available via `"exports": { "./*": "./src/*" }`,
|
||||
// the completion must be a (potentially extension-swapped) file name. Dropping extensions and index files is not allowed.
|
||||
allowedEndings = allowedEndings.filter(e => e !== ModuleSpecifierEnding.Minimal && e !== ModuleSpecifierEnding.Index);
|
||||
@@ -855,7 +865,7 @@ function getFilenameWithExtensionOption(name: string, program: Program, extensio
|
||||
}
|
||||
|
||||
if (
|
||||
!isExportsWildcard &&
|
||||
!isExportsOrImportsWildcard &&
|
||||
(allowedEndings[0] === ModuleSpecifierEnding.Minimal || allowedEndings[0] === ModuleSpecifierEnding.Index) &&
|
||||
fileExtensionIsOneOf(name, [Extension.Js, Extension.Jsx, Extension.Ts, Extension.Tsx, Extension.Dts])
|
||||
) {
|
||||
@@ -876,6 +886,7 @@ function addCompletionEntriesFromPaths(
|
||||
extensionOptions: ExtensionOptions,
|
||||
program: Program,
|
||||
host: LanguageServiceHost,
|
||||
moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost,
|
||||
paths: MapLike<string[]>,
|
||||
) {
|
||||
const getPatternsForKey = (key: string) => paths[key];
|
||||
@@ -886,18 +897,20 @@ function addCompletionEntriesFromPaths(
|
||||
const lengthB = typeof patternB === "object" ? patternB.prefix.length : b.length;
|
||||
return compareValues(lengthB, lengthA);
|
||||
};
|
||||
return addCompletionEntriesFromPathsOrExports(result, /*isExports*/ false, fragment, baseDirectory, extensionOptions, program, host, getOwnKeys(paths), getPatternsForKey, comparePaths);
|
||||
return addCompletionEntriesFromPathsOrExportsOrImports(result, /*isExports*/ false, /*isImports*/ false, fragment, baseDirectory, extensionOptions, program, host, moduleSpecifierResolutionHost, getOwnKeys(paths), getPatternsForKey, comparePaths);
|
||||
}
|
||||
|
||||
/** @returns whether `fragment` was a match for any `paths` (which should indicate whether any other path completions should be offered) */
|
||||
function addCompletionEntriesFromPathsOrExports(
|
||||
function addCompletionEntriesFromPathsOrExportsOrImports(
|
||||
result: NameAndKindSet,
|
||||
isExports: boolean,
|
||||
isImports: boolean,
|
||||
fragment: string,
|
||||
baseDirectory: string,
|
||||
extensionOptions: ExtensionOptions,
|
||||
program: Program,
|
||||
host: LanguageServiceHost,
|
||||
moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost,
|
||||
keys: readonly string[],
|
||||
getPatternsForKey: (key: string) => string[] | undefined,
|
||||
comparePaths: (a: string, b: string) => Comparison,
|
||||
@@ -906,13 +919,15 @@ function addCompletionEntriesFromPathsOrExports(
|
||||
let matchedPath: string | undefined;
|
||||
for (const key of keys) {
|
||||
if (key === ".") continue;
|
||||
const keyWithoutLeadingDotSlash = key.replace(/^\.\//, ""); // remove leading "./"
|
||||
const keyWithoutLeadingDotSlash = key
|
||||
.replace(/^\.\//, "") // remove leading "./"
|
||||
+ ((isExports || isImports) && endsWith(key, "/") ? "*" : ""); // normalize trailing `/` to `/*`
|
||||
const patterns = getPatternsForKey(key);
|
||||
if (patterns) {
|
||||
const pathPattern = tryParsePattern(keyWithoutLeadingDotSlash);
|
||||
if (!pathPattern) continue;
|
||||
const isMatch = typeof pathPattern === "object" && isPatternMatch(pathPattern, fragment);
|
||||
const isLongestMatch = isMatch && (matchedPath === undefined || comparePaths(key, matchedPath) === Comparison.LessThan);
|
||||
const isLongestMatch = isMatch && (matchedPath === undefined || comparePaths(keyWithoutLeadingDotSlash, matchedPath) === Comparison.LessThan);
|
||||
if (isLongestMatch) {
|
||||
// If this is a higher priority match than anything we've seen so far, previous results from matches are invalid, e.g.
|
||||
// for `import {} from "some-package/|"` with a typesVersions:
|
||||
@@ -925,13 +940,13 @@ function addCompletionEntriesFromPathsOrExports(
|
||||
// added by the '*' match, after typing `"some-package/foo/|"` we would get file results from both
|
||||
// ./dist/foo and ./foo, when only the latter will actually be resolvable.
|
||||
// See pathCompletionsTypesVersionsWildcard6.ts.
|
||||
matchedPath = key;
|
||||
matchedPath = keyWithoutLeadingDotSlash;
|
||||
pathResults = pathResults.filter(r => !r.matchedPattern);
|
||||
}
|
||||
if (typeof pathPattern === "string" || matchedPath === undefined || comparePaths(key, matchedPath) !== Comparison.GreaterThan) {
|
||||
if (typeof pathPattern === "string" || matchedPath === undefined || comparePaths(keyWithoutLeadingDotSlash, matchedPath) !== Comparison.GreaterThan) {
|
||||
pathResults.push({
|
||||
matchedPattern: isMatch,
|
||||
results: getCompletionsForPathMapping(keyWithoutLeadingDotSlash, patterns, fragment, baseDirectory, extensionOptions, isExports && isMatch, program, host)
|
||||
results: getCompletionsForPathMapping(keyWithoutLeadingDotSlash, patterns, fragment, baseDirectory, extensionOptions, isExports, isImports, program, host, moduleSpecifierResolutionHost)
|
||||
.map(({ name, kind, extension }) => nameAndKind(name, kind, extension)),
|
||||
});
|
||||
}
|
||||
@@ -955,6 +970,7 @@ function getCompletionEntriesForNonRelativeModules(
|
||||
mode: ResolutionMode,
|
||||
program: Program,
|
||||
host: LanguageServiceHost,
|
||||
moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost,
|
||||
extensionOptions: ExtensionOptions,
|
||||
): readonly NameAndKind[] {
|
||||
const typeChecker = program.getTypeChecker();
|
||||
@@ -966,12 +982,12 @@ function getCompletionEntriesForNonRelativeModules(
|
||||
|
||||
if (baseUrl) {
|
||||
const absolute = normalizePath(combinePaths(host.getCurrentDirectory(), baseUrl));
|
||||
getCompletionEntriesForDirectoryFragment(fragment, absolute, extensionOptions, program, host, /*moduleSpecifierIsRelative*/ false, /*exclude*/ undefined, result);
|
||||
getCompletionEntriesForDirectoryFragment(fragment, absolute, extensionOptions, program, host, moduleSpecifierResolutionHost, /*moduleSpecifierIsRelative*/ false, /*exclude*/ undefined, result);
|
||||
}
|
||||
|
||||
if (paths) {
|
||||
const absolute = getPathsBasePath(compilerOptions, host)!;
|
||||
addCompletionEntriesFromPaths(result, fragment, absolute, extensionOptions, program, host, paths);
|
||||
addCompletionEntriesFromPaths(result, fragment, absolute, extensionOptions, program, host, moduleSpecifierResolutionHost, paths);
|
||||
}
|
||||
|
||||
const fragmentDirectory = getFragmentDirectory(fragment);
|
||||
@@ -979,7 +995,7 @@ function getCompletionEntriesForNonRelativeModules(
|
||||
result.add(nameAndKind(ambientName, ScriptElementKind.externalModuleName, /*extension*/ undefined));
|
||||
}
|
||||
|
||||
getCompletionEntriesFromTypings(host, program, scriptPath, fragmentDirectory, extensionOptions, result);
|
||||
getCompletionEntriesFromTypings(program, host, moduleSpecifierResolutionHost, scriptPath, fragmentDirectory, extensionOptions, result);
|
||||
|
||||
if (moduleResolutionUsesNodeModules(moduleResolution)) {
|
||||
// If looking for a global package name, don't just include everything in `node_modules` because that includes dependencies' own dependencies.
|
||||
@@ -995,56 +1011,55 @@ function getCompletionEntriesForNonRelativeModules(
|
||||
}
|
||||
}
|
||||
if (!foundGlobal) {
|
||||
const resolvePackageJsonExports = getResolvePackageJsonExports(compilerOptions);
|
||||
const resolvePackageJsonImports = getResolvePackageJsonImports(compilerOptions);
|
||||
let seenPackageScope = false;
|
||||
|
||||
const importsLookup = (directory: string) => {
|
||||
if (resolvePackageJsonImports && !seenPackageScope) {
|
||||
const packageFile = combinePaths(directory, "package.json");
|
||||
if (seenPackageScope = tryFileExists(host, packageFile)) {
|
||||
const packageJson = readJson(packageFile, host);
|
||||
exportsOrImportsLookup((packageJson as MapLike<unknown>).imports, fragment, directory, /*isExports*/ false, /*isImports*/ true);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
let ancestorLookup: (directory: string) => void | undefined = ancestor => {
|
||||
const nodeModules = combinePaths(ancestor, "node_modules");
|
||||
if (tryDirectoryExists(host, nodeModules)) {
|
||||
getCompletionEntriesForDirectoryFragment(fragment, nodeModules, extensionOptions, program, host, /*moduleSpecifierIsRelative*/ false, /*exclude*/ undefined, result);
|
||||
getCompletionEntriesForDirectoryFragment(fragment, nodeModules, extensionOptions, program, host, moduleSpecifierResolutionHost, /*moduleSpecifierIsRelative*/ false, /*exclude*/ undefined, result);
|
||||
}
|
||||
importsLookup(ancestor);
|
||||
};
|
||||
if (fragmentDirectory && getResolvePackageJsonExports(compilerOptions)) {
|
||||
const nodeModulesDirectoryLookup = ancestorLookup;
|
||||
if (fragmentDirectory && resolvePackageJsonExports) {
|
||||
const nodeModulesDirectoryOrImportsLookup = ancestorLookup;
|
||||
ancestorLookup = ancestor => {
|
||||
const components = getPathComponents(fragment);
|
||||
components.shift(); // shift off empty root
|
||||
let packagePath = components.shift();
|
||||
if (!packagePath) {
|
||||
return nodeModulesDirectoryLookup(ancestor);
|
||||
return nodeModulesDirectoryOrImportsLookup(ancestor);
|
||||
}
|
||||
if (startsWith(packagePath, "@")) {
|
||||
const subName = components.shift();
|
||||
if (!subName) {
|
||||
return nodeModulesDirectoryLookup(ancestor);
|
||||
return nodeModulesDirectoryOrImportsLookup(ancestor);
|
||||
}
|
||||
packagePath = combinePaths(packagePath, subName);
|
||||
}
|
||||
if (resolvePackageJsonImports && startsWith(packagePath, "#")) {
|
||||
return importsLookup(ancestor);
|
||||
}
|
||||
const packageDirectory = combinePaths(ancestor, "node_modules", packagePath);
|
||||
const packageFile = combinePaths(packageDirectory, "package.json");
|
||||
if (tryFileExists(host, packageFile)) {
|
||||
const packageJson = readJson(packageFile, host);
|
||||
const exports = (packageJson as any).exports;
|
||||
if (exports) {
|
||||
if (typeof exports !== "object" || exports === null) { // eslint-disable-line no-restricted-syntax
|
||||
return; // null exports or entrypoint only, no sub-modules available
|
||||
}
|
||||
const keys = getOwnKeys(exports);
|
||||
const fragmentSubpath = components.join("/") + (components.length && hasTrailingDirectorySeparator(fragment) ? "/" : "");
|
||||
const conditions = getConditions(compilerOptions, mode);
|
||||
addCompletionEntriesFromPathsOrExports(
|
||||
result,
|
||||
/*isExports*/ true,
|
||||
fragmentSubpath,
|
||||
packageDirectory,
|
||||
extensionOptions,
|
||||
program,
|
||||
host,
|
||||
keys,
|
||||
key => singleElementArray(getPatternFromFirstMatchingCondition(exports[key], conditions)),
|
||||
comparePatternKeys,
|
||||
);
|
||||
return;
|
||||
}
|
||||
const fragmentSubpath = components.join("/") + (components.length && hasTrailingDirectorySeparator(fragment) ? "/" : "");
|
||||
exportsOrImportsLookup((packageJson as MapLike<unknown>).exports, fragmentSubpath, packageDirectory, /*isExports*/ true, /*isImports*/ false);
|
||||
return;
|
||||
}
|
||||
return nodeModulesDirectoryLookup(ancestor);
|
||||
return nodeModulesDirectoryOrImportsLookup(ancestor);
|
||||
};
|
||||
}
|
||||
forEachAncestorDirectoryStoppingAtGlobalCache(host, scriptPath, ancestorLookup);
|
||||
@@ -1052,6 +1067,34 @@ function getCompletionEntriesForNonRelativeModules(
|
||||
}
|
||||
|
||||
return arrayFrom(result.values());
|
||||
|
||||
function exportsOrImportsLookup(lookupTable: unknown, fragment: string, baseDirectory: string, isExports: boolean, isImports: boolean) {
|
||||
if (typeof lookupTable !== "object" || lookupTable === null) { // eslint-disable-line no-restricted-syntax
|
||||
return; // null lookupTable or entrypoint only
|
||||
}
|
||||
const keys = getOwnKeys(lookupTable as MapLike<unknown>);
|
||||
const conditions = getConditions(compilerOptions, mode);
|
||||
addCompletionEntriesFromPathsOrExportsOrImports(
|
||||
result,
|
||||
isExports,
|
||||
isImports,
|
||||
fragment,
|
||||
baseDirectory,
|
||||
extensionOptions,
|
||||
program,
|
||||
host,
|
||||
moduleSpecifierResolutionHost,
|
||||
keys,
|
||||
key => {
|
||||
const pattern = getPatternFromFirstMatchingCondition((lookupTable as MapLike<unknown>)[key], conditions);
|
||||
if (pattern === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
return singleElementArray(endsWith(key, "/") && endsWith(pattern, "/") ? pattern + "*" : pattern);
|
||||
},
|
||||
comparePatternKeys,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function getPatternFromFirstMatchingCondition(target: unknown, conditions: readonly string[]): string | undefined {
|
||||
@@ -1078,22 +1121,27 @@ function getCompletionsForPathMapping(
|
||||
fragment: string,
|
||||
packageDirectory: string,
|
||||
extensionOptions: ExtensionOptions,
|
||||
isExportsWildcard: boolean,
|
||||
isExports: boolean,
|
||||
isImports: boolean,
|
||||
program: Program,
|
||||
host: LanguageServiceHost,
|
||||
moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost,
|
||||
): readonly NameAndKind[] {
|
||||
if (!endsWith(path, "*")) {
|
||||
const parsedPath = tryParsePattern(path);
|
||||
if (!parsedPath) {
|
||||
return emptyArray;
|
||||
}
|
||||
// no stars in the pattern
|
||||
if (typeof parsedPath === "string") {
|
||||
// For a path mapping "foo": ["/x/y/z.ts"], add "foo" itself as a completion.
|
||||
return !path.includes("*") ? justPathMappingName(path, ScriptElementKind.scriptElement) : emptyArray;
|
||||
return justPathMappingName(path, ScriptElementKind.scriptElement);
|
||||
}
|
||||
|
||||
const pathPrefix = path.slice(0, path.length - 1);
|
||||
const remainingFragment = tryRemovePrefix(fragment, pathPrefix);
|
||||
const remainingFragment = tryRemovePrefix(fragment, parsedPath.prefix);
|
||||
if (remainingFragment === undefined) {
|
||||
const starIsFullPathComponent = path[path.length - 2] === "/";
|
||||
return starIsFullPathComponent ? justPathMappingName(pathPrefix, ScriptElementKind.directory) : flatMap(patterns, pattern => getModulesForPathsPattern("", packageDirectory, pattern, extensionOptions, isExportsWildcard, program, host)?.map(({ name, ...rest }) => ({ name: pathPrefix + name, ...rest })));
|
||||
const starIsFullPathComponent = endsWith(path, "/*");
|
||||
return starIsFullPathComponent ? justPathMappingName(parsedPath.prefix, ScriptElementKind.directory) : flatMap(patterns, pattern => getModulesForPathsPattern("", packageDirectory, pattern, extensionOptions, isExports, isImports, program, host, moduleSpecifierResolutionHost)?.map(({ name, ...rest }) => ({ name: parsedPath.prefix + name + parsedPath.suffix, ...rest })));
|
||||
}
|
||||
return flatMap(patterns, pattern => getModulesForPathsPattern(remainingFragment, packageDirectory, pattern, extensionOptions, isExportsWildcard, program, host));
|
||||
return flatMap(patterns, pattern => getModulesForPathsPattern(remainingFragment, packageDirectory, pattern, extensionOptions, isExports, isImports, program, host, moduleSpecifierResolutionHost));
|
||||
|
||||
function justPathMappingName(name: string, kind: ScriptElementKind.directory | ScriptElementKind.scriptElement): readonly NameAndKind[] {
|
||||
return startsWith(name, fragment) ? [{ name: removeTrailingDirectorySeparator(name), kind, extension: undefined }] : emptyArray;
|
||||
@@ -1105,9 +1153,11 @@ function getModulesForPathsPattern(
|
||||
packageDirectory: string,
|
||||
pattern: string,
|
||||
extensionOptions: ExtensionOptions,
|
||||
isExportsWildcard: boolean,
|
||||
isExports: boolean,
|
||||
isImports: boolean,
|
||||
program: Program,
|
||||
host: LanguageServiceHost,
|
||||
moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost,
|
||||
): readonly NameAndKind[] | undefined {
|
||||
if (!host.readDirectory) {
|
||||
return undefined;
|
||||
@@ -1127,15 +1177,25 @@ function getModulesForPathsPattern(
|
||||
const fragmentHasPath = containsSlash(fragment);
|
||||
const fragmentDirectory = fragmentHasPath ? hasTrailingDirectorySeparator(fragment) ? fragment : getDirectoryPath(fragment) : undefined;
|
||||
|
||||
const getCommonSourceDirectory = () => moduleSpecifierResolutionHost.getCommonSourceDirectory();
|
||||
const ignoreCase = !hostUsesCaseSensitiveFileNames(moduleSpecifierResolutionHost);
|
||||
const outDir = program.getCompilerOptions().outDir;
|
||||
const declarationDir = program.getCompilerOptions().declarationDir;
|
||||
|
||||
// Try and expand the prefix to include any path from the fragment so that we can limit the readDirectory call
|
||||
const expandedPrefixDirectory = fragmentHasPath ? combinePaths(normalizedPrefixDirectory, normalizedPrefixBase + fragmentDirectory) : normalizedPrefixDirectory;
|
||||
|
||||
const normalizedSuffix = normalizePath(parsed.suffix);
|
||||
const declarationExtension = normalizedSuffix && getDeclarationEmitExtensionForPath("_" + normalizedSuffix);
|
||||
const matchingSuffixes = declarationExtension ? [changeExtension(normalizedSuffix, declarationExtension), normalizedSuffix] : [normalizedSuffix];
|
||||
// Need to normalize after combining: If we combinePaths("a", "../b"), we want "b" and not "a/../b".
|
||||
const baseDirectory = normalizePath(combinePaths(packageDirectory, expandedPrefixDirectory));
|
||||
const completePrefix = fragmentHasPath ? baseDirectory : ensureTrailingDirectorySeparator(baseDirectory) + normalizedPrefixBase;
|
||||
const possibleInputBaseDirectoryForOutDir = isImports && outDir && getPossibleOriginalInputPathWithoutChangingExt(baseDirectory, ignoreCase, outDir, getCommonSourceDirectory);
|
||||
const possibleInputBaseDirectoryForDeclarationDir = isImports && declarationDir && getPossibleOriginalInputPathWithoutChangingExt(baseDirectory, ignoreCase, declarationDir, getCommonSourceDirectory);
|
||||
const normalizedSuffix = normalizePath(parsed.suffix);
|
||||
const declarationExtension = normalizedSuffix && getDeclarationEmitExtensionForPath("_" + normalizedSuffix);
|
||||
const inputExtension = normalizedSuffix ? getPossibleOriginalInputExtensionForExtension("_" + normalizedSuffix) : undefined;
|
||||
const matchingSuffixes = [
|
||||
declarationExtension && changeExtension(normalizedSuffix, declarationExtension),
|
||||
...(inputExtension ? inputExtension.map(ext => changeExtension(normalizedSuffix, ext)) : []),
|
||||
normalizedSuffix,
|
||||
].filter(isString);
|
||||
|
||||
// If we have a suffix, then we read the directory all the way down to avoid returning completions for
|
||||
// directories that don't contain files that would match the suffix. A previous comment here was concerned
|
||||
@@ -1149,28 +1209,53 @@ function getModulesForPathsPattern(
|
||||
? matchingSuffixes.map(suffix => "**/*" + suffix)
|
||||
: ["./*"];
|
||||
|
||||
const matches = mapDefined(tryReadDirectory(host, baseDirectory, extensionOptions.extensionsToSearch, /*exclude*/ undefined, includeGlobs), match => {
|
||||
const trimmedWithPattern = trimPrefixAndSuffix(match);
|
||||
if (trimmedWithPattern) {
|
||||
if (containsSlash(trimmedWithPattern)) {
|
||||
return directoryResult(getPathComponents(removeLeadingDirectorySeparator(trimmedWithPattern))[1]);
|
||||
}
|
||||
const { name, extension } = getFilenameWithExtensionOption(trimmedWithPattern, program, extensionOptions, isExportsWildcard);
|
||||
return nameAndKind(name, ScriptElementKind.scriptElement, extension);
|
||||
}
|
||||
});
|
||||
const isExportsOrImportsWildcard = (isExports || isImports) && endsWith(pattern, "/*");
|
||||
|
||||
let matches = getMatchesWithPrefix(baseDirectory);
|
||||
|
||||
if (possibleInputBaseDirectoryForOutDir) {
|
||||
matches = concatenate(matches, getMatchesWithPrefix(possibleInputBaseDirectoryForOutDir));
|
||||
}
|
||||
if (possibleInputBaseDirectoryForDeclarationDir) {
|
||||
matches = concatenate(matches, getMatchesWithPrefix(possibleInputBaseDirectoryForDeclarationDir));
|
||||
}
|
||||
|
||||
// If we had a suffix, we already recursively searched for all possible files that could match
|
||||
// it and returned the directories leading to those files. Otherwise, assume any directory could
|
||||
// have something valid to import.
|
||||
const directories = normalizedSuffix
|
||||
? emptyArray
|
||||
: mapDefined(tryGetDirectories(host, baseDirectory), dir => dir === "node_modules" ? undefined : directoryResult(dir));
|
||||
return [...matches, ...directories];
|
||||
if (!normalizedSuffix) {
|
||||
matches = concatenate(matches, getDirectoryMatches(baseDirectory));
|
||||
if (possibleInputBaseDirectoryForOutDir) {
|
||||
matches = concatenate(matches, getDirectoryMatches(possibleInputBaseDirectoryForOutDir));
|
||||
}
|
||||
if (possibleInputBaseDirectoryForDeclarationDir) {
|
||||
matches = concatenate(matches, getDirectoryMatches(possibleInputBaseDirectoryForDeclarationDir));
|
||||
}
|
||||
}
|
||||
|
||||
function trimPrefixAndSuffix(path: string): string | undefined {
|
||||
return matches;
|
||||
|
||||
function getMatchesWithPrefix(directory: string) {
|
||||
const completePrefix = fragmentHasPath ? directory : ensureTrailingDirectorySeparator(directory) + normalizedPrefixBase;
|
||||
return mapDefined(tryReadDirectory(host, directory, extensionOptions.extensionsToSearch, /*exclude*/ undefined, includeGlobs), match => {
|
||||
const trimmedWithPattern = trimPrefixAndSuffix(match, completePrefix);
|
||||
if (trimmedWithPattern) {
|
||||
if (containsSlash(trimmedWithPattern)) {
|
||||
return directoryResult(getPathComponents(removeLeadingDirectorySeparator(trimmedWithPattern))[1]);
|
||||
}
|
||||
const { name, extension } = getFilenameWithExtensionOption(trimmedWithPattern, program, extensionOptions, isExportsOrImportsWildcard);
|
||||
return nameAndKind(name, ScriptElementKind.scriptElement, extension);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getDirectoryMatches(directoryName: string) {
|
||||
return mapDefined(tryGetDirectories(host, directoryName), dir => dir === "node_modules" ? undefined : directoryResult(dir));
|
||||
}
|
||||
|
||||
function trimPrefixAndSuffix(path: string, prefix: string): string | undefined {
|
||||
return firstDefined(matchingSuffixes, suffix => {
|
||||
const inner = withoutStartAndEnd(normalizePath(path), completePrefix, suffix);
|
||||
const inner = withoutStartAndEnd(normalizePath(path), prefix, suffix);
|
||||
return inner === undefined ? undefined : removeLeadingDirectorySeparator(inner);
|
||||
});
|
||||
}
|
||||
@@ -1199,7 +1284,7 @@ function getAmbientModuleCompletions(fragment: string, fragmentDirectory: string
|
||||
return nonRelativeModuleNames;
|
||||
}
|
||||
|
||||
function getTripleSlashReferenceCompletion(sourceFile: SourceFile, position: number, program: Program, host: LanguageServiceHost): readonly PathCompletion[] | undefined {
|
||||
function getTripleSlashReferenceCompletion(sourceFile: SourceFile, position: number, program: Program, host: LanguageServiceHost, moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost): readonly PathCompletion[] | undefined {
|
||||
const compilerOptions = program.getCompilerOptions();
|
||||
const token = getTokenAtPosition(sourceFile, position);
|
||||
const commentRanges = getLeadingCommentRanges(sourceFile.text, token.pos);
|
||||
@@ -1215,13 +1300,13 @@ function getTripleSlashReferenceCompletion(sourceFile: SourceFile, position: num
|
||||
|
||||
const [, prefix, kind, toComplete] = match;
|
||||
const scriptPath = getDirectoryPath(sourceFile.path);
|
||||
const names = kind === "path" ? getCompletionEntriesForDirectoryFragment(toComplete, scriptPath, getExtensionOptions(compilerOptions, ReferenceKind.Filename, sourceFile), program, host, /*moduleSpecifierIsRelative*/ true, sourceFile.path)
|
||||
: kind === "types" ? getCompletionEntriesFromTypings(host, program, scriptPath, getFragmentDirectory(toComplete), getExtensionOptions(compilerOptions, ReferenceKind.ModuleSpecifier, sourceFile))
|
||||
const names = kind === "path" ? getCompletionEntriesForDirectoryFragment(toComplete, scriptPath, getExtensionOptions(compilerOptions, ReferenceKind.Filename, sourceFile), program, host, moduleSpecifierResolutionHost, /*moduleSpecifierIsRelative*/ true, sourceFile.path)
|
||||
: kind === "types" ? getCompletionEntriesFromTypings(program, host, moduleSpecifierResolutionHost, scriptPath, getFragmentDirectory(toComplete), getExtensionOptions(compilerOptions, ReferenceKind.ModuleSpecifier, sourceFile))
|
||||
: Debug.fail();
|
||||
return addReplacementSpans(toComplete, range.pos + prefix.length, arrayFrom(names.values()));
|
||||
}
|
||||
|
||||
function getCompletionEntriesFromTypings(host: LanguageServiceHost, program: Program, scriptPath: string, fragmentDirectory: string | undefined, extensionOptions: ExtensionOptions, result = createNameAndKindSet()): NameAndKindSet {
|
||||
function getCompletionEntriesFromTypings(program: Program, host: LanguageServiceHost, moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost, scriptPath: string, fragmentDirectory: string | undefined, extensionOptions: ExtensionOptions, result = createNameAndKindSet()): NameAndKindSet {
|
||||
const options = program.getCompilerOptions();
|
||||
// Check for typings specified in compiler options
|
||||
const seen = new Map<string, true>();
|
||||
@@ -1257,7 +1342,7 @@ function getCompletionEntriesFromTypings(host: LanguageServiceHost, program: Pro
|
||||
const baseDirectory = combinePaths(directory, typeDirectoryName);
|
||||
const remainingFragment = tryRemoveDirectoryPrefix(fragmentDirectory, packageName, hostGetCanonicalFileName(host));
|
||||
if (remainingFragment !== undefined) {
|
||||
getCompletionEntriesForDirectoryFragment(remainingFragment, baseDirectory, extensionOptions, program, host, /*moduleSpecifierIsRelative*/ false, /*exclude*/ undefined, result);
|
||||
getCompletionEntriesForDirectoryFragment(remainingFragment, baseDirectory, extensionOptions, program, host, moduleSpecifierResolutionHost, /*moduleSpecifierIsRelative*/ false, /*exclude*/ undefined, result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import {
|
||||
addToSeen,
|
||||
ArrowFunction,
|
||||
BindingElement,
|
||||
CharacterCodes,
|
||||
@@ -353,7 +352,7 @@ function getAdjustedRange(sourceFile: SourceFile, startNode: Node, endNode: Node
|
||||
return { pos: getAdjustedStartPosition(sourceFile, startNode, options), end: getAdjustedEndPosition(sourceFile, endNode, options) };
|
||||
}
|
||||
|
||||
function getAdjustedStartPosition(sourceFile: SourceFile, node: Node, options: ConfigurableStartEnd, hasTrailingComment = false) {
|
||||
function getAdjustedStartPosition(sourceFile: SourceFile, node: Node, options: ConfigurableStartEnd, hasTrailingComment = false): number {
|
||||
const { leadingTriviaOption } = options;
|
||||
if (leadingTriviaOption === LeadingTriviaOption.Exclude) {
|
||||
return node.getStart(sourceFile);
|
||||
@@ -437,7 +436,8 @@ function getEndPositionOfMultilineTrailingComment(sourceFile: SourceFile, node:
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function getAdjustedEndPosition(sourceFile: SourceFile, node: Node, options: ConfigurableEnd): number {
|
||||
/** @internal */
|
||||
export function getAdjustedEndPosition(sourceFile: SourceFile, node: Node, options: ConfigurableEnd): number {
|
||||
const { end } = node;
|
||||
const { trailingTriviaOption } = options;
|
||||
if (trailingTriviaOption === TrailingTriviaOption.Exclude) {
|
||||
@@ -493,7 +493,7 @@ export function isThisTypeAnnotatable(containingFunction: SignatureDeclaration):
|
||||
export class ChangeTracker {
|
||||
private readonly changes: Change[] = [];
|
||||
private newFileChanges?: MultiMap<string, NewFileInsertion>;
|
||||
private readonly classesWithNodesInsertedAtStart = new Map<number, { readonly node: ClassLikeDeclaration | InterfaceDeclaration | ObjectLiteralExpression; readonly sourceFile: SourceFile; }>(); // Set<ClassDeclaration> implemented as Map<node id, ClassDeclaration>
|
||||
private readonly classesWithNodesInsertedAtStart = new Map<number, { readonly node: ClassLikeDeclaration | InterfaceDeclaration | ObjectLiteralExpression | TypeLiteralNode | EnumDeclaration; readonly sourceFile: SourceFile; }>(); // Set<ClassDeclaration> implemented as Map<node id, ClassDeclaration>
|
||||
private readonly deletedNodes: { readonly sourceFile: SourceFile; readonly node: Node | NodeArray<TypeParameterDeclaration>; }[] = [];
|
||||
|
||||
public static fromContext(context: TextChangesContext): ChangeTracker {
|
||||
@@ -903,7 +903,10 @@ export class ChangeTracker {
|
||||
|
||||
const members = getMembersOrProperties(node);
|
||||
const isEmpty = members.length === 0;
|
||||
const isFirstInsertion = addToSeen(this.classesWithNodesInsertedAtStart, getNodeId(node), { node, sourceFile });
|
||||
const isFirstInsertion = !this.classesWithNodesInsertedAtStart.has(getNodeId(node));
|
||||
if (isFirstInsertion) {
|
||||
this.classesWithNodesInsertedAtStart.set(getNodeId(node), { node, sourceFile });
|
||||
}
|
||||
const insertTrailingComma = isObjectLiteralExpression(node) && (!isJsonSourceFile(sourceFile) || !isEmpty);
|
||||
const insertLeadingComma = isObjectLiteralExpression(node) && isJsonSourceFile(sourceFile) && isEmpty && !isFirstInsertion;
|
||||
return {
|
||||
@@ -1246,7 +1249,7 @@ function endPositionToDeleteNodeInList(sourceFile: SourceFile, node: Node, prevN
|
||||
return end;
|
||||
}
|
||||
|
||||
function getClassOrObjectBraceEnds(cls: ClassLikeDeclaration | InterfaceDeclaration | ObjectLiteralExpression, sourceFile: SourceFile): [number | undefined, number | undefined] {
|
||||
function getClassOrObjectBraceEnds(cls: ClassLikeDeclaration | InterfaceDeclaration | ObjectLiteralExpression | TypeLiteralNode | EnumDeclaration, sourceFile: SourceFile): [number | undefined, number | undefined] {
|
||||
const open = findChildOfKind(cls, SyntaxKind.OpenBraceToken, sourceFile);
|
||||
const close = findChildOfKind(cls, SyntaxKind.CloseBraceToken, sourceFile);
|
||||
return [open?.end, close?.end];
|
||||
|
||||
@@ -169,6 +169,7 @@ import {
|
||||
isExternalModule,
|
||||
isExternalModuleImportEqualsDeclaration,
|
||||
isExternalModuleReference,
|
||||
isExternalModuleSymbol,
|
||||
isFileLevelUniqueName,
|
||||
isForInStatement,
|
||||
isForOfStatement,
|
||||
@@ -4027,7 +4028,13 @@ export function getDefaultLikeExportNameFromDeclaration(symbol: Symbol): string
|
||||
return tryCast(d.propertyName, isIdentifier)?.text;
|
||||
}
|
||||
// GH#52694
|
||||
return tryCast(getNameOfDeclaration(d), isIdentifier)?.text;
|
||||
const name = tryCast(getNameOfDeclaration(d), isIdentifier)?.text;
|
||||
if (name) {
|
||||
return name;
|
||||
}
|
||||
if (symbol.parent && !isExternalModuleSymbol(symbol.parent)) {
|
||||
return symbol.parent.getName();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -57,6 +57,8 @@ describe("unittests:: config:: showConfig", () => {
|
||||
|
||||
showTSConfigCorrectly("Show TSConfig with advanced options", ["--showConfig", "--declaration", "--declarationDir", "lib", "--skipLibCheck", "--noErrorTruncation"]);
|
||||
|
||||
showTSConfigCorrectly("Show TSConfig with transitively implied options", ["--showConfig", "--module", "nodenext"]);
|
||||
|
||||
showTSConfigCorrectly("Show TSConfig with compileOnSave and more", ["-p", "tsconfig.json"], {
|
||||
compilerOptions: {
|
||||
esModuleInterop: true,
|
||||
|
||||
@@ -358,5 +358,13 @@ describe("unittests:: PrinterAPI", () => {
|
||||
),
|
||||
ts.createSourceFile("source.ts", "", ts.ScriptTarget.ES2015),
|
||||
));
|
||||
|
||||
// https://github.com/microsoft/TypeScript/issues/59150
|
||||
printsCorrectly("template string", {}, printer =>
|
||||
printer.printNode(
|
||||
ts.EmitHint.Unspecified,
|
||||
ts.factory.createNoSubstitutionTemplateLiteral("\n"),
|
||||
ts.createSourceFile("source.ts", "", ts.ScriptTarget.ESNext),
|
||||
));
|
||||
});
|
||||
});
|
||||
|
||||
@@ -46,4 +46,42 @@ const f = r + s;`;
|
||||
verifyGetErrRequest({ session, files: [target.path] });
|
||||
baselineTsserverLogs("pasteEdits", "adds paste edits", session);
|
||||
});
|
||||
it("should not error", () => {
|
||||
const file1: File = {
|
||||
path: "/home/src/projects/project/file1.ts",
|
||||
content: `export const r = 1;
|
||||
console.log(r);`,
|
||||
};
|
||||
const tsconfig: File = {
|
||||
path: "/home/src/projects/project/tsconfig.json",
|
||||
content: "{}",
|
||||
};
|
||||
const host = TestServerHost.createServerHost([file1, tsconfig]);
|
||||
const session = new TestSession(host);
|
||||
session.executeCommandSeq<ts.server.protocol.UpdateOpenRequest>({
|
||||
command: ts.server.protocol.CommandTypes.UpdateOpen,
|
||||
arguments: {
|
||||
changedFiles: [],
|
||||
closedFiles: [],
|
||||
openFiles: [
|
||||
{
|
||||
file: "^/untitled/ts-nul-authority/Untitled-1",
|
||||
fileContent: "function foo(){}\r\n \r\n",
|
||||
scriptKindName: "TS",
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
session.executeCommandSeq<ts.server.protocol.GetPasteEditsRequest>({
|
||||
command: ts.server.protocol.CommandTypes.GetPasteEdits,
|
||||
arguments: {
|
||||
file: "^/untitled/ts-nul-authority/Untitled-1",
|
||||
pastedText: ["console.log(r);"],
|
||||
pasteLocations: [{ start: { line: 1, offset: 0 }, end: { line: 1, offset: 0 } }],
|
||||
copiedFrom: { file: file1.path, spans: [{ start: { line: 2, offset: 0 }, end: { line: 2, offset: 13 } }] },
|
||||
},
|
||||
});
|
||||
verifyGetErrRequest({ session, files: ["^/untitled/ts-nul-authority/Untitled-1"] });
|
||||
baselineTsserverLogs("pasteEdits", "should not error", session);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { execFileSync } from "child_process";
|
||||
import { execSync } from "child_process";
|
||||
import * as fs from "fs";
|
||||
import * as path from "path";
|
||||
|
||||
@@ -172,7 +172,7 @@ class NodeTypingsInstaller extends ts.server.typingsInstaller.TypingsInstaller {
|
||||
this.log.writeLine(`Exec: ${command}`);
|
||||
}
|
||||
try {
|
||||
const stdout = execFileSync(command, { ...options, encoding: "utf-8" });
|
||||
const stdout = execSync(command, { ...options, encoding: "utf-8" });
|
||||
if (this.log.isEnabled()) {
|
||||
this.log.writeLine(` Succeeded. stdout:${indent(sys.newLine, stdout)}`);
|
||||
}
|
||||
|
||||
+17
-7
@@ -50,13 +50,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __importStar = (this && this.__importStar) || (function () {
|
||||
var ownKeys = function(o) {
|
||||
ownKeys = Object.getOwnPropertyNames || function (o) {
|
||||
var ar = [];
|
||||
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
||||
return ar;
|
||||
};
|
||||
return ownKeys(o);
|
||||
};
|
||||
return function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports["<Z>"] = exports["<Y>"] = exports["<X>"] = void 0;
|
||||
const someValue = "someValue";
|
||||
|
||||
+17
-7
@@ -50,13 +50,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __importStar = (this && this.__importStar) || (function () {
|
||||
var ownKeys = function(o) {
|
||||
ownKeys = Object.getOwnPropertyNames || function (o) {
|
||||
var ar = [];
|
||||
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
||||
return ar;
|
||||
};
|
||||
return ownKeys(o);
|
||||
};
|
||||
return function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports["<Z>"] = exports["<Y>"] = exports["<X>"] = void 0;
|
||||
const someValue = "someValue";
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
asyncIteratorExtraParameters.ts(11,27): error TS2504: Type '{ [Symbol.asyncIterator](_: number): AsyncGenerator<number, void, unknown>; }' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
|
||||
asyncIteratorExtraParameters.ts(13,12): error TS2504: Type '{ [Symbol.asyncIterator](_: number): AsyncGenerator<number, void, unknown>; }' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
|
||||
|
||||
|
||||
==== asyncIteratorExtraParameters.ts (2 errors) ====
|
||||
// https://github.com/microsoft/TypeScript/issues/57130
|
||||
const iter = {
|
||||
async *[Symbol.asyncIterator](_: number) {
|
||||
yield 0;
|
||||
}
|
||||
};
|
||||
|
||||
declare function g(...args: any): any;
|
||||
|
||||
async function* f() {
|
||||
for await (const _ of iter);
|
||||
~~~~
|
||||
!!! error TS2504: Type '{ [Symbol.asyncIterator](_: number): AsyncGenerator<number, void, unknown>; }' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
|
||||
!!! related TS2322 asyncIteratorExtraParameters.ts:11:27: Type '{ [Symbol.asyncIterator](_: number): AsyncGenerator<number, void, unknown>; }' is not assignable to type 'AsyncIterable<T, TReturn, TNext>'.
|
||||
Types of property '[Symbol.asyncIterator]' are incompatible.
|
||||
Type '(_: number) => AsyncGenerator<number, void, unknown>' is not assignable to type '() => AsyncIterator<T, TReturn, TNext>'.
|
||||
Target signature provides too few arguments. Expected 1 or more, but got 0.
|
||||
|
||||
yield* iter;
|
||||
~~~~
|
||||
!!! error TS2504: Type '{ [Symbol.asyncIterator](_: number): AsyncGenerator<number, void, unknown>; }' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
|
||||
!!! related TS2322 asyncIteratorExtraParameters.ts:13:12: Type '{ [Symbol.asyncIterator](_: number): AsyncGenerator<number, void, unknown>; }' is not assignable to type 'AsyncIterable<T, TReturn, TNext>'.
|
||||
Types of property '[Symbol.asyncIterator]' are incompatible.
|
||||
Type '(_: number) => AsyncGenerator<number, void, unknown>' is not assignable to type '() => AsyncIterator<T, TReturn, TNext>'.
|
||||
Target signature provides too few arguments. Expected 1 or more, but got 0.
|
||||
}
|
||||
|
||||
@@ -1,39 +1,41 @@
|
||||
bigintWithLib.ts(4,1): error TS2350: Only a void function can be called with the 'new' keyword.
|
||||
bigintWithLib.ts(19,33): error TS2769: No overload matches this call.
|
||||
Overload 1 of 3, '(length?: number): BigInt64Array<ArrayBuffer>', gave the following error.
|
||||
Argument of type 'number[]' is not assignable to parameter of type 'number'.
|
||||
Overload 2 of 3, '(array: ArrayLike<bigint> | Iterable<bigint>): BigInt64Array<ArrayBuffer>', gave the following error.
|
||||
Argument of type 'number[]' is not assignable to parameter of type 'ArrayLike<bigint> | Iterable<bigint>'.
|
||||
Type 'number[]' is not assignable to type 'Iterable<bigint>'.
|
||||
The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types.
|
||||
Type 'IteratorResult<number, any>' is not assignable to type 'IteratorResult<bigint, any>'.
|
||||
Type 'IteratorYieldResult<number>' is not assignable to type 'IteratorResult<bigint, any>'.
|
||||
Type 'IteratorYieldResult<number>' is not assignable to type 'IteratorYieldResult<bigint>'.
|
||||
Type 'number' is not assignable to type 'bigint'.
|
||||
Overload 3 of 3, '(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigInt64Array<ArrayBufferLike>', gave the following error.
|
||||
Argument of type 'number[]' is not assignable to parameter of type 'ArrayBufferLike'.
|
||||
Type 'number[]' is missing the following properties from type 'SharedArrayBuffer': byteLength, [Symbol.species], [Symbol.toStringTag]
|
||||
bigintWithLib.ts(19,34): error TS2769: No overload matches this call.
|
||||
The last overload gave the following error.
|
||||
Type 'number' is not assignable to type 'bigint'.
|
||||
Type 'number' is not assignable to type 'bigint'.
|
||||
Type 'number' is not assignable to type 'bigint'.
|
||||
bigintWithLib.ts(19,37): error TS2769: No overload matches this call.
|
||||
The last overload gave the following error.
|
||||
Type 'number' is not assignable to type 'bigint'.
|
||||
Type 'number' is not assignable to type 'bigint'.
|
||||
Type 'number' is not assignable to type 'bigint'.
|
||||
bigintWithLib.ts(19,40): error TS2769: No overload matches this call.
|
||||
The last overload gave the following error.
|
||||
Type 'number' is not assignable to type 'bigint'.
|
||||
Type 'number' is not assignable to type 'bigint'.
|
||||
Type 'number' is not assignable to type 'bigint'.
|
||||
bigintWithLib.ts(24,13): error TS2540: Cannot assign to 'length' because it is a read-only property.
|
||||
bigintWithLib.ts(31,35): error TS2769: No overload matches this call.
|
||||
Overload 1 of 3, '(length?: number): BigUint64Array<ArrayBuffer>', gave the following error.
|
||||
Argument of type 'number[]' is not assignable to parameter of type 'number'.
|
||||
Overload 2 of 3, '(array: ArrayLike<bigint> | Iterable<bigint>): BigUint64Array<ArrayBuffer>', gave the following error.
|
||||
Argument of type 'number[]' is not assignable to parameter of type 'ArrayLike<bigint> | Iterable<bigint>'.
|
||||
Type 'number[]' is not assignable to type 'Iterable<bigint>'.
|
||||
The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types.
|
||||
Type 'IteratorResult<number, any>' is not assignable to type 'IteratorResult<bigint, any>'.
|
||||
Type 'IteratorYieldResult<number>' is not assignable to type 'IteratorResult<bigint, any>'.
|
||||
Type 'IteratorYieldResult<number>' is not assignable to type 'IteratorYieldResult<bigint>'.
|
||||
Type 'number' is not assignable to type 'bigint'.
|
||||
Overload 3 of 3, '(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigUint64Array<ArrayBufferLike>', gave the following error.
|
||||
Argument of type 'number[]' is not assignable to parameter of type 'ArrayBufferLike'.
|
||||
Type 'number[]' is missing the following properties from type 'SharedArrayBuffer': byteLength, [Symbol.species], [Symbol.toStringTag]
|
||||
bigintWithLib.ts(31,36): error TS2769: No overload matches this call.
|
||||
The last overload gave the following error.
|
||||
Type 'number' is not assignable to type 'bigint'.
|
||||
Type 'number' is not assignable to type 'bigint'.
|
||||
Type 'number' is not assignable to type 'bigint'.
|
||||
bigintWithLib.ts(31,39): error TS2769: No overload matches this call.
|
||||
The last overload gave the following error.
|
||||
Type 'number' is not assignable to type 'bigint'.
|
||||
Type 'number' is not assignable to type 'bigint'.
|
||||
Type 'number' is not assignable to type 'bigint'.
|
||||
bigintWithLib.ts(31,42): error TS2769: No overload matches this call.
|
||||
The last overload gave the following error.
|
||||
Type 'number' is not assignable to type 'bigint'.
|
||||
Type 'number' is not assignable to type 'bigint'.
|
||||
Type 'number' is not assignable to type 'bigint'.
|
||||
bigintWithLib.ts(36,13): error TS2540: Cannot assign to 'length' because it is a read-only property.
|
||||
bigintWithLib.ts(43,25): error TS2345: Argument of type 'number' is not assignable to parameter of type 'bigint'.
|
||||
bigintWithLib.ts(46,26): error TS2345: Argument of type 'number' is not assignable to parameter of type 'bigint'.
|
||||
|
||||
|
||||
==== bigintWithLib.ts (7 errors) ====
|
||||
==== bigintWithLib.ts (11 errors) ====
|
||||
// Test BigInt functions
|
||||
let bigintVal: bigint = BigInt(123);
|
||||
bigintVal = BigInt("456");
|
||||
@@ -55,21 +57,27 @@ bigintWithLib.ts(46,26): error TS2345: Argument of type 'number' is not assignab
|
||||
bigIntArray = new BigInt64Array(10);
|
||||
bigIntArray = new BigInt64Array([1n, 2n, 3n]);
|
||||
bigIntArray = new BigInt64Array([1, 2, 3]); // should error
|
||||
~~~~~~~~~
|
||||
~
|
||||
!!! error TS2769: No overload matches this call.
|
||||
!!! error TS2769: Overload 1 of 3, '(length?: number): BigInt64Array<ArrayBuffer>', gave the following error.
|
||||
!!! error TS2769: Argument of type 'number[]' is not assignable to parameter of type 'number'.
|
||||
!!! error TS2769: Overload 2 of 3, '(array: ArrayLike<bigint> | Iterable<bigint>): BigInt64Array<ArrayBuffer>', gave the following error.
|
||||
!!! error TS2769: Argument of type 'number[]' is not assignable to parameter of type 'ArrayLike<bigint> | Iterable<bigint>'.
|
||||
!!! error TS2769: Type 'number[]' is not assignable to type 'Iterable<bigint>'.
|
||||
!!! error TS2769: The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types.
|
||||
!!! error TS2769: Type 'IteratorResult<number, any>' is not assignable to type 'IteratorResult<bigint, any>'.
|
||||
!!! error TS2769: Type 'IteratorYieldResult<number>' is not assignable to type 'IteratorResult<bigint, any>'.
|
||||
!!! error TS2769: Type 'IteratorYieldResult<number>' is not assignable to type 'IteratorYieldResult<bigint>'.
|
||||
!!! error TS2769: Type 'number' is not assignable to type 'bigint'.
|
||||
!!! error TS2769: Overload 3 of 3, '(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigInt64Array<ArrayBufferLike>', gave the following error.
|
||||
!!! error TS2769: Argument of type 'number[]' is not assignable to parameter of type 'ArrayBufferLike'.
|
||||
!!! error TS2769: Type 'number[]' is missing the following properties from type 'SharedArrayBuffer': byteLength, [Symbol.species], [Symbol.toStringTag]
|
||||
!!! error TS2769: The last overload gave the following error.
|
||||
!!! error TS2769: Type 'number' is not assignable to type 'bigint'.
|
||||
!!! error TS2769: Type 'number' is not assignable to type 'bigint'.
|
||||
!!! error TS2769: Type 'number' is not assignable to type 'bigint'.
|
||||
!!! related TS2771 lib.es2020.bigint.d.ts:--:--: The last overload is declared here.
|
||||
~
|
||||
!!! error TS2769: No overload matches this call.
|
||||
!!! error TS2769: The last overload gave the following error.
|
||||
!!! error TS2769: Type 'number' is not assignable to type 'bigint'.
|
||||
!!! error TS2769: Type 'number' is not assignable to type 'bigint'.
|
||||
!!! error TS2769: Type 'number' is not assignable to type 'bigint'.
|
||||
!!! related TS2771 lib.es2020.bigint.d.ts:--:--: The last overload is declared here.
|
||||
~
|
||||
!!! error TS2769: No overload matches this call.
|
||||
!!! error TS2769: The last overload gave the following error.
|
||||
!!! error TS2769: Type 'number' is not assignable to type 'bigint'.
|
||||
!!! error TS2769: Type 'number' is not assignable to type 'bigint'.
|
||||
!!! error TS2769: Type 'number' is not assignable to type 'bigint'.
|
||||
!!! related TS2771 lib.es2020.bigint.d.ts:--:--: The last overload is declared here.
|
||||
bigIntArray = new BigInt64Array(new ArrayBuffer(80));
|
||||
bigIntArray = new BigInt64Array(new ArrayBuffer(80), 8);
|
||||
bigIntArray = new BigInt64Array(new ArrayBuffer(80), 8, 3);
|
||||
@@ -84,21 +92,27 @@ bigintWithLib.ts(46,26): error TS2345: Argument of type 'number' is not assignab
|
||||
bigUintArray = new BigUint64Array(10);
|
||||
bigUintArray = new BigUint64Array([1n, 2n, 3n]);
|
||||
bigUintArray = new BigUint64Array([1, 2, 3]); // should error
|
||||
~~~~~~~~~
|
||||
~
|
||||
!!! error TS2769: No overload matches this call.
|
||||
!!! error TS2769: Overload 1 of 3, '(length?: number): BigUint64Array<ArrayBuffer>', gave the following error.
|
||||
!!! error TS2769: Argument of type 'number[]' is not assignable to parameter of type 'number'.
|
||||
!!! error TS2769: Overload 2 of 3, '(array: ArrayLike<bigint> | Iterable<bigint>): BigUint64Array<ArrayBuffer>', gave the following error.
|
||||
!!! error TS2769: Argument of type 'number[]' is not assignable to parameter of type 'ArrayLike<bigint> | Iterable<bigint>'.
|
||||
!!! error TS2769: Type 'number[]' is not assignable to type 'Iterable<bigint>'.
|
||||
!!! error TS2769: The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types.
|
||||
!!! error TS2769: Type 'IteratorResult<number, any>' is not assignable to type 'IteratorResult<bigint, any>'.
|
||||
!!! error TS2769: Type 'IteratorYieldResult<number>' is not assignable to type 'IteratorResult<bigint, any>'.
|
||||
!!! error TS2769: Type 'IteratorYieldResult<number>' is not assignable to type 'IteratorYieldResult<bigint>'.
|
||||
!!! error TS2769: Type 'number' is not assignable to type 'bigint'.
|
||||
!!! error TS2769: Overload 3 of 3, '(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigUint64Array<ArrayBufferLike>', gave the following error.
|
||||
!!! error TS2769: Argument of type 'number[]' is not assignable to parameter of type 'ArrayBufferLike'.
|
||||
!!! error TS2769: Type 'number[]' is missing the following properties from type 'SharedArrayBuffer': byteLength, [Symbol.species], [Symbol.toStringTag]
|
||||
!!! error TS2769: The last overload gave the following error.
|
||||
!!! error TS2769: Type 'number' is not assignable to type 'bigint'.
|
||||
!!! error TS2769: Type 'number' is not assignable to type 'bigint'.
|
||||
!!! error TS2769: Type 'number' is not assignable to type 'bigint'.
|
||||
!!! related TS2771 lib.es2020.bigint.d.ts:--:--: The last overload is declared here.
|
||||
~
|
||||
!!! error TS2769: No overload matches this call.
|
||||
!!! error TS2769: The last overload gave the following error.
|
||||
!!! error TS2769: Type 'number' is not assignable to type 'bigint'.
|
||||
!!! error TS2769: Type 'number' is not assignable to type 'bigint'.
|
||||
!!! error TS2769: Type 'number' is not assignable to type 'bigint'.
|
||||
!!! related TS2771 lib.es2020.bigint.d.ts:--:--: The last overload is declared here.
|
||||
~
|
||||
!!! error TS2769: No overload matches this call.
|
||||
!!! error TS2769: The last overload gave the following error.
|
||||
!!! error TS2769: Type 'number' is not assignable to type 'bigint'.
|
||||
!!! error TS2769: Type 'number' is not assignable to type 'bigint'.
|
||||
!!! error TS2769: Type 'number' is not assignable to type 'bigint'.
|
||||
!!! related TS2771 lib.es2020.bigint.d.ts:--:--: The last overload is declared here.
|
||||
bigUintArray = new BigUint64Array(new ArrayBuffer(80));
|
||||
bigUintArray = new BigUint64Array(new ArrayBuffer(80), 8);
|
||||
bigUintArray = new BigUint64Array(new ArrayBuffer(80), 8, 3);
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
error TS2318: Cannot find global type 'IterableIterator'.
|
||||
canFollowGetSetKeyword.ts(10,5): error TS18004: No value exists in scope for the shorthand property 'get'. Either declare one or provide an initializer.
|
||||
canFollowGetSetKeyword.ts(11,5): error TS1005: ',' expected.
|
||||
canFollowGetSetKeyword.ts(14,5): error TS18004: No value exists in scope for the shorthand property 'set'. Either declare one or provide an initializer.
|
||||
canFollowGetSetKeyword.ts(15,5): error TS1005: ',' expected.
|
||||
|
||||
|
||||
!!! error TS2318: Cannot find global type 'IterableIterator'.
|
||||
==== canFollowGetSetKeyword.ts (4 errors) ====
|
||||
class A {
|
||||
get
|
||||
*x() {}
|
||||
}
|
||||
class B {
|
||||
set
|
||||
*x() {}
|
||||
}
|
||||
const c = {
|
||||
get
|
||||
~~~
|
||||
!!! error TS18004: No value exists in scope for the shorthand property 'get'. Either declare one or provide an initializer.
|
||||
*x() {}
|
||||
~
|
||||
!!! error TS1005: ',' expected.
|
||||
};
|
||||
const d = {
|
||||
set
|
||||
~~~
|
||||
!!! error TS18004: No value exists in scope for the shorthand property 'set'. Either declare one or provide an initializer.
|
||||
*x() {}
|
||||
~
|
||||
!!! error TS1005: ',' expected.
|
||||
};
|
||||
@@ -0,0 +1,76 @@
|
||||
//// [tests/cases/conformance/classes/propertyMemberDeclarations/canFollowGetSetKeyword.ts] ////
|
||||
|
||||
//// [canFollowGetSetKeyword.ts]
|
||||
class A {
|
||||
get
|
||||
*x() {}
|
||||
}
|
||||
class B {
|
||||
set
|
||||
*x() {}
|
||||
}
|
||||
const c = {
|
||||
get
|
||||
*x() {}
|
||||
};
|
||||
const d = {
|
||||
set
|
||||
*x() {}
|
||||
};
|
||||
|
||||
//// [canFollowGetSetKeyword.js]
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
||||
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
var A = /** @class */ (function () {
|
||||
function A() {
|
||||
}
|
||||
A.prototype.x = function () { return __generator(this, function (_a) {
|
||||
return [2 /*return*/];
|
||||
}); };
|
||||
return A;
|
||||
}());
|
||||
var B = /** @class */ (function () {
|
||||
function B() {
|
||||
}
|
||||
B.prototype.x = function () { return __generator(this, function (_a) {
|
||||
return [2 /*return*/];
|
||||
}); };
|
||||
return B;
|
||||
}());
|
||||
var c = {
|
||||
get: get,
|
||||
x: function () { return __generator(this, function (_a) {
|
||||
return [2 /*return*/];
|
||||
}); }
|
||||
};
|
||||
var d = {
|
||||
set: set,
|
||||
x: function () { return __generator(this, function (_a) {
|
||||
return [2 /*return*/];
|
||||
}); }
|
||||
};
|
||||
@@ -22,16 +22,16 @@ type typeAlias2 = typeof varOfAliasedType2;
|
||||
> : ^^^
|
||||
|
||||
function func(): typeAlias3 { return null; }
|
||||
>func : () => any
|
||||
> : ^^^^^^^^^
|
||||
>func : () => typeAlias3
|
||||
> : ^^^^^^
|
||||
|
||||
var varOfAliasedType3 = func();
|
||||
>varOfAliasedType3 : any
|
||||
> : ^^^
|
||||
>func() : any
|
||||
> : ^^^
|
||||
>func : () => any
|
||||
> : ^^^^^^^^^
|
||||
>func : () => typeAlias3
|
||||
> : ^^^^^^
|
||||
|
||||
type typeAlias3 = typeof varOfAliasedType3;
|
||||
>typeAlias3 : any
|
||||
@@ -54,12 +54,12 @@ interface Input {
|
||||
type R = ReturnType<typeof mul>;
|
||||
>R : any
|
||||
> : ^^^
|
||||
>mul : (input: Input) => any
|
||||
> : ^ ^^ ^^^^^^^^
|
||||
>mul : (input: Input) => R
|
||||
> : ^ ^^ ^^^^^
|
||||
|
||||
function mul(input: Input): R {
|
||||
>mul : (input: Input) => any
|
||||
> : ^ ^^ ^^^^^^^^
|
||||
>mul : (input: Input) => R
|
||||
> : ^ ^^ ^^^^^
|
||||
>input : Input
|
||||
> : ^^^^^
|
||||
|
||||
@@ -85,12 +85,12 @@ function mul(input: Input): R {
|
||||
type R2 = ReturnType<typeof f>;
|
||||
>R2 : any
|
||||
> : ^^^
|
||||
>f : () => any
|
||||
> : ^^^^^^^^^
|
||||
>f : () => R2
|
||||
> : ^^^^^^
|
||||
|
||||
function f(): R2 { return 0; }
|
||||
>f : () => any
|
||||
> : ^^^^^^^^^
|
||||
>f : () => R2
|
||||
> : ^^^^^^
|
||||
>0 : 0
|
||||
> : ^
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
//// [tests/cases/compiler/classAccessorInitializationInferenceWithElementAccess1.ts] ////
|
||||
|
||||
//// [classAccessorInitializationInferenceWithElementAccess1.ts]
|
||||
export class Cls {
|
||||
accessor x;
|
||||
accessor y;
|
||||
accessor z;
|
||||
|
||||
accessor 0;
|
||||
|
||||
constructor(seed: number) {
|
||||
this['x'] = [seed];
|
||||
this['y'] = { seed };
|
||||
this['z'] = `${seed}`;
|
||||
|
||||
this[0] = [seed];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//// [classAccessorInitializationInferenceWithElementAccess1.js]
|
||||
export class Cls {
|
||||
accessor x;
|
||||
accessor y;
|
||||
accessor z;
|
||||
accessor 0;
|
||||
constructor(seed) {
|
||||
this['x'] = [seed];
|
||||
this['y'] = { seed };
|
||||
this['z'] = `${seed}`;
|
||||
this[0] = [seed];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//// [classAccessorInitializationInferenceWithElementAccess1.d.ts]
|
||||
export declare class Cls {
|
||||
accessor x: number[];
|
||||
accessor y: {
|
||||
seed: number;
|
||||
};
|
||||
accessor z: string;
|
||||
accessor 0: number[];
|
||||
constructor(seed: number);
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
//// [tests/cases/compiler/classAccessorInitializationInferenceWithElementAccess1.ts] ////
|
||||
|
||||
=== classAccessorInitializationInferenceWithElementAccess1.ts ===
|
||||
export class Cls {
|
||||
>Cls : Symbol(Cls, Decl(classAccessorInitializationInferenceWithElementAccess1.ts, 0, 0))
|
||||
|
||||
accessor x;
|
||||
>x : Symbol(Cls.x, Decl(classAccessorInitializationInferenceWithElementAccess1.ts, 0, 18))
|
||||
|
||||
accessor y;
|
||||
>y : Symbol(Cls.y, Decl(classAccessorInitializationInferenceWithElementAccess1.ts, 1, 15))
|
||||
|
||||
accessor z;
|
||||
>z : Symbol(Cls.z, Decl(classAccessorInitializationInferenceWithElementAccess1.ts, 2, 15))
|
||||
|
||||
accessor 0;
|
||||
>0 : Symbol(Cls[0], Decl(classAccessorInitializationInferenceWithElementAccess1.ts, 3, 15))
|
||||
|
||||
constructor(seed: number) {
|
||||
>seed : Symbol(seed, Decl(classAccessorInitializationInferenceWithElementAccess1.ts, 7, 16))
|
||||
|
||||
this['x'] = [seed];
|
||||
>this : Symbol(Cls, Decl(classAccessorInitializationInferenceWithElementAccess1.ts, 0, 0))
|
||||
>'x' : Symbol(Cls.x, Decl(classAccessorInitializationInferenceWithElementAccess1.ts, 0, 18))
|
||||
>seed : Symbol(seed, Decl(classAccessorInitializationInferenceWithElementAccess1.ts, 7, 16))
|
||||
|
||||
this['y'] = { seed };
|
||||
>this : Symbol(Cls, Decl(classAccessorInitializationInferenceWithElementAccess1.ts, 0, 0))
|
||||
>'y' : Symbol(Cls.y, Decl(classAccessorInitializationInferenceWithElementAccess1.ts, 1, 15))
|
||||
>seed : Symbol(seed, Decl(classAccessorInitializationInferenceWithElementAccess1.ts, 9, 21))
|
||||
|
||||
this['z'] = `${seed}`;
|
||||
>this : Symbol(Cls, Decl(classAccessorInitializationInferenceWithElementAccess1.ts, 0, 0))
|
||||
>'z' : Symbol(Cls.z, Decl(classAccessorInitializationInferenceWithElementAccess1.ts, 2, 15))
|
||||
>seed : Symbol(seed, Decl(classAccessorInitializationInferenceWithElementAccess1.ts, 7, 16))
|
||||
|
||||
this[0] = [seed];
|
||||
>this : Symbol(Cls, Decl(classAccessorInitializationInferenceWithElementAccess1.ts, 0, 0))
|
||||
>0 : Symbol(Cls[0], Decl(classAccessorInitializationInferenceWithElementAccess1.ts, 3, 15))
|
||||
>seed : Symbol(seed, Decl(classAccessorInitializationInferenceWithElementAccess1.ts, 7, 16))
|
||||
}
|
||||
}
|
||||
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
//// [tests/cases/compiler/classAccessorInitializationInferenceWithElementAccess1.ts] ////
|
||||
|
||||
=== classAccessorInitializationInferenceWithElementAccess1.ts ===
|
||||
export class Cls {
|
||||
>Cls : Cls
|
||||
> : ^^^
|
||||
|
||||
accessor x;
|
||||
>x : number[]
|
||||
> : ^^^^^^^^
|
||||
|
||||
accessor y;
|
||||
>y : { seed: number; }
|
||||
> : ^^^^^^^^^^^^^^^^^
|
||||
|
||||
accessor z;
|
||||
>z : string
|
||||
> : ^^^^^^
|
||||
|
||||
accessor 0;
|
||||
>0 : number[]
|
||||
> : ^^^^^^^^
|
||||
|
||||
constructor(seed: number) {
|
||||
>seed : number
|
||||
> : ^^^^^^
|
||||
|
||||
this['x'] = [seed];
|
||||
>this['x'] = [seed] : number[]
|
||||
> : ^^^^^^^^
|
||||
>this['x'] : number[]
|
||||
> : ^^^^^^^^
|
||||
>this : this
|
||||
> : ^^^^
|
||||
>'x' : "x"
|
||||
> : ^^^
|
||||
>[seed] : number[]
|
||||
> : ^^^^^^^^
|
||||
>seed : number
|
||||
> : ^^^^^^
|
||||
|
||||
this['y'] = { seed };
|
||||
>this['y'] = { seed } : { seed: number; }
|
||||
> : ^^^^^^^^^^^^^^^^^
|
||||
>this['y'] : { seed: number; }
|
||||
> : ^^^^^^^^^^^^^^^^^
|
||||
>this : this
|
||||
> : ^^^^
|
||||
>'y' : "y"
|
||||
> : ^^^
|
||||
>{ seed } : { seed: number; }
|
||||
> : ^^^^^^^^^^^^^^^^^
|
||||
>seed : number
|
||||
> : ^^^^^^
|
||||
|
||||
this['z'] = `${seed}`;
|
||||
>this['z'] = `${seed}` : string
|
||||
> : ^^^^^^
|
||||
>this['z'] : string
|
||||
> : ^^^^^^
|
||||
>this : this
|
||||
> : ^^^^
|
||||
>'z' : "z"
|
||||
> : ^^^
|
||||
>`${seed}` : string
|
||||
> : ^^^^^^
|
||||
>seed : number
|
||||
> : ^^^^^^
|
||||
|
||||
this[0] = [seed];
|
||||
>this[0] = [seed] : number[]
|
||||
> : ^^^^^^^^
|
||||
>this[0] : number[]
|
||||
> : ^^^^^^^^
|
||||
>this : this
|
||||
> : ^^^^
|
||||
>0 : 0
|
||||
> : ^
|
||||
>[seed] : number[]
|
||||
> : ^^^^^^^^
|
||||
>seed : number
|
||||
> : ^^^^^^
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,16 +13,42 @@ class MyClass {
|
||||
|
||||
const localProperty = `foo-${variable}`; // Correctly inferred as `string`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class MyClass2 {
|
||||
accessor property;
|
||||
accessor property2;
|
||||
|
||||
constructor() {
|
||||
const variable = 'something'
|
||||
|
||||
this.property = `foo`; // Correctly inferred as `string`
|
||||
this.property2 = `foo-${variable}`; // Causes an error
|
||||
|
||||
const localProperty = `foo-${variable}`; // Correctly inferred as `string`
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//// [classAttributeInferenceTemplate.js]
|
||||
"use strict";
|
||||
var MyClass = /** @class */ (function () {
|
||||
function MyClass() {
|
||||
var variable = 'something';
|
||||
this.property = "foo"; // Correctly inferred as `string`
|
||||
this.property2 = "foo-".concat(variable); // Causes an error
|
||||
var localProperty = "foo-".concat(variable); // Correctly inferred as `string`
|
||||
class MyClass {
|
||||
property;
|
||||
property2;
|
||||
constructor() {
|
||||
const variable = 'something';
|
||||
this.property = `foo`; // Correctly inferred as `string`
|
||||
this.property2 = `foo-${variable}`; // Causes an error
|
||||
const localProperty = `foo-${variable}`; // Correctly inferred as `string`
|
||||
}
|
||||
return MyClass;
|
||||
}());
|
||||
}
|
||||
class MyClass2 {
|
||||
accessor property;
|
||||
accessor property2;
|
||||
constructor() {
|
||||
const variable = 'something';
|
||||
this.property = `foo`; // Correctly inferred as `string`
|
||||
this.property2 = `foo-${variable}`; // Causes an error
|
||||
const localProperty = `foo-${variable}`; // Correctly inferred as `string`
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,3 +30,34 @@ class MyClass {
|
||||
>variable : Symbol(variable, Decl(classAttributeInferenceTemplate.ts, 5, 13))
|
||||
}
|
||||
}
|
||||
|
||||
class MyClass2 {
|
||||
>MyClass2 : Symbol(MyClass2, Decl(classAttributeInferenceTemplate.ts, 12, 1))
|
||||
|
||||
accessor property;
|
||||
>property : Symbol(MyClass2.property, Decl(classAttributeInferenceTemplate.ts, 14, 16))
|
||||
|
||||
accessor property2;
|
||||
>property2 : Symbol(MyClass2.property2, Decl(classAttributeInferenceTemplate.ts, 15, 22))
|
||||
|
||||
constructor() {
|
||||
const variable = 'something'
|
||||
>variable : Symbol(variable, Decl(classAttributeInferenceTemplate.ts, 19, 13))
|
||||
|
||||
this.property = `foo`; // Correctly inferred as `string`
|
||||
>this.property : Symbol(MyClass2.property, Decl(classAttributeInferenceTemplate.ts, 14, 16))
|
||||
>this : Symbol(MyClass2, Decl(classAttributeInferenceTemplate.ts, 12, 1))
|
||||
>property : Symbol(MyClass2.property, Decl(classAttributeInferenceTemplate.ts, 14, 16))
|
||||
|
||||
this.property2 = `foo-${variable}`; // Causes an error
|
||||
>this.property2 : Symbol(MyClass2.property2, Decl(classAttributeInferenceTemplate.ts, 15, 22))
|
||||
>this : Symbol(MyClass2, Decl(classAttributeInferenceTemplate.ts, 12, 1))
|
||||
>property2 : Symbol(MyClass2.property2, Decl(classAttributeInferenceTemplate.ts, 15, 22))
|
||||
>variable : Symbol(variable, Decl(classAttributeInferenceTemplate.ts, 19, 13))
|
||||
|
||||
const localProperty = `foo-${variable}`; // Correctly inferred as `string`
|
||||
>localProperty : Symbol(localProperty, Decl(classAttributeInferenceTemplate.ts, 24, 13))
|
||||
>variable : Symbol(variable, Decl(classAttributeInferenceTemplate.ts, 19, 13))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,3 +55,59 @@ class MyClass {
|
||||
> : ^^^^^^^^^^^
|
||||
}
|
||||
}
|
||||
|
||||
class MyClass2 {
|
||||
>MyClass2 : MyClass2
|
||||
> : ^^^^^^^^
|
||||
|
||||
accessor property;
|
||||
>property : string
|
||||
> : ^^^^^^
|
||||
|
||||
accessor property2;
|
||||
>property2 : string
|
||||
> : ^^^^^^
|
||||
|
||||
constructor() {
|
||||
const variable = 'something'
|
||||
>variable : "something"
|
||||
> : ^^^^^^^^^^^
|
||||
>'something' : "something"
|
||||
> : ^^^^^^^^^^^
|
||||
|
||||
this.property = `foo`; // Correctly inferred as `string`
|
||||
>this.property = `foo` : "foo"
|
||||
> : ^^^^^
|
||||
>this.property : string
|
||||
> : ^^^^^^
|
||||
>this : this
|
||||
> : ^^^^
|
||||
>property : string
|
||||
> : ^^^^^^
|
||||
>`foo` : "foo"
|
||||
> : ^^^^^
|
||||
|
||||
this.property2 = `foo-${variable}`; // Causes an error
|
||||
>this.property2 = `foo-${variable}` : "foo-something"
|
||||
> : ^^^^^^^^^^^^^^^
|
||||
>this.property2 : string
|
||||
> : ^^^^^^
|
||||
>this : this
|
||||
> : ^^^^
|
||||
>property2 : string
|
||||
> : ^^^^^^
|
||||
>`foo-${variable}` : "foo-something"
|
||||
> : ^^^^^^^^^^^^^^^
|
||||
>variable : "something"
|
||||
> : ^^^^^^^^^^^
|
||||
|
||||
const localProperty = `foo-${variable}`; // Correctly inferred as `string`
|
||||
>localProperty : "foo-something"
|
||||
> : ^^^^^^^^^^^^^^^
|
||||
>`foo-${variable}` : "foo-something"
|
||||
> : ^^^^^^^^^^^^^^^
|
||||
>variable : "something"
|
||||
> : ^^^^^^^^^^^
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,3 +30,34 @@ class MyClass {
|
||||
>variable : Symbol(variable, Decl(index.js, 5, 13))
|
||||
}
|
||||
}
|
||||
|
||||
class MyClass2 {
|
||||
>MyClass2 : Symbol(MyClass2, Decl(index.js, 12, 1))
|
||||
|
||||
accessor property;
|
||||
>property : Symbol(MyClass2.property, Decl(index.js, 14, 16))
|
||||
|
||||
accessor property2;
|
||||
>property2 : Symbol(MyClass2.property2, Decl(index.js, 15, 22))
|
||||
|
||||
constructor() {
|
||||
const variable = 'something'
|
||||
>variable : Symbol(variable, Decl(index.js, 19, 13))
|
||||
|
||||
this.property = `foo`; // Correctly inferred as `string`
|
||||
>this.property : Symbol(MyClass2.property, Decl(index.js, 14, 16))
|
||||
>this : Symbol(MyClass2, Decl(index.js, 12, 1))
|
||||
>property : Symbol(MyClass2.property, Decl(index.js, 14, 16))
|
||||
|
||||
this.property2 = `foo-${variable}`; // Causes an error
|
||||
>this.property2 : Symbol(MyClass2.property2, Decl(index.js, 15, 22))
|
||||
>this : Symbol(MyClass2, Decl(index.js, 12, 1))
|
||||
>property2 : Symbol(MyClass2.property2, Decl(index.js, 15, 22))
|
||||
>variable : Symbol(variable, Decl(index.js, 19, 13))
|
||||
|
||||
const localProperty = `foo-${variable}`; // Correctly inferred as `string`
|
||||
>localProperty : Symbol(localProperty, Decl(index.js, 24, 13))
|
||||
>variable : Symbol(variable, Decl(index.js, 19, 13))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,3 +55,59 @@ class MyClass {
|
||||
> : ^^^^^^^^^^^
|
||||
}
|
||||
}
|
||||
|
||||
class MyClass2 {
|
||||
>MyClass2 : MyClass2
|
||||
> : ^^^^^^^^
|
||||
|
||||
accessor property;
|
||||
>property : string
|
||||
> : ^^^^^^
|
||||
|
||||
accessor property2;
|
||||
>property2 : string
|
||||
> : ^^^^^^
|
||||
|
||||
constructor() {
|
||||
const variable = 'something'
|
||||
>variable : "something"
|
||||
> : ^^^^^^^^^^^
|
||||
>'something' : "something"
|
||||
> : ^^^^^^^^^^^
|
||||
|
||||
this.property = `foo`; // Correctly inferred as `string`
|
||||
>this.property = `foo` : "foo"
|
||||
> : ^^^^^
|
||||
>this.property : string
|
||||
> : ^^^^^^
|
||||
>this : this
|
||||
> : ^^^^
|
||||
>property : string
|
||||
> : ^^^^^^
|
||||
>`foo` : "foo"
|
||||
> : ^^^^^
|
||||
|
||||
this.property2 = `foo-${variable}`; // Causes an error
|
||||
>this.property2 = `foo-${variable}` : "foo-something"
|
||||
> : ^^^^^^^^^^^^^^^
|
||||
>this.property2 : string
|
||||
> : ^^^^^^
|
||||
>this : this
|
||||
> : ^^^^
|
||||
>property2 : string
|
||||
> : ^^^^^^
|
||||
>`foo-${variable}` : "foo-something"
|
||||
> : ^^^^^^^^^^^^^^^
|
||||
>variable : "something"
|
||||
> : ^^^^^^^^^^^
|
||||
|
||||
const localProperty = `foo-${variable}`; // Correctly inferred as `string`
|
||||
>localProperty : "foo-something"
|
||||
> : ^^^^^^^^^^^^^^^
|
||||
>`foo-${variable}` : "foo-something"
|
||||
> : ^^^^^^^^^^^^^^^
|
||||
>variable : "something"
|
||||
> : ^^^^^^^^^^^
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
//// [tests/cases/conformance/classes/classStaticBlock/classStaticBlockUseBeforeDef4.ts] ////
|
||||
|
||||
//// [classStaticBlockUseBeforeDef4.ts]
|
||||
class C {
|
||||
static accessor x;
|
||||
static {
|
||||
this.x = 1;
|
||||
}
|
||||
static accessor y = this.x;
|
||||
static accessor z;
|
||||
static {
|
||||
this.z = this.y;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//// [classStaticBlockUseBeforeDef4.js]
|
||||
"use strict";
|
||||
class C {
|
||||
static accessor x;
|
||||
static {
|
||||
this.x = 1;
|
||||
}
|
||||
static accessor y = this.x;
|
||||
static accessor z;
|
||||
static {
|
||||
this.z = this.y;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//// [classStaticBlockUseBeforeDef4.d.ts]
|
||||
declare class C {
|
||||
static accessor x: number;
|
||||
static accessor y: number;
|
||||
static accessor z: number;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
//// [tests/cases/conformance/classes/classStaticBlock/classStaticBlockUseBeforeDef4.ts] ////
|
||||
|
||||
=== classStaticBlockUseBeforeDef4.ts ===
|
||||
class C {
|
||||
>C : Symbol(C, Decl(classStaticBlockUseBeforeDef4.ts, 0, 0))
|
||||
|
||||
static accessor x;
|
||||
>x : Symbol(C.x, Decl(classStaticBlockUseBeforeDef4.ts, 0, 9))
|
||||
|
||||
static {
|
||||
this.x = 1;
|
||||
>this.x : Symbol(C.x, Decl(classStaticBlockUseBeforeDef4.ts, 0, 9))
|
||||
>this : Symbol(C, Decl(classStaticBlockUseBeforeDef4.ts, 0, 0))
|
||||
>x : Symbol(C.x, Decl(classStaticBlockUseBeforeDef4.ts, 0, 9))
|
||||
}
|
||||
static accessor y = this.x;
|
||||
>y : Symbol(C.y, Decl(classStaticBlockUseBeforeDef4.ts, 4, 5))
|
||||
>this.x : Symbol(C.x, Decl(classStaticBlockUseBeforeDef4.ts, 0, 9))
|
||||
>this : Symbol(C, Decl(classStaticBlockUseBeforeDef4.ts, 0, 0))
|
||||
>x : Symbol(C.x, Decl(classStaticBlockUseBeforeDef4.ts, 0, 9))
|
||||
|
||||
static accessor z;
|
||||
>z : Symbol(C.z, Decl(classStaticBlockUseBeforeDef4.ts, 5, 31))
|
||||
|
||||
static {
|
||||
this.z = this.y;
|
||||
>this.z : Symbol(C.z, Decl(classStaticBlockUseBeforeDef4.ts, 5, 31))
|
||||
>this : Symbol(C, Decl(classStaticBlockUseBeforeDef4.ts, 0, 0))
|
||||
>z : Symbol(C.z, Decl(classStaticBlockUseBeforeDef4.ts, 5, 31))
|
||||
>this.y : Symbol(C.y, Decl(classStaticBlockUseBeforeDef4.ts, 4, 5))
|
||||
>this : Symbol(C, Decl(classStaticBlockUseBeforeDef4.ts, 0, 0))
|
||||
>y : Symbol(C.y, Decl(classStaticBlockUseBeforeDef4.ts, 4, 5))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
//// [tests/cases/conformance/classes/classStaticBlock/classStaticBlockUseBeforeDef4.ts] ////
|
||||
|
||||
=== classStaticBlockUseBeforeDef4.ts ===
|
||||
class C {
|
||||
>C : C
|
||||
> : ^
|
||||
|
||||
static accessor x;
|
||||
>x : number
|
||||
> : ^^^^^^
|
||||
|
||||
static {
|
||||
this.x = 1;
|
||||
>this.x = 1 : 1
|
||||
> : ^
|
||||
>this.x : number
|
||||
> : ^^^^^^
|
||||
>this : typeof C
|
||||
> : ^^^^^^^^
|
||||
>x : number
|
||||
> : ^^^^^^
|
||||
>1 : 1
|
||||
> : ^
|
||||
}
|
||||
static accessor y = this.x;
|
||||
>y : number
|
||||
> : ^^^^^^
|
||||
>this.x : number
|
||||
> : ^^^^^^
|
||||
>this : typeof C
|
||||
> : ^^^^^^^^
|
||||
>x : number
|
||||
> : ^^^^^^
|
||||
|
||||
static accessor z;
|
||||
>z : number
|
||||
> : ^^^^^^
|
||||
|
||||
static {
|
||||
this.z = this.y;
|
||||
>this.z = this.y : number
|
||||
> : ^^^^^^
|
||||
>this.z : number
|
||||
> : ^^^^^^
|
||||
>this : typeof C
|
||||
> : ^^^^^^^^
|
||||
>z : number
|
||||
> : ^^^^^^
|
||||
>this.y : number
|
||||
> : ^^^^^^
|
||||
>this : typeof C
|
||||
> : ^^^^^^^^
|
||||
>y : number
|
||||
> : ^^^^^^
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
classStaticBlockUseBeforeDef5.ts(3,14): error TS2729: Property 'x' is used before its initialization.
|
||||
|
||||
|
||||
==== classStaticBlockUseBeforeDef5.ts (1 errors) ====
|
||||
class C {
|
||||
static {
|
||||
this.x = 1;
|
||||
~
|
||||
!!! error TS2729: Property 'x' is used before its initialization.
|
||||
!!! related TS2728 classStaticBlockUseBeforeDef5.ts:5:21: 'x' is declared here.
|
||||
}
|
||||
static accessor x;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
//// [tests/cases/conformance/classes/classStaticBlock/classStaticBlockUseBeforeDef5.ts] ////
|
||||
|
||||
//// [classStaticBlockUseBeforeDef5.ts]
|
||||
class C {
|
||||
static {
|
||||
this.x = 1;
|
||||
}
|
||||
static accessor x;
|
||||
}
|
||||
|
||||
|
||||
//// [classStaticBlockUseBeforeDef5.js]
|
||||
"use strict";
|
||||
class C {
|
||||
static {
|
||||
this.x = 1;
|
||||
}
|
||||
static accessor x;
|
||||
}
|
||||
|
||||
|
||||
//// [classStaticBlockUseBeforeDef5.d.ts]
|
||||
declare class C {
|
||||
static accessor x: number;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
//// [tests/cases/conformance/classes/classStaticBlock/classStaticBlockUseBeforeDef5.ts] ////
|
||||
|
||||
=== classStaticBlockUseBeforeDef5.ts ===
|
||||
class C {
|
||||
>C : Symbol(C, Decl(classStaticBlockUseBeforeDef5.ts, 0, 0))
|
||||
|
||||
static {
|
||||
this.x = 1;
|
||||
>this.x : Symbol(C.x, Decl(classStaticBlockUseBeforeDef5.ts, 3, 5))
|
||||
>this : Symbol(C, Decl(classStaticBlockUseBeforeDef5.ts, 0, 0))
|
||||
>x : Symbol(C.x, Decl(classStaticBlockUseBeforeDef5.ts, 3, 5))
|
||||
}
|
||||
static accessor x;
|
||||
>x : Symbol(C.x, Decl(classStaticBlockUseBeforeDef5.ts, 3, 5))
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
//// [tests/cases/conformance/classes/classStaticBlock/classStaticBlockUseBeforeDef5.ts] ////
|
||||
|
||||
=== classStaticBlockUseBeforeDef5.ts ===
|
||||
class C {
|
||||
>C : C
|
||||
> : ^
|
||||
|
||||
static {
|
||||
this.x = 1;
|
||||
>this.x = 1 : 1
|
||||
> : ^
|
||||
>this.x : number
|
||||
> : ^^^^^^
|
||||
>this : typeof C
|
||||
> : ^^^^^^^^
|
||||
>x : number
|
||||
> : ^^^^^^
|
||||
>1 : 1
|
||||
> : ^
|
||||
}
|
||||
static accessor x;
|
||||
>x : number
|
||||
> : ^^^^^^
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
//// [tests/cases/compiler/computedPropertiesWithSetterAssignment.ts] ////
|
||||
|
||||
//// [a.ts]
|
||||
const k = Symbol();
|
||||
|
||||
const enum Props {
|
||||
k = 'k',
|
||||
}
|
||||
|
||||
interface Foo {
|
||||
get k(): Set<string>;
|
||||
set k(v: Iterable<string>);
|
||||
|
||||
get [k](): Set<string>;
|
||||
set [k](v: Iterable<string>);
|
||||
}
|
||||
|
||||
declare const foo: Foo;
|
||||
|
||||
foo.k = ['foo'];
|
||||
foo['k'] = ['foo'];
|
||||
foo[Props.k] = ['foo'];
|
||||
foo[k] = ['foo'];
|
||||
|
||||
|
||||
//// [a.js]
|
||||
"use strict";
|
||||
const k = Symbol();
|
||||
foo.k = ['foo'];
|
||||
foo['k'] = ['foo'];
|
||||
foo["k" /* Props.k */] = ['foo'];
|
||||
foo[k] = ['foo'];
|
||||
@@ -0,0 +1,61 @@
|
||||
//// [tests/cases/compiler/computedPropertiesWithSetterAssignment.ts] ////
|
||||
|
||||
=== /a.ts ===
|
||||
const k = Symbol();
|
||||
>k : Symbol(k, Decl(a.ts, 0, 5))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2019.symbol.d.ts, --, --))
|
||||
|
||||
const enum Props {
|
||||
>Props : Symbol(Props, Decl(a.ts, 0, 19))
|
||||
|
||||
k = 'k',
|
||||
>k : Symbol(Props.k, Decl(a.ts, 2, 18))
|
||||
}
|
||||
|
||||
interface Foo {
|
||||
>Foo : Symbol(Foo, Decl(a.ts, 4, 1))
|
||||
|
||||
get k(): Set<string>;
|
||||
>k : Symbol(Foo.k, Decl(a.ts, 6, 15), Decl(a.ts, 7, 25))
|
||||
>Set : Symbol(Set, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.esnext.collection.d.ts, --, --))
|
||||
|
||||
set k(v: Iterable<string>);
|
||||
>k : Symbol(Foo.k, Decl(a.ts, 6, 15), Decl(a.ts, 7, 25))
|
||||
>v : Symbol(v, Decl(a.ts, 8, 10))
|
||||
>Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --))
|
||||
|
||||
get [k](): Set<string>;
|
||||
>[k] : Symbol(Foo[k], Decl(a.ts, 8, 31), Decl(a.ts, 10, 27))
|
||||
>k : Symbol(k, Decl(a.ts, 0, 5))
|
||||
>Set : Symbol(Set, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.esnext.collection.d.ts, --, --))
|
||||
|
||||
set [k](v: Iterable<string>);
|
||||
>[k] : Symbol(Foo[k], Decl(a.ts, 8, 31), Decl(a.ts, 10, 27))
|
||||
>k : Symbol(k, Decl(a.ts, 0, 5))
|
||||
>v : Symbol(v, Decl(a.ts, 11, 12))
|
||||
>Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --))
|
||||
}
|
||||
|
||||
declare const foo: Foo;
|
||||
>foo : Symbol(foo, Decl(a.ts, 14, 13))
|
||||
>Foo : Symbol(Foo, Decl(a.ts, 4, 1))
|
||||
|
||||
foo.k = ['foo'];
|
||||
>foo.k : Symbol(Foo.k, Decl(a.ts, 6, 15), Decl(a.ts, 7, 25))
|
||||
>foo : Symbol(foo, Decl(a.ts, 14, 13))
|
||||
>k : Symbol(Foo.k, Decl(a.ts, 6, 15), Decl(a.ts, 7, 25))
|
||||
|
||||
foo['k'] = ['foo'];
|
||||
>foo : Symbol(foo, Decl(a.ts, 14, 13))
|
||||
>'k' : Symbol(Foo.k, Decl(a.ts, 6, 15), Decl(a.ts, 7, 25))
|
||||
|
||||
foo[Props.k] = ['foo'];
|
||||
>foo : Symbol(foo, Decl(a.ts, 14, 13))
|
||||
>Props.k : Symbol(Props.k, Decl(a.ts, 2, 18))
|
||||
>Props : Symbol(Props, Decl(a.ts, 0, 19))
|
||||
>k : Symbol(Props.k, Decl(a.ts, 2, 18))
|
||||
|
||||
foo[k] = ['foo'];
|
||||
>foo : Symbol(foo, Decl(a.ts, 14, 13))
|
||||
>k : Symbol(k, Decl(a.ts, 0, 5))
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user