diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index d0c07bb86fa3d..b023c7de37cd7 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -15,7 +15,7 @@ // Use 'postCreateCommand' to run commands after the container is created. "postCreateCommand": { - "Configure Build Tools": "sudo corepack enable npm; sudo npm install -g hereby; npm ci", + "Configure Build Tools": "sudo npm install -g hereby; npm ci", "Install pprof": "go install github.com/google/pprof@latest", "Install Graphviz": "sudo apt install graphviz" }, diff --git a/.github/workflows/accept-baselines-fix-lints.yaml b/.github/workflows/accept-baselines-fix-lints.yaml index 4f3ee8ef0767b..6a6c5caadd7e1 100644 --- a/.github/workflows/accept-baselines-fix-lints.yaml +++ b/.github/workflows/accept-baselines-fix-lints.yaml @@ -17,10 +17,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: token: ${{ secrets.TS_BOT_GITHUB_TOKEN }} - - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: node-version: 'lts/*' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 388db63970372..6b7552609cbaa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -121,9 +121,9 @@ jobs: name: Test Node ${{ matrix.config.node-version }} on ${{ matrix.config.os }}${{ (!matrix.config.bundle && ' with --no-bundle') || '' }} steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Use node version ${{ matrix.config.node-version }} - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 + uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: node-version: ${{ matrix.config.node-version }} check-latest: true @@ -154,8 +154,8 @@ jobs: contents: read steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: node-version: 'lts/*' - run: npm ci @@ -179,8 +179,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: node-version: 'lts/*' - run: npm ci @@ -192,8 +192,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: node-version: 'lts/*' - run: npm ci @@ -205,13 +205,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: node-version: 'lts/*' - run: npm ci - - uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 + - uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2 with: path: ~/.cache/dprint key: ${{ runner.os }}-dprint-${{ hashFiles('package-lock.json', '.dprint.jsonc') }} @@ -227,8 +227,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: node-version: 'lts/*' - run: npm ci @@ -243,8 +243,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: node-version: 'lts/*' - run: npm ci @@ -256,9 +256,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: node-version: 'lts/*' - run: | @@ -297,16 +297,16 @@ jobs: if: github.event_name == 'pull_request' steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: path: pr - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: path: base ref: ${{ github.base_ref }} - - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: node-version: 'lts/*' - run: | @@ -344,8 +344,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: node-version: 'lts/*' - run: npm ci @@ -360,8 +360,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: node-version: 'lts/*' - run: npm ci @@ -381,8 +381,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: node-version: 'lts/*' - run: npm ci diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index d715312240f51..c659ebdfdde92 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -42,11 +42,11 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@1b168cd39490f61582a9beae412bb7057a6b2c4e # v4.31.8 + uses: github/codeql-action/init@19b2f06db2b6f5108140aeb04014ef02b648f789 # v4.31.11 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@1b168cd39490f61582a9beae412bb7057a6b2c4e # v4.31.8 + uses: github/codeql-action/autobuild@19b2f06db2b6f5108140aeb04014ef02b648f789 # v4.31.11 # â„šī¸ 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@1b168cd39490f61582a9beae412bb7057a6b2c4e # v4.31.8 + uses: github/codeql-action/analyze@19b2f06db2b6f5108140aeb04014ef02b648f789 # v4.31.11 diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index 5c8c2dd2485b2..3ba278f47a99a 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -15,8 +15,8 @@ jobs: # You can define any steps you want, and they will run before the agent starts. # If you do not check out your code, Copilot will do this for you. steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 - run: npm ci # pull dprint caches before network access is blocked - run: npx hereby check-format || true diff --git a/.github/workflows/create-cherry-pick-pr.yml b/.github/workflows/create-cherry-pick-pr.yml index 47c2be940481d..ecdd770e02776 100644 --- a/.github/workflows/create-cherry-pick-pr.yml +++ b/.github/workflows/create-cherry-pick-pr.yml @@ -47,7 +47,7 @@ jobs: if: github.repository == 'microsoft/TypeScript' steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.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. diff --git a/.github/workflows/insiders.yaml b/.github/workflows/insiders.yaml index 9c27709dae89b..7d33556e1b7bb 100644 --- a/.github/workflows/insiders.yaml +++ b/.github/workflows/insiders.yaml @@ -20,8 +20,8 @@ jobs: if: github.repository == 'microsoft/TypeScript' steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: node-version: 'lts/*' - run: | @@ -42,8 +42,8 @@ jobs: if: github.repository == 'microsoft/TypeScript' steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: node-version: 'lts/*' # Use NODE_AUTH_TOKEN environment variable to authenticate to this registry. diff --git a/.github/workflows/lkg.yml b/.github/workflows/lkg.yml index 3d1d1f50d27c8..5a3491d6c5e32 100644 --- a/.github/workflows/lkg.yml +++ b/.github/workflows/lkg.yml @@ -27,11 +27,11 @@ jobs: exit 1 fi - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: ref: ${{ inputs.branch_name }} token: ${{ secrets.TS_BOT_GITHUB_TOKEN }} - - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: node-version: 'lts/*' - run: | diff --git a/.github/workflows/new-release-branch.yaml b/.github/workflows/new-release-branch.yaml index 7d96198753384..558162756c196 100644 --- a/.github/workflows/new-release-branch.yaml +++ b/.github/workflows/new-release-branch.yaml @@ -50,12 +50,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.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@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: node-version: 'lts/*' - run: | diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index faa9f3d615a73..92c74366730a1 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -21,8 +21,8 @@ jobs: if: github.repository == 'microsoft/TypeScript' steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: node-version: 'lts/*' - run: | @@ -42,8 +42,8 @@ jobs: if: github.repository == 'microsoft/TypeScript' steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: node-version: 'lts/*' # Use NODE_AUTH_TOKEN environment variable to authenticate to this registry. diff --git a/.github/workflows/release-branch-artifact.yaml b/.github/workflows/release-branch-artifact.yaml index 70ccb39435a83..27b1335bc3bb2 100644 --- a/.github/workflows/release-branch-artifact.yaml +++ b/.github/workflows/release-branch-artifact.yaml @@ -19,8 +19,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: node-version: 'lts/*' - run: | diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index b5c0239a9301d..b23eba9b2a4b5 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -29,7 +29,7 @@ jobs: steps: - name: 'Checkout code' - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false @@ -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@1b168cd39490f61582a9beae412bb7057a6b2c4e # v4.31.8 + uses: github/codeql-action/upload-sarif@19b2f06db2b6f5108140aeb04014ef02b648f789 # v4.31.11 with: sarif_file: results.sarif diff --git a/.github/workflows/set-version.yaml b/.github/workflows/set-version.yaml index 77455eb3c7bd2..43729312642ff 100644 --- a/.github/workflows/set-version.yaml +++ b/.github/workflows/set-version.yaml @@ -49,11 +49,11 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: ref: ${{ inputs.branch_name }} token: ${{ secrets.TS_BOT_GITHUB_TOKEN }} - - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: node-version: 'lts/*' - run: | diff --git a/.github/workflows/sync-branch.yaml b/.github/workflows/sync-branch.yaml index 62c27289ebc94..c37eae0a14eb1 100644 --- a/.github/workflows/sync-branch.yaml +++ b/.github/workflows/sync-branch.yaml @@ -42,10 +42,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: node-version: 'lts/*' - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.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/ diff --git a/.github/workflows/sync-wiki.yml b/.github/workflows/sync-wiki.yml index 610f8170127e7..ebe024316b7ef 100644 --- a/.github/workflows/sync-wiki.yml +++ b/.github/workflows/sync-wiki.yml @@ -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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: repository: '${{ GITHUB.repository_owner }}/${{ env.BASENAME }}-wiki' token: ${{ secrets.TS_BOT_GITHUB_TOKEN }} diff --git a/.github/workflows/twoslash-repros.yaml b/.github/workflows/twoslash-repros.yaml index 414be032b6d80..1b5b140026d9a 100644 --- a/.github/workflows/twoslash-repros.yaml +++ b/.github/workflows/twoslash-repros.yaml @@ -51,13 +51,13 @@ jobs: runs-on: ubuntu-latest steps: - if: ${{ github.event.inputs.bisect }} - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: node-version: 'lts/*' - uses: microsoft/TypeScript-Twoslash-Repro-Action@master diff --git a/.github/workflows/update-package-lock.yaml b/.github/workflows/update-package-lock.yaml index 7fa5d6ad6bf6f..4aaf3c451826d 100644 --- a/.github/workflows/update-package-lock.yaml +++ b/.github/workflows/update-package-lock.yaml @@ -22,10 +22,10 @@ jobs: if: github.repository == 'microsoft/TypeScript' steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: token: ${{ secrets.TS_BOT_GITHUB_TOKEN }} - - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: node-version: 'lts/*' - run: | diff --git a/Herebyfile.mjs b/Herebyfile.mjs index aca96dc28c911..9195f631914e8 100644 --- a/Herebyfile.mjs +++ b/Herebyfile.mjs @@ -677,7 +677,7 @@ export const watchLocal = task({ dependencies: [localize, watchTsc, watchTsserver, watchServices, lssl, watchOtherOutputs, dts, watchSrc], }); -const runtestsDeps = [tests, generateLibs].concat(cmdLineOptions.typecheck ? [dts] : []); +const runtestsDeps = [tests, generateLibs, generateTypesMap].concat(cmdLineOptions.typecheck ? [dts] : []); export const runTests = task({ name: "runtests", diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index d0d53aea61c00..5d446f6799418 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -3794,6 +3794,21 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // are ESM, there cannot be a synthetic default. return false; } + // For other files (not node16/nodenext with impliedNodeFormat), check if we can determine + // the module format from project references + if (!targetMode && file.isDeclarationFile) { + // Try to get the project reference - try both source file mapping and output file mapping + // since declaration files can be mapped either way depending on how they're resolved + const redirect = host.getRedirectFromSourceFile(file.path) || host.getRedirectFromOutput(file.path); + if (redirect) { + // This is a declaration file from a project reference, so we can determine + // its module format from the referenced project's options + const targetModuleKind = host.getEmitModuleFormatOfFile(file); + if (usageMode === ModuleKind.ESNext && ModuleKind.ES2015 <= targetModuleKind && targetModuleKind <= ModuleKind.ESNext) { + return false; + } + } + } } if (!allowSyntheticDefaultImports) { return false; @@ -15332,6 +15347,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { undefined; } if (t.flags & TypeFlags.Index) { + if (isGenericMappedType((t as IndexType).type)) { + const mappedType = (t as IndexType).type as MappedType; + if (getNameTypeFromMappedType(mappedType) && !isMappedTypeWithKeyofConstraintDeclaration(mappedType)) { + return getBaseConstraint(getIndexTypeForMappedType(mappedType, IndexFlags.None)); + } + } return stringNumberSymbolType; } if (t.flags & TypeFlags.TemplateLiteral) { @@ -18824,7 +18845,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // a circular definition. For this reason, we only eagerly manifest the keys if the constraint is non-generic. if (isGenericIndexType(constraintType)) { if (isMappedTypeWithKeyofConstraintDeclaration(type)) { - // We have a generic index and a homomorphic mapping (but a distributive key remapping) - we need to defer + // We have a generic index and a homomorphic mapping and a key remapping - we need to defer // the whole `keyof whatever` for later since it's not safe to resolve the shape of modifier type. return getIndexTypeForGenericType(type, indexFlags); } @@ -18854,25 +18875,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } - // Ordinarily we reduce a keyof M, where M is a mapped type { [P in K as N

]: X }, to simply N. This however presumes - // that N distributes over union types, i.e. that N is equivalent to N | N | N. Specifically, we only - // want to perform the reduction when the name type of a mapped type is distributive with respect to the type variable - // introduced by the 'in' clause of the mapped type. Note that non-generic types are considered to be distributive because - // they're the same type regardless of what's being distributed over. - function hasDistributiveNameType(mappedType: MappedType) { - const typeVariable = getTypeParameterFromMappedType(mappedType); - return isDistributive(getNameTypeFromMappedType(mappedType) || typeVariable); - function isDistributive(type: Type): boolean { - return type.flags & (TypeFlags.AnyOrUnknown | TypeFlags.Primitive | TypeFlags.Never | TypeFlags.TypeParameter | TypeFlags.Object | TypeFlags.NonPrimitive) ? true : - type.flags & TypeFlags.Conditional ? (type as ConditionalType).root.isDistributive && (type as ConditionalType).checkType === typeVariable : - type.flags & (TypeFlags.UnionOrIntersection | TypeFlags.TemplateLiteral) ? every((type as UnionOrIntersectionType | TemplateLiteralType).types, isDistributive) : - type.flags & TypeFlags.IndexedAccess ? isDistributive((type as IndexedAccessType).objectType) && isDistributive((type as IndexedAccessType).indexType) : - type.flags & TypeFlags.Substitution ? isDistributive((type as SubstitutionType).baseType) && isDistributive((type as SubstitutionType).constraint) : - type.flags & TypeFlags.StringMapping ? isDistributive((type as StringMappingType).type) : - false; - } - } - function getLiteralTypeFromPropertyName(name: PropertyName | JsxAttributeName) { if (isPrivateIdentifier(name)) { return neverType; @@ -18924,7 +18926,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function shouldDeferIndexType(type: Type, indexFlags = IndexFlags.None) { return !!(type.flags & TypeFlags.InstantiableNonPrimitive || isGenericTupleType(type) || - isGenericMappedType(type) && (!hasDistributiveNameType(type) || getMappedTypeNameTypeKind(type) === MappedTypeNameTypeKind.Remapping) || + isGenericMappedType(type) && getNameTypeFromMappedType(type) || type.flags & TypeFlags.Union && !(indexFlags & IndexFlags.NoReducibleCheck) && isGenericReducibleType(type) || type.flags & TypeFlags.Intersection && maybeTypeOfKind(type, TypeFlags.Instantiable) && some((type as IntersectionType).types, isEmptyAnonymousObjectType)); } @@ -19445,6 +19447,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function getSimplifiedType(type: Type, writing: boolean): Type { return type.flags & TypeFlags.IndexedAccess ? getSimplifiedIndexedAccessType(type as IndexedAccessType, writing) : type.flags & TypeFlags.Conditional ? getSimplifiedConditionalType(type as ConditionalType, writing) : + type.flags & TypeFlags.Index ? getSimplifiedIndexType(type as IndexType) : type; } @@ -19544,6 +19547,13 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return type; } + function getSimplifiedIndexType(type: IndexType) { + if (isGenericMappedType(type.type) && getNameTypeFromMappedType(type.type) && !isMappedTypeWithKeyofConstraintDeclaration(type.type)) { + return getIndexTypeForMappedType(type.type, IndexFlags.None); + } + return type; + } + /** * Invokes union simplification logic to determine if an intersection is considered empty as a union constituent */ @@ -24881,7 +24891,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function discriminateTypeByDiscriminableItems(target: UnionType, discriminators: (readonly [() => Type, __String])[], related: (source: Type, target: Type) => boolean | Ternary) { const types = target.types; - const include: Ternary[] = types.map(t => t.flags & TypeFlags.Primitive ? Ternary.False : Ternary.True); + const include: Ternary[] = types.map(t => t.flags & TypeFlags.Primitive || getReducedType(t).flags & TypeFlags.Never ? Ternary.False : Ternary.True); for (const [getDiscriminatingType, propertyName] of discriminators) { // If the remaining target types include at least one with a matching discriminant, eliminate those that // have non-matching discriminants. This ensures that we ignore erroneous discriminators and gradually @@ -31113,7 +31123,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // We only look for uninitialized variables in strict null checking mode, and only when we can analyze // the entire control flow graph from the variable's declaration (i.e. when the flow container and // declaration container are the same). - const isNeverInitialized = immediateDeclaration && isVariableDeclaration(immediateDeclaration) && !immediateDeclaration.initializer && !immediateDeclaration.exclamationToken && isMutableLocalVariableDeclaration(immediateDeclaration) && !isSymbolAssignedDefinitely(symbol); + const isNeverInitialized = immediateDeclaration && isVariableDeclaration(immediateDeclaration) && !isForInOrOfStatement(immediateDeclaration.parent.parent) && !immediateDeclaration.initializer && !immediateDeclaration.exclamationToken && isMutableLocalVariableDeclaration(immediateDeclaration) && !isSymbolAssignedDefinitely(symbol); const assumeInitialized = isParameter || isAlias || (isOuterVariable && !isNeverInitialized) || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || @@ -40548,12 +40558,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } checkNullishCoalesceOperandLeft(node); - checkNullishCoalesceOperandRight(node); } function checkNullishCoalesceOperandLeft(node: BinaryExpression) { const leftTarget = skipOuterExpressions(node.left, OuterExpressionKinds.All); - const nullishSemantics = getSyntacticNullishnessSemantics(leftTarget); if (nullishSemantics !== PredicateSemantics.Sometimes) { if (nullishSemantics === PredicateSemantics.Always) { @@ -40565,25 +40573,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } - function checkNullishCoalesceOperandRight(node: BinaryExpression) { - const rightTarget = skipOuterExpressions(node.right, OuterExpressionKinds.All); - const nullishSemantics = getSyntacticNullishnessSemantics(rightTarget); - if (isNotWithinNullishCoalesceExpression(node)) { - return; - } - - if (nullishSemantics === PredicateSemantics.Always) { - error(rightTarget, Diagnostics.This_expression_is_always_nullish); - } - else if (nullishSemantics === PredicateSemantics.Never) { - error(rightTarget, Diagnostics.This_expression_is_never_nullish); - } - } - - function isNotWithinNullishCoalesceExpression(node: BinaryExpression) { - return !isBinaryExpression(node.parent) || node.parent.operatorToken.kind !== SyntaxKind.QuestionQuestionToken; - } - function getSyntacticNullishnessSemantics(node: Node): PredicateSemantics { node = skipOuterExpressions(node); switch (node.kind) { @@ -40601,15 +40590,16 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // List of operators that can produce null/undefined: // = ??= ?? || ||= && &&= switch ((node as BinaryExpression).operatorToken.kind) { - case SyntaxKind.EqualsToken: - case SyntaxKind.QuestionQuestionToken: - case SyntaxKind.QuestionQuestionEqualsToken: case SyntaxKind.BarBarToken: case SyntaxKind.BarBarEqualsToken: case SyntaxKind.AmpersandAmpersandToken: case SyntaxKind.AmpersandAmpersandEqualsToken: return PredicateSemantics.Sometimes; + // For these operator kinds, the right operand is effectively controlling case SyntaxKind.CommaToken: + case SyntaxKind.EqualsToken: + case SyntaxKind.QuestionQuestionToken: + case SyntaxKind.QuestionQuestionEqualsToken: return getSyntacticNullishnessSemantics((node as BinaryExpression).right); } return PredicateSemantics.Never; @@ -42859,12 +42849,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // Check if the index type is assignable to 'keyof T' for the object type. const objectType = (type as IndexedAccessType).objectType; const indexType = (type as IndexedAccessType).indexType; - // skip index type deferral on remapping mapped types - const objectIndexType = isGenericMappedType(objectType) && getMappedTypeNameTypeKind(objectType) === MappedTypeNameTypeKind.Remapping - ? getIndexTypeForMappedType(objectType, IndexFlags.None) - : getIndexType(objectType, IndexFlags.None); const hasNumberIndexInfo = !!getIndexInfoOfType(objectType, numberType); - if (everyType(indexType, t => isTypeAssignableTo(t, objectIndexType) || hasNumberIndexInfo && isApplicableIndexType(t, numberType))) { + if (everyType(indexType, t => isTypeAssignableTo(t, getIndexType(objectType, IndexFlags.None)) || hasNumberIndexInfo && isApplicableIndexType(t, numberType))) { if ( accessNode.kind === SyntaxKind.ElementAccessExpression && isAssignmentTarget(accessNode) && getObjectFlags(objectType) & ObjectFlags.Mapped && getMappedTypeModifiers(objectType as MappedType) & MappedTypeModifiers.IncludeReadonly diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 03f5f19a69877..1a69dba02a6c1 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -4480,6 +4480,10 @@ "category": "Error", "code": 5010 }, + "The common source directory of '{0}' is '{1}'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.": { + "category": "Error", + "code": 5011 + }, "Cannot read file '{0}': {1}.": { "category": "Error", "code": 5012 diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 000861e55dd44..9ba1afcae27ea 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -646,7 +646,7 @@ export function getCommonSourceDirectory( commonSourceDirectory = getNormalizedAbsolutePath(options.rootDir, currentDirectory); checkSourceFilesBelongToPath?.(options.rootDir); } - else if (options.composite && options.configFilePath) { + else if (options.configFilePath) { // Project compilations never infer their root from the input source paths commonSourceDirectory = getDirectoryPath(normalizeSlashes(options.configFilePath)); checkSourceFilesBelongToPath?.(commonSourceDirectory); @@ -664,6 +664,23 @@ export function getCommonSourceDirectory( return commonSourceDirectory; } +/** @internal */ +export function getComputedCommonSourceDirectory( + emittedFiles: readonly string[], + currentDirectory: string, + getCanonicalFileName: GetCanonicalFileName, +): string { + let commonSourceDirectory = computeCommonSourceDirectoryOfFilenames(emittedFiles, currentDirectory, getCanonicalFileName); + + if (commonSourceDirectory && commonSourceDirectory[commonSourceDirectory.length - 1] !== directorySeparator) { + // Make sure directory path ends with directory separator so this string can directly + // used to replace with "" to get the relative path of the source file and the relative path doesn't + // start with / making it rooted path + commonSourceDirectory += directorySeparator; + } + return commonSourceDirectory; +} + /** @internal */ export function getCommonSourceDirectoryOfConfig({ options, fileNames }: ParsedCommandLine, ignoreCase: boolean): string { return getCommonSourceDirectory( diff --git a/src/compiler/executeCommandLine.ts b/src/compiler/executeCommandLine.ts index 6b6fb23683ca2..0ed4cfd96a45f 100644 --- a/src/compiler/executeCommandLine.ts +++ b/src/compiler/executeCommandLine.ts @@ -157,7 +157,13 @@ function updateReportDiagnostic( } function defaultIsPretty(sys: System) { - return !!sys.writeOutputIsTTY && sys.writeOutputIsTTY() && !sys.getEnvironmentVariable("NO_COLOR"); + if (sys.getEnvironmentVariable("NO_COLOR")) { + return false; + } + if (sys.getEnvironmentVariable("FORCE_COLOR")) { + return true; + } + return !!sys.writeOutputIsTTY && sys.writeOutputIsTTY(); } function shouldBePretty(sys: System, options: CompilerOptions | BuildOptions) { diff --git a/src/compiler/moduleNameResolver.ts b/src/compiler/moduleNameResolver.ts index 2bf692f6298a6..d665072ae51b5 100644 --- a/src/compiler/moduleNameResolver.ts +++ b/src/compiler/moduleNameResolver.ts @@ -2889,7 +2889,7 @@ function getLoadModuleFromTargetExportOrImport(extensions: Extensions, state: Mo const commonSourceDirGuesses: string[] = []; // A `rootDir` compiler option strongly indicates the root location // A `composite` project is using project references and has it's common src dir set to `.`, so it shouldn't need to check any other locations - if (state.compilerOptions.rootDir || (state.compilerOptions.composite && state.compilerOptions.configFilePath)) { + if (state.compilerOptions.rootDir || state.compilerOptions.configFilePath) { const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], state.host.getCurrentDirectory?.() || "", getCanonicalFileName)); commonSourceDirGuesses.push(commonDir); } diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 323b887b20c2b..e56c0353cd3bc 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -109,6 +109,7 @@ import { GetCanonicalFileName, getCommonSourceDirectory as ts_getCommonSourceDirectory, getCommonSourceDirectoryOfConfig, + getComputedCommonSourceDirectory, getDeclarationDiagnostics as ts_getDeclarationDiagnostics, getDefaultLibFileName, getDirectoryPath, @@ -132,6 +133,7 @@ import { getPackageScopeForPath, getPathFromPathComponents, getPositionOfLineAndCharacter, + getRelativePathFromFile, getResolvedModuleFromResolution, getResolvedTypeReferenceDirectiveFromResolution, getResolveJsonModule, @@ -4254,6 +4256,35 @@ export function createProgram(_rootNamesOrOptions: readonly string[] | CreatePro } } + if ( + !options.noEmit && + !options.composite && + !options.rootDir && + options.configFilePath && + (options.outDir || // there is --outDir specified + (getEmitDeclarations(options) && options.declarationDir) || // there is --declarationDir specified + options.outFile) + ) { + // Check if rootDir inferred changed and issue diagnostic + const dir = getCommonSourceDirectory(); + const emittedFiles = mapDefined(files, file => !file.isDeclarationFile && sourceFileMayBeEmitted(file, program) ? file.fileName : undefined); + const dir59 = getComputedCommonSourceDirectory(emittedFiles, currentDirectory, getCanonicalFileName); + if (dir59 !== "" && getCanonicalFileName(dir) !== getCanonicalFileName(dir59)) { + // change in layout + createDiagnosticForOption( + /*onKey*/ true, + options.outFile ? "outFile" : options.outDir ? "outDir" : "declarationDir", + !options.outFile && options.outDir ? "declarationDir" : undefined, + chainDiagnosticMessages( + chainDiagnosticMessages(/*details*/ undefined, Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information), + Diagnostics.The_common_source_directory_of_0_is_1_The_rootDir_setting_must_be_explicitly_set_to_this_or_another_path_to_adjust_your_output_s_file_layout, + getBaseFileName(options.configFilePath), + getRelativePathFromFile(options.configFilePath, dir59, getCanonicalFileName), + ), + ); + } + } + if (options.checkJs && !getAllowJSCompilerOption(options)) { createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "checkJs", "allowJs"); } @@ -4484,7 +4515,7 @@ export function createProgram(_rootNamesOrOptions: readonly string[] | CreatePro createDeprecatedDiagnostic("charset"); } if (options.out) { - createDeprecatedDiagnostic("out", /*value*/ undefined, "outFile"); + createDeprecatedDiagnostic("out"); } if (options.importsNotUsedAsValues) { createDeprecatedDiagnostic("importsNotUsedAsValues", /*value*/ undefined, "verbatimModuleSyntax"); @@ -4510,6 +4541,9 @@ export function createProgram(_rootNamesOrOptions: readonly string[] | CreatePro if (options.allowSyntheticDefaultImports === false) { createDeprecatedDiagnostic("allowSyntheticDefaultImports", "false", /*useInstead*/ undefined, /*related*/ undefined); } + if (options.outFile) { + createDeprecatedDiagnostic("outFile"); + } if (options.module === ModuleKind.None || options.module === ModuleKind.AMD || options.module === ModuleKind.UMD || options.module === ModuleKind.System) { createDeprecatedDiagnostic("module", ModuleKind[options.module], /*useInstead*/ undefined, /*related*/ undefined); } diff --git a/src/compiler/resolutionCache.ts b/src/compiler/resolutionCache.ts index 7bced48353b82..6f1fc390723ad 100644 --- a/src/compiler/resolutionCache.ts +++ b/src/compiler/resolutionCache.ts @@ -199,6 +199,9 @@ export interface ResolutionCacheHost extends MinimalResolutionCacheHost { fileIsOpen(filePath: Path): boolean; onDiscoveredSymlink?(): void; + skipWatchingFailedLookups?(path: Path): boolean | undefined; + skipWatchingTypeRoots?(): boolean | undefined; + // For incremental testing beforeResolveSingleModuleNameWithoutWatching?( moduleResolutionCache: ModuleResolutionCache, @@ -895,7 +898,7 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD resolutionHost.onDiscoveredSymlink(); } resolutionsInFile.set(name, mode, resolution); - if (resolution !== existingResolution) { + if (resolution !== existingResolution && !resolutionHost.skipWatchingFailedLookups?.(path)) { watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution); if (existingResolution) { stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName); @@ -947,7 +950,9 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD // Stop watching and remove the unused name resolutionsInFile.forEach((resolution, name, mode) => { if (!seenNamesInFile.has(name, mode)) { - stopWatchFailedLookupLocationOfResolution(resolution, path, getResolutionWithResolvedFileName); + if (!resolutionHost.skipWatchingFailedLookups?.(path)) { + stopWatchFailedLookupLocationOfResolution(resolution, path, getResolutionWithResolvedFileName); + } resolutionsInFile.delete(name, mode); } }); @@ -1434,13 +1439,15 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD // Deleted file, stop watching failed lookups for all the resolutions in the file const resolutions = cache.get(filePath); if (resolutions) { - resolutions.forEach(resolution => - stopWatchFailedLookupLocationOfResolution( - resolution, - filePath, - getResolutionWithResolvedFileName, - ) - ); + if (!resolutionHost.skipWatchingFailedLookups?.(filePath)) { + resolutions.forEach(resolution => + stopWatchFailedLookupLocationOfResolution( + resolution, + filePath, + getResolutionWithResolvedFileName, + ) + ); + } cache.delete(filePath); } } @@ -1667,6 +1674,12 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD return; } + // if this is inferred project with non watchable root or current directory that is lib location, skip watching type roots + if (!isRootWatchable || resolutionHost.skipWatchingTypeRoots?.()) { + closeTypeRootsWatch(); + return; + } + // we need to assume the directories exist to ensure that we can get all the type root directories that get included // But filter directories that are at root level to say directory doesnt exist, so that we arent watching them const typeRoots = getEffectiveTypeRoots(options, { getCurrentDirectory }); diff --git a/src/compiler/transformers/ts.ts b/src/compiler/transformers/ts.ts index cc3da23d2067b..2219f2b1211a1 100644 --- a/src/compiler/transformers/ts.ts +++ b/src/compiler/transformers/ts.ts @@ -1055,6 +1055,10 @@ export function transformTypeScript(context: TransformationContext): Transformer if (parametersWithPropertyAssignments) { for (const parameter of parametersWithPropertyAssignments) { + // Ignore parameter properties with destructured names; we will have errored on them earlier. + if (!isIdentifier(parameter.name)) { + continue; + } const parameterProperty = factory.createPropertyDeclaration( /*modifiers*/ undefined, parameter.name, diff --git a/src/compiler/types.ts b/src/compiler/types.ts index ef01015982139..4e9f872720d79 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -6394,7 +6394,7 @@ export const enum TypeFlags { /** @internal */ ObjectFlagsType = Any | Nullable | Never | Object | Union | Intersection, /** @internal */ - Simplifiable = IndexedAccess | Conditional, + Simplifiable = IndexedAccess | Conditional | Index, /** @internal */ Singleton = Any | Unknown | String | Number | Boolean | BigInt | ESSymbol | Void | Undefined | Null | Never | NonPrimitive, // 'Narrowable' types are types where narrowing actually narrows. diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index ba6b6d253a31c..9a78e2de7a949 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -6632,7 +6632,7 @@ export function sourceFileMayBeEmitted(sourceFile: SourceFile, host: SourceFileM // Json file is not emitted if outDir is not specified if (!options.outDir) return false; // Otherwise if rootDir or composite config file, we know common sourceDir and can check if file would be emitted in same location - if (options.rootDir || (options.composite && options.configFilePath)) { + if (options.rootDir || options.configFilePath) { const commonDir = getNormalizedAbsolutePath(getCommonSourceDirectory(options, () => [], host.getCurrentDirectory(), host.getCanonicalFileName), host.getCurrentDirectory()); const outputPath = getSourceFilePathInNewDirWorker(sourceFile.fileName, options.outDir, host.getCurrentDirectory(), commonDir, host.getCanonicalFileName); if (comparePaths(sourceFile.fileName, outputPath, host.getCurrentDirectory(), !host.useCaseSensitiveFileNames()) === Comparison.EqualTo) return false; diff --git a/src/harness/evaluatorImpl.ts b/src/harness/evaluatorImpl.ts index 2e2124b64e068..7b434403eb15c 100644 --- a/src/harness/evaluatorImpl.ts +++ b/src/harness/evaluatorImpl.ts @@ -39,6 +39,7 @@ export function evaluateTypeScript(source: string | { files: vfs.FileSet; rootFi const compilerOptions: ts.CompilerOptions = { target: ts.ScriptTarget.ES5, module: ts.ModuleKind.CommonJS, + strict: false, lib: ["lib.esnext.d.ts", "lib.dom.d.ts"], ...options, }; diff --git a/src/harness/fourslashImpl.ts b/src/harness/fourslashImpl.ts index 5b1c66546da88..dc6341ef018f7 100644 --- a/src/harness/fourslashImpl.ts +++ b/src/harness/fourslashImpl.ts @@ -9,10 +9,7 @@ import * as vpath from "./_namespaces/vpath.js"; import { LoggerWithInMemoryLogs } from "./tsserverLogger.js"; import ArrayOrSingle = FourSlashInterface.ArrayOrSingle; -import { - harnessSessionLibLocation, - harnessTypingInstallerCacheLocation, -} from "./harnessLanguageService.js"; +import { harnessTypingInstallerCacheLocation } from "./harnessLanguageService.js"; import { ensureWatchablePath } from "./watchUtils.js"; export const enum FourSlashTestType { @@ -105,7 +102,7 @@ const enum MetadataOptionNames { const fileMetadataNames = [MetadataOptionNames.fileName, MetadataOptionNames.emitThisFile, MetadataOptionNames.resolveReference, MetadataOptionNames.symlink]; function convertGlobalOptionsToCompilerOptions(globalOptions: Harness.TestCaseParser.CompilerSettings): ts.CompilerOptions { - const settings: ts.CompilerOptions = { target: ts.ScriptTarget.ES5, newLine: ts.NewLineKind.CarriageReturnLineFeed }; + const settings: ts.CompilerOptions = { ...ts.getDefaultCompilerOptions(), jsx: undefined, newLine: ts.NewLineKind.CarriageReturnLineFeed }; Harness.Compiler.setCompilerOptionsFromHarnessSetting(globalOptions, settings); return settings; } @@ -367,11 +364,6 @@ export class TestState { } } - const libName = (name: string) => - this.testType !== FourSlashTestType.Server ? - name : - `${harnessSessionLibLocation}/${name}`; - let configParseResult: ts.ParsedCommandLine | undefined; if (configFileName) { const baseDir = ts.normalizePath(ts.getDirectoryPath(configFileName)); @@ -422,24 +414,6 @@ export class TestState { const importedFilePath = this.basePath + "/" + importedFile.fileName; this.addMatchedInputFile(importedFilePath, exts); }); - - this.languageServiceAdapterHost.addScript( - libName(Harness.Compiler.defaultLibFileName), - Harness.Compiler.getDefaultLibrarySourceFile()!.text, - /*isRootFile*/ false, - ); - - compilationOptions.lib?.forEach(fileName => { - const libFile = Harness.Compiler.getDefaultLibrarySourceFile(fileName); - ts.Debug.assertIsDefined(libFile, `Could not find lib file '${fileName}'`); - if (libFile) { - this.languageServiceAdapterHost.addScript( - libName(fileName), - libFile.text, - /*isRootFile*/ false, - ); - } - }); } else { // resolveReference file-option is not specified then do not resolve any files and include all inputFiles @@ -452,24 +426,6 @@ export class TestState { this.languageServiceAdapterHost.addScript(fileName, file, isRootFile); } }); - - if (!compilationOptions.noLib) { - const seen = new Set(); - const addSourceFile = (fileName: string) => { - if (seen.has(fileName)) return; - seen.add(fileName); - const libFile = Harness.Compiler.getDefaultLibrarySourceFile(fileName); - ts.Debug.assertIsDefined(libFile, `Could not find lib file '${fileName}'`); - this.languageServiceAdapterHost.addScript(libName(fileName), libFile.text, /*isRootFile*/ false); - if (!ts.some(libFile.libReferenceDirectives)) return; - for (const directive of libFile.libReferenceDirectives) { - addSourceFile(`lib.${directive.fileName}.d.ts`); - } - }; - - addSourceFile(Harness.Compiler.defaultLibFileName); - compilationOptions.lib?.forEach(addSourceFile); - } } for (const file of testData.files) { @@ -557,7 +513,13 @@ export class TestState { } private tryGetFileContent(fileName: string): string | undefined { const script = this.languageServiceAdapterHost.getScriptInfo(fileName); - return script && script.content; + if (script) return script.content; + try { + return this.languageServiceAdapterHost.vfs.readFileSync(fileName, "utf8"); + } + catch { + return undefined; + } } // Entry points from fourslash.ts @@ -4870,18 +4832,6 @@ function parseTestData(basePath: string, contents: string, fileName: string): Fo } } - // @Filename is the only directive that can be used in a test that contains tsconfig.json file. - const config = ts.find(files, isConfig); - if (config) { - let directive = getNonFileNameOptionInFileList(files); - if (!directive) { - directive = getNonFileNameOptionInObject(globalOptions); - } - if (directive) { - throw Error(`It is not allowed to use ${config.fileName} along with directive '${directive}'`); - } - } - return { markerPositions, markers, @@ -4896,24 +4846,6 @@ function isConfig(file: FourSlashFile): boolean { return Harness.getConfigNameFromFileName(file.fileName) !== undefined; } -function getNonFileNameOptionInFileList(files: FourSlashFile[]): string | undefined { - return ts.forEach(files, f => getNonFileNameOptionInObject(f.fileOptions)); -} - -function getNonFileNameOptionInObject(optionObject: { [s: string]: string; }): string | undefined { - for (const option in optionObject) { - switch (option) { - case MetadataOptionNames.fileName: - case MetadataOptionNames.baselineFile: - case MetadataOptionNames.emitThisFile: - break; - default: - return option; - } - } - return undefined; -} - const enum State { none, inSlashStarMarker, diff --git a/src/harness/harnessIO.ts b/src/harness/harnessIO.ts index 62eb692058e67..a06bde1c95182 100644 --- a/src/harness/harnessIO.ts +++ b/src/harness/harnessIO.ts @@ -229,48 +229,6 @@ export namespace Compiler { return result; } - export const defaultLibFileName = "lib.d.ts"; - export const es2015DefaultLibFileName = "lib.es2015.d.ts"; - - // Cache of lib files from "built/local" - export let libFileNameSourceFileMap: Map | undefined; - - export function getDefaultLibrarySourceFile(fileName: string = defaultLibFileName): ts.SourceFile | undefined { - if (!isDefaultLibraryFile(fileName)) { - return undefined; - } - - if (!libFileNameSourceFileMap) { - const file = createSourceFileAndAssertInvariants(defaultLibFileName, IO.readFile(libFolder + "lib.es5.d.ts")!, /*languageVersion*/ ts.ScriptTarget.Latest); - libFileNameSourceFileMap = new Map(Object.entries({ - [defaultLibFileName]: { file, stringified: JSON.stringify(file.text) }, - })); - } - - let sourceFile = libFileNameSourceFileMap.get(fileName); - if (!sourceFile) { - const file = createSourceFileAndAssertInvariants(fileName, IO.readFile(libFolder + fileName)!, ts.ScriptTarget.Latest); - sourceFile = { file, stringified: JSON.stringify(file.text) }; - libFileNameSourceFileMap.set(fileName, sourceFile); - } - return sourceFile.file; - } - - export function getDefaultLibFileName(options: ts.CompilerOptions): string { - switch (ts.getEmitScriptTarget(options)) { - case ts.ScriptTarget.ESNext: - case ts.ScriptTarget.ES2017: - return "lib.es2017.d.ts"; - case ts.ScriptTarget.ES2016: - return "lib.es2016.d.ts"; - case ts.ScriptTarget.ES2015: - return es2015DefaultLibFileName; - - default: - return defaultLibFileName; - } - } - // Cache these between executions so we don't have to re-parse them for every test export const fourslashFileName = "fourslash.ts"; export let fourslashSourceFile: ts.SourceFile; @@ -281,9 +239,7 @@ export namespace Compiler { interface HarnessOptions { useCaseSensitiveFileNames?: boolean; - includeBuiltFile?: string; baselineFile?: string; - libFiles?: string; noTypesAndSymbols?: boolean; captureSuggestions?: boolean; } @@ -293,9 +249,7 @@ export namespace Compiler { { name: "allowNonTsExtensions", type: "boolean", defaultValueDescription: false }, { name: "useCaseSensitiveFileNames", type: "boolean", defaultValueDescription: false }, { name: "baselineFile", type: "string" }, - { name: "includeBuiltFile", type: "string" }, { name: "fileName", type: "string" }, - { name: "libFiles", type: "string" }, { name: "noErrorTruncation", type: "boolean", defaultValueDescription: false }, { name: "suppressOutputPathCheck", type: "boolean", defaultValueDescription: false }, { name: "noImplicitReferences", type: "boolean", defaultValueDescription: false }, @@ -412,23 +366,6 @@ export namespace Compiler { .map(file => options.configFile ? ts.getNormalizedAbsolutePath(file.unitName, currentDirectory) : file.unitName) .filter(fileName => !ts.fileExtensionIs(fileName, ts.Extension.Json)); - // Files from built\local that are requested by test "@includeBuiltFiles" to be in the context. - // Treat them as library files, so include them in build, but not in baselines. - if (options.includeBuiltFile) { - programFileNames.push(vpath.combine(vfs.builtFolder, options.includeBuiltFile)); - } - - // Files from tests\lib that are requested by "@libFiles" - if (options.libFiles) { - for (const fileName of options.libFiles.split(",")) { - if (fileName === "lib.d.ts" && !options.noLib) { - // Hack from Corsa. - continue; - } - programFileNames.push(vpath.combine(vfs.testLibFolder, fileName)); - } - } - const docs = inputFiles.concat(otherFiles).map(documents.TextDocument.fromTestFile); const fs = vfs.createFromFileSystem(IO, !useCaseSensitiveFileNames, { documents: docs, cwd: currentDirectory }); if (symlinks) { @@ -1062,7 +999,7 @@ export namespace Compiler { function fileOutput(file: documents.TextDocument, harnessSettings: TestCaseParser.CompilerSettings): string { const fileName = harnessSettings.fullEmitPaths ? Utils.removeTestPathPrefixes(file.file) : ts.getBaseFileName(file.file); - return "//// [" + fileName + "]\r\n" + Utils.removeTestPathPrefixes(file.text); + return "//// [" + fileName + "]\r\n" + file.text; } export function collateOutputs(outputFiles: readonly documents.TextDocument[]): string { diff --git a/src/harness/harnessLanguageService.ts b/src/harness/harnessLanguageService.ts index 7aff47310a4b6..1703d466619aa 100644 --- a/src/harness/harnessLanguageService.ts +++ b/src/harness/harnessLanguageService.ts @@ -1,7 +1,7 @@ import * as collections from "./_namespaces/collections.js"; import * as fakes from "./_namespaces/fakes.js"; import { - Compiler, + IO, mockHash, virtualFileSystemRoot, } from "./_namespaces/Harness.js"; @@ -128,13 +128,122 @@ export interface LanguageServiceAdapter { getLogger(): LoggerWithInMemoryLogs | undefined; } +/** Create VFS with libs only at fourslashLibFolder */ +function createLanguageServiceVfs(): vfs.FileSystem { + return vfs.createFourslashVfs(IO, /*ignoreCase*/ true, { cwd: virtualFileSystemRoot }); +} + +// Cache lib file SourceFiles directly to avoid reparsing across tests. +// Lib .d.ts files parse identically regardless of compiler settings, so we cache +// just one copy per path. This persists for the entire test run. +const libSourceFileCache = new Map(); + +function createLibCachingDocumentRegistry(): ts.DocumentRegistry { + const localRegistry = ts.createDocumentRegistry(/*useCaseSensitiveFileNames*/ false, virtualFileSystemRoot); + + function isLibFile(fileName: string): boolean { + return vpath.beneath(vfs.fourslashLibFolder, fileName); + } + + return { + acquireDocument(fileName, compilationSettingsOrHost, scriptSnapshot, version, scriptKind, sourceFileOptions) { + if (isLibFile(fileName)) { + const cached = libSourceFileCache.get(fileName); + if (cached) { + return cached; + } + // Not cached - acquire from local registry to parse it, then cache + const sourceFile = localRegistry.acquireDocument(fileName, compilationSettingsOrHost, scriptSnapshot, version, scriptKind, sourceFileOptions); + libSourceFileCache.set(fileName, sourceFile); + // Release from local registry immediately - we don't need ref counting for cached libs + const settings = typeof (compilationSettingsOrHost as ts.MinimalResolutionCacheHost).getCompilationSettings === "function" + ? (compilationSettingsOrHost as ts.MinimalResolutionCacheHost).getCompilationSettings() + : compilationSettingsOrHost as ts.CompilerOptions; + localRegistry.releaseDocument(fileName, settings, scriptKind!, typeof sourceFileOptions === "object" ? sourceFileOptions.impliedNodeFormat : undefined); + return sourceFile; + } + return localRegistry.acquireDocument(fileName, compilationSettingsOrHost, scriptSnapshot, version, scriptKind, sourceFileOptions); + }, + acquireDocumentWithKey(fileName, path, compilationSettingsOrHost, key, scriptSnapshot, version, scriptKind, sourceFileOptions) { + if (isLibFile(fileName)) { + const cached = libSourceFileCache.get(fileName); + if (cached) { + return cached; + } + // Not cached - acquire from local registry to parse it, then cache + const sourceFile = localRegistry.acquireDocumentWithKey(fileName, path, compilationSettingsOrHost, key, scriptSnapshot, version, scriptKind, sourceFileOptions); + libSourceFileCache.set(fileName, sourceFile); + // Release from local registry immediately + const impliedNodeFormat = typeof sourceFileOptions === "object" ? sourceFileOptions.impliedNodeFormat : undefined; + localRegistry.releaseDocumentWithKey(path, key, scriptKind!, impliedNodeFormat); + return sourceFile; + } + return localRegistry.acquireDocumentWithKey(fileName, path, compilationSettingsOrHost, key, scriptSnapshot, version, scriptKind, sourceFileOptions); + }, + updateDocument(fileName, compilationSettingsOrHost, scriptSnapshot, version, scriptKind, sourceFileOptions) { + if (isLibFile(fileName)) { + // Lib files should never be updated - just return the cached version + const cached = libSourceFileCache.get(fileName); + if (cached) { + return cached; + } + // Fall through to acquire if somehow not cached + return this.acquireDocument(fileName, compilationSettingsOrHost, scriptSnapshot, version, scriptKind, sourceFileOptions); + } + return localRegistry.updateDocument(fileName, compilationSettingsOrHost, scriptSnapshot, version, scriptKind, sourceFileOptions); + }, + updateDocumentWithKey(fileName, path, compilationSettingsOrHost, key, scriptSnapshot, version, scriptKind, sourceFileOptions) { + if (isLibFile(fileName)) { + // Lib files should never be updated - just return the cached version + const cached = libSourceFileCache.get(fileName); + if (cached) { + return cached; + } + // Fall through to acquire if somehow not cached + return this.acquireDocumentWithKey(fileName, path, compilationSettingsOrHost, key, scriptSnapshot, version, scriptKind, sourceFileOptions); + } + return localRegistry.updateDocumentWithKey(fileName, path, compilationSettingsOrHost, key, scriptSnapshot, version, scriptKind, sourceFileOptions); + }, + getKeyForCompilationSettings(settings) { + return localRegistry.getKeyForCompilationSettings(settings); + }, + getDocumentRegistryBucketKeyWithMode(key, mode) { + return localRegistry.getDocumentRegistryBucketKeyWithMode(key, mode); + }, + releaseDocument(fileName: string, compilationSettings: ts.CompilerOptions, scriptKind?: ts.ScriptKind, impliedNodeFormat?: ts.ResolutionMode) { + if (isLibFile(fileName)) { + // Lib files are cached separately - no ref counting needed, so no-op + return; + } + return localRegistry.releaseDocument(fileName, compilationSettings, scriptKind!, impliedNodeFormat); + }, + releaseDocumentWithKey(path: ts.Path, key: ts.DocumentRegistryBucketKey, scriptKind?: ts.ScriptKind, impliedNodeFormat?: ts.ResolutionMode) { + // We can't easily tell if this is a lib file from just the path without the fileName, + // so try to release from local registry and ignore errors + try { + localRegistry.releaseDocumentWithKey(path, key, scriptKind!, impliedNodeFormat); + } + catch { + // Ignore - might be a lib file that was never in the local registry + } + }, + reportStats() { + return `Lib cache: ${libSourceFileCache.size} files\nLocal registry: ${localRegistry.reportStats()}`; + }, + getBuckets() { + return localRegistry.getBuckets(); + }, + }; +} + export abstract class LanguageServiceAdapterHost { - public readonly sys: fakes.System = new fakes.System(new vfs.FileSystem(/*ignoreCase*/ true, { cwd: virtualFileSystemRoot })); + public readonly sys: fakes.System; public typesRegistry: Map | undefined; private scriptInfos: collections.SortedMap; public jsDocParsingMode: ts.JSDocParsingMode | undefined; constructor(protected cancellationToken: DefaultHostCancellationToken = DefaultHostCancellationToken.instance, protected settings: ts.CompilerOptions = ts.getDefaultCompilerOptions()) { + this.sys = new fakes.System(createLanguageServiceVfs()); this.scriptInfos = new collections.SortedMap({ comparer: this.vfs.stringComparer, sort: "insertion" }); } @@ -280,7 +389,7 @@ class NativeLanguageServiceHost extends LanguageServiceAdapterHost implements ts } getDefaultLibFileName(): string { - return Compiler.defaultLibFileName; + return vpath.combine(vfs.fourslashLibFolder, ts.getDefaultLibFileName(this.settings)); } getScriptFileNames(): string[] { @@ -289,7 +398,10 @@ class NativeLanguageServiceHost extends LanguageServiceAdapterHost implements ts getScriptSnapshot(fileName: string): ts.IScriptSnapshot | undefined { const script = this.getScriptInfo(fileName); - return script ? new ScriptSnapshot(script) : undefined; + if (script) return new ScriptSnapshot(script); + // Fall back to reading from VFS for files not in scriptInfos (e.g., lib files) + const content = this.readFile(fileName); + return content !== undefined ? ts.ScriptSnapshot.fromString(content) : undefined; } getScriptKind(): ts.ScriptKind { @@ -332,15 +444,17 @@ class NativeLanguageServiceHost extends LanguageServiceAdapterHost implements ts export class NativeLanguageServiceAdapter implements LanguageServiceAdapter { private host: NativeLanguageServiceHost; + private documentRegistry: ts.DocumentRegistry; getLogger: typeof ts.returnUndefined = ts.returnUndefined; constructor(cancellationToken?: ts.HostCancellationToken, options?: ts.CompilerOptions) { this.host = new NativeLanguageServiceHost(cancellationToken, options); + this.documentRegistry = createLibCachingDocumentRegistry(); } getHost(): LanguageServiceAdapterHost { return this.host; } getLanguageService(): ts.LanguageService { - return ts.createLanguageService(this.host); + return ts.createLanguageService(this.host, this.documentRegistry); } getClassifier(): ts.Classifier { return ts.createClassifier(); @@ -394,8 +508,6 @@ interface ServerHostDirectoryWatcher { cb: ts.DirectoryWatcherCallback; } -/** Default typescript and lib installs location for tests */ -export const harnessSessionLibLocation = "/home/src/tslibs/TS/Lib"; class SessionServerHost implements ts.server.ServerHost { args: string[] = []; newLine: string; @@ -420,7 +532,9 @@ class SessionServerHost implements ts.server.ServerHost { readFile(fileName: string): string | undefined { // System FS would follow symlinks, even though snapshots are stored by original file name const snapshot = this.host.getScriptSnapshot(fileName) || this.host.getScriptSnapshot(this.realpath(fileName)); - return snapshot && ts.getSnapshotText(snapshot); + if (snapshot) return ts.getSnapshotText(snapshot); + // Fall back to reading from VFS for files not in scriptInfos (e.g., lib files) + return this.host.readFile(fileName); } realpath(path: string) { @@ -443,7 +557,7 @@ class SessionServerHost implements ts.server.ServerHost { } getExecutingFilePath(): string { - return harnessSessionLibLocation + "/tsc.js"; + return vfs.fourslashLibFolder + "/tsc.js"; } exit = ts.noop; @@ -671,6 +785,11 @@ export class ServerLanguageServiceAdapter implements LanguageServiceAdapter { // or edited. clientHost.setClient(client); + // Apply test options (e.g. @lib) to inferred projects + if (options) { + client.setCompilerOptionsForInferredProjects(ts.optionMapToObject(ts.serializeCompilerOptions(options)) as ts.server.protocol.CompilerOptions); + } + // Set the properties this.client = client; this.host = clientHost; diff --git a/src/harness/harnessUtils.ts b/src/harness/harnessUtils.ts index b0b0edd8af868..f768325897167 100644 --- a/src/harness/harnessUtils.ts +++ b/src/harness/harnessUtils.ts @@ -15,19 +15,15 @@ export function evalFile(fileContents: string, fileName: string, nodeContext?: a } } -/** Splits the given string on \r\n, or on only \n if that fails, or on only \r if *that* fails. */ +const newlineRegex = /\r?\n/; + +/** + * Splits the given string on the two reasonable line terminators (\r\n or \n). + * Does NOT split on `\r` alone, \u2028, or \u2029. + */ export function splitContentByNewlines(content: string): string[] { // Split up the input file by line - // Note: IE JS engine incorrectly handles consecutive delimiters here when using RegExp split, so - // we have to use string-based splitting instead and try to figure out the delimiting chars - let lines = content.split("\r\n"); - if (lines.length === 1) { - lines = content.split("\n"); - - if (lines.length === 1) { - lines = content.split("\r"); - } - } + const lines = content.split(newlineRegex); return lines; } diff --git a/src/harness/incrementalUtils.ts b/src/harness/incrementalUtils.ts index 47114c88d5151..d7459f1ba489f 100644 --- a/src/harness/incrementalUtils.ts +++ b/src/harness/incrementalUtils.ts @@ -107,6 +107,7 @@ interface ResolutionInfo { fileName: string; name: string; mode: ts.ResolutionMode; + watched: boolean; } function getResolutionCacheDetails( @@ -254,8 +255,8 @@ export function verifyResolutionCache( // Verify ref count resolutionToRefs.forEach((info, resolution) => { ts.Debug.assert( - resolution.files?.size === info.length, - `${projectName}:: Expected Resolution ref count ${info.length} but got ${resolution.files?.size}`, + (resolution.files?.size ?? 0) === info.filter(i => i.watched).length, + `${projectName}:: Expected Resolution ref count ${info.filter(i => i.watched).length} but got ${resolution.files?.size}`, () => `Expected from:: ${JSON.stringify(info, undefined, " ")}` + `Actual from: ${resolution.files?.size}`, @@ -317,12 +318,13 @@ export function verifyResolutionCache( ): ExpectedResolution { const existing = resolutionToRefs.get(resolved); let expectedResolution: ExpectedResolution; + const watched = !resolutionHostCacheHost.skipWatchingFailedLookups?.(fileName); if (existing) { - existing.push({ cacheType, fileName, name, mode }); + existing.push({ cacheType, fileName, name, mode, watched }); expectedResolution = resolutionToExpected.get(resolved)!; } else { - resolutionToRefs.set(resolved, [{ cacheType, fileName, name, mode }]); + resolutionToRefs.set(resolved, [{ cacheType, fileName, name, mode, watched }]); expectedResolution = { resolvedModule: (resolved as any).resolvedModule, resolvedTypeReferenceDirective: (resolved as any).resolvedTypeReferenceDirective, @@ -333,7 +335,9 @@ export function verifyResolutionCache( expectedToResolution.set(expectedResolution, resolved); resolutionToExpected.set(resolved, expectedResolution); } - expected.watchFailedLookupLocationsOfExternalModuleResolutions(name, expectedResolution, fileName, () => ({ resolvedFileName }), deferWatchingNonRelativeResolution); + if (watched) { + expected.watchFailedLookupLocationsOfExternalModuleResolutions(name, expectedResolution, fileName, () => ({ resolvedFileName }), deferWatchingNonRelativeResolution); + } return expectedResolution; } @@ -527,6 +531,8 @@ function verifyProgram(service: ts.server.ProjectService, project: ts.server.Pro getGlobalTypingsCacheLocation: project.getGlobalTypingsCacheLocation.bind(project), globalCacheResolutionModuleName: project.globalCacheResolutionModuleName.bind(project), fileIsOpen: project.fileIsOpen.bind(project), + skipWatchingFailedLookups: project.skipWatchingFailedLookups.bind(project), + skipWatchingTypeRoots: project.skipWatchingTypeRoots.bind(project), getCurrentProgram: () => project.getCurrentProgram(), preferNonRecursiveWatch: project.preferNonRecursiveWatch, diff --git a/src/harness/tsserverLogger.ts b/src/harness/tsserverLogger.ts index 85d81ebfb217b..8f260b5304a43 100644 --- a/src/harness/tsserverLogger.ts +++ b/src/harness/tsserverLogger.ts @@ -1,5 +1,8 @@ import * as ts from "./_namespaces/ts.js"; -import { Compiler } from "./harnessIO.js"; +import { + IO, + libFolder, +} from "./harnessIO.js"; export const HarnessLSCouldNotResolveModule = "HarnessLanguageService:: Could not resolve module"; @@ -142,11 +145,25 @@ function sanitizeHarnessLSException(s: string) { return s; } +const libFileTextReplacements = ts.memoize(() => { + const replacements: { text: string; jsonText: string; replacement: string; }[] = []; + // Read all lib files from built/local + const libFiles = IO.listFiles(libFolder, /^lib.*\.d\.ts$/); + for (const libPath of libFiles) { + const content = IO.readFile(libPath); + if (content) { + const fileName = ts.getBaseFileName(libPath); + replacements.push({ text: content, jsonText: JSON.stringify(content), replacement: `${fileName}-Text` }); + } + } + return replacements; +}); + export function sanitizeLibFileText(s: string): string { - Compiler.libFileNameSourceFileMap?.forEach((lib, fileName) => { - s = replaceAll(s, lib.stringified, `${fileName}-Text`); - s = replaceAll(s, lib.file.text, `${fileName}-Text`); - }); + for (const { text, jsonText, replacement } of libFileTextReplacements()) { + s = replaceAll(s, jsonText, replacement); + s = replaceAll(s, text, replacement); + } return s; } diff --git a/src/harness/vfsUtil.ts b/src/harness/vfsUtil.ts index 596575beece2c..b217fb57bba95 100644 --- a/src/harness/vfsUtil.ts +++ b/src/harness/vfsUtil.ts @@ -9,6 +9,11 @@ import * as vpath from "./_namespaces/vpath.js"; */ export const builtFolder = "/.ts"; +/** + * Posix-style path to libs for fourslash server tests (mounted to same location as builtFolder) + */ +export const fourslashLibFolder = "/home/src/tslibs/TS/Lib"; + /** * Posix-style path to additional mountable folders (./tests/projects in this repo) */ @@ -1583,6 +1588,73 @@ function getBuiltLocal(host: FileSystemResolverHost, ignoreCase: boolean): FileS return builtLocalCS; } +let fourslashLibsOnlyHost: FileSystemResolverHost | undefined; +let fourslashLibsOnlyCI: FileSystem | undefined; +let fourslashLibsOnlyCS: FileSystem | undefined; + +function getFourslashLibsOnly(host: FileSystemResolverHost, ignoreCase: boolean): FileSystem { + if (fourslashLibsOnlyHost !== host) { + fourslashLibsOnlyCI = undefined; + fourslashLibsOnlyCS = undefined; + fourslashLibsOnlyHost = host; + } + if (!fourslashLibsOnlyCI) { + const resolver = createResolver(host); + fourslashLibsOnlyCI = new FileSystem(/*ignoreCase*/ true, { + files: { + [fourslashLibFolder]: new Mount(vpath.resolve(host.getWorkspaceRoot(), "built/local"), resolver), + }, + cwd: "/", + meta: { defaultLibLocation: fourslashLibFolder }, + }); + fourslashLibsOnlyCI.makeReadonly(); + } + if (ignoreCase) return fourslashLibsOnlyCI; + if (!fourslashLibsOnlyCS) { + fourslashLibsOnlyCS = fourslashLibsOnlyCI.shadow(/*ignoreCase*/ false); + fourslashLibsOnlyCS.makeReadonly(); + } + return fourslashLibsOnlyCS; +} + +/** + * Creates a VFS with only libs mounted at fourslashLibFolder, suitable for fourslash tests. + */ +export function createFourslashVfs(host: FileSystemResolverHost, ignoreCase: boolean, { documents, files, cwd, time, meta }: FileSystemCreateOptions = {}): FileSystem { + const fs = getFourslashLibsOnly(host, ignoreCase).shadow(); + if (meta) { + for (const key of Object.keys(meta)) { + fs.meta.set(key, meta[key]); + } + } + if (time) { + fs.time(time); + } + if (cwd) { + fs.mkdirpSync(cwd); + fs.chdir(cwd); + } + if (documents) { + for (const document of documents) { + fs.mkdirpSync(vpath.dirname(document.file)); + fs.writeFileSync(document.file, document.text, "utf8"); + fs.filemeta(document.file).set("document", document); + // Add symlinks + const symlink = document.meta.get("symlink"); + if (symlink) { + for (const link of symlink.split(",").map(link => link.trim())) { + fs.mkdirpSync(vpath.dirname(link)); + fs.symlinkSync(vpath.resolve(fs.cwd(), document.file), link); + } + } + } + } + if (files) { + fs.apply(files); + } + return fs; +} + /* eslint-disable no-restricted-syntax */ function normalizeFileSetEntry(value: FileSet[string]) { if ( diff --git a/src/lib/es2015.core.d.ts b/src/lib/es2015.core.d.ts index d3b487d7a52c1..93b103bd8b83e 100644 --- a/src/lib/es2015.core.d.ts +++ b/src/lib/es2015.core.d.ts @@ -173,7 +173,7 @@ interface Math { hypot(...values: number[]): number; /** - * Returns the integral part of the a numeric expression, x, removing any fractional digits. + * Returns the integral part of the numeric expression x, removing any fractional digits. * If x is already an integer, the result is x. * @param x A numeric expression. */ diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 23f8d844c9856..aa578c7ed0815 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -80,6 +80,7 @@ import { JSDocParsingMode, LanguageServiceMode, length, + libMap, map, mapDefinedIterator, matchesExcludeWorker, @@ -464,6 +465,10 @@ export function convertCompilerOptions(protocolOptions: protocol.ExternalProject protocolOptions[id] = mappedValues.get(propertyValue.toLowerCase()); } }); + // Convert lib short names (e.g. "es6") to full filenames (e.g. "lib.es6.d.ts") + if (isArray(protocolOptions.lib)) { + protocolOptions.lib = protocolOptions.lib.map(libName => libMap.get(libName) ?? libName); + } return protocolOptions as any; } diff --git a/src/server/project.ts b/src/server/project.ts index 2786ad033a3af..88fa23c1bc263 100644 --- a/src/server/project.ts +++ b/src/server/project.ts @@ -1530,6 +1530,15 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo /** @internal */ watchTypingLocations(files: readonly string[] | undefined): void { + // Skip watching typing locations for inferred project whose currentDirectory is not watchable or + // is same as server's current directory + if ( + this.currentDirectory === this.projectService.currentDirectory || + !canWatchDirectoryOrFilePath(this.toPath(this.currentDirectory)) + ) { + return; + } + if (!files) { this.typingWatchers!.isInvoked = false; return; @@ -1626,6 +1635,18 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo }); } + /** @internal */ + skipWatchingFailedLookups(path: Path): boolean | undefined { + const info = this.projectService.getScriptInfoForPath(path); + return info?.isDynamic; + } + + /** @internal */ + skipWatchingTypeRoots(): boolean | undefined { + // Skip watching inferrd project where current directory is lib location + return isInferredProject(this) && this.currentDirectory === this.projectService.currentDirectory; + } + /** @internal */ getCurrentProgram(): Program | undefined { return this.program; diff --git a/src/testRunner/unittests/helpers/contents.ts b/src/testRunner/unittests/helpers/contents.ts index 780ca4b1d81ee..ddfd14d5695a4 100644 --- a/src/testRunner/unittests/helpers/contents.ts +++ b/src/testRunner/unittests/helpers/contents.ts @@ -1,13 +1,11 @@ -import { - harnessSessionLibLocation, - harnessTypingInstallerCacheLocation, -} from "../../../harness/harnessLanguageService.js"; +import * as vfs from "../../../harness/_namespaces/vfs.js"; +import { harnessTypingInstallerCacheLocation } from "../../../harness/harnessLanguageService.js"; import * as ts from "../../_namespaces/ts.js"; /** Default typescript and lib installs location for tests */ export const tscTypeScriptTestLocation: string = getPathForTypeScriptTestLocation("tsc.js"); export function getPathForTypeScriptTestLocation(fileName: string): string { - return ts.combinePaths(harnessSessionLibLocation, fileName); + return ts.combinePaths(vfs.fourslashLibFolder, fileName); } export function getTypeScriptLibTestLocation(libName: string): string { diff --git a/src/testRunner/unittests/helpers/monorepoSymlinkedSiblingPackages.ts b/src/testRunner/unittests/helpers/monorepoSymlinkedSiblingPackages.ts index 2f0139f2595d3..7084298e1a72a 100644 --- a/src/testRunner/unittests/helpers/monorepoSymlinkedSiblingPackages.ts +++ b/src/testRunner/unittests/helpers/monorepoSymlinkedSiblingPackages.ts @@ -151,6 +151,7 @@ function getMonorepoSymlinkedSiblingPackagesSysWithUnRelatedFolders( compilerOptions: { outDir: "lib", declaration: true, + rootDir: "src", }, include: ["src/**/*.ts"], }), @@ -169,6 +170,7 @@ function getMonorepoSymlinkedSiblingPackagesSysWithUnRelatedFolders( compilerOptions: { outDir: "lib", declaration: true, + rootDir: "src", }, include: ["src/**/*.ts"], }), @@ -183,6 +185,7 @@ function getMonorepoSymlinkedSiblingPackagesSysWithUnRelatedFolders( "/home/src/projects/b/2/b-impl/b/tsconfig.json": jsonToReadableText({ compilerOptions: { outDir: "lib", + rootDir: "src", }, include: ["src/**/*.ts"], }), diff --git a/src/testRunner/unittests/tsbuild/outputPaths.ts b/src/testRunner/unittests/tsbuild/outputPaths.ts index 48007978ace8b..40a30f6e6d98a 100644 --- a/src/testRunner/unittests/tsbuild/outputPaths.ts +++ b/src/testRunner/unittests/tsbuild/outputPaths.ts @@ -26,7 +26,7 @@ describe("unittests:: tsbuild:: outputPaths::", () => { ...input, }); - it("verify getOutputFileNames", () => { + it("verify getOutputFileNames " + input.subScenario, () => { const sys = input.sys(); assert.deepEqual( ts.getOutputFileNames( @@ -58,7 +58,7 @@ describe("unittests:: tsbuild:: outputPaths::", () => { }), }), edits, - }, ["/home/src/workspaces/project/dist/index.js"]); + }, ["/home/src/workspaces/project/dist/src/index.js"]); verify({ subScenario: "when rootDir is not specified and is composite", diff --git a/src/testRunner/unittests/tsc/commandLine.ts b/src/testRunner/unittests/tsc/commandLine.ts index d56f293f61111..fd2fe029218b7 100644 --- a/src/testRunner/unittests/tsc/commandLine.ts +++ b/src/testRunner/unittests/tsc/commandLine.ts @@ -30,6 +30,26 @@ describe("unittests:: tsc:: commandLine::", () => { commandLineArgs: emptyArray, }); + verifyTsc({ + scenario: "commandLine", + subScenario: "adds color when FORCE_COLOR is set", + sys: () => + TestServerHost.createWatchedSystem(emptyArray, { + environmentVariables: new Map([["FORCE_COLOR", "true"]]), + }), + commandLineArgs: emptyArray, + }); + + verifyTsc({ + scenario: "commandLine", + subScenario: "does not add color when NO_COLOR is set even if FORCE_COLOR is set", + sys: () => + TestServerHost.createWatchedSystem(emptyArray, { + environmentVariables: new Map([["NO_COLOR", "true"], ["FORCE_COLOR", "true"]]), + }), + commandLineArgs: emptyArray, + }); + verifyTsc({ scenario: "commandLine", subScenario: "when build not first argument", diff --git a/src/testRunner/unittests/tsc/projectReferences.ts b/src/testRunner/unittests/tsc/projectReferences.ts index 3a5b1e09de7ad..39ca6ce5f71fe 100644 --- a/src/testRunner/unittests/tsc/projectReferences.ts +++ b/src/testRunner/unittests/tsc/projectReferences.ts @@ -90,6 +90,42 @@ describe("unittests:: tsc:: projectReferences::", () => { commandLineArgs: ["--p", "app", "--pretty", "false"], }); + verifyTsc({ + scenario: "projectReferences", + subScenario: "referenced project with esnext module disallows synthetic default imports", + sys: () => + TestServerHost.createWatchedSystem({ + "/home/src/workspaces/project/lib/tsconfig.json": jsonToReadableText({ + compilerOptions: { + composite: true, + declaration: true, + module: "esnext", + moduleResolution: "bundler", + rootDir: "src", + outDir: "dist", + }, + include: ["src"], + }), + "/home/src/workspaces/project/lib/src/utils.ts": "export const test = () => 'test';", + "/home/src/workspaces/project/lib/dist/utils.d.ts": "export declare const test: () => string;", + "/home/src/workspaces/project/app/tsconfig.json": jsonToReadableText({ + compilerOptions: { + module: "esnext", + moduleResolution: "bundler", + }, + references: [ + { path: "../lib" }, + ], + }), + "/home/src/workspaces/project/app/index.ts": ` + import TestSrc from '../lib/src/utils'; // Error + import TestDecl from '../lib/dist/utils'; // Error + console.log(TestSrc.test()); + console.log(TestDecl.test());`, + }), + commandLineArgs: ["--p", "app", "--pretty", "false"], + }); + verifyTsc({ scenario: "projectReferences", subScenario: "referencing ambient const enum from referenced project with preserveConstEnums", diff --git a/src/testRunner/unittests/tsserver/dynamicFiles.ts b/src/testRunner/unittests/tsserver/dynamicFiles.ts index d3d3945e19286..5a5906f08c3de 100644 --- a/src/testRunner/unittests/tsserver/dynamicFiles.ts +++ b/src/testRunner/unittests/tsserver/dynamicFiles.ts @@ -270,4 +270,27 @@ describe("unittests:: tsserver:: dynamicFiles:: ", () => { verifyPathRecognizedAsDynamic("walkThroughSnippet", "walkThroughSnippet:/usr/share/code/resources/app/out/vs/workbench/contrib/welcome/walkThrough/browser/editor/^vs_code_editor_walkthrough.md#1.ts"); verifyPathRecognizedAsDynamic("untitled", "untitled:/Users/matb/projects/san/^newFile.ts"); }); + + it("chat block with imports", () => { + const host = TestServerHost.createServerHost({ + "/user/username/projects/myproject/a.ts": "", + "/user/username/projects/myproject/tsconfig.json": "{}", + }); + const session = new TestSession({ host, useInferredProjectPerProjectRoot: true }); + openFilesForSession([{ file: "/user/username/projects/myproject/a.ts", projectRootPath: "/user/username/projects/myproject" }], session); + // Without projectRoot + openFilesForSession([{ + file: "^/chat-editing-snapshot-text-model/ts-nul-authority/c/temp/codeRepo/src/services/user.service.ts", + content: "", + scriptKindName: "TS", + }], session); + // with "/" as project root + openFilesForSession([{ + file: '^/vscode-chat-code-block/dnnjb2rllwnoyxqtc2vzc2lvbjovl2xvy2fsl1peag1oelv6tkdvde9uvtvnuzawtxpbnuxxstrare10tvrobfpuvtbpvgmytudwaq/response_6b1244f1-9aca-4b8b-8f65-0ff7ed4e6b4e/2#{"references":[]}', + content: `import { UserService from './src/services/user.service';}`, + projectRootPath: "/", + scriptKindName: "TS", + }], session); + baselineTsserverLogs("dynamicFiles", "chat block with imports", session); + }); }); diff --git a/tests/baselines/reference/2dArrays.js b/tests/baselines/reference/2dArrays.js index 67ca55be5f1e1..3c12da4a25ef8 100644 --- a/tests/baselines/reference/2dArrays.js +++ b/tests/baselines/reference/2dArrays.js @@ -5,12 +5,12 @@ class Cell { } class Ship { - isSunk: boolean; + isSunk: boolean = false; } class Board { - ships: Ship[]; - cells: Cell[]; + ships: Ship[] = []; + cells: Cell[] = []; private allShipsSunk() { return this.ships.every(function (val) { return val.isSunk; }); @@ -25,11 +25,14 @@ var Cell = /** @class */ (function () { }()); var Ship = /** @class */ (function () { function Ship() { + this.isSunk = false; } return Ship; }()); var Board = /** @class */ (function () { function Board() { + this.ships = []; + this.cells = []; } Board.prototype.allShipsSunk = function () { return this.ships.every(function (val) { return val.isSunk; }); diff --git a/tests/baselines/reference/2dArrays.symbols b/tests/baselines/reference/2dArrays.symbols index 3974e5e803d82..109c8307ff9fc 100644 --- a/tests/baselines/reference/2dArrays.symbols +++ b/tests/baselines/reference/2dArrays.symbols @@ -8,23 +8,23 @@ class Cell { class Ship { >Ship : Symbol(Ship, Decl(2dArrays.ts, 1, 1)) - isSunk: boolean; + isSunk: boolean = false; >isSunk : Symbol(Ship.isSunk, Decl(2dArrays.ts, 3, 12)) } class Board { >Board : Symbol(Board, Decl(2dArrays.ts, 5, 1)) - ships: Ship[]; + ships: Ship[] = []; >ships : Symbol(Board.ships, Decl(2dArrays.ts, 7, 13)) >Ship : Symbol(Ship, Decl(2dArrays.ts, 1, 1)) - cells: Cell[]; ->cells : Symbol(Board.cells, Decl(2dArrays.ts, 8, 18)) + cells: Cell[] = []; +>cells : Symbol(Board.cells, Decl(2dArrays.ts, 8, 23)) >Cell : Symbol(Cell, Decl(2dArrays.ts, 0, 0)) private allShipsSunk() { ->allShipsSunk : Symbol(Board.allShipsSunk, Decl(2dArrays.ts, 9, 18)) +>allShipsSunk : Symbol(Board.allShipsSunk, Decl(2dArrays.ts, 9, 23)) return this.ships.every(function (val) { return val.isSunk; }); >this.ships.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/2dArrays.types b/tests/baselines/reference/2dArrays.types index 74a962fff0424..3ad88ae6b15dc 100644 --- a/tests/baselines/reference/2dArrays.types +++ b/tests/baselines/reference/2dArrays.types @@ -10,22 +10,28 @@ class Ship { >Ship : Ship > : ^^^^ - isSunk: boolean; + isSunk: boolean = false; >isSunk : boolean > : ^^^^^^^ +>false : false +> : ^^^^^ } class Board { >Board : Board > : ^^^^^ - ships: Ship[]; + ships: Ship[] = []; >ships : Ship[] > : ^^^^^^ +>[] : undefined[] +> : ^^^^^^^^^^^ - cells: Cell[]; + cells: Cell[] = []; >cells : Cell[] > : ^^^^^^ +>[] : undefined[] +> : ^^^^^^^^^^^ private allShipsSunk() { >allShipsSunk : () => boolean diff --git a/tests/baselines/reference/APISample_Watch.js b/tests/baselines/reference/APISample_Watch.js index 8659e969ffb66..608d0e00a1dda 100644 --- a/tests/baselines/reference/APISample_Watch.js +++ b/tests/baselines/reference/APISample_Watch.js @@ -51,7 +51,7 @@ function watchMain() { // You can technically override any given hook on the host, though you probably don't need to. // Note that we're assuming `origCreateProgram` and `origPostProgramCreate` doesn't use `this` at all. const origCreateProgram = host.createProgram; - host.createProgram = (rootNames: ReadonlyArray, options, host, oldProgram) => { + host.createProgram = (rootNames: ReadonlyArray | undefined, options, host, oldProgram) => { console.log("** We're about to create the program! **"); return origCreateProgram(rootNames, options, host, oldProgram); } diff --git a/tests/baselines/reference/ES5For-ofTypeCheck11.errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck11.errors.txt index 0c850f5ff5499..4ccd0dc727574 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck11.errors.txt +++ b/tests/baselines/reference/ES5For-ofTypeCheck11.errors.txt @@ -3,7 +3,7 @@ ES5For-ofTypeCheck11.ts(3,6): error TS2322: Type 'string | number' is not assign ==== ES5For-ofTypeCheck11.ts (1 errors) ==== - var union: string | number[]; + declare var union: string | number[]; var v: string; for (v of union) { } ~ diff --git a/tests/baselines/reference/ES5For-ofTypeCheck11.js b/tests/baselines/reference/ES5For-ofTypeCheck11.js index a601d2f658a11..3f1e87cd7050b 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck11.js +++ b/tests/baselines/reference/ES5For-ofTypeCheck11.js @@ -1,12 +1,11 @@ //// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck11.ts] //// //// [ES5For-ofTypeCheck11.ts] -var union: string | number[]; +declare var union: string | number[]; var v: string; for (v of union) { } //// [ES5For-ofTypeCheck11.js] -var union; var v; for (var _i = 0, union_1 = union; _i < union_1.length; _i++) { v = union_1[_i]; diff --git a/tests/baselines/reference/ES5For-ofTypeCheck11.symbols b/tests/baselines/reference/ES5For-ofTypeCheck11.symbols index 51a72d9f37362..cfdf8ac0287c6 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck11.symbols +++ b/tests/baselines/reference/ES5For-ofTypeCheck11.symbols @@ -1,13 +1,13 @@ //// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck11.ts] //// === ES5For-ofTypeCheck11.ts === -var union: string | number[]; ->union : Symbol(union, Decl(ES5For-ofTypeCheck11.ts, 0, 3)) +declare var union: string | number[]; +>union : Symbol(union, Decl(ES5For-ofTypeCheck11.ts, 0, 11)) var v: string; >v : Symbol(v, Decl(ES5For-ofTypeCheck11.ts, 1, 3)) for (v of union) { } >v : Symbol(v, Decl(ES5For-ofTypeCheck11.ts, 1, 3)) ->union : Symbol(union, Decl(ES5For-ofTypeCheck11.ts, 0, 3)) +>union : Symbol(union, Decl(ES5For-ofTypeCheck11.ts, 0, 11)) diff --git a/tests/baselines/reference/ES5For-ofTypeCheck11.types b/tests/baselines/reference/ES5For-ofTypeCheck11.types index 3c85a2698d2ee..f1551d5b1b1cd 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck11.types +++ b/tests/baselines/reference/ES5For-ofTypeCheck11.types @@ -1,7 +1,7 @@ //// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck11.ts] //// === ES5For-ofTypeCheck11.ts === -var union: string | number[]; +declare var union: string | number[]; >union : string | number[] > : ^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/ES5For-ofTypeCheck14.errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck14.errors.txt index 68d5353f1a606..71d2526927a70 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck14.errors.txt +++ b/tests/baselines/reference/ES5For-ofTypeCheck14.errors.txt @@ -2,7 +2,7 @@ ES5For-ofTypeCheck14.ts(2,17): error TS2802: Type 'Set' can only be iter ==== ES5For-ofTypeCheck14.ts (1 errors) ==== - var union: string | Set + declare var union: string | Set for (const e of union) { } ~~~~~ !!! error TS2802: Type 'Set' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-ofTypeCheck14.js b/tests/baselines/reference/ES5For-ofTypeCheck14.js index c97179f60e279..3dd6049bc315d 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck14.js +++ b/tests/baselines/reference/ES5For-ofTypeCheck14.js @@ -1,11 +1,10 @@ //// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck14.ts] //// //// [ES5For-ofTypeCheck14.ts] -var union: string | Set +declare var union: string | Set for (const e of union) { } //// [ES5For-ofTypeCheck14.js] -var union; for (var _i = 0, union_1 = union; _i < union_1.length; _i++) { var e = union_1[_i]; } diff --git a/tests/baselines/reference/ES5For-ofTypeCheck14.symbols b/tests/baselines/reference/ES5For-ofTypeCheck14.symbols index 49354157b12a0..d964cb61ed992 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck14.symbols +++ b/tests/baselines/reference/ES5For-ofTypeCheck14.symbols @@ -1,11 +1,11 @@ //// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck14.ts] //// === ES5For-ofTypeCheck14.ts === -var union: string | Set ->union : Symbol(union, Decl(ES5For-ofTypeCheck14.ts, 0, 3)) +declare var union: string | Set +>union : Symbol(union, Decl(ES5For-ofTypeCheck14.ts, 0, 11)) >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, --, --)) for (const e of union) { } >e : Symbol(e, Decl(ES5For-ofTypeCheck14.ts, 1, 10)) ->union : Symbol(union, Decl(ES5For-ofTypeCheck14.ts, 0, 3)) +>union : Symbol(union, Decl(ES5For-ofTypeCheck14.ts, 0, 11)) diff --git a/tests/baselines/reference/ES5For-ofTypeCheck14.types b/tests/baselines/reference/ES5For-ofTypeCheck14.types index ac54cd58fb4b2..63af9b654ca59 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck14.types +++ b/tests/baselines/reference/ES5For-ofTypeCheck14.types @@ -1,7 +1,7 @@ //// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck14.ts] //// === ES5For-ofTypeCheck14.ts === -var union: string | Set +declare var union: string | Set >union : string | Set > : ^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/ES5For-ofTypeCheck7.errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck7.errors.txt index 2b66cf9f1fedb..653f2be91661e 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck7.errors.txt +++ b/tests/baselines/reference/ES5For-ofTypeCheck7.errors.txt @@ -2,7 +2,7 @@ ES5For-ofTypeCheck7.ts(2,15): error TS2461: Type 'number' is not an array type. ==== ES5For-ofTypeCheck7.ts (1 errors) ==== - var union: string | number; + declare var union: string | number; for (var v of union) { } ~~~~~ !!! error TS2461: Type 'number' is not an array type. \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-ofTypeCheck7.js b/tests/baselines/reference/ES5For-ofTypeCheck7.js index 1fe4b50ebaeb7..517422a33ab57 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck7.js +++ b/tests/baselines/reference/ES5For-ofTypeCheck7.js @@ -1,11 +1,10 @@ //// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck7.ts] //// //// [ES5For-ofTypeCheck7.ts] -var union: string | number; +declare var union: string | number; for (var v of union) { } //// [ES5For-ofTypeCheck7.js] -var union; for (var _i = 0, union_1 = union; _i < union_1.length; _i++) { var v = union_1[_i]; } diff --git a/tests/baselines/reference/ES5For-ofTypeCheck7.symbols b/tests/baselines/reference/ES5For-ofTypeCheck7.symbols index f6af471545832..68dbdf6f50db5 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck7.symbols +++ b/tests/baselines/reference/ES5For-ofTypeCheck7.symbols @@ -1,10 +1,10 @@ //// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck7.ts] //// === ES5For-ofTypeCheck7.ts === -var union: string | number; ->union : Symbol(union, Decl(ES5For-ofTypeCheck7.ts, 0, 3)) +declare var union: string | number; +>union : Symbol(union, Decl(ES5For-ofTypeCheck7.ts, 0, 11)) for (var v of union) { } >v : Symbol(v, Decl(ES5For-ofTypeCheck7.ts, 1, 8)) ->union : Symbol(union, Decl(ES5For-ofTypeCheck7.ts, 0, 3)) +>union : Symbol(union, Decl(ES5For-ofTypeCheck7.ts, 0, 11)) diff --git a/tests/baselines/reference/ES5For-ofTypeCheck7.types b/tests/baselines/reference/ES5For-ofTypeCheck7.types index 7901b1d185637..2a004a90d60e6 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck7.types +++ b/tests/baselines/reference/ES5For-ofTypeCheck7.types @@ -1,7 +1,7 @@ //// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck7.ts] //// === ES5For-ofTypeCheck7.ts === -var union: string | number; +declare var union: string | number; >union : string | number > : ^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/ES5For-ofTypeCheck8.errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck8.errors.txt index 0ad1495cebc23..3f82df8f45f66 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck8.errors.txt +++ b/tests/baselines/reference/ES5For-ofTypeCheck8.errors.txt @@ -3,7 +3,7 @@ ES5For-ofTypeCheck8.ts(3,6): error TS2322: Type 'string | number | symbol' is no ==== ES5For-ofTypeCheck8.ts (1 errors) ==== - var union: string | string[]| number[]| symbol[]; + declare var union: string | string[]| number[]| symbol[]; var v: symbol; for (v of union) { } ~ diff --git a/tests/baselines/reference/ES5For-ofTypeCheck8.js b/tests/baselines/reference/ES5For-ofTypeCheck8.js index 6f126c036b4ca..04d929fbcb014 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck8.js +++ b/tests/baselines/reference/ES5For-ofTypeCheck8.js @@ -1,12 +1,11 @@ //// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck8.ts] //// //// [ES5For-ofTypeCheck8.ts] -var union: string | string[]| number[]| symbol[]; +declare var union: string | string[]| number[]| symbol[]; var v: symbol; for (v of union) { } //// [ES5For-ofTypeCheck8.js] -var union; var v; for (var _i = 0, union_1 = union; _i < union_1.length; _i++) { v = union_1[_i]; diff --git a/tests/baselines/reference/ES5For-ofTypeCheck8.symbols b/tests/baselines/reference/ES5For-ofTypeCheck8.symbols index a73daf86cf977..faf229923b679 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck8.symbols +++ b/tests/baselines/reference/ES5For-ofTypeCheck8.symbols @@ -1,13 +1,13 @@ //// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck8.ts] //// === ES5For-ofTypeCheck8.ts === -var union: string | string[]| number[]| symbol[]; ->union : Symbol(union, Decl(ES5For-ofTypeCheck8.ts, 0, 3)) +declare var union: string | string[]| number[]| symbol[]; +>union : Symbol(union, Decl(ES5For-ofTypeCheck8.ts, 0, 11)) var v: symbol; >v : Symbol(v, Decl(ES5For-ofTypeCheck8.ts, 1, 3)) for (v of union) { } >v : Symbol(v, Decl(ES5For-ofTypeCheck8.ts, 1, 3)) ->union : Symbol(union, Decl(ES5For-ofTypeCheck8.ts, 0, 3)) +>union : Symbol(union, Decl(ES5For-ofTypeCheck8.ts, 0, 11)) diff --git a/tests/baselines/reference/ES5For-ofTypeCheck8.types b/tests/baselines/reference/ES5For-ofTypeCheck8.types index cbf3aececc047..4616a6fe6bae9 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck8.types +++ b/tests/baselines/reference/ES5For-ofTypeCheck8.types @@ -1,7 +1,7 @@ //// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck8.ts] //// === ES5For-ofTypeCheck8.ts === -var union: string | string[]| number[]| symbol[]; +declare var union: string | string[]| number[]| symbol[]; >union : string | string[] | number[] | symbol[] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/ES5For-ofTypeCheck9.errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck9.errors.txt index 681af2013de23..47f971f9d6303 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck9.errors.txt +++ b/tests/baselines/reference/ES5For-ofTypeCheck9.errors.txt @@ -2,7 +2,7 @@ ES5For-ofTypeCheck9.ts(2,15): error TS2461: Type 'number | symbol | string[]' is ==== ES5For-ofTypeCheck9.ts (1 errors) ==== - var union: string | string[] | number | symbol; + declare var union: string | string[] | number | symbol; for (let v of union) { } ~~~~~ !!! error TS2461: Type 'number | symbol | string[]' is not an array type. \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-ofTypeCheck9.js b/tests/baselines/reference/ES5For-ofTypeCheck9.js index 00667fc24d45b..fc66bb2967db7 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck9.js +++ b/tests/baselines/reference/ES5For-ofTypeCheck9.js @@ -1,11 +1,10 @@ //// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck9.ts] //// //// [ES5For-ofTypeCheck9.ts] -var union: string | string[] | number | symbol; +declare var union: string | string[] | number | symbol; for (let v of union) { } //// [ES5For-ofTypeCheck9.js] -var union; for (var _i = 0, union_1 = union; _i < union_1.length; _i++) { var v = union_1[_i]; } diff --git a/tests/baselines/reference/ES5For-ofTypeCheck9.symbols b/tests/baselines/reference/ES5For-ofTypeCheck9.symbols index 8e157cb7c299d..8bcf34bf7682c 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck9.symbols +++ b/tests/baselines/reference/ES5For-ofTypeCheck9.symbols @@ -1,10 +1,10 @@ //// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck9.ts] //// === ES5For-ofTypeCheck9.ts === -var union: string | string[] | number | symbol; ->union : Symbol(union, Decl(ES5For-ofTypeCheck9.ts, 0, 3)) +declare var union: string | string[] | number | symbol; +>union : Symbol(union, Decl(ES5For-ofTypeCheck9.ts, 0, 11)) for (let v of union) { } >v : Symbol(v, Decl(ES5For-ofTypeCheck9.ts, 1, 8)) ->union : Symbol(union, Decl(ES5For-ofTypeCheck9.ts, 0, 3)) +>union : Symbol(union, Decl(ES5For-ofTypeCheck9.ts, 0, 11)) diff --git a/tests/baselines/reference/ES5For-ofTypeCheck9.types b/tests/baselines/reference/ES5For-ofTypeCheck9.types index 69e56c7665860..c0783320660cd 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck9.types +++ b/tests/baselines/reference/ES5For-ofTypeCheck9.types @@ -1,7 +1,7 @@ //// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck9.ts] //// === ES5For-ofTypeCheck9.ts === -var union: string | string[] | number | symbol; +declare var union: string | string[] | number | symbol; >union : string | number | symbol | string[] > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/ES5SymbolProperty5.errors.txt b/tests/baselines/reference/ES5SymbolProperty5.errors.txt index e53226f91bea4..962069c9d2a70 100644 --- a/tests/baselines/reference/ES5SymbolProperty5.errors.txt +++ b/tests/baselines/reference/ES5SymbolProperty5.errors.txt @@ -1,10 +1,10 @@ -ES5SymbolProperty5.ts(1,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'Symbol' must be of type 'SymbolConstructor', but here has type '{ iterator: symbol; }'. +ES5SymbolProperty5.ts(1,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'Symbol' must be of type 'SymbolConstructor', but here has type '{ iterator: symbol; }'. ES5SymbolProperty5.ts(7,26): error TS2554: Expected 0 arguments, but got 1. ==== ES5SymbolProperty5.ts (2 errors) ==== - var Symbol: { iterator: symbol }; - ~~~~~~ + declare var Symbol: { iterator: symbol }; + ~~~~~~ !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'Symbol' must be of type 'SymbolConstructor', but here has type '{ iterator: symbol; }'. !!! related TS6203 lib.es2015.symbol.d.ts:--:--: 'Symbol' was also declared here. diff --git a/tests/baselines/reference/ES5SymbolProperty5.js b/tests/baselines/reference/ES5SymbolProperty5.js index b7d21bec4a0a4..45ff6b9e56199 100644 --- a/tests/baselines/reference/ES5SymbolProperty5.js +++ b/tests/baselines/reference/ES5SymbolProperty5.js @@ -1,7 +1,7 @@ //// [tests/cases/conformance/Symbols/ES5SymbolProperty5.ts] //// //// [ES5SymbolProperty5.ts] -var Symbol: { iterator: symbol }; +declare var Symbol: { iterator: symbol }; class C { [Symbol.iterator]() { } @@ -10,7 +10,6 @@ class C { (new C)[Symbol.iterator](0) // Should error //// [ES5SymbolProperty5.js] -var Symbol; var C = /** @class */ (function () { function C() { } diff --git a/tests/baselines/reference/ES5SymbolProperty5.symbols b/tests/baselines/reference/ES5SymbolProperty5.symbols index 40ca8431fe20f..c0b016b14b44f 100644 --- a/tests/baselines/reference/ES5SymbolProperty5.symbols +++ b/tests/baselines/reference/ES5SymbolProperty5.symbols @@ -1,23 +1,23 @@ //// [tests/cases/conformance/Symbols/ES5SymbolProperty5.ts] //// === ES5SymbolProperty5.ts === -var Symbol: { iterator: symbol }; ->Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(ES5SymbolProperty5.ts, 0, 3)) ->iterator : Symbol(iterator, Decl(ES5SymbolProperty5.ts, 0, 13)) +declare var Symbol: { iterator: symbol }; +>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(ES5SymbolProperty5.ts, 0, 11)) +>iterator : Symbol(iterator, Decl(ES5SymbolProperty5.ts, 0, 21)) class C { ->C : Symbol(C, Decl(ES5SymbolProperty5.ts, 0, 33)) +>C : Symbol(C, Decl(ES5SymbolProperty5.ts, 0, 41)) [Symbol.iterator]() { } >[Symbol.iterator] : Symbol(C[Symbol.iterator], Decl(ES5SymbolProperty5.ts, 2, 9)) >Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) ->Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(ES5SymbolProperty5.ts, 0, 3)) +>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(ES5SymbolProperty5.ts, 0, 11)) >iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) } (new C)[Symbol.iterator](0) // Should error ->C : Symbol(C, Decl(ES5SymbolProperty5.ts, 0, 33)) +>C : Symbol(C, Decl(ES5SymbolProperty5.ts, 0, 41)) >Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) ->Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(ES5SymbolProperty5.ts, 0, 3)) +>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(ES5SymbolProperty5.ts, 0, 11)) >iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) diff --git a/tests/baselines/reference/ES5SymbolProperty5.types b/tests/baselines/reference/ES5SymbolProperty5.types index 719789d894772..72bd530e52e21 100644 --- a/tests/baselines/reference/ES5SymbolProperty5.types +++ b/tests/baselines/reference/ES5SymbolProperty5.types @@ -1,7 +1,7 @@ //// [tests/cases/conformance/Symbols/ES5SymbolProperty5.ts] //// === ES5SymbolProperty5.ts === -var Symbol: { iterator: symbol }; +declare var Symbol: { iterator: symbol }; >Symbol : SymbolConstructor > : ^^^^^^^^^^^^^^^^^ >iterator : symbol diff --git a/tests/baselines/reference/abstractPropertyBasics.js b/tests/baselines/reference/abstractPropertyBasics.js index c9026e5f3424d..c20a295242ff3 100644 --- a/tests/baselines/reference/abstractPropertyBasics.js +++ b/tests/baselines/reference/abstractPropertyBasics.js @@ -19,7 +19,7 @@ class C extends B { set prop(v) { } raw = "edge"; readonly ro = "readonly please"; - readonlyProp: string; // don't have to give a value, in fact + readonlyProp!: string; m() { } } diff --git a/tests/baselines/reference/abstractPropertyBasics.symbols b/tests/baselines/reference/abstractPropertyBasics.symbols index b7c7a74483d02..b251e283c2965 100644 --- a/tests/baselines/reference/abstractPropertyBasics.symbols +++ b/tests/baselines/reference/abstractPropertyBasics.symbols @@ -53,9 +53,9 @@ class C extends B { readonly ro = "readonly please"; >ro : Symbol(C.ro, Decl(abstractPropertyBasics.ts, 16, 17)) - readonlyProp: string; // don't have to give a value, in fact + readonlyProp!: string; >readonlyProp : Symbol(C.readonlyProp, Decl(abstractPropertyBasics.ts, 17, 36)) m() { } ->m : Symbol(C.m, Decl(abstractPropertyBasics.ts, 18, 25)) +>m : Symbol(C.m, Decl(abstractPropertyBasics.ts, 18, 26)) } diff --git a/tests/baselines/reference/abstractPropertyBasics.types b/tests/baselines/reference/abstractPropertyBasics.types index e578dfc1a3d83..c62b71a86e149 100644 --- a/tests/baselines/reference/abstractPropertyBasics.types +++ b/tests/baselines/reference/abstractPropertyBasics.types @@ -74,7 +74,7 @@ class C extends B { >"readonly please" : "readonly please" > : ^^^^^^^^^^^^^^^^^ - readonlyProp: string; // don't have to give a value, in fact + readonlyProp!: string; >readonlyProp : string > : ^^^^^^ diff --git a/tests/baselines/reference/additionOperatorWithInvalidOperands.errors.txt b/tests/baselines/reference/additionOperatorWithInvalidOperands.errors.txt index 6051993f2e260..c1c3c7da2cde8 100644 --- a/tests/baselines/reference/additionOperatorWithInvalidOperands.errors.txt +++ b/tests/baselines/reference/additionOperatorWithInvalidOperands.errors.txt @@ -28,10 +28,10 @@ additionOperatorWithInvalidOperands.ts(40,11): error TS2365: Operator '+' cannot enum E { a, b, c } namespace M { export var a } - var a: boolean; - var b: number; - var c: Object; - var d: Number; + declare var a: boolean; + declare var b: number; + declare var c: Object; + declare var d: Number; // boolean + every type except any and string var r1 = a + a; diff --git a/tests/baselines/reference/additionOperatorWithInvalidOperands.js b/tests/baselines/reference/additionOperatorWithInvalidOperands.js index 1093452897cef..d42f381dfd70c 100644 --- a/tests/baselines/reference/additionOperatorWithInvalidOperands.js +++ b/tests/baselines/reference/additionOperatorWithInvalidOperands.js @@ -9,10 +9,10 @@ class C { enum E { a, b, c } namespace M { export var a } -var a: boolean; -var b: number; -var c: Object; -var d: Number; +declare var a: boolean; +declare var b: number; +declare var c: Object; +declare var d: Number; // boolean + every type except any and string var r1 = a + a; @@ -59,10 +59,6 @@ var E; var M; (function (M) { })(M || (M = {})); -var a; -var b; -var c; -var d; // boolean + every type except any and string var r1 = a + a; var r2 = a + b; diff --git a/tests/baselines/reference/additionOperatorWithInvalidOperands.symbols b/tests/baselines/reference/additionOperatorWithInvalidOperands.symbols index 697ea7cc0bbe5..4dc696b6f9247 100644 --- a/tests/baselines/reference/additionOperatorWithInvalidOperands.symbols +++ b/tests/baselines/reference/additionOperatorWithInvalidOperands.symbols @@ -23,72 +23,72 @@ namespace M { export var a } >M : Symbol(M, Decl(additionOperatorWithInvalidOperands.ts, 5, 18)) >a : Symbol(a, Decl(additionOperatorWithInvalidOperands.ts, 6, 24)) -var a: boolean; ->a : Symbol(a, Decl(additionOperatorWithInvalidOperands.ts, 8, 3)) +declare var a: boolean; +>a : Symbol(a, Decl(additionOperatorWithInvalidOperands.ts, 8, 11)) -var b: number; ->b : Symbol(b, Decl(additionOperatorWithInvalidOperands.ts, 9, 3)) +declare var b: number; +>b : Symbol(b, Decl(additionOperatorWithInvalidOperands.ts, 9, 11)) -var c: Object; ->c : Symbol(c, Decl(additionOperatorWithInvalidOperands.ts, 10, 3)) +declare var c: Object; +>c : Symbol(c, Decl(additionOperatorWithInvalidOperands.ts, 10, 11)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) -var d: Number; ->d : Symbol(d, Decl(additionOperatorWithInvalidOperands.ts, 11, 3)) +declare var d: Number; +>d : Symbol(d, Decl(additionOperatorWithInvalidOperands.ts, 11, 11)) >Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) // boolean + every type except any and string var r1 = a + a; >r1 : Symbol(r1, Decl(additionOperatorWithInvalidOperands.ts, 14, 3)) ->a : Symbol(a, Decl(additionOperatorWithInvalidOperands.ts, 8, 3)) ->a : Symbol(a, Decl(additionOperatorWithInvalidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(additionOperatorWithInvalidOperands.ts, 8, 11)) +>a : Symbol(a, Decl(additionOperatorWithInvalidOperands.ts, 8, 11)) var r2 = a + b; >r2 : Symbol(r2, Decl(additionOperatorWithInvalidOperands.ts, 15, 3)) ->a : Symbol(a, Decl(additionOperatorWithInvalidOperands.ts, 8, 3)) ->b : Symbol(b, Decl(additionOperatorWithInvalidOperands.ts, 9, 3)) +>a : Symbol(a, Decl(additionOperatorWithInvalidOperands.ts, 8, 11)) +>b : Symbol(b, Decl(additionOperatorWithInvalidOperands.ts, 9, 11)) var r3 = a + c; >r3 : Symbol(r3, Decl(additionOperatorWithInvalidOperands.ts, 16, 3)) ->a : Symbol(a, Decl(additionOperatorWithInvalidOperands.ts, 8, 3)) ->c : Symbol(c, Decl(additionOperatorWithInvalidOperands.ts, 10, 3)) +>a : Symbol(a, Decl(additionOperatorWithInvalidOperands.ts, 8, 11)) +>c : Symbol(c, Decl(additionOperatorWithInvalidOperands.ts, 10, 11)) // number + every type except any and string var r4 = b + a; >r4 : Symbol(r4, Decl(additionOperatorWithInvalidOperands.ts, 19, 3)) ->b : Symbol(b, Decl(additionOperatorWithInvalidOperands.ts, 9, 3)) ->a : Symbol(a, Decl(additionOperatorWithInvalidOperands.ts, 8, 3)) +>b : Symbol(b, Decl(additionOperatorWithInvalidOperands.ts, 9, 11)) +>a : Symbol(a, Decl(additionOperatorWithInvalidOperands.ts, 8, 11)) var r5 = b + b; // number + number is valid >r5 : Symbol(r5, Decl(additionOperatorWithInvalidOperands.ts, 20, 3)) ->b : Symbol(b, Decl(additionOperatorWithInvalidOperands.ts, 9, 3)) ->b : Symbol(b, Decl(additionOperatorWithInvalidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(additionOperatorWithInvalidOperands.ts, 9, 11)) +>b : Symbol(b, Decl(additionOperatorWithInvalidOperands.ts, 9, 11)) var r6 = b + c; >r6 : Symbol(r6, Decl(additionOperatorWithInvalidOperands.ts, 21, 3)) ->b : Symbol(b, Decl(additionOperatorWithInvalidOperands.ts, 9, 3)) ->c : Symbol(c, Decl(additionOperatorWithInvalidOperands.ts, 10, 3)) +>b : Symbol(b, Decl(additionOperatorWithInvalidOperands.ts, 9, 11)) +>c : Symbol(c, Decl(additionOperatorWithInvalidOperands.ts, 10, 11)) // object + every type except any and string var r7 = c + a; >r7 : Symbol(r7, Decl(additionOperatorWithInvalidOperands.ts, 24, 3)) ->c : Symbol(c, Decl(additionOperatorWithInvalidOperands.ts, 10, 3)) ->a : Symbol(a, Decl(additionOperatorWithInvalidOperands.ts, 8, 3)) +>c : Symbol(c, Decl(additionOperatorWithInvalidOperands.ts, 10, 11)) +>a : Symbol(a, Decl(additionOperatorWithInvalidOperands.ts, 8, 11)) var r8 = c + b; >r8 : Symbol(r8, Decl(additionOperatorWithInvalidOperands.ts, 25, 3)) ->c : Symbol(c, Decl(additionOperatorWithInvalidOperands.ts, 10, 3)) ->b : Symbol(b, Decl(additionOperatorWithInvalidOperands.ts, 9, 3)) +>c : Symbol(c, Decl(additionOperatorWithInvalidOperands.ts, 10, 11)) +>b : Symbol(b, Decl(additionOperatorWithInvalidOperands.ts, 9, 11)) var r9 = c + c; >r9 : Symbol(r9, Decl(additionOperatorWithInvalidOperands.ts, 26, 3)) ->c : Symbol(c, Decl(additionOperatorWithInvalidOperands.ts, 10, 3)) ->c : Symbol(c, Decl(additionOperatorWithInvalidOperands.ts, 10, 3)) +>c : Symbol(c, Decl(additionOperatorWithInvalidOperands.ts, 10, 11)) +>c : Symbol(c, Decl(additionOperatorWithInvalidOperands.ts, 10, 11)) // other cases var r10 = a + true; >r10 : Symbol(r10, Decl(additionOperatorWithInvalidOperands.ts, 29, 3)) ->a : Symbol(a, Decl(additionOperatorWithInvalidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(additionOperatorWithInvalidOperands.ts, 8, 11)) var r11 = true + false; >r11 : Symbol(r11, Decl(additionOperatorWithInvalidOperands.ts, 30, 3)) @@ -101,22 +101,22 @@ var r13 = {} + {}; var r14 = b + d; >r14 : Symbol(r14, Decl(additionOperatorWithInvalidOperands.ts, 33, 3)) ->b : Symbol(b, Decl(additionOperatorWithInvalidOperands.ts, 9, 3)) ->d : Symbol(d, Decl(additionOperatorWithInvalidOperands.ts, 11, 3)) +>b : Symbol(b, Decl(additionOperatorWithInvalidOperands.ts, 9, 11)) +>d : Symbol(d, Decl(additionOperatorWithInvalidOperands.ts, 11, 11)) var r15 = b + foo; >r15 : Symbol(r15, Decl(additionOperatorWithInvalidOperands.ts, 34, 3)) ->b : Symbol(b, Decl(additionOperatorWithInvalidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(additionOperatorWithInvalidOperands.ts, 9, 11)) >foo : Symbol(foo, Decl(additionOperatorWithInvalidOperands.ts, 0, 0)) var r16 = b + foo(); >r16 : Symbol(r16, Decl(additionOperatorWithInvalidOperands.ts, 35, 3)) ->b : Symbol(b, Decl(additionOperatorWithInvalidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(additionOperatorWithInvalidOperands.ts, 9, 11)) >foo : Symbol(foo, Decl(additionOperatorWithInvalidOperands.ts, 0, 0)) var r17 = b + C; >r17 : Symbol(r17, Decl(additionOperatorWithInvalidOperands.ts, 36, 3)) ->b : Symbol(b, Decl(additionOperatorWithInvalidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(additionOperatorWithInvalidOperands.ts, 9, 11)) >C : Symbol(C, Decl(additionOperatorWithInvalidOperands.ts, 0, 18)) var r18 = E.a + new C(); diff --git a/tests/baselines/reference/additionOperatorWithInvalidOperands.types b/tests/baselines/reference/additionOperatorWithInvalidOperands.types index f49e6f2b06b3d..9ed3272bad699 100644 --- a/tests/baselines/reference/additionOperatorWithInvalidOperands.types +++ b/tests/baselines/reference/additionOperatorWithInvalidOperands.types @@ -33,19 +33,19 @@ namespace M { export var a } >a : any > : ^^^ -var a: boolean; +declare var a: boolean; >a : boolean > : ^^^^^^^ -var b: number; +declare var b: number; >b : number > : ^^^^^^ -var c: Object; +declare var c: Object; >c : Object > : ^^^^^^ -var d: Number; +declare var d: Number; >d : Number > : ^^^^^^ diff --git a/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.errors.txt b/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.errors.txt index 0a51361b10848..30c26aace1a40 100644 --- a/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.errors.txt +++ b/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.errors.txt @@ -16,10 +16,10 @@ additionOperatorWithNullValueAndInvalidOperator.ts(23,11): error TS2365: Operato function foo(): void { return undefined } - var a: boolean; - var b: Object; - var c: void; - var d: Number; + declare var a: boolean; + declare var b: Object; + declare var c: void; + declare var d: Number; // null + boolean/Object var r1 = null + a; diff --git a/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.js b/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.js index 8388dbebb3955..6a38d10bd00aa 100644 --- a/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.js +++ b/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.js @@ -5,10 +5,10 @@ function foo(): void { return undefined } -var a: boolean; -var b: Object; -var c: void; -var d: Number; +declare var a: boolean; +declare var b: Object; +declare var c: void; +declare var d: Number; // null + boolean/Object var r1 = null + a; @@ -28,10 +28,6 @@ var r11 = null + (() => { }); //// [additionOperatorWithNullValueAndInvalidOperator.js] // If one operand is the null or undefined value, it is treated as having the type of the other operand. function foo() { return undefined; } -var a; -var b; -var c; -var d; // null + boolean/Object var r1 = null + a; var r2 = null + b; diff --git a/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.symbols b/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.symbols index 4e0844055bb5e..405bbe72a0b2d 100644 --- a/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.symbols +++ b/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.symbols @@ -7,49 +7,49 @@ function foo(): void { return undefined } >foo : Symbol(foo, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 0, 0)) >undefined : Symbol(undefined) -var a: boolean; ->a : Symbol(a, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 4, 3)) +declare var a: boolean; +>a : Symbol(a, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 4, 11)) -var b: Object; ->b : Symbol(b, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 5, 3)) +declare var b: Object; +>b : Symbol(b, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 5, 11)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) -var c: void; ->c : Symbol(c, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 6, 3)) +declare var c: void; +>c : Symbol(c, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 6, 11)) -var d: Number; ->d : Symbol(d, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 7, 3)) +declare var d: Number; +>d : Symbol(d, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 7, 11)) >Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) // null + boolean/Object var r1 = null + a; >r1 : Symbol(r1, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 10, 3)) ->a : Symbol(a, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 4, 3)) +>a : Symbol(a, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 4, 11)) var r2 = null + b; >r2 : Symbol(r2, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 11, 3)) ->b : Symbol(b, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 5, 3)) +>b : Symbol(b, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 5, 11)) var r3 = null + c; >r3 : Symbol(r3, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 12, 3)) ->c : Symbol(c, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 6, 3)) +>c : Symbol(c, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 6, 11)) var r4 = a + null; >r4 : Symbol(r4, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 13, 3)) ->a : Symbol(a, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 4, 3)) +>a : Symbol(a, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 4, 11)) var r5 = b + null; >r5 : Symbol(r5, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 14, 3)) ->b : Symbol(b, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 5, 3)) +>b : Symbol(b, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 5, 11)) var r6 = null + c; >r6 : Symbol(r6, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 15, 3)) ->c : Symbol(c, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 6, 3)) +>c : Symbol(c, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 6, 11)) // other cases var r7 = null + d; >r7 : Symbol(r7, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 18, 3)) ->d : Symbol(d, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 7, 3)) +>d : Symbol(d, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 7, 11)) var r8 = null + true; >r8 : Symbol(r8, Decl(additionOperatorWithNullValueAndInvalidOperator.ts, 19, 3)) diff --git a/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.types b/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.types index ee664f35f3f92..cb4b2660b74a3 100644 --- a/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.types +++ b/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.types @@ -9,19 +9,19 @@ function foo(): void { return undefined } >undefined : undefined > : ^^^^^^^^^ -var a: boolean; +declare var a: boolean; >a : boolean > : ^^^^^^^ -var b: Object; +declare var b: Object; >b : Object > : ^^^^^^ -var c: void; +declare var c: void; >c : void > : ^^^^ -var d: Number; +declare var d: Number; >d : Number > : ^^^^^^ diff --git a/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.errors.txt b/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.errors.txt index eb13ff16ed092..a046d0f0b0f8f 100644 --- a/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.errors.txt +++ b/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.errors.txt @@ -15,10 +15,10 @@ additionOperatorWithNullValueAndValidOperator.ts(24,11): error TS2365: Operator enum E { a, b, c } - var a: any; - var b: number; - var c: E; - var d: string; + declare var a: any; + declare var b: number; + declare var c: E; + declare var d: string; // null + any var r1: any = null + a; diff --git a/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.js b/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.js index 460b5eb5fc358..0c9c6750982ed 100644 --- a/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.js +++ b/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.js @@ -5,10 +5,10 @@ enum E { a, b, c } -var a: any; -var b: number; -var c: E; -var d: string; +declare var a: any; +declare var b: number; +declare var c: E; +declare var d: string; // null + any var r1: any = null + a; @@ -40,10 +40,6 @@ var E; E[E["b"] = 1] = "b"; E[E["c"] = 2] = "c"; })(E || (E = {})); -var a; -var b; -var c; -var d; // null + any var r1 = null + a; var r2 = a + null; diff --git a/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.symbols b/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.symbols index 416e99c767155..d539264fd1743 100644 --- a/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.symbols +++ b/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.symbols @@ -9,39 +9,39 @@ enum E { a, b, c } >b : Symbol(E.b, Decl(additionOperatorWithNullValueAndValidOperator.ts, 2, 11)) >c : Symbol(E.c, Decl(additionOperatorWithNullValueAndValidOperator.ts, 2, 14)) -var a: any; ->a : Symbol(a, Decl(additionOperatorWithNullValueAndValidOperator.ts, 4, 3)) +declare var a: any; +>a : Symbol(a, Decl(additionOperatorWithNullValueAndValidOperator.ts, 4, 11)) -var b: number; ->b : Symbol(b, Decl(additionOperatorWithNullValueAndValidOperator.ts, 5, 3)) +declare var b: number; +>b : Symbol(b, Decl(additionOperatorWithNullValueAndValidOperator.ts, 5, 11)) -var c: E; ->c : Symbol(c, Decl(additionOperatorWithNullValueAndValidOperator.ts, 6, 3)) +declare var c: E; +>c : Symbol(c, Decl(additionOperatorWithNullValueAndValidOperator.ts, 6, 11)) >E : Symbol(E, Decl(additionOperatorWithNullValueAndValidOperator.ts, 0, 0)) -var d: string; ->d : Symbol(d, Decl(additionOperatorWithNullValueAndValidOperator.ts, 7, 3)) +declare var d: string; +>d : Symbol(d, Decl(additionOperatorWithNullValueAndValidOperator.ts, 7, 11)) // null + any var r1: any = null + a; >r1 : Symbol(r1, Decl(additionOperatorWithNullValueAndValidOperator.ts, 10, 3)) ->a : Symbol(a, Decl(additionOperatorWithNullValueAndValidOperator.ts, 4, 3)) +>a : Symbol(a, Decl(additionOperatorWithNullValueAndValidOperator.ts, 4, 11)) var r2: any = a + null; >r2 : Symbol(r2, Decl(additionOperatorWithNullValueAndValidOperator.ts, 11, 3)) ->a : Symbol(a, Decl(additionOperatorWithNullValueAndValidOperator.ts, 4, 3)) +>a : Symbol(a, Decl(additionOperatorWithNullValueAndValidOperator.ts, 4, 11)) // null + number/enum var r3 = null + b; >r3 : Symbol(r3, Decl(additionOperatorWithNullValueAndValidOperator.ts, 14, 3)) ->b : Symbol(b, Decl(additionOperatorWithNullValueAndValidOperator.ts, 5, 3)) +>b : Symbol(b, Decl(additionOperatorWithNullValueAndValidOperator.ts, 5, 11)) var r4 = null + 1; >r4 : Symbol(r4, Decl(additionOperatorWithNullValueAndValidOperator.ts, 15, 3)) var r5 = null + c; >r5 : Symbol(r5, Decl(additionOperatorWithNullValueAndValidOperator.ts, 16, 3)) ->c : Symbol(c, Decl(additionOperatorWithNullValueAndValidOperator.ts, 6, 3)) +>c : Symbol(c, Decl(additionOperatorWithNullValueAndValidOperator.ts, 6, 11)) var r6 = null + E.a; >r6 : Symbol(r6, Decl(additionOperatorWithNullValueAndValidOperator.ts, 17, 3)) @@ -56,14 +56,14 @@ var r7 = null + E['a']; var r8 = b + null; >r8 : Symbol(r8, Decl(additionOperatorWithNullValueAndValidOperator.ts, 19, 3)) ->b : Symbol(b, Decl(additionOperatorWithNullValueAndValidOperator.ts, 5, 3)) +>b : Symbol(b, Decl(additionOperatorWithNullValueAndValidOperator.ts, 5, 11)) var r9 = 1 + null; >r9 : Symbol(r9, Decl(additionOperatorWithNullValueAndValidOperator.ts, 20, 3)) var r10 = c + null >r10 : Symbol(r10, Decl(additionOperatorWithNullValueAndValidOperator.ts, 21, 3)) ->c : Symbol(c, Decl(additionOperatorWithNullValueAndValidOperator.ts, 6, 3)) +>c : Symbol(c, Decl(additionOperatorWithNullValueAndValidOperator.ts, 6, 11)) var r11 = E.a + null; >r11 : Symbol(r11, Decl(additionOperatorWithNullValueAndValidOperator.ts, 22, 3)) @@ -79,14 +79,14 @@ var r12 = E['a'] + null; // null + string var r13 = null + d; >r13 : Symbol(r13, Decl(additionOperatorWithNullValueAndValidOperator.ts, 26, 3)) ->d : Symbol(d, Decl(additionOperatorWithNullValueAndValidOperator.ts, 7, 3)) +>d : Symbol(d, Decl(additionOperatorWithNullValueAndValidOperator.ts, 7, 11)) var r14 = null + ''; >r14 : Symbol(r14, Decl(additionOperatorWithNullValueAndValidOperator.ts, 27, 3)) var r15 = d + null; >r15 : Symbol(r15, Decl(additionOperatorWithNullValueAndValidOperator.ts, 28, 3)) ->d : Symbol(d, Decl(additionOperatorWithNullValueAndValidOperator.ts, 7, 3)) +>d : Symbol(d, Decl(additionOperatorWithNullValueAndValidOperator.ts, 7, 11)) var r16 = '' + null; >r16 : Symbol(r16, Decl(additionOperatorWithNullValueAndValidOperator.ts, 29, 3)) diff --git a/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.types b/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.types index b2e3a1b34d6a4..59be50dfa81fb 100644 --- a/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.types +++ b/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.types @@ -13,19 +13,19 @@ enum E { a, b, c } >c : E.c > : ^^^ -var a: any; +declare var a: any; >a : any > : ^^^ -var b: number; +declare var b: number; >b : number > : ^^^^^^ -var c: E; +declare var c: E; >c : E > : ^ -var d: string; +declare var d: string; >d : string > : ^^^^^^ diff --git a/tests/baselines/reference/additionOperatorWithTypeParameter.errors.txt b/tests/baselines/reference/additionOperatorWithTypeParameter.errors.txt index 42e6850300c75..6bf776b120d4b 100644 --- a/tests/baselines/reference/additionOperatorWithTypeParameter.errors.txt +++ b/tests/baselines/reference/additionOperatorWithTypeParameter.errors.txt @@ -21,13 +21,13 @@ additionOperatorWithTypeParameter.ts(37,15): error TS2365: Operator '+' cannot b enum E { a, b } function foo(t: T, u: U) { - var a: any; - var b: boolean; - var c: number; - var d: string; - var e: Object; - var g: E; - var f: void; + let a!: any; + let b!: boolean; + let c!: number; + let d!: string; + let e!: Object; + let g!: E; + let f!: void; // type parameter as left operand var r1: any = t + a; // ok, one operand is any diff --git a/tests/baselines/reference/additionOperatorWithTypeParameter.js b/tests/baselines/reference/additionOperatorWithTypeParameter.js index 7f321c748aeb0..aaf8c9d72d9b2 100644 --- a/tests/baselines/reference/additionOperatorWithTypeParameter.js +++ b/tests/baselines/reference/additionOperatorWithTypeParameter.js @@ -5,13 +5,13 @@ enum E { a, b } function foo(t: T, u: U) { - var a: any; - var b: boolean; - var c: number; - var d: string; - var e: Object; - var g: E; - var f: void; + let a!: any; + let b!: boolean; + let c!: number; + let d!: string; + let e!: Object; + let g!: E; + let f!: void; // type parameter as left operand var r1: any = t + a; // ok, one operand is any diff --git a/tests/baselines/reference/additionOperatorWithTypeParameter.symbols b/tests/baselines/reference/additionOperatorWithTypeParameter.symbols index 4b765c129d755..70ed83db31ebc 100644 --- a/tests/baselines/reference/additionOperatorWithTypeParameter.symbols +++ b/tests/baselines/reference/additionOperatorWithTypeParameter.symbols @@ -16,27 +16,27 @@ function foo(t: T, u: U) { >u : Symbol(u, Decl(additionOperatorWithTypeParameter.ts, 3, 24)) >U : Symbol(U, Decl(additionOperatorWithTypeParameter.ts, 3, 15)) - var a: any; + let a!: any; >a : Symbol(a, Decl(additionOperatorWithTypeParameter.ts, 4, 7)) - var b: boolean; + let b!: boolean; >b : Symbol(b, Decl(additionOperatorWithTypeParameter.ts, 5, 7)) - var c: number; + let c!: number; >c : Symbol(c, Decl(additionOperatorWithTypeParameter.ts, 6, 7)) - var d: string; + let d!: string; >d : Symbol(d, Decl(additionOperatorWithTypeParameter.ts, 7, 7)) - var e: Object; + let e!: Object; >e : Symbol(e, Decl(additionOperatorWithTypeParameter.ts, 8, 7)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) - var g: E; + let g!: E; >g : Symbol(g, Decl(additionOperatorWithTypeParameter.ts, 9, 7)) >E : Symbol(E, Decl(additionOperatorWithTypeParameter.ts, 0, 0)) - var f: void; + let f!: void; >f : Symbol(f, Decl(additionOperatorWithTypeParameter.ts, 10, 7)) // type parameter as left operand diff --git a/tests/baselines/reference/additionOperatorWithTypeParameter.types b/tests/baselines/reference/additionOperatorWithTypeParameter.types index 5291fc2fe0e57..200f1ebab23a1 100644 --- a/tests/baselines/reference/additionOperatorWithTypeParameter.types +++ b/tests/baselines/reference/additionOperatorWithTypeParameter.types @@ -18,31 +18,31 @@ function foo(t: T, u: U) { >u : U > : ^ - var a: any; + let a!: any; >a : any > : ^^^ - var b: boolean; + let b!: boolean; >b : boolean > : ^^^^^^^ - var c: number; + let c!: number; >c : number > : ^^^^^^ - var d: string; + let d!: string; >d : string > : ^^^^^^ - var e: Object; + let e!: Object; >e : Object > : ^^^^^^ - var g: E; + let g!: E; >g : E > : ^ - var f: void; + let f!: void; >f : void > : ^^^^ diff --git a/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.errors.txt b/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.errors.txt index 7546a67f9f332..1c50937aad0a7 100644 --- a/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.errors.txt +++ b/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.errors.txt @@ -16,10 +16,10 @@ additionOperatorWithUndefinedValueAndInvalidOperands.ts(23,11): error TS2365: Op function foo(): void { return undefined } - var a: boolean; - var b: Object; - var c: void; - var d: Number; + declare var a: boolean; + declare var b: Object; + declare var c: void; + declare var d: Number; // undefined + boolean/Object var r1 = undefined + a; diff --git a/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.js b/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.js index 755ddc7bc18e3..c4d1cafd628d3 100644 --- a/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.js +++ b/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.js @@ -5,10 +5,10 @@ function foo(): void { return undefined } -var a: boolean; -var b: Object; -var c: void; -var d: Number; +declare var a: boolean; +declare var b: Object; +declare var c: void; +declare var d: Number; // undefined + boolean/Object var r1 = undefined + a; @@ -28,10 +28,6 @@ var r11 = undefined + (() => { }); //// [additionOperatorWithUndefinedValueAndInvalidOperands.js] // If one operand is the null or undefined value, it is treated as having the type of the other operand. function foo() { return undefined; } -var a; -var b; -var c; -var d; // undefined + boolean/Object var r1 = undefined + a; var r2 = undefined + b; diff --git a/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.symbols b/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.symbols index 0ea20fccc4a65..b6fc78b177ea4 100644 --- a/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.symbols +++ b/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.symbols @@ -7,56 +7,56 @@ function foo(): void { return undefined } >foo : Symbol(foo, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 0, 0)) >undefined : Symbol(undefined) -var a: boolean; ->a : Symbol(a, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 3)) +declare var a: boolean; +>a : Symbol(a, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 11)) -var b: Object; ->b : Symbol(b, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 3)) +declare var b: Object; +>b : Symbol(b, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 11)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) -var c: void; ->c : Symbol(c, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 6, 3)) +declare var c: void; +>c : Symbol(c, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 6, 11)) -var d: Number; ->d : Symbol(d, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 7, 3)) +declare var d: Number; +>d : Symbol(d, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 7, 11)) >Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) // undefined + boolean/Object var r1 = undefined + a; >r1 : Symbol(r1, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 10, 3)) >undefined : Symbol(undefined) ->a : Symbol(a, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 11)) var r2 = undefined + b; >r2 : Symbol(r2, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 11, 3)) >undefined : Symbol(undefined) ->b : Symbol(b, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 11)) var r3 = undefined + c; >r3 : Symbol(r3, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 12, 3)) >undefined : Symbol(undefined) ->c : Symbol(c, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 6, 11)) var r4 = a + undefined; >r4 : Symbol(r4, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 13, 3)) ->a : Symbol(a, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 11)) >undefined : Symbol(undefined) var r5 = b + undefined; >r5 : Symbol(r5, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 14, 3)) ->b : Symbol(b, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 11)) >undefined : Symbol(undefined) var r6 = undefined + c; >r6 : Symbol(r6, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 15, 3)) >undefined : Symbol(undefined) ->c : Symbol(c, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 6, 11)) // other cases var r7 = undefined + d; >r7 : Symbol(r7, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 18, 3)) >undefined : Symbol(undefined) ->d : Symbol(d, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 7, 11)) var r8 = undefined + true; >r8 : Symbol(r8, Decl(additionOperatorWithUndefinedValueAndInvalidOperands.ts, 19, 3)) diff --git a/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.types b/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.types index d9bf840aa0695..39fc32e765ba8 100644 --- a/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.types +++ b/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.types @@ -9,19 +9,19 @@ function foo(): void { return undefined } >undefined : undefined > : ^^^^^^^^^ -var a: boolean; +declare var a: boolean; >a : boolean > : ^^^^^^^ -var b: Object; +declare var b: Object; >b : Object > : ^^^^^^ -var c: void; +declare var c: void; >c : void > : ^^^^ -var d: Number; +declare var d: Number; >d : Number > : ^^^^^^ diff --git a/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.errors.txt b/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.errors.txt index 36a4ce620cb5a..bf1f4cd3e4fd3 100644 --- a/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.errors.txt +++ b/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.errors.txt @@ -15,10 +15,10 @@ additionOperatorWithUndefinedValueAndValidOperator.ts(24,11): error TS2365: Oper enum E { a, b, c } - var a: any; - var b: number; - var c: E; - var d: string; + declare var a: any; + declare var b: number; + declare var c: E; + declare var d: string; // undefined + any var r1: any = undefined + a; diff --git a/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.js b/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.js index bff58795e7683..f80fb1253c3f4 100644 --- a/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.js +++ b/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.js @@ -5,10 +5,10 @@ enum E { a, b, c } -var a: any; -var b: number; -var c: E; -var d: string; +declare var a: any; +declare var b: number; +declare var c: E; +declare var d: string; // undefined + any var r1: any = undefined + a; @@ -40,10 +40,6 @@ var E; E[E["b"] = 1] = "b"; E[E["c"] = 2] = "c"; })(E || (E = {})); -var a; -var b; -var c; -var d; // undefined + any var r1 = undefined + a; var r2 = a + undefined; diff --git a/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.symbols b/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.symbols index a45dfe9f559b6..55cd1d2e95ace 100644 --- a/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.symbols +++ b/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.symbols @@ -9,35 +9,35 @@ enum E { a, b, c } >b : Symbol(E.b, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 2, 11)) >c : Symbol(E.c, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 2, 14)) -var a: any; ->a : Symbol(a, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 4, 3)) +declare var a: any; +>a : Symbol(a, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 4, 11)) -var b: number; ->b : Symbol(b, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 5, 3)) +declare var b: number; +>b : Symbol(b, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 5, 11)) -var c: E; ->c : Symbol(c, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 6, 3)) +declare var c: E; +>c : Symbol(c, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 6, 11)) >E : Symbol(E, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 0, 0)) -var d: string; ->d : Symbol(d, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 7, 3)) +declare var d: string; +>d : Symbol(d, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 7, 11)) // undefined + any var r1: any = undefined + a; >r1 : Symbol(r1, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 10, 3)) >undefined : Symbol(undefined) ->a : Symbol(a, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 4, 3)) +>a : Symbol(a, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 4, 11)) var r2: any = a + undefined; >r2 : Symbol(r2, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 11, 3)) ->a : Symbol(a, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 4, 3)) +>a : Symbol(a, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 4, 11)) >undefined : Symbol(undefined) // undefined + number/enum var r3 = undefined + b; >r3 : Symbol(r3, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 14, 3)) >undefined : Symbol(undefined) ->b : Symbol(b, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 5, 3)) +>b : Symbol(b, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 5, 11)) var r4 = undefined + 1; >r4 : Symbol(r4, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 15, 3)) @@ -46,7 +46,7 @@ var r4 = undefined + 1; var r5 = undefined + c; >r5 : Symbol(r5, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 16, 3)) >undefined : Symbol(undefined) ->c : Symbol(c, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 6, 3)) +>c : Symbol(c, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 6, 11)) var r6 = undefined + E.a; >r6 : Symbol(r6, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 17, 3)) @@ -63,7 +63,7 @@ var r7 = undefined + E['a']; var r8 = b + undefined; >r8 : Symbol(r8, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 19, 3)) ->b : Symbol(b, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 5, 3)) +>b : Symbol(b, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 5, 11)) >undefined : Symbol(undefined) var r9 = 1 + undefined; @@ -72,7 +72,7 @@ var r9 = 1 + undefined; var r10 = c + undefined >r10 : Symbol(r10, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 21, 3)) ->c : Symbol(c, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 6, 3)) +>c : Symbol(c, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 6, 11)) >undefined : Symbol(undefined) var r11 = E.a + undefined; @@ -92,7 +92,7 @@ var r12 = E['a'] + undefined; var r13 = undefined + d; >r13 : Symbol(r13, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 26, 3)) >undefined : Symbol(undefined) ->d : Symbol(d, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 7, 3)) +>d : Symbol(d, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 7, 11)) var r14 = undefined + ''; >r14 : Symbol(r14, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 27, 3)) @@ -100,7 +100,7 @@ var r14 = undefined + ''; var r15 = d + undefined; >r15 : Symbol(r15, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 28, 3)) ->d : Symbol(d, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 7, 3)) +>d : Symbol(d, Decl(additionOperatorWithUndefinedValueAndValidOperator.ts, 7, 11)) >undefined : Symbol(undefined) var r16 = '' + undefined; diff --git a/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.types b/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.types index 5f36bcdc37951..3c87e85c3bded 100644 --- a/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.types +++ b/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.types @@ -13,19 +13,19 @@ enum E { a, b, c } >c : E.c > : ^^^ -var a: any; +declare var a: any; >a : any > : ^^^ -var b: number; +declare var b: number; >b : number > : ^^^^^^ -var c: E; +declare var c: E; >c : E > : ^ -var d: string; +declare var d: string; >d : string > : ^^^^^^ diff --git a/tests/baselines/reference/aliasOnMergedModuleInterface.errors.txt b/tests/baselines/reference/aliasOnMergedModuleInterface.errors.txt index 327faccff8a54..cd328111bba70 100644 --- a/tests/baselines/reference/aliasOnMergedModuleInterface.errors.txt +++ b/tests/baselines/reference/aliasOnMergedModuleInterface.errors.txt @@ -4,7 +4,7 @@ aliasOnMergedModuleInterface_1.ts(5,16): error TS2708: Cannot use namespace 'foo ==== aliasOnMergedModuleInterface_1.ts (1 errors) ==== /// import foo = require("foo") - var z: foo; + declare var z: foo; z.bar("hello"); // This should be ok var x: foo.A = foo.bar("hello"); // foo.A should be ok but foo.bar should be error ~~~ diff --git a/tests/baselines/reference/aliasOnMergedModuleInterface.js b/tests/baselines/reference/aliasOnMergedModuleInterface.js index e7cac961b653a..3d032add8eb62 100644 --- a/tests/baselines/reference/aliasOnMergedModuleInterface.js +++ b/tests/baselines/reference/aliasOnMergedModuleInterface.js @@ -16,7 +16,7 @@ declare module "foo" //// [aliasOnMergedModuleInterface_1.ts] /// import foo = require("foo") -var z: foo; +declare var z: foo; z.bar("hello"); // This should be ok var x: foo.A = foo.bar("hello"); // foo.A should be ok but foo.bar should be error @@ -25,6 +25,5 @@ var x: foo.A = foo.bar("hello"); // foo.A should be ok but foo.bar should be err //// [aliasOnMergedModuleInterface_1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var z; z.bar("hello"); // This should be ok var x = foo.bar("hello"); // foo.A should be ok but foo.bar should be error diff --git a/tests/baselines/reference/aliasOnMergedModuleInterface.symbols b/tests/baselines/reference/aliasOnMergedModuleInterface.symbols index 6544197e32e71..16f71fc1185ff 100644 --- a/tests/baselines/reference/aliasOnMergedModuleInterface.symbols +++ b/tests/baselines/reference/aliasOnMergedModuleInterface.symbols @@ -5,13 +5,13 @@ import foo = require("foo") >foo : Symbol(foo, Decl(aliasOnMergedModuleInterface_1.ts, 0, 0)) -var z: foo; ->z : Symbol(z, Decl(aliasOnMergedModuleInterface_1.ts, 2, 3)) +declare var z: foo; +>z : Symbol(z, Decl(aliasOnMergedModuleInterface_1.ts, 2, 11)) >foo : Symbol(foo, Decl(aliasOnMergedModuleInterface_1.ts, 0, 0)) z.bar("hello"); // This should be ok >z.bar : Symbol(foo.bar, Decl(aliasOnMergedModuleInterface_0.ts, 6, 17)) ->z : Symbol(z, Decl(aliasOnMergedModuleInterface_1.ts, 2, 3)) +>z : Symbol(z, Decl(aliasOnMergedModuleInterface_1.ts, 2, 11)) >bar : Symbol(foo.bar, Decl(aliasOnMergedModuleInterface_0.ts, 6, 17)) var x: foo.A = foo.bar("hello"); // foo.A should be ok but foo.bar should be error diff --git a/tests/baselines/reference/aliasOnMergedModuleInterface.types b/tests/baselines/reference/aliasOnMergedModuleInterface.types index 756caf50f4beb..08d42e1f8ed53 100644 --- a/tests/baselines/reference/aliasOnMergedModuleInterface.types +++ b/tests/baselines/reference/aliasOnMergedModuleInterface.types @@ -6,7 +6,7 @@ import foo = require("foo") >foo : any > : ^^^ -var z: foo; +declare var z: foo; >z : foo > : ^^^ diff --git a/tests/baselines/reference/aliasUsageInOrExpression.errors.txt b/tests/baselines/reference/aliasUsageInOrExpression.errors.txt index 2ac162439c2c7..85113b6a55d79 100644 --- a/tests/baselines/reference/aliasUsageInOrExpression.errors.txt +++ b/tests/baselines/reference/aliasUsageInOrExpression.errors.txt @@ -8,7 +8,7 @@ aliasUsageInOrExpression_main.ts(11,40): error TS2873: This kind of expression i interface IHasVisualizationModel { VisualizationModel: typeof Backbone.Model; } - var i: IHasVisualizationModel; + declare var i: IHasVisualizationModel; var d1 = i || moduleA; var d2: IHasVisualizationModel = i || moduleA; var d2: IHasVisualizationModel = moduleA || i; diff --git a/tests/baselines/reference/aliasUsageInOrExpression.js b/tests/baselines/reference/aliasUsageInOrExpression.js index 63f9cade8fef1..25545e99de318 100644 --- a/tests/baselines/reference/aliasUsageInOrExpression.js +++ b/tests/baselines/reference/aliasUsageInOrExpression.js @@ -17,7 +17,7 @@ import moduleA = require("./aliasUsageInOrExpression_moduleA"); interface IHasVisualizationModel { VisualizationModel: typeof Backbone.Model; } -var i: IHasVisualizationModel; +declare var i: IHasVisualizationModel; var d1 = i || moduleA; var d2: IHasVisualizationModel = i || moduleA; var d2: IHasVisualizationModel = moduleA || i; @@ -66,7 +66,6 @@ exports.VisualizationModel = VisualizationModel; "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var moduleA = require("./aliasUsageInOrExpression_moduleA"); -var i; var d1 = i || moduleA; var d2 = i || moduleA; var d2 = moduleA || i; diff --git a/tests/baselines/reference/aliasUsageInOrExpression.symbols b/tests/baselines/reference/aliasUsageInOrExpression.symbols index 8c56640fb27a2..6cb0647c087df 100644 --- a/tests/baselines/reference/aliasUsageInOrExpression.symbols +++ b/tests/baselines/reference/aliasUsageInOrExpression.symbols @@ -16,26 +16,26 @@ interface IHasVisualizationModel { >Backbone : Symbol(Backbone, Decl(aliasUsageInOrExpression_main.ts, 0, 0)) >Model : Symbol(Backbone.Model, Decl(aliasUsageInOrExpression_backbone.ts, 0, 0)) } -var i: IHasVisualizationModel; ->i : Symbol(i, Decl(aliasUsageInOrExpression_main.ts, 5, 3)) +declare var i: IHasVisualizationModel; +>i : Symbol(i, Decl(aliasUsageInOrExpression_main.ts, 5, 11)) >IHasVisualizationModel : Symbol(IHasVisualizationModel, Decl(aliasUsageInOrExpression_main.ts, 1, 63)) var d1 = i || moduleA; >d1 : Symbol(d1, Decl(aliasUsageInOrExpression_main.ts, 6, 3)) ->i : Symbol(i, Decl(aliasUsageInOrExpression_main.ts, 5, 3)) +>i : Symbol(i, Decl(aliasUsageInOrExpression_main.ts, 5, 11)) >moduleA : Symbol(moduleA, Decl(aliasUsageInOrExpression_main.ts, 0, 65)) var d2: IHasVisualizationModel = i || moduleA; >d2 : Symbol(d2, Decl(aliasUsageInOrExpression_main.ts, 7, 3), Decl(aliasUsageInOrExpression_main.ts, 8, 3)) >IHasVisualizationModel : Symbol(IHasVisualizationModel, Decl(aliasUsageInOrExpression_main.ts, 1, 63)) ->i : Symbol(i, Decl(aliasUsageInOrExpression_main.ts, 5, 3)) +>i : Symbol(i, Decl(aliasUsageInOrExpression_main.ts, 5, 11)) >moduleA : Symbol(moduleA, Decl(aliasUsageInOrExpression_main.ts, 0, 65)) var d2: IHasVisualizationModel = moduleA || i; >d2 : Symbol(d2, Decl(aliasUsageInOrExpression_main.ts, 7, 3), Decl(aliasUsageInOrExpression_main.ts, 8, 3)) >IHasVisualizationModel : Symbol(IHasVisualizationModel, Decl(aliasUsageInOrExpression_main.ts, 1, 63)) >moduleA : Symbol(moduleA, Decl(aliasUsageInOrExpression_main.ts, 0, 65)) ->i : Symbol(i, Decl(aliasUsageInOrExpression_main.ts, 5, 3)) +>i : Symbol(i, Decl(aliasUsageInOrExpression_main.ts, 5, 11)) var e: { x: IHasVisualizationModel } = <{ x: IHasVisualizationModel }>null || { x: moduleA }; >e : Symbol(e, Decl(aliasUsageInOrExpression_main.ts, 9, 3)) diff --git a/tests/baselines/reference/aliasUsageInOrExpression.types b/tests/baselines/reference/aliasUsageInOrExpression.types index f79acc30c5c75..ab24f27750295 100644 --- a/tests/baselines/reference/aliasUsageInOrExpression.types +++ b/tests/baselines/reference/aliasUsageInOrExpression.types @@ -20,7 +20,7 @@ interface IHasVisualizationModel { >Model : typeof Backbone.Model > : ^^^^^^^^^^^^^^^^^^^^^ } -var i: IHasVisualizationModel; +declare var i: IHasVisualizationModel; >i : IHasVisualizationModel > : ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/alwaysStrictModule2.errors.txt b/tests/baselines/reference/alwaysStrictModule2.errors.txt index d1302f9c0c5f0..9f15368183c0a 100644 --- a/tests/baselines/reference/alwaysStrictModule2.errors.txt +++ b/tests/baselines/reference/alwaysStrictModule2.errors.txt @@ -1,7 +1,9 @@ +error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. a.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. b.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. +!!! error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== a.ts (1 errors) ==== namespace M { export function f() { diff --git a/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.errors.txt b/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.errors.txt index 3e48ae27ac125..b78698d948e8a 100644 --- a/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.errors.txt +++ b/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.errors.txt @@ -1,6 +1,8 @@ +error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +!!! error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. !!! error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== Class.ts (0 errors) ==== import { Configurable } from "./Configurable" diff --git a/tests/baselines/reference/amdModuleBundleNoDuplicateDeclarationEmitComments.errors.txt b/tests/baselines/reference/amdModuleBundleNoDuplicateDeclarationEmitComments.errors.txt index a0f10142a0010..c4877ef823505 100644 --- a/tests/baselines/reference/amdModuleBundleNoDuplicateDeclarationEmitComments.errors.txt +++ b/tests/baselines/reference/amdModuleBundleNoDuplicateDeclarationEmitComments.errors.txt @@ -1,6 +1,8 @@ +error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +!!! error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. !!! error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== file1.ts (0 errors) ==== /// diff --git a/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.errors.txt b/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.errors.txt index 7fe239623fa97..8f7727381f762 100644 --- a/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.errors.txt +++ b/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.errors.txt @@ -562,12 +562,12 @@ arithmeticOperatorWithInvalidOperands.ts(581,13): error TS2362: The left-hand si // an enum type enum E { a, b, c } - var a: any; - var b: boolean; - var c: number; - var d: string; - var e: { a: number }; - var f: Number; + declare var a: any; + declare var b: boolean; + declare var c: number; + declare var d: string; + declare var e: { a: number }; + declare var f: Number; // All of the below should be an error unless otherwise noted // operator * diff --git a/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.js b/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.js index 691081b53722b..e8a6cfa93d418 100644 --- a/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.js +++ b/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.js @@ -5,12 +5,12 @@ // an enum type enum E { a, b, c } -var a: any; -var b: boolean; -var c: number; -var d: string; -var e: { a: number }; -var f: Number; +declare var a: any; +declare var b: boolean; +declare var c: number; +declare var d: string; +declare var e: { a: number }; +declare var f: Number; // All of the below should be an error unless otherwise noted // operator * @@ -592,12 +592,6 @@ var E; E[E["b"] = 1] = "b"; E[E["c"] = 2] = "c"; })(E || (E = {})); -var a; -var b; -var c; -var d; -var e; -var f; // All of the below should be an error unless otherwise noted // operator * var r1a1 = a * a; //ok diff --git a/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.symbols b/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.symbols index b087cff2b360d..59697e9684c70 100644 --- a/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.symbols +++ b/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.symbols @@ -9,288 +9,288 @@ enum E { a, b, c } >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >c : Symbol(E.c, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 14)) -var a: any; ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +declare var a: any; +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) -var b: boolean; ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +declare var b: boolean; +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) -var c: number; ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +declare var c: number; +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) -var d: string; ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +declare var d: string; +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) -var e: { a: number }; ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 8)) +declare var e: { a: number }; +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 16)) -var f: Number; ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +declare var f: Number; +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) >Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) // All of the below should be an error unless otherwise noted // operator * var r1a1 = a * a; //ok >r1a1 : Symbol(r1a1, Decl(arithmeticOperatorWithInvalidOperands.ts, 13, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r1a2 = a * b; >r1a2 : Symbol(r1a2, Decl(arithmeticOperatorWithInvalidOperands.ts, 14, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r1a3 = a * c; //ok >r1a3 : Symbol(r1a3, Decl(arithmeticOperatorWithInvalidOperands.ts, 15, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r1a4 = a * d; >r1a4 : Symbol(r1a4, Decl(arithmeticOperatorWithInvalidOperands.ts, 16, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r1a5 = a * e; >r1a5 : Symbol(r1a5, Decl(arithmeticOperatorWithInvalidOperands.ts, 17, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r1a6 = a * f; >r1a6 : Symbol(r1a6, Decl(arithmeticOperatorWithInvalidOperands.ts, 18, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r1b1 = b * a; >r1b1 : Symbol(r1b1, Decl(arithmeticOperatorWithInvalidOperands.ts, 20, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r1b2 = b * b; >r1b2 : Symbol(r1b2, Decl(arithmeticOperatorWithInvalidOperands.ts, 21, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r1b3 = b * c; >r1b3 : Symbol(r1b3, Decl(arithmeticOperatorWithInvalidOperands.ts, 22, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r1b4 = b * d; >r1b4 : Symbol(r1b4, Decl(arithmeticOperatorWithInvalidOperands.ts, 23, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r1b5 = b * e; >r1b5 : Symbol(r1b5, Decl(arithmeticOperatorWithInvalidOperands.ts, 24, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r1b6 = b * f; >r1b6 : Symbol(r1b6, Decl(arithmeticOperatorWithInvalidOperands.ts, 25, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r1c1 = c * a; //ok >r1c1 : Symbol(r1c1, Decl(arithmeticOperatorWithInvalidOperands.ts, 27, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r1c2 = c * b; >r1c2 : Symbol(r1c2, Decl(arithmeticOperatorWithInvalidOperands.ts, 28, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r1c3 = c * c; //ok >r1c3 : Symbol(r1c3, Decl(arithmeticOperatorWithInvalidOperands.ts, 29, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r1c4 = c * d; >r1c4 : Symbol(r1c4, Decl(arithmeticOperatorWithInvalidOperands.ts, 30, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r1c5 = c * e; >r1c5 : Symbol(r1c5, Decl(arithmeticOperatorWithInvalidOperands.ts, 31, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r1c6 = c * f; >r1c6 : Symbol(r1c6, Decl(arithmeticOperatorWithInvalidOperands.ts, 32, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r1d1 = d * a; >r1d1 : Symbol(r1d1, Decl(arithmeticOperatorWithInvalidOperands.ts, 34, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r1d2 = d * b; >r1d2 : Symbol(r1d2, Decl(arithmeticOperatorWithInvalidOperands.ts, 35, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r1d3 = d * c; >r1d3 : Symbol(r1d3, Decl(arithmeticOperatorWithInvalidOperands.ts, 36, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r1d4 = d * d; >r1d4 : Symbol(r1d4, Decl(arithmeticOperatorWithInvalidOperands.ts, 37, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r1d5 = d * e; >r1d5 : Symbol(r1d5, Decl(arithmeticOperatorWithInvalidOperands.ts, 38, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r1d6 = d * f; >r1d6 : Symbol(r1d6, Decl(arithmeticOperatorWithInvalidOperands.ts, 39, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r1e1 = e * a; >r1e1 : Symbol(r1e1, Decl(arithmeticOperatorWithInvalidOperands.ts, 41, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r1e2 = e * b; >r1e2 : Symbol(r1e2, Decl(arithmeticOperatorWithInvalidOperands.ts, 42, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r1e3 = e * c; >r1e3 : Symbol(r1e3, Decl(arithmeticOperatorWithInvalidOperands.ts, 43, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r1e4 = e * d; >r1e4 : Symbol(r1e4, Decl(arithmeticOperatorWithInvalidOperands.ts, 44, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r1e5 = e * e; >r1e5 : Symbol(r1e5, Decl(arithmeticOperatorWithInvalidOperands.ts, 45, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r1e6 = e * f; >r1e6 : Symbol(r1e6, Decl(arithmeticOperatorWithInvalidOperands.ts, 46, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r1f1 = f * a; >r1f1 : Symbol(r1f1, Decl(arithmeticOperatorWithInvalidOperands.ts, 48, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r1f2 = f * b; >r1f2 : Symbol(r1f2, Decl(arithmeticOperatorWithInvalidOperands.ts, 49, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r1f3 = f * c; >r1f3 : Symbol(r1f3, Decl(arithmeticOperatorWithInvalidOperands.ts, 50, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r1f4 = f * d; >r1f4 : Symbol(r1f4, Decl(arithmeticOperatorWithInvalidOperands.ts, 51, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r1f5 = f * e; >r1f5 : Symbol(r1f5, Decl(arithmeticOperatorWithInvalidOperands.ts, 52, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r1f6 = f * f; >r1f6 : Symbol(r1f6, Decl(arithmeticOperatorWithInvalidOperands.ts, 53, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r1g1 = E.a * a; //ok >r1g1 : Symbol(r1g1, Decl(arithmeticOperatorWithInvalidOperands.ts, 55, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r1g2 = E.a * b; >r1g2 : Symbol(r1g2, Decl(arithmeticOperatorWithInvalidOperands.ts, 56, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r1g3 = E.a * c; //ok >r1g3 : Symbol(r1g3, Decl(arithmeticOperatorWithInvalidOperands.ts, 57, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r1g4 = E.a * d; >r1g4 : Symbol(r1g4, Decl(arithmeticOperatorWithInvalidOperands.ts, 58, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r1g5 = E.a * e; >r1g5 : Symbol(r1g5, Decl(arithmeticOperatorWithInvalidOperands.ts, 59, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r1g6 = E.a * f; >r1g6 : Symbol(r1g6, Decl(arithmeticOperatorWithInvalidOperands.ts, 60, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r1h1 = a * E.b; //ok >r1h1 : Symbol(r1h1, Decl(arithmeticOperatorWithInvalidOperands.ts, 62, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r1h2 = b * E.b; >r1h2 : Symbol(r1h2, Decl(arithmeticOperatorWithInvalidOperands.ts, 63, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r1h3 = c * E.b; //ok >r1h3 : Symbol(r1h3, Decl(arithmeticOperatorWithInvalidOperands.ts, 64, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r1h4 = d * E.b; >r1h4 : Symbol(r1h4, Decl(arithmeticOperatorWithInvalidOperands.ts, 65, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r1h5 = e * E.b; >r1h5 : Symbol(r1h5, Decl(arithmeticOperatorWithInvalidOperands.ts, 66, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r1h6 = f * E.b; >r1h6 : Symbol(r1h6, Decl(arithmeticOperatorWithInvalidOperands.ts, 67, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) @@ -298,264 +298,264 @@ var r1h6 = f * E.b; // operator / var r2a1 = a / a; //ok >r2a1 : Symbol(r2a1, Decl(arithmeticOperatorWithInvalidOperands.ts, 70, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r2a2 = a / b; >r2a2 : Symbol(r2a2, Decl(arithmeticOperatorWithInvalidOperands.ts, 71, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r2a3 = a / c; //ok >r2a3 : Symbol(r2a3, Decl(arithmeticOperatorWithInvalidOperands.ts, 72, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r2a4 = a / d; >r2a4 : Symbol(r2a4, Decl(arithmeticOperatorWithInvalidOperands.ts, 73, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r2a5 = a / e; >r2a5 : Symbol(r2a5, Decl(arithmeticOperatorWithInvalidOperands.ts, 74, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r2a6 = a / f; >r2a6 : Symbol(r2a6, Decl(arithmeticOperatorWithInvalidOperands.ts, 75, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r2b1 = b / a; >r2b1 : Symbol(r2b1, Decl(arithmeticOperatorWithInvalidOperands.ts, 77, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r2b2 = b / b; >r2b2 : Symbol(r2b2, Decl(arithmeticOperatorWithInvalidOperands.ts, 78, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r2b3 = b / c; >r2b3 : Symbol(r2b3, Decl(arithmeticOperatorWithInvalidOperands.ts, 79, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r2b4 = b / d; >r2b4 : Symbol(r2b4, Decl(arithmeticOperatorWithInvalidOperands.ts, 80, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r2b5 = b / e; >r2b5 : Symbol(r2b5, Decl(arithmeticOperatorWithInvalidOperands.ts, 81, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r2b6 = b / f; >r2b6 : Symbol(r2b6, Decl(arithmeticOperatorWithInvalidOperands.ts, 82, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r2c1 = c / a; //ok >r2c1 : Symbol(r2c1, Decl(arithmeticOperatorWithInvalidOperands.ts, 84, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r2c2 = c / b; >r2c2 : Symbol(r2c2, Decl(arithmeticOperatorWithInvalidOperands.ts, 85, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r2c3 = c / c; //ok >r2c3 : Symbol(r2c3, Decl(arithmeticOperatorWithInvalidOperands.ts, 86, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r2c4 = c / d; >r2c4 : Symbol(r2c4, Decl(arithmeticOperatorWithInvalidOperands.ts, 87, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r2c5 = c / e; >r2c5 : Symbol(r2c5, Decl(arithmeticOperatorWithInvalidOperands.ts, 88, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r2c6 = c / f; >r2c6 : Symbol(r2c6, Decl(arithmeticOperatorWithInvalidOperands.ts, 89, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r2d1 = d / a; >r2d1 : Symbol(r2d1, Decl(arithmeticOperatorWithInvalidOperands.ts, 91, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r2d2 = d / b; >r2d2 : Symbol(r2d2, Decl(arithmeticOperatorWithInvalidOperands.ts, 92, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r2d3 = d / c; >r2d3 : Symbol(r2d3, Decl(arithmeticOperatorWithInvalidOperands.ts, 93, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r2d4 = d / d; >r2d4 : Symbol(r2d4, Decl(arithmeticOperatorWithInvalidOperands.ts, 94, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r2d5 = d / e; >r2d5 : Symbol(r2d5, Decl(arithmeticOperatorWithInvalidOperands.ts, 95, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r2d6 = d / f; >r2d6 : Symbol(r2d6, Decl(arithmeticOperatorWithInvalidOperands.ts, 96, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r2e1 = e / a; >r2e1 : Symbol(r2e1, Decl(arithmeticOperatorWithInvalidOperands.ts, 98, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r2e2 = e / b; >r2e2 : Symbol(r2e2, Decl(arithmeticOperatorWithInvalidOperands.ts, 99, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r2e3 = e / c; >r2e3 : Symbol(r2e3, Decl(arithmeticOperatorWithInvalidOperands.ts, 100, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r2e4 = e / d; >r2e4 : Symbol(r2e4, Decl(arithmeticOperatorWithInvalidOperands.ts, 101, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r2e5 = e / e; >r2e5 : Symbol(r2e5, Decl(arithmeticOperatorWithInvalidOperands.ts, 102, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r2e6 = e / f; >r2e6 : Symbol(r2e6, Decl(arithmeticOperatorWithInvalidOperands.ts, 103, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r2f1 = f / a; >r2f1 : Symbol(r2f1, Decl(arithmeticOperatorWithInvalidOperands.ts, 105, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r2f2 = f / b; >r2f2 : Symbol(r2f2, Decl(arithmeticOperatorWithInvalidOperands.ts, 106, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r2f3 = f / c; >r2f3 : Symbol(r2f3, Decl(arithmeticOperatorWithInvalidOperands.ts, 107, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r2f4 = f / d; >r2f4 : Symbol(r2f4, Decl(arithmeticOperatorWithInvalidOperands.ts, 108, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r2f5 = f / e; >r2f5 : Symbol(r2f5, Decl(arithmeticOperatorWithInvalidOperands.ts, 109, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r2f6 = f / f; >r2f6 : Symbol(r2f6, Decl(arithmeticOperatorWithInvalidOperands.ts, 110, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r2g1 = E.a / a; //ok >r2g1 : Symbol(r2g1, Decl(arithmeticOperatorWithInvalidOperands.ts, 112, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r2g2 = E.a / b; >r2g2 : Symbol(r2g2, Decl(arithmeticOperatorWithInvalidOperands.ts, 113, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r2g3 = E.a / c; //ok >r2g3 : Symbol(r2g3, Decl(arithmeticOperatorWithInvalidOperands.ts, 114, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r2g4 = E.a / d; >r2g4 : Symbol(r2g4, Decl(arithmeticOperatorWithInvalidOperands.ts, 115, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r2g5 = E.a / e; >r2g5 : Symbol(r2g5, Decl(arithmeticOperatorWithInvalidOperands.ts, 116, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r2g6 = E.a / f; >r2g6 : Symbol(r2g6, Decl(arithmeticOperatorWithInvalidOperands.ts, 117, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r2h1 = a / E.b; //ok >r2h1 : Symbol(r2h1, Decl(arithmeticOperatorWithInvalidOperands.ts, 119, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r2h2 = b / E.b; >r2h2 : Symbol(r2h2, Decl(arithmeticOperatorWithInvalidOperands.ts, 120, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r2h3 = c / E.b; //ok >r2h3 : Symbol(r2h3, Decl(arithmeticOperatorWithInvalidOperands.ts, 121, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r2h4 = d / E.b; >r2h4 : Symbol(r2h4, Decl(arithmeticOperatorWithInvalidOperands.ts, 122, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r2h5 = e / E.b; >r2h5 : Symbol(r2h5, Decl(arithmeticOperatorWithInvalidOperands.ts, 123, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r2h6 = f / E.b; >r2h6 : Symbol(r2h6, Decl(arithmeticOperatorWithInvalidOperands.ts, 124, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) @@ -563,264 +563,264 @@ var r2h6 = f / E.b; // operator % var r3a1 = a % a; //ok >r3a1 : Symbol(r3a1, Decl(arithmeticOperatorWithInvalidOperands.ts, 127, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r3a2 = a % b; >r3a2 : Symbol(r3a2, Decl(arithmeticOperatorWithInvalidOperands.ts, 128, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r3a3 = a % c; //ok >r3a3 : Symbol(r3a3, Decl(arithmeticOperatorWithInvalidOperands.ts, 129, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r3a4 = a % d; >r3a4 : Symbol(r3a4, Decl(arithmeticOperatorWithInvalidOperands.ts, 130, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r3a5 = a % e; >r3a5 : Symbol(r3a5, Decl(arithmeticOperatorWithInvalidOperands.ts, 131, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r3a6 = a % f; >r3a6 : Symbol(r3a6, Decl(arithmeticOperatorWithInvalidOperands.ts, 132, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r3b1 = b % a; >r3b1 : Symbol(r3b1, Decl(arithmeticOperatorWithInvalidOperands.ts, 134, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r3b2 = b % b; >r3b2 : Symbol(r3b2, Decl(arithmeticOperatorWithInvalidOperands.ts, 135, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r3b3 = b % c; >r3b3 : Symbol(r3b3, Decl(arithmeticOperatorWithInvalidOperands.ts, 136, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r3b4 = b % d; >r3b4 : Symbol(r3b4, Decl(arithmeticOperatorWithInvalidOperands.ts, 137, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r3b5 = b % e; >r3b5 : Symbol(r3b5, Decl(arithmeticOperatorWithInvalidOperands.ts, 138, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r3b6 = b % f; >r3b6 : Symbol(r3b6, Decl(arithmeticOperatorWithInvalidOperands.ts, 139, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r3c1 = c % a; //ok >r3c1 : Symbol(r3c1, Decl(arithmeticOperatorWithInvalidOperands.ts, 141, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r3c2 = c % b; >r3c2 : Symbol(r3c2, Decl(arithmeticOperatorWithInvalidOperands.ts, 142, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r3c3 = c % c; //ok >r3c3 : Symbol(r3c3, Decl(arithmeticOperatorWithInvalidOperands.ts, 143, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r3c4 = c % d; >r3c4 : Symbol(r3c4, Decl(arithmeticOperatorWithInvalidOperands.ts, 144, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r3c5 = c % e; >r3c5 : Symbol(r3c5, Decl(arithmeticOperatorWithInvalidOperands.ts, 145, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r3c6 = c % f; >r3c6 : Symbol(r3c6, Decl(arithmeticOperatorWithInvalidOperands.ts, 146, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r3d1 = d % a; >r3d1 : Symbol(r3d1, Decl(arithmeticOperatorWithInvalidOperands.ts, 148, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r3d2 = d % b; >r3d2 : Symbol(r3d2, Decl(arithmeticOperatorWithInvalidOperands.ts, 149, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r3d3 = d % c; >r3d3 : Symbol(r3d3, Decl(arithmeticOperatorWithInvalidOperands.ts, 150, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r3d4 = d % d; >r3d4 : Symbol(r3d4, Decl(arithmeticOperatorWithInvalidOperands.ts, 151, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r3d5 = d % e; >r3d5 : Symbol(r3d5, Decl(arithmeticOperatorWithInvalidOperands.ts, 152, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r3d6 = d % f; >r3d6 : Symbol(r3d6, Decl(arithmeticOperatorWithInvalidOperands.ts, 153, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r3e1 = e % a; >r3e1 : Symbol(r3e1, Decl(arithmeticOperatorWithInvalidOperands.ts, 155, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r3e2 = e % b; >r3e2 : Symbol(r3e2, Decl(arithmeticOperatorWithInvalidOperands.ts, 156, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r3e3 = e % c; >r3e3 : Symbol(r3e3, Decl(arithmeticOperatorWithInvalidOperands.ts, 157, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r3e4 = e % d; >r3e4 : Symbol(r3e4, Decl(arithmeticOperatorWithInvalidOperands.ts, 158, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r3e5 = e % e; >r3e5 : Symbol(r3e5, Decl(arithmeticOperatorWithInvalidOperands.ts, 159, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r3e6 = e % f; >r3e6 : Symbol(r3e6, Decl(arithmeticOperatorWithInvalidOperands.ts, 160, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r3f1 = f % a; >r3f1 : Symbol(r3f1, Decl(arithmeticOperatorWithInvalidOperands.ts, 162, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r3f2 = f % b; >r3f2 : Symbol(r3f2, Decl(arithmeticOperatorWithInvalidOperands.ts, 163, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r3f3 = f % c; >r3f3 : Symbol(r3f3, Decl(arithmeticOperatorWithInvalidOperands.ts, 164, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r3f4 = f % d; >r3f4 : Symbol(r3f4, Decl(arithmeticOperatorWithInvalidOperands.ts, 165, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r3f5 = f % e; >r3f5 : Symbol(r3f5, Decl(arithmeticOperatorWithInvalidOperands.ts, 166, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r3f6 = f % f; >r3f6 : Symbol(r3f6, Decl(arithmeticOperatorWithInvalidOperands.ts, 167, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r3g1 = E.a % a; //ok >r3g1 : Symbol(r3g1, Decl(arithmeticOperatorWithInvalidOperands.ts, 169, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r3g2 = E.a % b; >r3g2 : Symbol(r3g2, Decl(arithmeticOperatorWithInvalidOperands.ts, 170, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r3g3 = E.a % c; //ok >r3g3 : Symbol(r3g3, Decl(arithmeticOperatorWithInvalidOperands.ts, 171, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r3g4 = E.a % d; >r3g4 : Symbol(r3g4, Decl(arithmeticOperatorWithInvalidOperands.ts, 172, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r3g5 = E.a % e; >r3g5 : Symbol(r3g5, Decl(arithmeticOperatorWithInvalidOperands.ts, 173, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r3g6 = E.a % f; >r3g6 : Symbol(r3g6, Decl(arithmeticOperatorWithInvalidOperands.ts, 174, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r3h1 = a % E.b; //ok >r3h1 : Symbol(r3h1, Decl(arithmeticOperatorWithInvalidOperands.ts, 176, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r3h2 = b % E.b; >r3h2 : Symbol(r3h2, Decl(arithmeticOperatorWithInvalidOperands.ts, 177, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r3h3 = c % E.b; //ok >r3h3 : Symbol(r3h3, Decl(arithmeticOperatorWithInvalidOperands.ts, 178, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r3h4 = d % E.b; >r3h4 : Symbol(r3h4, Decl(arithmeticOperatorWithInvalidOperands.ts, 179, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r3h5 = e % E.b; >r3h5 : Symbol(r3h5, Decl(arithmeticOperatorWithInvalidOperands.ts, 180, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r3h6 = f % E.b; >r3h6 : Symbol(r3h6, Decl(arithmeticOperatorWithInvalidOperands.ts, 181, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) @@ -828,264 +828,264 @@ var r3h6 = f % E.b; // operator - var r4a1 = a - a; //ok >r4a1 : Symbol(r4a1, Decl(arithmeticOperatorWithInvalidOperands.ts, 184, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r4a2 = a - b; >r4a2 : Symbol(r4a2, Decl(arithmeticOperatorWithInvalidOperands.ts, 185, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r4a3 = a - c; //ok >r4a3 : Symbol(r4a3, Decl(arithmeticOperatorWithInvalidOperands.ts, 186, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r4a4 = a - d; >r4a4 : Symbol(r4a4, Decl(arithmeticOperatorWithInvalidOperands.ts, 187, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r4a5 = a - e; >r4a5 : Symbol(r4a5, Decl(arithmeticOperatorWithInvalidOperands.ts, 188, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r4a6 = a - f; >r4a6 : Symbol(r4a6, Decl(arithmeticOperatorWithInvalidOperands.ts, 189, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r4b1 = b - a; >r4b1 : Symbol(r4b1, Decl(arithmeticOperatorWithInvalidOperands.ts, 191, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r4b2 = b - b; >r4b2 : Symbol(r4b2, Decl(arithmeticOperatorWithInvalidOperands.ts, 192, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r4b3 = b - c; >r4b3 : Symbol(r4b3, Decl(arithmeticOperatorWithInvalidOperands.ts, 193, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r4b4 = b - d; >r4b4 : Symbol(r4b4, Decl(arithmeticOperatorWithInvalidOperands.ts, 194, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r4b5 = b - e; >r4b5 : Symbol(r4b5, Decl(arithmeticOperatorWithInvalidOperands.ts, 195, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r4b6 = b - f; >r4b6 : Symbol(r4b6, Decl(arithmeticOperatorWithInvalidOperands.ts, 196, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r4c1 = c - a; //ok >r4c1 : Symbol(r4c1, Decl(arithmeticOperatorWithInvalidOperands.ts, 198, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r4c2 = c - b; >r4c2 : Symbol(r4c2, Decl(arithmeticOperatorWithInvalidOperands.ts, 199, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r4c3 = c - c; //ok >r4c3 : Symbol(r4c3, Decl(arithmeticOperatorWithInvalidOperands.ts, 200, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r4c4 = c - d; >r4c4 : Symbol(r4c4, Decl(arithmeticOperatorWithInvalidOperands.ts, 201, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r4c5 = c - e; >r4c5 : Symbol(r4c5, Decl(arithmeticOperatorWithInvalidOperands.ts, 202, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r4c6 = c - f; >r4c6 : Symbol(r4c6, Decl(arithmeticOperatorWithInvalidOperands.ts, 203, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r4d1 = d - a; >r4d1 : Symbol(r4d1, Decl(arithmeticOperatorWithInvalidOperands.ts, 205, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r4d2 = d - b; >r4d2 : Symbol(r4d2, Decl(arithmeticOperatorWithInvalidOperands.ts, 206, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r4d3 = d - c; >r4d3 : Symbol(r4d3, Decl(arithmeticOperatorWithInvalidOperands.ts, 207, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r4d4 = d - d; >r4d4 : Symbol(r4d4, Decl(arithmeticOperatorWithInvalidOperands.ts, 208, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r4d5 = d - e; >r4d5 : Symbol(r4d5, Decl(arithmeticOperatorWithInvalidOperands.ts, 209, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r4d6 = d - f; >r4d6 : Symbol(r4d6, Decl(arithmeticOperatorWithInvalidOperands.ts, 210, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r4e1 = e - a; >r4e1 : Symbol(r4e1, Decl(arithmeticOperatorWithInvalidOperands.ts, 212, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r4e2 = e - b; >r4e2 : Symbol(r4e2, Decl(arithmeticOperatorWithInvalidOperands.ts, 213, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r4e3 = e - c; >r4e3 : Symbol(r4e3, Decl(arithmeticOperatorWithInvalidOperands.ts, 214, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r4e4 = e - d; >r4e4 : Symbol(r4e4, Decl(arithmeticOperatorWithInvalidOperands.ts, 215, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r4e5 = e - e; >r4e5 : Symbol(r4e5, Decl(arithmeticOperatorWithInvalidOperands.ts, 216, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r4e6 = e - f; >r4e6 : Symbol(r4e6, Decl(arithmeticOperatorWithInvalidOperands.ts, 217, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r4f1 = f - a; >r4f1 : Symbol(r4f1, Decl(arithmeticOperatorWithInvalidOperands.ts, 219, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r4f2 = f - b; >r4f2 : Symbol(r4f2, Decl(arithmeticOperatorWithInvalidOperands.ts, 220, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r4f3 = f - c; >r4f3 : Symbol(r4f3, Decl(arithmeticOperatorWithInvalidOperands.ts, 221, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r4f4 = f - d; >r4f4 : Symbol(r4f4, Decl(arithmeticOperatorWithInvalidOperands.ts, 222, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r4f5 = f - e; >r4f5 : Symbol(r4f5, Decl(arithmeticOperatorWithInvalidOperands.ts, 223, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r4f6 = f - f; >r4f6 : Symbol(r4f6, Decl(arithmeticOperatorWithInvalidOperands.ts, 224, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r4g1 = E.a - a; //ok >r4g1 : Symbol(r4g1, Decl(arithmeticOperatorWithInvalidOperands.ts, 226, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r4g2 = E.a - b; >r4g2 : Symbol(r4g2, Decl(arithmeticOperatorWithInvalidOperands.ts, 227, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r4g3 = E.a - c; //ok >r4g3 : Symbol(r4g3, Decl(arithmeticOperatorWithInvalidOperands.ts, 228, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r4g4 = E.a - d; >r4g4 : Symbol(r4g4, Decl(arithmeticOperatorWithInvalidOperands.ts, 229, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r4g5 = E.a - e; >r4g5 : Symbol(r4g5, Decl(arithmeticOperatorWithInvalidOperands.ts, 230, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r4g6 = E.a - f; >r4g6 : Symbol(r4g6, Decl(arithmeticOperatorWithInvalidOperands.ts, 231, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r4h1 = a - E.b; //ok >r4h1 : Symbol(r4h1, Decl(arithmeticOperatorWithInvalidOperands.ts, 233, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r4h2 = b - E.b; >r4h2 : Symbol(r4h2, Decl(arithmeticOperatorWithInvalidOperands.ts, 234, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r4h3 = c - E.b; //ok >r4h3 : Symbol(r4h3, Decl(arithmeticOperatorWithInvalidOperands.ts, 235, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r4h4 = d - E.b; >r4h4 : Symbol(r4h4, Decl(arithmeticOperatorWithInvalidOperands.ts, 236, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r4h5 = e - E.b; >r4h5 : Symbol(r4h5, Decl(arithmeticOperatorWithInvalidOperands.ts, 237, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r4h6 = f - E.b; >r4h6 : Symbol(r4h6, Decl(arithmeticOperatorWithInvalidOperands.ts, 238, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) @@ -1093,264 +1093,264 @@ var r4h6 = f - E.b; // operator << var r5a1 = a << a; //ok >r5a1 : Symbol(r5a1, Decl(arithmeticOperatorWithInvalidOperands.ts, 241, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r5a2 = a << b; >r5a2 : Symbol(r5a2, Decl(arithmeticOperatorWithInvalidOperands.ts, 242, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r5a3 = a << c; //ok >r5a3 : Symbol(r5a3, Decl(arithmeticOperatorWithInvalidOperands.ts, 243, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r5a4 = a << d; >r5a4 : Symbol(r5a4, Decl(arithmeticOperatorWithInvalidOperands.ts, 244, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r5a5 = a << e; >r5a5 : Symbol(r5a5, Decl(arithmeticOperatorWithInvalidOperands.ts, 245, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r5a6 = a << f; >r5a6 : Symbol(r5a6, Decl(arithmeticOperatorWithInvalidOperands.ts, 246, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r5b1 = b << a; >r5b1 : Symbol(r5b1, Decl(arithmeticOperatorWithInvalidOperands.ts, 248, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r5b2 = b << b; >r5b2 : Symbol(r5b2, Decl(arithmeticOperatorWithInvalidOperands.ts, 249, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r5b3 = b << c; >r5b3 : Symbol(r5b3, Decl(arithmeticOperatorWithInvalidOperands.ts, 250, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r5b4 = b << d; >r5b4 : Symbol(r5b4, Decl(arithmeticOperatorWithInvalidOperands.ts, 251, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r5b5 = b << e; >r5b5 : Symbol(r5b5, Decl(arithmeticOperatorWithInvalidOperands.ts, 252, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r5b6 = b << f; >r5b6 : Symbol(r5b6, Decl(arithmeticOperatorWithInvalidOperands.ts, 253, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r5c1 = c << a; //ok >r5c1 : Symbol(r5c1, Decl(arithmeticOperatorWithInvalidOperands.ts, 255, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r5c2 = c << b; >r5c2 : Symbol(r5c2, Decl(arithmeticOperatorWithInvalidOperands.ts, 256, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r5c3 = c << c; //ok >r5c3 : Symbol(r5c3, Decl(arithmeticOperatorWithInvalidOperands.ts, 257, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r5c4 = c << d; >r5c4 : Symbol(r5c4, Decl(arithmeticOperatorWithInvalidOperands.ts, 258, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r5c5 = c << e; >r5c5 : Symbol(r5c5, Decl(arithmeticOperatorWithInvalidOperands.ts, 259, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r5c6 = c << f; >r5c6 : Symbol(r5c6, Decl(arithmeticOperatorWithInvalidOperands.ts, 260, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r5d1 = d << a; >r5d1 : Symbol(r5d1, Decl(arithmeticOperatorWithInvalidOperands.ts, 262, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r5d2 = d << b; >r5d2 : Symbol(r5d2, Decl(arithmeticOperatorWithInvalidOperands.ts, 263, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r5d3 = d << c; >r5d3 : Symbol(r5d3, Decl(arithmeticOperatorWithInvalidOperands.ts, 264, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r5d4 = d << d; >r5d4 : Symbol(r5d4, Decl(arithmeticOperatorWithInvalidOperands.ts, 265, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r5d5 = d << e; >r5d5 : Symbol(r5d5, Decl(arithmeticOperatorWithInvalidOperands.ts, 266, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r5d6 = d << f; >r5d6 : Symbol(r5d6, Decl(arithmeticOperatorWithInvalidOperands.ts, 267, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r5e1 = e << a; >r5e1 : Symbol(r5e1, Decl(arithmeticOperatorWithInvalidOperands.ts, 269, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r5e2 = e << b; >r5e2 : Symbol(r5e2, Decl(arithmeticOperatorWithInvalidOperands.ts, 270, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r5e3 = e << c; >r5e3 : Symbol(r5e3, Decl(arithmeticOperatorWithInvalidOperands.ts, 271, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r5e4 = e << d; >r5e4 : Symbol(r5e4, Decl(arithmeticOperatorWithInvalidOperands.ts, 272, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r5e5 = e << e; >r5e5 : Symbol(r5e5, Decl(arithmeticOperatorWithInvalidOperands.ts, 273, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r5e6 = e << f; >r5e6 : Symbol(r5e6, Decl(arithmeticOperatorWithInvalidOperands.ts, 274, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r5f1 = f << a; >r5f1 : Symbol(r5f1, Decl(arithmeticOperatorWithInvalidOperands.ts, 276, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r5f2 = f << b; >r5f2 : Symbol(r5f2, Decl(arithmeticOperatorWithInvalidOperands.ts, 277, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r5f3 = f << c; >r5f3 : Symbol(r5f3, Decl(arithmeticOperatorWithInvalidOperands.ts, 278, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r5f4 = f << d; >r5f4 : Symbol(r5f4, Decl(arithmeticOperatorWithInvalidOperands.ts, 279, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r5f5 = f << e; >r5f5 : Symbol(r5f5, Decl(arithmeticOperatorWithInvalidOperands.ts, 280, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r5f6 = f << f; >r5f6 : Symbol(r5f6, Decl(arithmeticOperatorWithInvalidOperands.ts, 281, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r5g1 = E.a << a; //ok >r5g1 : Symbol(r5g1, Decl(arithmeticOperatorWithInvalidOperands.ts, 283, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r5g2 = E.a << b; >r5g2 : Symbol(r5g2, Decl(arithmeticOperatorWithInvalidOperands.ts, 284, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r5g3 = E.a << c; //ok >r5g3 : Symbol(r5g3, Decl(arithmeticOperatorWithInvalidOperands.ts, 285, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r5g4 = E.a << d; >r5g4 : Symbol(r5g4, Decl(arithmeticOperatorWithInvalidOperands.ts, 286, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r5g5 = E.a << e; >r5g5 : Symbol(r5g5, Decl(arithmeticOperatorWithInvalidOperands.ts, 287, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r5g6 = E.a << f; >r5g6 : Symbol(r5g6, Decl(arithmeticOperatorWithInvalidOperands.ts, 288, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r5h1 = a << E.b; //ok >r5h1 : Symbol(r5h1, Decl(arithmeticOperatorWithInvalidOperands.ts, 290, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r5h2 = b << E.b; >r5h2 : Symbol(r5h2, Decl(arithmeticOperatorWithInvalidOperands.ts, 291, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r5h3 = c << E.b; //ok >r5h3 : Symbol(r5h3, Decl(arithmeticOperatorWithInvalidOperands.ts, 292, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r5h4 = d << E.b; >r5h4 : Symbol(r5h4, Decl(arithmeticOperatorWithInvalidOperands.ts, 293, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r5h5 = e << E.b; >r5h5 : Symbol(r5h5, Decl(arithmeticOperatorWithInvalidOperands.ts, 294, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r5h6 = f << E.b; >r5h6 : Symbol(r5h6, Decl(arithmeticOperatorWithInvalidOperands.ts, 295, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) @@ -1358,264 +1358,264 @@ var r5h6 = f << E.b; // operator >> var r6a1 = a >> a; //ok >r6a1 : Symbol(r6a1, Decl(arithmeticOperatorWithInvalidOperands.ts, 298, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r6a2 = a >> b; >r6a2 : Symbol(r6a2, Decl(arithmeticOperatorWithInvalidOperands.ts, 299, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r6a3 = a >> c; //ok >r6a3 : Symbol(r6a3, Decl(arithmeticOperatorWithInvalidOperands.ts, 300, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r6a4 = a >> d; >r6a4 : Symbol(r6a4, Decl(arithmeticOperatorWithInvalidOperands.ts, 301, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r6a5 = a >> e; >r6a5 : Symbol(r6a5, Decl(arithmeticOperatorWithInvalidOperands.ts, 302, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r6a6 = a >> f; >r6a6 : Symbol(r6a6, Decl(arithmeticOperatorWithInvalidOperands.ts, 303, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r6b1 = b >> a; >r6b1 : Symbol(r6b1, Decl(arithmeticOperatorWithInvalidOperands.ts, 305, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r6b2 = b >> b; >r6b2 : Symbol(r6b2, Decl(arithmeticOperatorWithInvalidOperands.ts, 306, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r6b3 = b >> c; >r6b3 : Symbol(r6b3, Decl(arithmeticOperatorWithInvalidOperands.ts, 307, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r6b4 = b >> d; >r6b4 : Symbol(r6b4, Decl(arithmeticOperatorWithInvalidOperands.ts, 308, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r6b5 = b >> e; >r6b5 : Symbol(r6b5, Decl(arithmeticOperatorWithInvalidOperands.ts, 309, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r6b6 = b >> f; >r6b6 : Symbol(r6b6, Decl(arithmeticOperatorWithInvalidOperands.ts, 310, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r6c1 = c >> a; //ok >r6c1 : Symbol(r6c1, Decl(arithmeticOperatorWithInvalidOperands.ts, 312, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r6c2 = c >> b; >r6c2 : Symbol(r6c2, Decl(arithmeticOperatorWithInvalidOperands.ts, 313, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r6c3 = c >> c; //ok >r6c3 : Symbol(r6c3, Decl(arithmeticOperatorWithInvalidOperands.ts, 314, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r6c4 = c >> d; >r6c4 : Symbol(r6c4, Decl(arithmeticOperatorWithInvalidOperands.ts, 315, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r6c5 = c >> e; >r6c5 : Symbol(r6c5, Decl(arithmeticOperatorWithInvalidOperands.ts, 316, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r6c6 = c >> f; >r6c6 : Symbol(r6c6, Decl(arithmeticOperatorWithInvalidOperands.ts, 317, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r6d1 = d >> a; >r6d1 : Symbol(r6d1, Decl(arithmeticOperatorWithInvalidOperands.ts, 319, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r6d2 = d >> b; >r6d2 : Symbol(r6d2, Decl(arithmeticOperatorWithInvalidOperands.ts, 320, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r6d3 = d >> c; >r6d3 : Symbol(r6d3, Decl(arithmeticOperatorWithInvalidOperands.ts, 321, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r6d4 = d >> d; >r6d4 : Symbol(r6d4, Decl(arithmeticOperatorWithInvalidOperands.ts, 322, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r6d5 = d >> e; >r6d5 : Symbol(r6d5, Decl(arithmeticOperatorWithInvalidOperands.ts, 323, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r6d6 = d >> f; >r6d6 : Symbol(r6d6, Decl(arithmeticOperatorWithInvalidOperands.ts, 324, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r6e1 = e >> a; >r6e1 : Symbol(r6e1, Decl(arithmeticOperatorWithInvalidOperands.ts, 326, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r6e2 = e >> b; >r6e2 : Symbol(r6e2, Decl(arithmeticOperatorWithInvalidOperands.ts, 327, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r6e3 = e >> c; >r6e3 : Symbol(r6e3, Decl(arithmeticOperatorWithInvalidOperands.ts, 328, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r6e4 = e >> d; >r6e4 : Symbol(r6e4, Decl(arithmeticOperatorWithInvalidOperands.ts, 329, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r6e5 = e >> e; >r6e5 : Symbol(r6e5, Decl(arithmeticOperatorWithInvalidOperands.ts, 330, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r6e6 = e >> f; >r6e6 : Symbol(r6e6, Decl(arithmeticOperatorWithInvalidOperands.ts, 331, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r6f1 = f >> a; >r6f1 : Symbol(r6f1, Decl(arithmeticOperatorWithInvalidOperands.ts, 333, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r6f2 = f >> b; >r6f2 : Symbol(r6f2, Decl(arithmeticOperatorWithInvalidOperands.ts, 334, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r6f3 = f >> c; >r6f3 : Symbol(r6f3, Decl(arithmeticOperatorWithInvalidOperands.ts, 335, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r6f4 = f >> d; >r6f4 : Symbol(r6f4, Decl(arithmeticOperatorWithInvalidOperands.ts, 336, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r6f5 = f >> e; >r6f5 : Symbol(r6f5, Decl(arithmeticOperatorWithInvalidOperands.ts, 337, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r6f6 = f >> f; >r6f6 : Symbol(r6f6, Decl(arithmeticOperatorWithInvalidOperands.ts, 338, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r6g1 = E.a >> a; //ok >r6g1 : Symbol(r6g1, Decl(arithmeticOperatorWithInvalidOperands.ts, 340, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r6g2 = E.a >> b; >r6g2 : Symbol(r6g2, Decl(arithmeticOperatorWithInvalidOperands.ts, 341, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r6g3 = E.a >> c; //ok >r6g3 : Symbol(r6g3, Decl(arithmeticOperatorWithInvalidOperands.ts, 342, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r6g4 = E.a >> d; >r6g4 : Symbol(r6g4, Decl(arithmeticOperatorWithInvalidOperands.ts, 343, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r6g5 = E.a >> e; >r6g5 : Symbol(r6g5, Decl(arithmeticOperatorWithInvalidOperands.ts, 344, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r6g6 = E.a >> f; >r6g6 : Symbol(r6g6, Decl(arithmeticOperatorWithInvalidOperands.ts, 345, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r6h1 = a >> E.b; //ok >r6h1 : Symbol(r6h1, Decl(arithmeticOperatorWithInvalidOperands.ts, 347, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r6h2 = b >> E.b; >r6h2 : Symbol(r6h2, Decl(arithmeticOperatorWithInvalidOperands.ts, 348, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r6h3 = c >> E.b; //ok >r6h3 : Symbol(r6h3, Decl(arithmeticOperatorWithInvalidOperands.ts, 349, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r6h4 = d >> E.b; >r6h4 : Symbol(r6h4, Decl(arithmeticOperatorWithInvalidOperands.ts, 350, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r6h5 = e >> E.b; >r6h5 : Symbol(r6h5, Decl(arithmeticOperatorWithInvalidOperands.ts, 351, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r6h6 = f >> E.b; >r6h6 : Symbol(r6h6, Decl(arithmeticOperatorWithInvalidOperands.ts, 352, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) @@ -1623,264 +1623,264 @@ var r6h6 = f >> E.b; // operator >>> var r7a1 = a >>> a; //ok >r7a1 : Symbol(r7a1, Decl(arithmeticOperatorWithInvalidOperands.ts, 355, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r7a2 = a >>> b; >r7a2 : Symbol(r7a2, Decl(arithmeticOperatorWithInvalidOperands.ts, 356, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r7a3 = a >>> c; //ok >r7a3 : Symbol(r7a3, Decl(arithmeticOperatorWithInvalidOperands.ts, 357, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r7a4 = a >>> d; >r7a4 : Symbol(r7a4, Decl(arithmeticOperatorWithInvalidOperands.ts, 358, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r7a5 = a >>> e; >r7a5 : Symbol(r7a5, Decl(arithmeticOperatorWithInvalidOperands.ts, 359, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r7a6 = a >>> f; >r7a6 : Symbol(r7a6, Decl(arithmeticOperatorWithInvalidOperands.ts, 360, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r7b1 = b >>> a; >r7b1 : Symbol(r7b1, Decl(arithmeticOperatorWithInvalidOperands.ts, 362, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r7b2 = b >>> b; >r7b2 : Symbol(r7b2, Decl(arithmeticOperatorWithInvalidOperands.ts, 363, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r7b3 = b >>> c; >r7b3 : Symbol(r7b3, Decl(arithmeticOperatorWithInvalidOperands.ts, 364, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r7b4 = b >>> d; >r7b4 : Symbol(r7b4, Decl(arithmeticOperatorWithInvalidOperands.ts, 365, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r7b5 = b >>> e; >r7b5 : Symbol(r7b5, Decl(arithmeticOperatorWithInvalidOperands.ts, 366, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r7b6 = b >>> f; >r7b6 : Symbol(r7b6, Decl(arithmeticOperatorWithInvalidOperands.ts, 367, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r7c1 = c >>> a; //ok >r7c1 : Symbol(r7c1, Decl(arithmeticOperatorWithInvalidOperands.ts, 369, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r7c2 = c >>> b; >r7c2 : Symbol(r7c2, Decl(arithmeticOperatorWithInvalidOperands.ts, 370, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r7c3 = c >>> c; //ok >r7c3 : Symbol(r7c3, Decl(arithmeticOperatorWithInvalidOperands.ts, 371, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r7c4 = c >>> d; >r7c4 : Symbol(r7c4, Decl(arithmeticOperatorWithInvalidOperands.ts, 372, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r7c5 = c >>> e; >r7c5 : Symbol(r7c5, Decl(arithmeticOperatorWithInvalidOperands.ts, 373, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r7c6 = c >>> f; >r7c6 : Symbol(r7c6, Decl(arithmeticOperatorWithInvalidOperands.ts, 374, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r7d1 = d >>> a; >r7d1 : Symbol(r7d1, Decl(arithmeticOperatorWithInvalidOperands.ts, 376, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r7d2 = d >>> b; >r7d2 : Symbol(r7d2, Decl(arithmeticOperatorWithInvalidOperands.ts, 377, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r7d3 = d >>> c; >r7d3 : Symbol(r7d3, Decl(arithmeticOperatorWithInvalidOperands.ts, 378, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r7d4 = d >>> d; >r7d4 : Symbol(r7d4, Decl(arithmeticOperatorWithInvalidOperands.ts, 379, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r7d5 = d >>> e; >r7d5 : Symbol(r7d5, Decl(arithmeticOperatorWithInvalidOperands.ts, 380, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r7d6 = d >>> f; >r7d6 : Symbol(r7d6, Decl(arithmeticOperatorWithInvalidOperands.ts, 381, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r7e1 = e >>> a; >r7e1 : Symbol(r7e1, Decl(arithmeticOperatorWithInvalidOperands.ts, 383, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r7e2 = e >>> b; >r7e2 : Symbol(r7e2, Decl(arithmeticOperatorWithInvalidOperands.ts, 384, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r7e3 = e >>> c; >r7e3 : Symbol(r7e3, Decl(arithmeticOperatorWithInvalidOperands.ts, 385, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r7e4 = e >>> d; >r7e4 : Symbol(r7e4, Decl(arithmeticOperatorWithInvalidOperands.ts, 386, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r7e5 = e >>> e; >r7e5 : Symbol(r7e5, Decl(arithmeticOperatorWithInvalidOperands.ts, 387, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r7e6 = e >>> f; >r7e6 : Symbol(r7e6, Decl(arithmeticOperatorWithInvalidOperands.ts, 388, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r7f1 = f >>> a; >r7f1 : Symbol(r7f1, Decl(arithmeticOperatorWithInvalidOperands.ts, 390, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r7f2 = f >>> b; >r7f2 : Symbol(r7f2, Decl(arithmeticOperatorWithInvalidOperands.ts, 391, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r7f3 = f >>> c; >r7f3 : Symbol(r7f3, Decl(arithmeticOperatorWithInvalidOperands.ts, 392, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r7f4 = f >>> d; >r7f4 : Symbol(r7f4, Decl(arithmeticOperatorWithInvalidOperands.ts, 393, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r7f5 = f >>> e; >r7f5 : Symbol(r7f5, Decl(arithmeticOperatorWithInvalidOperands.ts, 394, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r7f6 = f >>> f; >r7f6 : Symbol(r7f6, Decl(arithmeticOperatorWithInvalidOperands.ts, 395, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r7g1 = E.a >>> a; //ok >r7g1 : Symbol(r7g1, Decl(arithmeticOperatorWithInvalidOperands.ts, 397, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r7g2 = E.a >>> b; >r7g2 : Symbol(r7g2, Decl(arithmeticOperatorWithInvalidOperands.ts, 398, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r7g3 = E.a >>> c; //ok >r7g3 : Symbol(r7g3, Decl(arithmeticOperatorWithInvalidOperands.ts, 399, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r7g4 = E.a >>> d; >r7g4 : Symbol(r7g4, Decl(arithmeticOperatorWithInvalidOperands.ts, 400, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r7g5 = E.a >>> e; >r7g5 : Symbol(r7g5, Decl(arithmeticOperatorWithInvalidOperands.ts, 401, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r7g6 = E.a >>> f; >r7g6 : Symbol(r7g6, Decl(arithmeticOperatorWithInvalidOperands.ts, 402, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r7h1 = a >>> E.b; //ok >r7h1 : Symbol(r7h1, Decl(arithmeticOperatorWithInvalidOperands.ts, 404, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r7h2 = b >>> E.b; >r7h2 : Symbol(r7h2, Decl(arithmeticOperatorWithInvalidOperands.ts, 405, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r7h3 = c >>> E.b; //ok >r7h3 : Symbol(r7h3, Decl(arithmeticOperatorWithInvalidOperands.ts, 406, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r7h4 = d >>> E.b; >r7h4 : Symbol(r7h4, Decl(arithmeticOperatorWithInvalidOperands.ts, 407, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r7h5 = e >>> E.b; >r7h5 : Symbol(r7h5, Decl(arithmeticOperatorWithInvalidOperands.ts, 408, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r7h6 = f >>> E.b; >r7h6 : Symbol(r7h6, Decl(arithmeticOperatorWithInvalidOperands.ts, 409, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) @@ -1888,264 +1888,264 @@ var r7h6 = f >>> E.b; // operator & var r8a1 = a & a; //ok >r8a1 : Symbol(r8a1, Decl(arithmeticOperatorWithInvalidOperands.ts, 412, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r8a2 = a & b; >r8a2 : Symbol(r8a2, Decl(arithmeticOperatorWithInvalidOperands.ts, 413, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r8a3 = a & c; //ok >r8a3 : Symbol(r8a3, Decl(arithmeticOperatorWithInvalidOperands.ts, 414, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r8a4 = a & d; >r8a4 : Symbol(r8a4, Decl(arithmeticOperatorWithInvalidOperands.ts, 415, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r8a5 = a & e; >r8a5 : Symbol(r8a5, Decl(arithmeticOperatorWithInvalidOperands.ts, 416, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r8a6 = a & f; >r8a6 : Symbol(r8a6, Decl(arithmeticOperatorWithInvalidOperands.ts, 417, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r8b1 = b & a; >r8b1 : Symbol(r8b1, Decl(arithmeticOperatorWithInvalidOperands.ts, 419, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r8b2 = b & b; >r8b2 : Symbol(r8b2, Decl(arithmeticOperatorWithInvalidOperands.ts, 420, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r8b3 = b & c; >r8b3 : Symbol(r8b3, Decl(arithmeticOperatorWithInvalidOperands.ts, 421, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r8b4 = b & d; >r8b4 : Symbol(r8b4, Decl(arithmeticOperatorWithInvalidOperands.ts, 422, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r8b5 = b & e; >r8b5 : Symbol(r8b5, Decl(arithmeticOperatorWithInvalidOperands.ts, 423, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r8b6 = b & f; >r8b6 : Symbol(r8b6, Decl(arithmeticOperatorWithInvalidOperands.ts, 424, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r8c1 = c & a; //ok >r8c1 : Symbol(r8c1, Decl(arithmeticOperatorWithInvalidOperands.ts, 426, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r8c2 = c & b; >r8c2 : Symbol(r8c2, Decl(arithmeticOperatorWithInvalidOperands.ts, 427, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r8c3 = c & c; //ok >r8c3 : Symbol(r8c3, Decl(arithmeticOperatorWithInvalidOperands.ts, 428, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r8c4 = c & d; >r8c4 : Symbol(r8c4, Decl(arithmeticOperatorWithInvalidOperands.ts, 429, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r8c5 = c & e; >r8c5 : Symbol(r8c5, Decl(arithmeticOperatorWithInvalidOperands.ts, 430, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r8c6 = c & f; >r8c6 : Symbol(r8c6, Decl(arithmeticOperatorWithInvalidOperands.ts, 431, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r8d1 = d & a; >r8d1 : Symbol(r8d1, Decl(arithmeticOperatorWithInvalidOperands.ts, 433, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r8d2 = d & b; >r8d2 : Symbol(r8d2, Decl(arithmeticOperatorWithInvalidOperands.ts, 434, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r8d3 = d & c; >r8d3 : Symbol(r8d3, Decl(arithmeticOperatorWithInvalidOperands.ts, 435, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r8d4 = d & d; >r8d4 : Symbol(r8d4, Decl(arithmeticOperatorWithInvalidOperands.ts, 436, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r8d5 = d & e; >r8d5 : Symbol(r8d5, Decl(arithmeticOperatorWithInvalidOperands.ts, 437, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r8d6 = d & f; >r8d6 : Symbol(r8d6, Decl(arithmeticOperatorWithInvalidOperands.ts, 438, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r8e1 = e & a; >r8e1 : Symbol(r8e1, Decl(arithmeticOperatorWithInvalidOperands.ts, 440, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r8e2 = e & b; >r8e2 : Symbol(r8e2, Decl(arithmeticOperatorWithInvalidOperands.ts, 441, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r8e3 = e & c; >r8e3 : Symbol(r8e3, Decl(arithmeticOperatorWithInvalidOperands.ts, 442, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r8e4 = e & d; >r8e4 : Symbol(r8e4, Decl(arithmeticOperatorWithInvalidOperands.ts, 443, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r8e5 = e & e; >r8e5 : Symbol(r8e5, Decl(arithmeticOperatorWithInvalidOperands.ts, 444, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r8e6 = e & f; >r8e6 : Symbol(r8e6, Decl(arithmeticOperatorWithInvalidOperands.ts, 445, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r8f1 = f & a; >r8f1 : Symbol(r8f1, Decl(arithmeticOperatorWithInvalidOperands.ts, 447, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r8f2 = f & b; >r8f2 : Symbol(r8f2, Decl(arithmeticOperatorWithInvalidOperands.ts, 448, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r8f3 = f & c; >r8f3 : Symbol(r8f3, Decl(arithmeticOperatorWithInvalidOperands.ts, 449, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r8f4 = f & d; >r8f4 : Symbol(r8f4, Decl(arithmeticOperatorWithInvalidOperands.ts, 450, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r8f5 = f & e; >r8f5 : Symbol(r8f5, Decl(arithmeticOperatorWithInvalidOperands.ts, 451, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r8f6 = f & f; >r8f6 : Symbol(r8f6, Decl(arithmeticOperatorWithInvalidOperands.ts, 452, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r8g1 = E.a & a; //ok >r8g1 : Symbol(r8g1, Decl(arithmeticOperatorWithInvalidOperands.ts, 454, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r8g2 = E.a & b; >r8g2 : Symbol(r8g2, Decl(arithmeticOperatorWithInvalidOperands.ts, 455, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r8g3 = E.a & c; //ok >r8g3 : Symbol(r8g3, Decl(arithmeticOperatorWithInvalidOperands.ts, 456, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r8g4 = E.a & d; >r8g4 : Symbol(r8g4, Decl(arithmeticOperatorWithInvalidOperands.ts, 457, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r8g5 = E.a & e; >r8g5 : Symbol(r8g5, Decl(arithmeticOperatorWithInvalidOperands.ts, 458, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r8g6 = E.a & f; >r8g6 : Symbol(r8g6, Decl(arithmeticOperatorWithInvalidOperands.ts, 459, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r8h1 = a & E.b; //ok >r8h1 : Symbol(r8h1, Decl(arithmeticOperatorWithInvalidOperands.ts, 461, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r8h2 = b & E.b; >r8h2 : Symbol(r8h2, Decl(arithmeticOperatorWithInvalidOperands.ts, 462, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r8h3 = c & E.b; //ok >r8h3 : Symbol(r8h3, Decl(arithmeticOperatorWithInvalidOperands.ts, 463, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r8h4 = d & E.b; >r8h4 : Symbol(r8h4, Decl(arithmeticOperatorWithInvalidOperands.ts, 464, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r8h5 = e & E.b; >r8h5 : Symbol(r8h5, Decl(arithmeticOperatorWithInvalidOperands.ts, 465, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r8h6 = f & E.b; >r8h6 : Symbol(r8h6, Decl(arithmeticOperatorWithInvalidOperands.ts, 466, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) @@ -2153,264 +2153,264 @@ var r8h6 = f & E.b; // operator ^ var r9a1 = a ^ a; //ok >r9a1 : Symbol(r9a1, Decl(arithmeticOperatorWithInvalidOperands.ts, 469, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r9a2 = a ^ b; >r9a2 : Symbol(r9a2, Decl(arithmeticOperatorWithInvalidOperands.ts, 470, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r9a3 = a ^ c; //ok >r9a3 : Symbol(r9a3, Decl(arithmeticOperatorWithInvalidOperands.ts, 471, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r9a4 = a ^ d; >r9a4 : Symbol(r9a4, Decl(arithmeticOperatorWithInvalidOperands.ts, 472, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r9a5 = a ^ e; >r9a5 : Symbol(r9a5, Decl(arithmeticOperatorWithInvalidOperands.ts, 473, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r9a6 = a ^ f; >r9a6 : Symbol(r9a6, Decl(arithmeticOperatorWithInvalidOperands.ts, 474, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r9b1 = b ^ a; >r9b1 : Symbol(r9b1, Decl(arithmeticOperatorWithInvalidOperands.ts, 476, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r9b2 = b ^ b; >r9b2 : Symbol(r9b2, Decl(arithmeticOperatorWithInvalidOperands.ts, 477, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r9b3 = b ^ c; >r9b3 : Symbol(r9b3, Decl(arithmeticOperatorWithInvalidOperands.ts, 478, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r9b4 = b ^ d; >r9b4 : Symbol(r9b4, Decl(arithmeticOperatorWithInvalidOperands.ts, 479, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r9b5 = b ^ e; >r9b5 : Symbol(r9b5, Decl(arithmeticOperatorWithInvalidOperands.ts, 480, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r9b6 = b ^ f; >r9b6 : Symbol(r9b6, Decl(arithmeticOperatorWithInvalidOperands.ts, 481, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r9c1 = c ^ a; //ok >r9c1 : Symbol(r9c1, Decl(arithmeticOperatorWithInvalidOperands.ts, 483, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r9c2 = c ^ b; >r9c2 : Symbol(r9c2, Decl(arithmeticOperatorWithInvalidOperands.ts, 484, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r9c3 = c ^ c; //ok >r9c3 : Symbol(r9c3, Decl(arithmeticOperatorWithInvalidOperands.ts, 485, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r9c4 = c ^ d; >r9c4 : Symbol(r9c4, Decl(arithmeticOperatorWithInvalidOperands.ts, 486, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r9c5 = c ^ e; >r9c5 : Symbol(r9c5, Decl(arithmeticOperatorWithInvalidOperands.ts, 487, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r9c6 = c ^ f; >r9c6 : Symbol(r9c6, Decl(arithmeticOperatorWithInvalidOperands.ts, 488, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r9d1 = d ^ a; >r9d1 : Symbol(r9d1, Decl(arithmeticOperatorWithInvalidOperands.ts, 490, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r9d2 = d ^ b; >r9d2 : Symbol(r9d2, Decl(arithmeticOperatorWithInvalidOperands.ts, 491, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r9d3 = d ^ c; >r9d3 : Symbol(r9d3, Decl(arithmeticOperatorWithInvalidOperands.ts, 492, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r9d4 = d ^ d; >r9d4 : Symbol(r9d4, Decl(arithmeticOperatorWithInvalidOperands.ts, 493, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r9d5 = d ^ e; >r9d5 : Symbol(r9d5, Decl(arithmeticOperatorWithInvalidOperands.ts, 494, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r9d6 = d ^ f; >r9d6 : Symbol(r9d6, Decl(arithmeticOperatorWithInvalidOperands.ts, 495, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r9e1 = e ^ a; >r9e1 : Symbol(r9e1, Decl(arithmeticOperatorWithInvalidOperands.ts, 497, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r9e2 = e ^ b; >r9e2 : Symbol(r9e2, Decl(arithmeticOperatorWithInvalidOperands.ts, 498, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r9e3 = e ^ c; >r9e3 : Symbol(r9e3, Decl(arithmeticOperatorWithInvalidOperands.ts, 499, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r9e4 = e ^ d; >r9e4 : Symbol(r9e4, Decl(arithmeticOperatorWithInvalidOperands.ts, 500, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r9e5 = e ^ e; >r9e5 : Symbol(r9e5, Decl(arithmeticOperatorWithInvalidOperands.ts, 501, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r9e6 = e ^ f; >r9e6 : Symbol(r9e6, Decl(arithmeticOperatorWithInvalidOperands.ts, 502, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r9f1 = f ^ a; >r9f1 : Symbol(r9f1, Decl(arithmeticOperatorWithInvalidOperands.ts, 504, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r9f2 = f ^ b; >r9f2 : Symbol(r9f2, Decl(arithmeticOperatorWithInvalidOperands.ts, 505, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r9f3 = f ^ c; >r9f3 : Symbol(r9f3, Decl(arithmeticOperatorWithInvalidOperands.ts, 506, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r9f4 = f ^ d; >r9f4 : Symbol(r9f4, Decl(arithmeticOperatorWithInvalidOperands.ts, 507, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r9f5 = f ^ e; >r9f5 : Symbol(r9f5, Decl(arithmeticOperatorWithInvalidOperands.ts, 508, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r9f6 = f ^ f; >r9f6 : Symbol(r9f6, Decl(arithmeticOperatorWithInvalidOperands.ts, 509, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r9g1 = E.a ^ a; //ok >r9g1 : Symbol(r9g1, Decl(arithmeticOperatorWithInvalidOperands.ts, 511, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r9g2 = E.a ^ b; >r9g2 : Symbol(r9g2, Decl(arithmeticOperatorWithInvalidOperands.ts, 512, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r9g3 = E.a ^ c; //ok >r9g3 : Symbol(r9g3, Decl(arithmeticOperatorWithInvalidOperands.ts, 513, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r9g4 = E.a ^ d; >r9g4 : Symbol(r9g4, Decl(arithmeticOperatorWithInvalidOperands.ts, 514, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r9g5 = E.a ^ e; >r9g5 : Symbol(r9g5, Decl(arithmeticOperatorWithInvalidOperands.ts, 515, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r9g6 = E.a ^ f; >r9g6 : Symbol(r9g6, Decl(arithmeticOperatorWithInvalidOperands.ts, 516, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r9h1 = a ^ E.b; //ok >r9h1 : Symbol(r9h1, Decl(arithmeticOperatorWithInvalidOperands.ts, 518, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r9h2 = b ^ E.b; >r9h2 : Symbol(r9h2, Decl(arithmeticOperatorWithInvalidOperands.ts, 519, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r9h3 = c ^ E.b; //ok >r9h3 : Symbol(r9h3, Decl(arithmeticOperatorWithInvalidOperands.ts, 520, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r9h4 = d ^ E.b; >r9h4 : Symbol(r9h4, Decl(arithmeticOperatorWithInvalidOperands.ts, 521, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r9h5 = e ^ E.b; >r9h5 : Symbol(r9h5, Decl(arithmeticOperatorWithInvalidOperands.ts, 522, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r9h6 = f ^ E.b; >r9h6 : Symbol(r9h6, Decl(arithmeticOperatorWithInvalidOperands.ts, 523, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) @@ -2418,264 +2418,264 @@ var r9h6 = f ^ E.b; // operator | var r10a1 = a | a; //ok >r10a1 : Symbol(r10a1, Decl(arithmeticOperatorWithInvalidOperands.ts, 526, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r10a2 = a | b; >r10a2 : Symbol(r10a2, Decl(arithmeticOperatorWithInvalidOperands.ts, 527, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r10a3 = a | c; //ok >r10a3 : Symbol(r10a3, Decl(arithmeticOperatorWithInvalidOperands.ts, 528, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r10a4 = a | d; >r10a4 : Symbol(r10a4, Decl(arithmeticOperatorWithInvalidOperands.ts, 529, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r10a5 = a | e; >r10a5 : Symbol(r10a5, Decl(arithmeticOperatorWithInvalidOperands.ts, 530, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r10a6 = a | f; >r10a6 : Symbol(r10a6, Decl(arithmeticOperatorWithInvalidOperands.ts, 531, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r10b1 = b | a; >r10b1 : Symbol(r10b1, Decl(arithmeticOperatorWithInvalidOperands.ts, 533, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r10b2 = b | b; >r10b2 : Symbol(r10b2, Decl(arithmeticOperatorWithInvalidOperands.ts, 534, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r10b3 = b | c; >r10b3 : Symbol(r10b3, Decl(arithmeticOperatorWithInvalidOperands.ts, 535, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r10b4 = b | d; >r10b4 : Symbol(r10b4, Decl(arithmeticOperatorWithInvalidOperands.ts, 536, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r10b5 = b | e; >r10b5 : Symbol(r10b5, Decl(arithmeticOperatorWithInvalidOperands.ts, 537, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r10b6 = b | f; >r10b6 : Symbol(r10b6, Decl(arithmeticOperatorWithInvalidOperands.ts, 538, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r10c1 = c | a; //ok >r10c1 : Symbol(r10c1, Decl(arithmeticOperatorWithInvalidOperands.ts, 540, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r10c2 = c | b; >r10c2 : Symbol(r10c2, Decl(arithmeticOperatorWithInvalidOperands.ts, 541, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r10c3 = c | c; //ok >r10c3 : Symbol(r10c3, Decl(arithmeticOperatorWithInvalidOperands.ts, 542, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r10c4 = c | d; >r10c4 : Symbol(r10c4, Decl(arithmeticOperatorWithInvalidOperands.ts, 543, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r10c5 = c | e; >r10c5 : Symbol(r10c5, Decl(arithmeticOperatorWithInvalidOperands.ts, 544, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r10c6 = c | f; >r10c6 : Symbol(r10c6, Decl(arithmeticOperatorWithInvalidOperands.ts, 545, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r10d1 = d | a; >r10d1 : Symbol(r10d1, Decl(arithmeticOperatorWithInvalidOperands.ts, 547, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r10d2 = d | b; >r10d2 : Symbol(r10d2, Decl(arithmeticOperatorWithInvalidOperands.ts, 548, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r10d3 = d | c; >r10d3 : Symbol(r10d3, Decl(arithmeticOperatorWithInvalidOperands.ts, 549, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r10d4 = d | d; >r10d4 : Symbol(r10d4, Decl(arithmeticOperatorWithInvalidOperands.ts, 550, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r10d5 = d | e; >r10d5 : Symbol(r10d5, Decl(arithmeticOperatorWithInvalidOperands.ts, 551, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r10d6 = d | f; >r10d6 : Symbol(r10d6, Decl(arithmeticOperatorWithInvalidOperands.ts, 552, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r10e1 = e | a; >r10e1 : Symbol(r10e1, Decl(arithmeticOperatorWithInvalidOperands.ts, 554, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r10e2 = e | b; >r10e2 : Symbol(r10e2, Decl(arithmeticOperatorWithInvalidOperands.ts, 555, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r10e3 = e | c; >r10e3 : Symbol(r10e3, Decl(arithmeticOperatorWithInvalidOperands.ts, 556, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r10e4 = e | d; >r10e4 : Symbol(r10e4, Decl(arithmeticOperatorWithInvalidOperands.ts, 557, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r10e5 = e | e; >r10e5 : Symbol(r10e5, Decl(arithmeticOperatorWithInvalidOperands.ts, 558, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r10e6 = e | f; >r10e6 : Symbol(r10e6, Decl(arithmeticOperatorWithInvalidOperands.ts, 559, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r10f1 = f | a; >r10f1 : Symbol(r10f1, Decl(arithmeticOperatorWithInvalidOperands.ts, 561, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r10f2 = f | b; >r10f2 : Symbol(r10f2, Decl(arithmeticOperatorWithInvalidOperands.ts, 562, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r10f3 = f | c; >r10f3 : Symbol(r10f3, Decl(arithmeticOperatorWithInvalidOperands.ts, 563, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r10f4 = f | d; >r10f4 : Symbol(r10f4, Decl(arithmeticOperatorWithInvalidOperands.ts, 564, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r10f5 = f | e; >r10f5 : Symbol(r10f5, Decl(arithmeticOperatorWithInvalidOperands.ts, 565, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r10f6 = f | f; >r10f6 : Symbol(r10f6, Decl(arithmeticOperatorWithInvalidOperands.ts, 566, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r10g1 = E.a | a; //ok >r10g1 : Symbol(r10g1, Decl(arithmeticOperatorWithInvalidOperands.ts, 568, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) var r10g2 = E.a | b; >r10g2 : Symbol(r10g2, Decl(arithmeticOperatorWithInvalidOperands.ts, 569, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) var r10g3 = E.a | c; //ok >r10g3 : Symbol(r10g3, Decl(arithmeticOperatorWithInvalidOperands.ts, 570, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) var r10g4 = E.a | d; >r10g4 : Symbol(r10g4, Decl(arithmeticOperatorWithInvalidOperands.ts, 571, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) var r10g5 = E.a | e; >r10g5 : Symbol(r10g5, Decl(arithmeticOperatorWithInvalidOperands.ts, 572, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) var r10g6 = E.a | f; >r10g6 : Symbol(r10g6, Decl(arithmeticOperatorWithInvalidOperands.ts, 573, 3)) >E.a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >a : Symbol(E.a, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 8)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) var r10h1 = a | E.b; //ok >r10h1 : Symbol(r10h1, Decl(arithmeticOperatorWithInvalidOperands.ts, 575, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithInvalidOperands.ts, 4, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r10h2 = b | E.b; >r10h2 : Symbol(r10h2, Decl(arithmeticOperatorWithInvalidOperands.ts, 576, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithInvalidOperands.ts, 5, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r10h3 = c | E.b; //ok >r10h3 : Symbol(r10h3, Decl(arithmeticOperatorWithInvalidOperands.ts, 577, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithInvalidOperands.ts, 6, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r10h4 = d | E.b; >r10h4 : Symbol(r10h4, Decl(arithmeticOperatorWithInvalidOperands.ts, 578, 3)) ->d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 3)) +>d : Symbol(d, Decl(arithmeticOperatorWithInvalidOperands.ts, 7, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r10h5 = e | E.b; >r10h5 : Symbol(r10h5, Decl(arithmeticOperatorWithInvalidOperands.ts, 579, 3)) ->e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 3)) +>e : Symbol(e, Decl(arithmeticOperatorWithInvalidOperands.ts, 8, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) var r10h6 = f | E.b; >r10h6 : Symbol(r10h6, Decl(arithmeticOperatorWithInvalidOperands.ts, 580, 3)) ->f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 3)) +>f : Symbol(f, Decl(arithmeticOperatorWithInvalidOperands.ts, 9, 11)) >E.b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) >E : Symbol(E, Decl(arithmeticOperatorWithInvalidOperands.ts, 0, 0)) >b : Symbol(E.b, Decl(arithmeticOperatorWithInvalidOperands.ts, 2, 11)) diff --git a/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.types b/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.types index f891e3ee4fbc7..1cef952e10efa 100644 --- a/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.types +++ b/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.types @@ -13,29 +13,29 @@ enum E { a, b, c } >c : E.c > : ^^^ -var a: any; +declare var a: any; >a : any > : ^^^ -var b: boolean; +declare var b: boolean; >b : boolean > : ^^^^^^^ -var c: number; +declare var c: number; >c : number > : ^^^^^^ -var d: string; +declare var d: string; >d : string > : ^^^^^^ -var e: { a: number }; +declare var e: { a: number }; >e : { a: number; } > : ^^^^^ ^^^ >a : number > : ^^^^^^ -var f: Number; +declare var f: Number; >f : Number > : ^^^^^^ diff --git a/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.errors.txt b/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.errors.txt index 2d254bda40710..a71c0deaa7922 100644 --- a/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.errors.txt +++ b/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.errors.txt @@ -244,9 +244,9 @@ arithmeticOperatorWithNullValueAndInvalidOperands.ts(176,18): error TS18050: The // If one operand is the null or undefined value, it is treated as having the type of the // other operand. - var a: boolean; - var b: string; - var c: Object; + declare var a: boolean; + declare var b: string; + declare var c: Object; // operator * var r1a1 = null * a; diff --git a/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.js b/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.js index 244abd14561e6..9cd24a96541d2 100644 --- a/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.js +++ b/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.js @@ -4,9 +4,9 @@ // If one operand is the null or undefined value, it is treated as having the type of the // other operand. -var a: boolean; -var b: string; -var c: Object; +declare var a: boolean; +declare var b: string; +declare var c: Object; // operator * var r1a1 = null * a; @@ -181,9 +181,6 @@ var r10d3 = {} | null; //// [arithmeticOperatorWithNullValueAndInvalidOperands.js] // If one operand is the null or undefined value, it is treated as having the type of the // other operand. -var a; -var b; -var c; // operator * var r1a1 = null * a; var r1a2 = null * b; diff --git a/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.symbols b/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.symbols index 09060fcd5f1ca..d5ba2cf80d8c7 100644 --- a/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.symbols +++ b/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.symbols @@ -4,40 +4,40 @@ // If one operand is the null or undefined value, it is treated as having the type of the // other operand. -var a: boolean; ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 3)) +declare var a: boolean; +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 11)) -var b: string; ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 3)) +declare var b: string; +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 11)) -var c: Object; ->c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 3)) +declare var c: Object; +>c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 11)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) // operator * var r1a1 = null * a; >r1a1 : Symbol(r1a1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 8, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 11)) var r1a2 = null * b; >r1a2 : Symbol(r1a2, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 9, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 11)) var r1a3 = null * c; >r1a3 : Symbol(r1a3, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 10, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 11)) var r1b1 = a * null; >r1b1 : Symbol(r1b1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 12, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 11)) var r1b2 = b * null; >r1b2 : Symbol(r1b2, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 13, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 11)) var r1b3 = c * null; >r1b3 : Symbol(r1b3, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 14, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 11)) var r1c1 = null * true; >r1c1 : Symbol(r1c1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 16, 3)) @@ -60,27 +60,27 @@ var r1d3 = {} * null; // operator / var r2a1 = null / a; >r2a1 : Symbol(r2a1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 25, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 11)) var r2a2 = null / b; >r2a2 : Symbol(r2a2, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 26, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 11)) var r2a3 = null / c; >r2a3 : Symbol(r2a3, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 27, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 11)) var r2b1 = a / null; >r2b1 : Symbol(r2b1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 29, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 11)) var r2b2 = b / null; >r2b2 : Symbol(r2b2, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 30, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 11)) var r2b3 = c / null; >r2b3 : Symbol(r2b3, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 31, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 11)) var r2c1 = null / true; >r2c1 : Symbol(r2c1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 33, 3)) @@ -103,27 +103,27 @@ var r2d3 = {} / null; // operator % var r3a1 = null % a; >r3a1 : Symbol(r3a1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 42, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 11)) var r3a2 = null % b; >r3a2 : Symbol(r3a2, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 43, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 11)) var r3a3 = null % c; >r3a3 : Symbol(r3a3, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 44, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 11)) var r3b1 = a % null; >r3b1 : Symbol(r3b1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 46, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 11)) var r3b2 = b % null; >r3b2 : Symbol(r3b2, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 47, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 11)) var r3b3 = c % null; >r3b3 : Symbol(r3b3, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 48, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 11)) var r3c1 = null % true; >r3c1 : Symbol(r3c1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 50, 3)) @@ -146,27 +146,27 @@ var r3d3 = {} % null; // operator - var r4a1 = null - a; >r4a1 : Symbol(r4a1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 59, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 11)) var r4a2 = null - b; >r4a2 : Symbol(r4a2, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 60, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 11)) var r4a3 = null - c; >r4a3 : Symbol(r4a3, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 61, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 11)) var r4b1 = a - null; >r4b1 : Symbol(r4b1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 63, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 11)) var r4b2 = b - null; >r4b2 : Symbol(r4b2, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 64, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 11)) var r4b3 = c - null; >r4b3 : Symbol(r4b3, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 65, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 11)) var r4c1 = null - true; >r4c1 : Symbol(r4c1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 67, 3)) @@ -189,27 +189,27 @@ var r4d3 = {} - null; // operator << var r5a1 = null << a; >r5a1 : Symbol(r5a1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 76, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 11)) var r5a2 = null << b; >r5a2 : Symbol(r5a2, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 77, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 11)) var r5a3 = null << c; >r5a3 : Symbol(r5a3, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 78, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 11)) var r5b1 = a << null; >r5b1 : Symbol(r5b1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 80, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 11)) var r5b2 = b << null; >r5b2 : Symbol(r5b2, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 81, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 11)) var r5b3 = c << null; >r5b3 : Symbol(r5b3, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 82, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 11)) var r5c1 = null << true; >r5c1 : Symbol(r5c1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 84, 3)) @@ -232,27 +232,27 @@ var r5d3 = {} << null; // operator >> var r6a1 = null >> a; >r6a1 : Symbol(r6a1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 93, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 11)) var r6a2 = null >> b; >r6a2 : Symbol(r6a2, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 94, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 11)) var r6a3 = null >> c; >r6a3 : Symbol(r6a3, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 95, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 11)) var r6b1 = a >> null; >r6b1 : Symbol(r6b1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 97, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 11)) var r6b2 = b >> null; >r6b2 : Symbol(r6b2, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 98, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 11)) var r6b3 = c >> null; >r6b3 : Symbol(r6b3, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 99, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 11)) var r6c1 = null >> true; >r6c1 : Symbol(r6c1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 101, 3)) @@ -275,27 +275,27 @@ var r6d3 = {} >> null; // operator >>> var r7a1 = null >>> a; >r7a1 : Symbol(r7a1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 110, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 11)) var r7a2 = null >>> b; >r7a2 : Symbol(r7a2, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 111, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 11)) var r7a3 = null >>> c; >r7a3 : Symbol(r7a3, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 112, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 11)) var r7b1 = a >>> null; >r7b1 : Symbol(r7b1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 114, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 11)) var r7b2 = b >>> null; >r7b2 : Symbol(r7b2, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 115, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 11)) var r7b3 = c >>> null; >r7b3 : Symbol(r7b3, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 116, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 11)) var r7c1 = null >>> true; >r7c1 : Symbol(r7c1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 118, 3)) @@ -318,27 +318,27 @@ var r7d3 = {} >>> null; // operator & var r8a1 = null & a; >r8a1 : Symbol(r8a1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 127, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 11)) var r8a2 = null & b; >r8a2 : Symbol(r8a2, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 128, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 11)) var r8a3 = null & c; >r8a3 : Symbol(r8a3, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 129, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 11)) var r8b1 = a & null; >r8b1 : Symbol(r8b1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 131, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 11)) var r8b2 = b & null; >r8b2 : Symbol(r8b2, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 132, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 11)) var r8b3 = c & null; >r8b3 : Symbol(r8b3, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 133, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 11)) var r8c1 = null & true; >r8c1 : Symbol(r8c1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 135, 3)) @@ -361,27 +361,27 @@ var r8d3 = {} & null; // operator ^ var r9a1 = null ^ a; >r9a1 : Symbol(r9a1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 144, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 11)) var r9a2 = null ^ b; >r9a2 : Symbol(r9a2, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 145, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 11)) var r9a3 = null ^ c; >r9a3 : Symbol(r9a3, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 146, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 11)) var r9b1 = a ^ null; >r9b1 : Symbol(r9b1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 148, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 11)) var r9b2 = b ^ null; >r9b2 : Symbol(r9b2, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 149, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 11)) var r9b3 = c ^ null; >r9b3 : Symbol(r9b3, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 150, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 11)) var r9c1 = null ^ true; >r9c1 : Symbol(r9c1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 152, 3)) @@ -404,27 +404,27 @@ var r9d3 = {} ^ null; // operator | var r10a1 = null | a; >r10a1 : Symbol(r10a1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 161, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 11)) var r10a2 = null | b; >r10a2 : Symbol(r10a2, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 162, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 11)) var r10a3 = null | c; >r10a3 : Symbol(r10a3, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 163, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 11)) var r10b1 = a | null; >r10b1 : Symbol(r10b1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 165, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 3, 11)) var r10b2 = b | null; >r10b2 : Symbol(r10b2, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 166, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 4, 11)) var r10b3 = c | null; >r10b3 : Symbol(r10b3, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 167, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 5, 11)) var r10c1 = null | true; >r10c1 : Symbol(r10c1, Decl(arithmeticOperatorWithNullValueAndInvalidOperands.ts, 169, 3)) diff --git a/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.types b/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.types index ba7ec86c6502b..8701591dc517b 100644 --- a/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.types +++ b/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.types @@ -4,15 +4,15 @@ // If one operand is the null or undefined value, it is treated as having the type of the // other operand. -var a: boolean; +declare var a: boolean; >a : boolean > : ^^^^^^^ -var b: string; +declare var b: string; >b : string > : ^^^^^^ -var c: Object; +declare var c: Object; >c : Object > : ^^^^^^ diff --git a/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.errors.txt b/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.errors.txt index dbb3c8ee7036a..4a4e273a4ac82 100644 --- a/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.errors.txt +++ b/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.errors.txt @@ -89,8 +89,8 @@ arithmeticOperatorWithNullValueAndValidOperands.ts(110,17): error TS18050: The v b } - var a: any; - var b: number; + declare var a: any; + declare var b: number; // operator * var ra1 = null * a; diff --git a/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.js b/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.js index fa3b897c3cc54..eef8b00890737 100644 --- a/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.js +++ b/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.js @@ -9,8 +9,8 @@ enum E { b } -var a: any; -var b: number; +declare var a: any; +declare var b: number; // operator * var ra1 = null * a; @@ -120,8 +120,6 @@ var E; E[E["a"] = 0] = "a"; E[E["b"] = 1] = "b"; })(E || (E = {})); -var a; -var b; // operator * var ra1 = null * a; var ra2 = null * b; diff --git a/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.symbols b/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.symbols index 971e192d68aa7..16429a1b9a7a2 100644 --- a/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.symbols +++ b/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.symbols @@ -14,20 +14,20 @@ enum E { >b : Symbol(E.b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 4, 6)) } -var a: any; ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 3)) +declare var a: any; +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 11)) -var b: number; ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 3)) +declare var b: number; +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 11)) // operator * var ra1 = null * a; >ra1 : Symbol(ra1, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 12, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 11)) var ra2 = null * b; >ra2 : Symbol(ra2, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 13, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 11)) var ra3 = null * 1; >ra3 : Symbol(ra3, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 14, 3)) @@ -40,11 +40,11 @@ var ra4 = null * E.a; var ra5 = a * null; >ra5 : Symbol(ra5, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 16, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 11)) var ra6 = b * null; >ra6 : Symbol(ra6, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 17, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 11)) var ra7 = 0 * null; >ra7 : Symbol(ra7, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 18, 3)) @@ -58,11 +58,11 @@ var ra8 = E.b * null; // operator / var rb1 = null / a; >rb1 : Symbol(rb1, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 22, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 11)) var rb2 = null / b; >rb2 : Symbol(rb2, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 23, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 11)) var rb3 = null / 1; >rb3 : Symbol(rb3, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 24, 3)) @@ -75,11 +75,11 @@ var rb4 = null / E.a; var rb5 = a / null; >rb5 : Symbol(rb5, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 26, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 11)) var rb6 = b / null; >rb6 : Symbol(rb6, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 27, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 11)) var rb7 = 0 / null; >rb7 : Symbol(rb7, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 28, 3)) @@ -93,11 +93,11 @@ var rb8 = E.b / null; // operator % var rc1 = null % a; >rc1 : Symbol(rc1, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 32, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 11)) var rc2 = null % b; >rc2 : Symbol(rc2, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 33, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 11)) var rc3 = null % 1; >rc3 : Symbol(rc3, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 34, 3)) @@ -110,11 +110,11 @@ var rc4 = null % E.a; var rc5 = a % null; >rc5 : Symbol(rc5, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 36, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 11)) var rc6 = b % null; >rc6 : Symbol(rc6, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 37, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 11)) var rc7 = 0 % null; >rc7 : Symbol(rc7, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 38, 3)) @@ -128,11 +128,11 @@ var rc8 = E.b % null; // operator - var rd1 = null - a; >rd1 : Symbol(rd1, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 42, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 11)) var rd2 = null - b; >rd2 : Symbol(rd2, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 43, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 11)) var rd3 = null - 1; >rd3 : Symbol(rd3, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 44, 3)) @@ -145,11 +145,11 @@ var rd4 = null - E.a; var rd5 = a - null; >rd5 : Symbol(rd5, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 46, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 11)) var rd6 = b - null; >rd6 : Symbol(rd6, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 47, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 11)) var rd7 = 0 - null; >rd7 : Symbol(rd7, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 48, 3)) @@ -163,11 +163,11 @@ var rd8 = E.b - null; // operator << var re1 = null << a; >re1 : Symbol(re1, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 52, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 11)) var re2 = null << b; >re2 : Symbol(re2, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 53, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 11)) var re3 = null << 1; >re3 : Symbol(re3, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 54, 3)) @@ -180,11 +180,11 @@ var re4 = null << E.a; var re5 = a << null; >re5 : Symbol(re5, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 56, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 11)) var re6 = b << null; >re6 : Symbol(re6, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 57, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 11)) var re7 = 0 << null; >re7 : Symbol(re7, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 58, 3)) @@ -198,11 +198,11 @@ var re8 = E.b << null; // operator >> var rf1 = null >> a; >rf1 : Symbol(rf1, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 62, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 11)) var rf2 = null >> b; >rf2 : Symbol(rf2, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 63, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 11)) var rf3 = null >> 1; >rf3 : Symbol(rf3, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 64, 3)) @@ -215,11 +215,11 @@ var rf4 = null >> E.a; var rf5 = a >> null; >rf5 : Symbol(rf5, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 66, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 11)) var rf6 = b >> null; >rf6 : Symbol(rf6, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 67, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 11)) var rf7 = 0 >> null; >rf7 : Symbol(rf7, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 68, 3)) @@ -233,11 +233,11 @@ var rf8 = E.b >> null; // operator >>> var rg1 = null >>> a; >rg1 : Symbol(rg1, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 72, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 11)) var rg2 = null >>> b; >rg2 : Symbol(rg2, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 73, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 11)) var rg3 = null >>> 1; >rg3 : Symbol(rg3, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 74, 3)) @@ -250,11 +250,11 @@ var rg4 = null >>> E.a; var rg5 = a >>> null; >rg5 : Symbol(rg5, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 76, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 11)) var rg6 = b >>> null; >rg6 : Symbol(rg6, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 77, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 11)) var rg7 = 0 >>> null; >rg7 : Symbol(rg7, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 78, 3)) @@ -268,11 +268,11 @@ var rg8 = E.b >>> null; // operator & var rh1 = null & a; >rh1 : Symbol(rh1, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 82, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 11)) var rh2 = null & b; >rh2 : Symbol(rh2, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 83, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 11)) var rh3 = null & 1; >rh3 : Symbol(rh3, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 84, 3)) @@ -285,11 +285,11 @@ var rh4 = null & E.a; var rh5 = a & null; >rh5 : Symbol(rh5, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 86, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 11)) var rh6 = b & null; >rh6 : Symbol(rh6, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 87, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 11)) var rh7 = 0 & null; >rh7 : Symbol(rh7, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 88, 3)) @@ -303,11 +303,11 @@ var rh8 = E.b & null; // operator ^ var ri1 = null ^ a; >ri1 : Symbol(ri1, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 92, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 11)) var ri2 = null ^ b; >ri2 : Symbol(ri2, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 93, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 11)) var ri3 = null ^ 1; >ri3 : Symbol(ri3, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 94, 3)) @@ -320,11 +320,11 @@ var ri4 = null ^ E.a; var ri5 = a ^ null; >ri5 : Symbol(ri5, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 96, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 11)) var ri6 = b ^ null; >ri6 : Symbol(ri6, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 97, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 11)) var ri7 = 0 ^ null; >ri7 : Symbol(ri7, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 98, 3)) @@ -338,11 +338,11 @@ var ri8 = E.b ^ null; // operator | var rj1 = null | a; >rj1 : Symbol(rj1, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 102, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 11)) var rj2 = null | b; >rj2 : Symbol(rj2, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 103, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 11)) var rj3 = null | 1; >rj3 : Symbol(rj3, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 104, 3)) @@ -355,11 +355,11 @@ var rj4 = null | E.a; var rj5 = a | null; >rj5 : Symbol(rj5, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 106, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 8, 11)) var rj6 = b | null; >rj6 : Symbol(rj6, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 107, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 9, 11)) var rj7 = 0 | null; >rj7 : Symbol(rj7, Decl(arithmeticOperatorWithNullValueAndValidOperands.ts, 108, 3)) diff --git a/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.types b/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.types index 98cc230a9471c..028613f87ccdc 100644 --- a/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.types +++ b/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.types @@ -17,11 +17,11 @@ enum E { > : ^^^ } -var a: any; +declare var a: any; >a : any > : ^^^ -var b: number; +declare var b: number; >b : number > : ^^^^^^ diff --git a/tests/baselines/reference/arithmeticOperatorWithTypeParameter.errors.txt b/tests/baselines/reference/arithmeticOperatorWithTypeParameter.errors.txt index 8d895278b97f7..f64a079e3ca9b 100644 --- a/tests/baselines/reference/arithmeticOperatorWithTypeParameter.errors.txt +++ b/tests/baselines/reference/arithmeticOperatorWithTypeParameter.errors.txt @@ -183,11 +183,11 @@ arithmeticOperatorWithTypeParameter.ts(128,21): error TS2363: The right-hand sid ==== arithmeticOperatorWithTypeParameter.ts (180 errors) ==== // type parameter type is not valid for arithmetic operand function foo(t: T) { - var a: any; - var b: boolean; - var c: number; - var d: string; - var e: {}; + let a!: any; + let b!: boolean; + let c!: number; + let d!: string; + let e!: {}; var r1a1 = a * t; ~ diff --git a/tests/baselines/reference/arithmeticOperatorWithTypeParameter.js b/tests/baselines/reference/arithmeticOperatorWithTypeParameter.js index 6c76194913b6e..b25225c6e579a 100644 --- a/tests/baselines/reference/arithmeticOperatorWithTypeParameter.js +++ b/tests/baselines/reference/arithmeticOperatorWithTypeParameter.js @@ -3,11 +3,11 @@ //// [arithmeticOperatorWithTypeParameter.ts] // type parameter type is not valid for arithmetic operand function foo(t: T) { - var a: any; - var b: boolean; - var c: number; - var d: string; - var e: {}; + let a!: any; + let b!: boolean; + let c!: number; + let d!: string; + let e!: {}; var r1a1 = a * t; var r1a2 = a / t; diff --git a/tests/baselines/reference/arithmeticOperatorWithTypeParameter.symbols b/tests/baselines/reference/arithmeticOperatorWithTypeParameter.symbols index 4228f2ffad0a5..3063f4d1a54a6 100644 --- a/tests/baselines/reference/arithmeticOperatorWithTypeParameter.symbols +++ b/tests/baselines/reference/arithmeticOperatorWithTypeParameter.symbols @@ -8,19 +8,19 @@ function foo(t: T) { >t : Symbol(t, Decl(arithmeticOperatorWithTypeParameter.ts, 1, 16)) >T : Symbol(T, Decl(arithmeticOperatorWithTypeParameter.ts, 1, 13)) - var a: any; + let a!: any; >a : Symbol(a, Decl(arithmeticOperatorWithTypeParameter.ts, 2, 7)) - var b: boolean; + let b!: boolean; >b : Symbol(b, Decl(arithmeticOperatorWithTypeParameter.ts, 3, 7)) - var c: number; + let c!: number; >c : Symbol(c, Decl(arithmeticOperatorWithTypeParameter.ts, 4, 7)) - var d: string; + let d!: string; >d : Symbol(d, Decl(arithmeticOperatorWithTypeParameter.ts, 5, 7)) - var e: {}; + let e!: {}; >e : Symbol(e, Decl(arithmeticOperatorWithTypeParameter.ts, 6, 7)) var r1a1 = a * t; diff --git a/tests/baselines/reference/arithmeticOperatorWithTypeParameter.types b/tests/baselines/reference/arithmeticOperatorWithTypeParameter.types index 11e91bc03c362..fd7f11770780c 100644 --- a/tests/baselines/reference/arithmeticOperatorWithTypeParameter.types +++ b/tests/baselines/reference/arithmeticOperatorWithTypeParameter.types @@ -8,23 +8,23 @@ function foo(t: T) { >t : T > : ^ - var a: any; + let a!: any; >a : any > : ^^^ - var b: boolean; + let b!: boolean; >b : boolean > : ^^^^^^^ - var c: number; + let c!: number; >c : number > : ^^^^^^ - var d: string; + let d!: string; >d : string > : ^^^^^^ - var e: {}; + let e!: {}; >e : {} > : ^^ diff --git a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.errors.txt b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.errors.txt index 2597dbc861257..35ab0d3f2ec19 100644 --- a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.errors.txt +++ b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.errors.txt @@ -244,9 +244,9 @@ arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(176,18): error TS18050 // If one operand is the undefined or undefined value, it is treated as having the type of the // other operand. - var a: boolean; - var b: string; - var c: Object; + declare var a: boolean; + declare var b: string; + declare var c: Object; // operator * var r1a1 = undefined * a; diff --git a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.js b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.js index e50c37344ca49..a771640b820d3 100644 --- a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.js +++ b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.js @@ -4,9 +4,9 @@ // If one operand is the undefined or undefined value, it is treated as having the type of the // other operand. -var a: boolean; -var b: string; -var c: Object; +declare var a: boolean; +declare var b: string; +declare var c: Object; // operator * var r1a1 = undefined * a; @@ -181,9 +181,6 @@ var r10d3 = {} | undefined; //// [arithmeticOperatorWithUndefinedValueAndInvalidOperands.js] // If one operand is the undefined or undefined value, it is treated as having the type of the // other operand. -var a; -var b; -var c; // operator * var r1a1 = undefined * a; var r1a2 = undefined * b; diff --git a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.symbols b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.symbols index a0c409aaf92b4..6c6643316a38c 100644 --- a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.symbols +++ b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.symbols @@ -4,45 +4,45 @@ // If one operand is the undefined or undefined value, it is treated as having the type of the // other operand. -var a: boolean; ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 3)) +declare var a: boolean; +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 11)) -var b: string; ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 3)) +declare var b: string; +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 11)) -var c: Object; ->c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 3)) +declare var c: Object; +>c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 11)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) // operator * var r1a1 = undefined * a; >r1a1 : Symbol(r1a1, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 8, 3)) >undefined : Symbol(undefined) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 11)) var r1a2 = undefined * b; >r1a2 : Symbol(r1a2, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 9, 3)) >undefined : Symbol(undefined) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 11)) var r1a3 = undefined * c; >r1a3 : Symbol(r1a3, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 10, 3)) >undefined : Symbol(undefined) ->c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 11)) var r1b1 = a * undefined; >r1b1 : Symbol(r1b1, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 12, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 11)) >undefined : Symbol(undefined) var r1b2 = b * undefined; >r1b2 : Symbol(r1b2, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 13, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 11)) >undefined : Symbol(undefined) var r1b3 = c * undefined; >r1b3 : Symbol(r1b3, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 14, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 11)) >undefined : Symbol(undefined) var r1c1 = undefined * true; @@ -73,31 +73,31 @@ var r1d3 = {} * undefined; var r2a1 = undefined / a; >r2a1 : Symbol(r2a1, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 25, 3)) >undefined : Symbol(undefined) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 11)) var r2a2 = undefined / b; >r2a2 : Symbol(r2a2, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 26, 3)) >undefined : Symbol(undefined) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 11)) var r2a3 = undefined / c; >r2a3 : Symbol(r2a3, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 27, 3)) >undefined : Symbol(undefined) ->c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 11)) var r2b1 = a / undefined; >r2b1 : Symbol(r2b1, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 29, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 11)) >undefined : Symbol(undefined) var r2b2 = b / undefined; >r2b2 : Symbol(r2b2, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 30, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 11)) >undefined : Symbol(undefined) var r2b3 = c / undefined; >r2b3 : Symbol(r2b3, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 31, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 11)) >undefined : Symbol(undefined) var r2c1 = undefined / true; @@ -128,31 +128,31 @@ var r2d3 = {} / undefined; var r3a1 = undefined % a; >r3a1 : Symbol(r3a1, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 42, 3)) >undefined : Symbol(undefined) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 11)) var r3a2 = undefined % b; >r3a2 : Symbol(r3a2, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 43, 3)) >undefined : Symbol(undefined) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 11)) var r3a3 = undefined % c; >r3a3 : Symbol(r3a3, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 44, 3)) >undefined : Symbol(undefined) ->c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 11)) var r3b1 = a % undefined; >r3b1 : Symbol(r3b1, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 46, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 11)) >undefined : Symbol(undefined) var r3b2 = b % undefined; >r3b2 : Symbol(r3b2, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 47, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 11)) >undefined : Symbol(undefined) var r3b3 = c % undefined; >r3b3 : Symbol(r3b3, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 48, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 11)) >undefined : Symbol(undefined) var r3c1 = undefined % true; @@ -183,31 +183,31 @@ var r3d3 = {} % undefined; var r4a1 = undefined - a; >r4a1 : Symbol(r4a1, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 59, 3)) >undefined : Symbol(undefined) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 11)) var r4a2 = undefined - b; >r4a2 : Symbol(r4a2, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 60, 3)) >undefined : Symbol(undefined) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 11)) var r4a3 = undefined - c; >r4a3 : Symbol(r4a3, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 61, 3)) >undefined : Symbol(undefined) ->c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 11)) var r4b1 = a - undefined; >r4b1 : Symbol(r4b1, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 63, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 11)) >undefined : Symbol(undefined) var r4b2 = b - undefined; >r4b2 : Symbol(r4b2, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 64, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 11)) >undefined : Symbol(undefined) var r4b3 = c - undefined; >r4b3 : Symbol(r4b3, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 65, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 11)) >undefined : Symbol(undefined) var r4c1 = undefined - true; @@ -238,31 +238,31 @@ var r4d3 = {} - undefined; var r5a1 = undefined << a; >r5a1 : Symbol(r5a1, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 76, 3)) >undefined : Symbol(undefined) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 11)) var r5a2 = undefined << b; >r5a2 : Symbol(r5a2, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 77, 3)) >undefined : Symbol(undefined) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 11)) var r5a3 = undefined << c; >r5a3 : Symbol(r5a3, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 78, 3)) >undefined : Symbol(undefined) ->c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 11)) var r5b1 = a << undefined; >r5b1 : Symbol(r5b1, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 80, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 11)) >undefined : Symbol(undefined) var r5b2 = b << undefined; >r5b2 : Symbol(r5b2, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 81, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 11)) >undefined : Symbol(undefined) var r5b3 = c << undefined; >r5b3 : Symbol(r5b3, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 82, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 11)) >undefined : Symbol(undefined) var r5c1 = undefined << true; @@ -293,31 +293,31 @@ var r5d3 = {} << undefined; var r6a1 = undefined >> a; >r6a1 : Symbol(r6a1, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 93, 3)) >undefined : Symbol(undefined) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 11)) var r6a2 = undefined >> b; >r6a2 : Symbol(r6a2, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 94, 3)) >undefined : Symbol(undefined) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 11)) var r6a3 = undefined >> c; >r6a3 : Symbol(r6a3, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 95, 3)) >undefined : Symbol(undefined) ->c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 11)) var r6b1 = a >> undefined; >r6b1 : Symbol(r6b1, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 97, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 11)) >undefined : Symbol(undefined) var r6b2 = b >> undefined; >r6b2 : Symbol(r6b2, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 98, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 11)) >undefined : Symbol(undefined) var r6b3 = c >> undefined; >r6b3 : Symbol(r6b3, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 99, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 11)) >undefined : Symbol(undefined) var r6c1 = undefined >> true; @@ -348,31 +348,31 @@ var r6d3 = {} >> undefined; var r7a1 = undefined >>> a; >r7a1 : Symbol(r7a1, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 110, 3)) >undefined : Symbol(undefined) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 11)) var r7a2 = undefined >>> b; >r7a2 : Symbol(r7a2, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 111, 3)) >undefined : Symbol(undefined) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 11)) var r7a3 = undefined >>> c; >r7a3 : Symbol(r7a3, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 112, 3)) >undefined : Symbol(undefined) ->c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 11)) var r7b1 = a >>> undefined; >r7b1 : Symbol(r7b1, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 114, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 11)) >undefined : Symbol(undefined) var r7b2 = b >>> undefined; >r7b2 : Symbol(r7b2, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 115, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 11)) >undefined : Symbol(undefined) var r7b3 = c >>> undefined; >r7b3 : Symbol(r7b3, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 116, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 11)) >undefined : Symbol(undefined) var r7c1 = undefined >>> true; @@ -403,31 +403,31 @@ var r7d3 = {} >>> undefined; var r8a1 = undefined & a; >r8a1 : Symbol(r8a1, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 127, 3)) >undefined : Symbol(undefined) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 11)) var r8a2 = undefined & b; >r8a2 : Symbol(r8a2, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 128, 3)) >undefined : Symbol(undefined) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 11)) var r8a3 = undefined & c; >r8a3 : Symbol(r8a3, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 129, 3)) >undefined : Symbol(undefined) ->c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 11)) var r8b1 = a & undefined; >r8b1 : Symbol(r8b1, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 131, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 11)) >undefined : Symbol(undefined) var r8b2 = b & undefined; >r8b2 : Symbol(r8b2, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 132, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 11)) >undefined : Symbol(undefined) var r8b3 = c & undefined; >r8b3 : Symbol(r8b3, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 133, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 11)) >undefined : Symbol(undefined) var r8c1 = undefined & true; @@ -458,31 +458,31 @@ var r8d3 = {} & undefined; var r9a1 = undefined ^ a; >r9a1 : Symbol(r9a1, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 144, 3)) >undefined : Symbol(undefined) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 11)) var r9a2 = undefined ^ b; >r9a2 : Symbol(r9a2, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 145, 3)) >undefined : Symbol(undefined) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 11)) var r9a3 = undefined ^ c; >r9a3 : Symbol(r9a3, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 146, 3)) >undefined : Symbol(undefined) ->c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 11)) var r9b1 = a ^ undefined; >r9b1 : Symbol(r9b1, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 148, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 11)) >undefined : Symbol(undefined) var r9b2 = b ^ undefined; >r9b2 : Symbol(r9b2, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 149, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 11)) >undefined : Symbol(undefined) var r9b3 = c ^ undefined; >r9b3 : Symbol(r9b3, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 150, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 11)) >undefined : Symbol(undefined) var r9c1 = undefined ^ true; @@ -513,31 +513,31 @@ var r9d3 = {} ^ undefined; var r10a1 = undefined | a; >r10a1 : Symbol(r10a1, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 161, 3)) >undefined : Symbol(undefined) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 11)) var r10a2 = undefined | b; >r10a2 : Symbol(r10a2, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 162, 3)) >undefined : Symbol(undefined) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 11)) var r10a3 = undefined | c; >r10a3 : Symbol(r10a3, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 163, 3)) >undefined : Symbol(undefined) ->c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 11)) var r10b1 = a | undefined; >r10b1 : Symbol(r10b1, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 165, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 3, 11)) >undefined : Symbol(undefined) var r10b2 = b | undefined; >r10b2 : Symbol(r10b2, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 166, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 4, 11)) >undefined : Symbol(undefined) var r10b3 = c | undefined; >r10b3 : Symbol(r10b3, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 167, 3)) ->c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 3)) +>c : Symbol(c, Decl(arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts, 5, 11)) >undefined : Symbol(undefined) var r10c1 = undefined | true; diff --git a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.types b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.types index 6c3ec53c7c60a..d5334eca68273 100644 --- a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.types +++ b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.types @@ -4,15 +4,15 @@ // If one operand is the undefined or undefined value, it is treated as having the type of the // other operand. -var a: boolean; +declare var a: boolean; >a : boolean > : ^^^^^^^ -var b: string; +declare var b: string; >b : string > : ^^^^^^ -var c: Object; +declare var c: Object; >c : Object > : ^^^^^^ diff --git a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.errors.txt b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.errors.txt index 53924924d504e..79c343eb2edca 100644 --- a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.errors.txt +++ b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.errors.txt @@ -89,8 +89,8 @@ arithmeticOperatorWithUndefinedValueAndValidOperands.ts(110,17): error TS18050: b } - var a: any; - var b: number; + declare var a: any; + declare var b: number; // operator * var ra1 = undefined * a; diff --git a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.js b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.js index fdb16d22f3009..b87edf044ecd8 100644 --- a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.js +++ b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.js @@ -9,8 +9,8 @@ enum E { b } -var a: any; -var b: number; +declare var a: any; +declare var b: number; // operator * var ra1 = undefined * a; @@ -120,8 +120,6 @@ var E; E[E["a"] = 0] = "a"; E[E["b"] = 1] = "b"; })(E || (E = {})); -var a; -var b; // operator * var ra1 = undefined * a; var ra2 = undefined * b; diff --git a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.symbols b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.symbols index 6219bebd69096..e3f247befa219 100644 --- a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.symbols +++ b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.symbols @@ -14,22 +14,22 @@ enum E { >b : Symbol(E.b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 4, 6)) } -var a: any; ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 3)) +declare var a: any; +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 11)) -var b: number; ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 3)) +declare var b: number; +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 11)) // operator * var ra1 = undefined * a; >ra1 : Symbol(ra1, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 12, 3)) >undefined : Symbol(undefined) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 11)) var ra2 = undefined * b; >ra2 : Symbol(ra2, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 13, 3)) >undefined : Symbol(undefined) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 11)) var ra3 = undefined * 1; >ra3 : Symbol(ra3, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 14, 3)) @@ -44,12 +44,12 @@ var ra4 = undefined * E.a; var ra5 = a * undefined; >ra5 : Symbol(ra5, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 16, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 11)) >undefined : Symbol(undefined) var ra6 = b * undefined; >ra6 : Symbol(ra6, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 17, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 11)) >undefined : Symbol(undefined) var ra7 = 0 * undefined; @@ -67,12 +67,12 @@ var ra8 = E.b * undefined; var rb1 = undefined / a; >rb1 : Symbol(rb1, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 22, 3)) >undefined : Symbol(undefined) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 11)) var rb2 = undefined / b; >rb2 : Symbol(rb2, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 23, 3)) >undefined : Symbol(undefined) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 11)) var rb3 = undefined / 1; >rb3 : Symbol(rb3, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 24, 3)) @@ -87,12 +87,12 @@ var rb4 = undefined / E.a; var rb5 = a / undefined; >rb5 : Symbol(rb5, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 26, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 11)) >undefined : Symbol(undefined) var rb6 = b / undefined; >rb6 : Symbol(rb6, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 27, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 11)) >undefined : Symbol(undefined) var rb7 = 0 / undefined; @@ -110,12 +110,12 @@ var rb8 = E.b / undefined; var rc1 = undefined % a; >rc1 : Symbol(rc1, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 32, 3)) >undefined : Symbol(undefined) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 11)) var rc2 = undefined % b; >rc2 : Symbol(rc2, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 33, 3)) >undefined : Symbol(undefined) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 11)) var rc3 = undefined % 1; >rc3 : Symbol(rc3, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 34, 3)) @@ -130,12 +130,12 @@ var rc4 = undefined % E.a; var rc5 = a % undefined; >rc5 : Symbol(rc5, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 36, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 11)) >undefined : Symbol(undefined) var rc6 = b % undefined; >rc6 : Symbol(rc6, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 37, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 11)) >undefined : Symbol(undefined) var rc7 = 0 % undefined; @@ -153,12 +153,12 @@ var rc8 = E.b % undefined; var rd1 = undefined - a; >rd1 : Symbol(rd1, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 42, 3)) >undefined : Symbol(undefined) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 11)) var rd2 = undefined - b; >rd2 : Symbol(rd2, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 43, 3)) >undefined : Symbol(undefined) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 11)) var rd3 = undefined - 1; >rd3 : Symbol(rd3, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 44, 3)) @@ -173,12 +173,12 @@ var rd4 = undefined - E.a; var rd5 = a - undefined; >rd5 : Symbol(rd5, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 46, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 11)) >undefined : Symbol(undefined) var rd6 = b - undefined; >rd6 : Symbol(rd6, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 47, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 11)) >undefined : Symbol(undefined) var rd7 = 0 - undefined; @@ -196,12 +196,12 @@ var rd8 = E.b - undefined; var re1 = undefined << a; >re1 : Symbol(re1, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 52, 3)) >undefined : Symbol(undefined) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 11)) var re2 = undefined << b; >re2 : Symbol(re2, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 53, 3)) >undefined : Symbol(undefined) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 11)) var re3 = undefined << 1; >re3 : Symbol(re3, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 54, 3)) @@ -216,12 +216,12 @@ var re4 = undefined << E.a; var re5 = a << undefined; >re5 : Symbol(re5, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 56, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 11)) >undefined : Symbol(undefined) var re6 = b << undefined; >re6 : Symbol(re6, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 57, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 11)) >undefined : Symbol(undefined) var re7 = 0 << undefined; @@ -239,12 +239,12 @@ var re8 = E.b << undefined; var rf1 = undefined >> a; >rf1 : Symbol(rf1, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 62, 3)) >undefined : Symbol(undefined) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 11)) var rf2 = undefined >> b; >rf2 : Symbol(rf2, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 63, 3)) >undefined : Symbol(undefined) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 11)) var rf3 = undefined >> 1; >rf3 : Symbol(rf3, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 64, 3)) @@ -259,12 +259,12 @@ var rf4 = undefined >> E.a; var rf5 = a >> undefined; >rf5 : Symbol(rf5, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 66, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 11)) >undefined : Symbol(undefined) var rf6 = b >> undefined; >rf6 : Symbol(rf6, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 67, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 11)) >undefined : Symbol(undefined) var rf7 = 0 >> undefined; @@ -282,12 +282,12 @@ var rf8 = E.b >> undefined; var rg1 = undefined >>> a; >rg1 : Symbol(rg1, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 72, 3)) >undefined : Symbol(undefined) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 11)) var rg2 = undefined >>> b; >rg2 : Symbol(rg2, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 73, 3)) >undefined : Symbol(undefined) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 11)) var rg3 = undefined >>> 1; >rg3 : Symbol(rg3, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 74, 3)) @@ -302,12 +302,12 @@ var rg4 = undefined >>> E.a; var rg5 = a >>> undefined; >rg5 : Symbol(rg5, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 76, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 11)) >undefined : Symbol(undefined) var rg6 = b >>> undefined; >rg6 : Symbol(rg6, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 77, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 11)) >undefined : Symbol(undefined) var rg7 = 0 >>> undefined; @@ -325,12 +325,12 @@ var rg8 = E.b >>> undefined; var rh1 = undefined & a; >rh1 : Symbol(rh1, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 82, 3)) >undefined : Symbol(undefined) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 11)) var rh2 = undefined & b; >rh2 : Symbol(rh2, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 83, 3)) >undefined : Symbol(undefined) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 11)) var rh3 = undefined & 1; >rh3 : Symbol(rh3, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 84, 3)) @@ -345,12 +345,12 @@ var rh4 = undefined & E.a; var rh5 = a & undefined; >rh5 : Symbol(rh5, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 86, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 11)) >undefined : Symbol(undefined) var rh6 = b & undefined; >rh6 : Symbol(rh6, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 87, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 11)) >undefined : Symbol(undefined) var rh7 = 0 & undefined; @@ -368,12 +368,12 @@ var rh8 = E.b & undefined; var ri1 = undefined ^ a; >ri1 : Symbol(ri1, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 92, 3)) >undefined : Symbol(undefined) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 11)) var ri2 = undefined ^ b; >ri2 : Symbol(ri2, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 93, 3)) >undefined : Symbol(undefined) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 11)) var ri3 = undefined ^ 1; >ri3 : Symbol(ri3, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 94, 3)) @@ -388,12 +388,12 @@ var ri4 = undefined ^ E.a; var ri5 = a ^ undefined; >ri5 : Symbol(ri5, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 96, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 11)) >undefined : Symbol(undefined) var ri6 = b ^ undefined; >ri6 : Symbol(ri6, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 97, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 11)) >undefined : Symbol(undefined) var ri7 = 0 ^ undefined; @@ -411,12 +411,12 @@ var ri8 = E.b ^ undefined; var rj1 = undefined | a; >rj1 : Symbol(rj1, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 102, 3)) >undefined : Symbol(undefined) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 11)) var rj2 = undefined | b; >rj2 : Symbol(rj2, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 103, 3)) >undefined : Symbol(undefined) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 11)) var rj3 = undefined | 1; >rj3 : Symbol(rj3, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 104, 3)) @@ -431,12 +431,12 @@ var rj4 = undefined | E.a; var rj5 = a | undefined; >rj5 : Symbol(rj5, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 106, 3)) ->a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 3)) +>a : Symbol(a, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 8, 11)) >undefined : Symbol(undefined) var rj6 = b | undefined; >rj6 : Symbol(rj6, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 107, 3)) ->b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 3)) +>b : Symbol(b, Decl(arithmeticOperatorWithUndefinedValueAndValidOperands.ts, 9, 11)) >undefined : Symbol(undefined) var rj7 = 0 | undefined; diff --git a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.types b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.types index 607c764e48c2e..37f3d457e99ca 100644 --- a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.types +++ b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.types @@ -17,11 +17,11 @@ enum E { > : ^^^ } -var a: any; +declare var a: any; >a : any > : ^^^ -var b: number; +declare var b: number; >b : number > : ^^^^^^ diff --git a/tests/baselines/reference/arityAndOrderCompatibility01.errors.txt b/tests/baselines/reference/arityAndOrderCompatibility01.errors.txt index b4e4cdbcf67a4..188e9e1160afc 100644 --- a/tests/baselines/reference/arityAndOrderCompatibility01.errors.txt +++ b/tests/baselines/reference/arityAndOrderCompatibility01.errors.txt @@ -36,9 +36,9 @@ arityAndOrderCompatibility01.ts(32,5): error TS2322: Type '{ 0: string; 1: numbe length: 2; } - var x: [string, number]; - var y: StrNum - var z: { + declare var x: [string, number]; + declare var y: StrNum + declare var z: { 0: string; 1: number; length: 2; diff --git a/tests/baselines/reference/arityAndOrderCompatibility01.js b/tests/baselines/reference/arityAndOrderCompatibility01.js index 81f2df8dd8165..4226f80656b02 100644 --- a/tests/baselines/reference/arityAndOrderCompatibility01.js +++ b/tests/baselines/reference/arityAndOrderCompatibility01.js @@ -7,9 +7,9 @@ interface StrNum extends Array { length: 2; } -var x: [string, number]; -var y: StrNum -var z: { +declare var x: [string, number]; +declare var y: StrNum +declare var z: { 0: string; 1: number; length: 2; @@ -39,9 +39,6 @@ var o3: [string, number] = y; //// [arityAndOrderCompatibility01.js] -var x; -var y; -var z; var a = x[0], b = x[1], c = x[2]; var d = y[0], e = y[1], f = y[2]; var g = z[0], h = z[1], i = z[2]; diff --git a/tests/baselines/reference/arityAndOrderCompatibility01.symbols b/tests/baselines/reference/arityAndOrderCompatibility01.symbols index b3cde5bd55213..aa22946313bad 100644 --- a/tests/baselines/reference/arityAndOrderCompatibility01.symbols +++ b/tests/baselines/reference/arityAndOrderCompatibility01.symbols @@ -15,18 +15,18 @@ interface StrNum extends Array { >length : Symbol(StrNum.length, Decl(arityAndOrderCompatibility01.ts, 2, 14)) } -var x: [string, number]; ->x : Symbol(x, Decl(arityAndOrderCompatibility01.ts, 6, 3)) +declare var x: [string, number]; +>x : Symbol(x, Decl(arityAndOrderCompatibility01.ts, 6, 11)) -var y: StrNum ->y : Symbol(y, Decl(arityAndOrderCompatibility01.ts, 7, 3)) +declare var y: StrNum +>y : Symbol(y, Decl(arityAndOrderCompatibility01.ts, 7, 11)) >StrNum : Symbol(StrNum, Decl(arityAndOrderCompatibility01.ts, 0, 0)) -var z: { ->z : Symbol(z, Decl(arityAndOrderCompatibility01.ts, 8, 3)) +declare var z: { +>z : Symbol(z, Decl(arityAndOrderCompatibility01.ts, 8, 11)) 0: string; ->0 : Symbol(0, Decl(arityAndOrderCompatibility01.ts, 8, 8)) +>0 : Symbol(0, Decl(arityAndOrderCompatibility01.ts, 8, 16)) 1: number; >1 : Symbol(1, Decl(arityAndOrderCompatibility01.ts, 9, 14)) @@ -39,89 +39,89 @@ var [a, b, c] = x; >a : Symbol(a, Decl(arityAndOrderCompatibility01.ts, 14, 5)) >b : Symbol(b, Decl(arityAndOrderCompatibility01.ts, 14, 7)) >c : Symbol(c, Decl(arityAndOrderCompatibility01.ts, 14, 10)) ->x : Symbol(x, Decl(arityAndOrderCompatibility01.ts, 6, 3)) +>x : Symbol(x, Decl(arityAndOrderCompatibility01.ts, 6, 11)) var [d, e, f] = y; >d : Symbol(d, Decl(arityAndOrderCompatibility01.ts, 15, 5)) >e : Symbol(e, Decl(arityAndOrderCompatibility01.ts, 15, 7)) >f : Symbol(f, Decl(arityAndOrderCompatibility01.ts, 15, 10)) ->y : Symbol(y, Decl(arityAndOrderCompatibility01.ts, 7, 3)) +>y : Symbol(y, Decl(arityAndOrderCompatibility01.ts, 7, 11)) var [g, h, i] = z; >g : Symbol(g, Decl(arityAndOrderCompatibility01.ts, 16, 5)) >h : Symbol(h, Decl(arityAndOrderCompatibility01.ts, 16, 7)) >i : Symbol(i, Decl(arityAndOrderCompatibility01.ts, 16, 10)) ->z : Symbol(z, Decl(arityAndOrderCompatibility01.ts, 8, 3)) +>z : Symbol(z, Decl(arityAndOrderCompatibility01.ts, 8, 11)) var j1: [number, number, number] = x; >j1 : Symbol(j1, Decl(arityAndOrderCompatibility01.ts, 17, 3)) ->x : Symbol(x, Decl(arityAndOrderCompatibility01.ts, 6, 3)) +>x : Symbol(x, Decl(arityAndOrderCompatibility01.ts, 6, 11)) var j2: [number, number, number] = y; >j2 : Symbol(j2, Decl(arityAndOrderCompatibility01.ts, 18, 3)) ->y : Symbol(y, Decl(arityAndOrderCompatibility01.ts, 7, 3)) +>y : Symbol(y, Decl(arityAndOrderCompatibility01.ts, 7, 11)) var j3: [number, number, number] = z; >j3 : Symbol(j3, Decl(arityAndOrderCompatibility01.ts, 19, 3)) ->z : Symbol(z, Decl(arityAndOrderCompatibility01.ts, 8, 3)) +>z : Symbol(z, Decl(arityAndOrderCompatibility01.ts, 8, 11)) var k1: [string, number, number] = x; >k1 : Symbol(k1, Decl(arityAndOrderCompatibility01.ts, 20, 3)) ->x : Symbol(x, Decl(arityAndOrderCompatibility01.ts, 6, 3)) +>x : Symbol(x, Decl(arityAndOrderCompatibility01.ts, 6, 11)) var k2: [string, number, number] = y; >k2 : Symbol(k2, Decl(arityAndOrderCompatibility01.ts, 21, 3)) ->y : Symbol(y, Decl(arityAndOrderCompatibility01.ts, 7, 3)) +>y : Symbol(y, Decl(arityAndOrderCompatibility01.ts, 7, 11)) var k3: [string, number, number] = z; >k3 : Symbol(k3, Decl(arityAndOrderCompatibility01.ts, 22, 3)) ->z : Symbol(z, Decl(arityAndOrderCompatibility01.ts, 8, 3)) +>z : Symbol(z, Decl(arityAndOrderCompatibility01.ts, 8, 11)) var l1: [number] = x; >l1 : Symbol(l1, Decl(arityAndOrderCompatibility01.ts, 23, 3)) ->x : Symbol(x, Decl(arityAndOrderCompatibility01.ts, 6, 3)) +>x : Symbol(x, Decl(arityAndOrderCompatibility01.ts, 6, 11)) var l2: [number] = y; >l2 : Symbol(l2, Decl(arityAndOrderCompatibility01.ts, 24, 3)) ->y : Symbol(y, Decl(arityAndOrderCompatibility01.ts, 7, 3)) +>y : Symbol(y, Decl(arityAndOrderCompatibility01.ts, 7, 11)) var l3: [number] = z; >l3 : Symbol(l3, Decl(arityAndOrderCompatibility01.ts, 25, 3)) ->z : Symbol(z, Decl(arityAndOrderCompatibility01.ts, 8, 3)) +>z : Symbol(z, Decl(arityAndOrderCompatibility01.ts, 8, 11)) var m1: [string] = x; >m1 : Symbol(m1, Decl(arityAndOrderCompatibility01.ts, 26, 3)) ->x : Symbol(x, Decl(arityAndOrderCompatibility01.ts, 6, 3)) +>x : Symbol(x, Decl(arityAndOrderCompatibility01.ts, 6, 11)) var m2: [string] = y; >m2 : Symbol(m2, Decl(arityAndOrderCompatibility01.ts, 27, 3)) ->y : Symbol(y, Decl(arityAndOrderCompatibility01.ts, 7, 3)) +>y : Symbol(y, Decl(arityAndOrderCompatibility01.ts, 7, 11)) var m3: [string] = z; >m3 : Symbol(m3, Decl(arityAndOrderCompatibility01.ts, 28, 3)) ->z : Symbol(z, Decl(arityAndOrderCompatibility01.ts, 8, 3)) +>z : Symbol(z, Decl(arityAndOrderCompatibility01.ts, 8, 11)) var n1: [number, string] = x; >n1 : Symbol(n1, Decl(arityAndOrderCompatibility01.ts, 29, 3)) ->x : Symbol(x, Decl(arityAndOrderCompatibility01.ts, 6, 3)) +>x : Symbol(x, Decl(arityAndOrderCompatibility01.ts, 6, 11)) var n2: [number, string] = y; >n2 : Symbol(n2, Decl(arityAndOrderCompatibility01.ts, 30, 3)) ->y : Symbol(y, Decl(arityAndOrderCompatibility01.ts, 7, 3)) +>y : Symbol(y, Decl(arityAndOrderCompatibility01.ts, 7, 11)) var n3: [number, string] = z; >n3 : Symbol(n3, Decl(arityAndOrderCompatibility01.ts, 31, 3)) ->z : Symbol(z, Decl(arityAndOrderCompatibility01.ts, 8, 3)) +>z : Symbol(z, Decl(arityAndOrderCompatibility01.ts, 8, 11)) var o1: [string, number] = x; >o1 : Symbol(o1, Decl(arityAndOrderCompatibility01.ts, 32, 3)) ->x : Symbol(x, Decl(arityAndOrderCompatibility01.ts, 6, 3)) +>x : Symbol(x, Decl(arityAndOrderCompatibility01.ts, 6, 11)) var o2: [string, number] = y; >o2 : Symbol(o2, Decl(arityAndOrderCompatibility01.ts, 33, 3)) ->y : Symbol(y, Decl(arityAndOrderCompatibility01.ts, 7, 3)) +>y : Symbol(y, Decl(arityAndOrderCompatibility01.ts, 7, 11)) var o3: [string, number] = y; >o3 : Symbol(o3, Decl(arityAndOrderCompatibility01.ts, 34, 3)) ->y : Symbol(y, Decl(arityAndOrderCompatibility01.ts, 7, 3)) +>y : Symbol(y, Decl(arityAndOrderCompatibility01.ts, 7, 11)) diff --git a/tests/baselines/reference/arityAndOrderCompatibility01.types b/tests/baselines/reference/arityAndOrderCompatibility01.types index 5c37248c3ebc0..a7109edfe8ae1 100644 --- a/tests/baselines/reference/arityAndOrderCompatibility01.types +++ b/tests/baselines/reference/arityAndOrderCompatibility01.types @@ -15,15 +15,15 @@ interface StrNum extends Array { > : ^ } -var x: [string, number]; +declare var x: [string, number]; >x : [string, number] > : ^^^^^^^^^^^^^^^^ -var y: StrNum +declare var y: StrNum >y : StrNum > : ^^^^^^ -var z: { +declare var z: { >z : { 0: string; 1: number; length: 2; } > : ^^^^^ ^^^^^ ^^^^^^^^^^ ^^^ diff --git a/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.errors.txt b/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.errors.txt index 61c9f33cada3f..a62cb8e3b56c8 100644 --- a/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.errors.txt +++ b/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.errors.txt @@ -1,13 +1,13 @@ -arrayLiteralAndArrayConstructorEquivalence1.ts(3,14): error TS2314: Generic type 'Array' requires 1 type argument(s). +arrayLiteralAndArrayConstructorEquivalence1.ts(3,22): error TS2314: Generic type 'Array' requires 1 type argument(s). ==== arrayLiteralAndArrayConstructorEquivalence1.ts (1 errors) ==== var myCars=new Array(); var myCars3 = new Array({}); - var myCars4: Array; // error - ~~~~~ + declare var myCars4: Array; // error + ~~~~~ !!! error TS2314: Generic type 'Array' requires 1 type argument(s). - var myCars5: Array[]; + declare var myCars5: Array[]; myCars = myCars3; myCars = myCars4; diff --git a/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.js b/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.js index 3876a90b17c2c..555eddfeeed70 100644 --- a/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.js +++ b/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.js @@ -3,8 +3,8 @@ //// [arrayLiteralAndArrayConstructorEquivalence1.ts] var myCars=new Array(); var myCars3 = new Array({}); -var myCars4: Array; // error -var myCars5: Array[]; +declare var myCars4: Array; // error +declare var myCars5: Array[]; myCars = myCars3; myCars = myCars4; @@ -18,8 +18,6 @@ myCars3 = myCars5; //// [arrayLiteralAndArrayConstructorEquivalence1.js] var myCars = new Array(); var myCars3 = new Array({}); -var myCars4; // error -var myCars5; myCars = myCars3; myCars = myCars4; myCars = myCars5; diff --git a/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.symbols b/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.symbols index 3793641e69586..c862cdf1756e6 100644 --- a/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.symbols +++ b/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.symbols @@ -9,12 +9,12 @@ var myCars3 = new Array({}); >myCars3 : Symbol(myCars3, Decl(arrayLiteralAndArrayConstructorEquivalence1.ts, 1, 3)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) -var myCars4: Array; // error ->myCars4 : Symbol(myCars4, Decl(arrayLiteralAndArrayConstructorEquivalence1.ts, 2, 3)) +declare var myCars4: Array; // error +>myCars4 : Symbol(myCars4, Decl(arrayLiteralAndArrayConstructorEquivalence1.ts, 2, 11)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) -var myCars5: Array[]; ->myCars5 : Symbol(myCars5, Decl(arrayLiteralAndArrayConstructorEquivalence1.ts, 3, 3)) +declare var myCars5: Array[]; +>myCars5 : Symbol(myCars5, Decl(arrayLiteralAndArrayConstructorEquivalence1.ts, 3, 11)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) myCars = myCars3; @@ -23,11 +23,11 @@ myCars = myCars3; myCars = myCars4; >myCars : Symbol(myCars, Decl(arrayLiteralAndArrayConstructorEquivalence1.ts, 0, 3)) ->myCars4 : Symbol(myCars4, Decl(arrayLiteralAndArrayConstructorEquivalence1.ts, 2, 3)) +>myCars4 : Symbol(myCars4, Decl(arrayLiteralAndArrayConstructorEquivalence1.ts, 2, 11)) myCars = myCars5; >myCars : Symbol(myCars, Decl(arrayLiteralAndArrayConstructorEquivalence1.ts, 0, 3)) ->myCars5 : Symbol(myCars5, Decl(arrayLiteralAndArrayConstructorEquivalence1.ts, 3, 3)) +>myCars5 : Symbol(myCars5, Decl(arrayLiteralAndArrayConstructorEquivalence1.ts, 3, 11)) myCars3 = myCars; >myCars3 : Symbol(myCars3, Decl(arrayLiteralAndArrayConstructorEquivalence1.ts, 1, 3)) @@ -35,9 +35,9 @@ myCars3 = myCars; myCars3 = myCars4; >myCars3 : Symbol(myCars3, Decl(arrayLiteralAndArrayConstructorEquivalence1.ts, 1, 3)) ->myCars4 : Symbol(myCars4, Decl(arrayLiteralAndArrayConstructorEquivalence1.ts, 2, 3)) +>myCars4 : Symbol(myCars4, Decl(arrayLiteralAndArrayConstructorEquivalence1.ts, 2, 11)) myCars3 = myCars5; >myCars3 : Symbol(myCars3, Decl(arrayLiteralAndArrayConstructorEquivalence1.ts, 1, 3)) ->myCars5 : Symbol(myCars5, Decl(arrayLiteralAndArrayConstructorEquivalence1.ts, 3, 3)) +>myCars5 : Symbol(myCars5, Decl(arrayLiteralAndArrayConstructorEquivalence1.ts, 3, 11)) diff --git a/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.types b/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.types index 002a8c7b9ae14..5fa1a325ca9e0 100644 --- a/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.types +++ b/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.types @@ -19,11 +19,11 @@ var myCars3 = new Array({}); >{} : {} > : ^^ -var myCars4: Array; // error +declare var myCars4: Array; // error >myCars4 : any > : ^^^ -var myCars5: Array[]; +declare var myCars5: Array[]; >myCars5 : any[][] > : ^^^^^^^ diff --git a/tests/baselines/reference/arraySigChecking.errors.txt b/tests/baselines/reference/arraySigChecking.errors.txt index d39a86ec11622..74dbd3487bfe2 100644 --- a/tests/baselines/reference/arraySigChecking.errors.txt +++ b/tests/baselines/reference/arraySigChecking.errors.txt @@ -23,7 +23,7 @@ arraySigChecking.ts(22,16): error TS2322: Type 'number' is not assignable to typ interface myInt { voidFn(): void; } - var myVar: myInt; + declare var myVar: myInt; var strArray: string[] = [myVar.voidFn()]; ~~~~~~~~~~~~~~ !!! error TS2322: Type 'void' is not assignable to type 'string'. diff --git a/tests/baselines/reference/arraySigChecking.js b/tests/baselines/reference/arraySigChecking.js index 12b13af0ef452..b114161260bad 100644 --- a/tests/baselines/reference/arraySigChecking.js +++ b/tests/baselines/reference/arraySigChecking.js @@ -17,7 +17,7 @@ declare namespace M { interface myInt { voidFn(): void; } -var myVar: myInt; +declare var myVar: myInt; var strArray: string[] = [myVar.voidFn()]; @@ -35,7 +35,6 @@ isEmpty(['a']); //// [arraySigChecking.js] -var myVar; var strArray = [myVar.voidFn()]; var myArray; myArray = [[1, 2]]; diff --git a/tests/baselines/reference/arraySigChecking.symbols b/tests/baselines/reference/arraySigChecking.symbols index 675232020ffa8..ec798833f2f34 100644 --- a/tests/baselines/reference/arraySigChecking.symbols +++ b/tests/baselines/reference/arraySigChecking.symbols @@ -34,14 +34,14 @@ interface myInt { voidFn(): void; >voidFn : Symbol(myInt.voidFn, Decl(arraySigChecking.ts, 13, 17)) } -var myVar: myInt; ->myVar : Symbol(myVar, Decl(arraySigChecking.ts, 16, 3)) +declare var myVar: myInt; +>myVar : Symbol(myVar, Decl(arraySigChecking.ts, 16, 11)) >myInt : Symbol(myInt, Decl(arraySigChecking.ts, 11, 1)) var strArray: string[] = [myVar.voidFn()]; >strArray : Symbol(strArray, Decl(arraySigChecking.ts, 17, 3)) >myVar.voidFn : Symbol(myInt.voidFn, Decl(arraySigChecking.ts, 13, 17)) ->myVar : Symbol(myVar, Decl(arraySigChecking.ts, 16, 3)) +>myVar : Symbol(myVar, Decl(arraySigChecking.ts, 16, 11)) >voidFn : Symbol(myInt.voidFn, Decl(arraySigChecking.ts, 13, 17)) diff --git a/tests/baselines/reference/arraySigChecking.types b/tests/baselines/reference/arraySigChecking.types index e06a70c576933..81f479fe85ec1 100644 --- a/tests/baselines/reference/arraySigChecking.types +++ b/tests/baselines/reference/arraySigChecking.types @@ -36,7 +36,7 @@ interface myInt { >voidFn : () => void > : ^^^^^^ } -var myVar: myInt; +declare var myVar: myInt; >myVar : myInt > : ^^^^^ diff --git a/tests/baselines/reference/asiPreventsParsingAsInterface05.errors.txt b/tests/baselines/reference/asiPreventsParsingAsInterface05.errors.txt index 61d669aec1ff6..e8fc62fbde16d 100644 --- a/tests/baselines/reference/asiPreventsParsingAsInterface05.errors.txt +++ b/tests/baselines/reference/asiPreventsParsingAsInterface05.errors.txt @@ -6,7 +6,7 @@ asiPreventsParsingAsInterface05.ts(11,1): error TS2304: Cannot find name 'I'. ==== asiPreventsParsingAsInterface05.ts (3 errors) ==== "use strict" - var interface: number; + var interface: number = 123; ~~~~~~~~~ !!! error TS1212: Identifier expected. 'interface' is a reserved word in strict mode. diff --git a/tests/baselines/reference/asiPreventsParsingAsInterface05.js b/tests/baselines/reference/asiPreventsParsingAsInterface05.js index 82aea79bba0b6..51f002b5a9d04 100644 --- a/tests/baselines/reference/asiPreventsParsingAsInterface05.js +++ b/tests/baselines/reference/asiPreventsParsingAsInterface05.js @@ -3,7 +3,7 @@ //// [asiPreventsParsingAsInterface05.ts] "use strict" -var interface: number; +var interface: number = 123; // 'interface' is a strict mode reserved word, and so it would be permissible // to allow 'interface' and the name of the interface to be on separate lines; @@ -16,7 +16,7 @@ I // This should be the identifier 'I' //// [asiPreventsParsingAsInterface05.js] "use strict"; -var interface; +var interface = 123; // 'interface' is a strict mode reserved word, and so it would be permissible // to allow 'interface' and the name of the interface to be on separate lines; // however, this complicates things, and so it is preferable to restrict interface diff --git a/tests/baselines/reference/asiPreventsParsingAsInterface05.symbols b/tests/baselines/reference/asiPreventsParsingAsInterface05.symbols index e3730eef1fae9..28eee75d44b0f 100644 --- a/tests/baselines/reference/asiPreventsParsingAsInterface05.symbols +++ b/tests/baselines/reference/asiPreventsParsingAsInterface05.symbols @@ -3,7 +3,7 @@ === asiPreventsParsingAsInterface05.ts === "use strict" -var interface: number; +var interface: number = 123; >interface : Symbol(interface, Decl(asiPreventsParsingAsInterface05.ts, 2, 3)) // 'interface' is a strict mode reserved word, and so it would be permissible diff --git a/tests/baselines/reference/asiPreventsParsingAsInterface05.types b/tests/baselines/reference/asiPreventsParsingAsInterface05.types index 504e351db0a1f..8e43fa7b75698 100644 --- a/tests/baselines/reference/asiPreventsParsingAsInterface05.types +++ b/tests/baselines/reference/asiPreventsParsingAsInterface05.types @@ -5,9 +5,11 @@ >"use strict" : "use strict" > : ^^^^^^^^^^^^ -var interface: number; +var interface: number = 123; >interface : number > : ^^^^^^ +>123 : 123 +> : ^^^ // 'interface' is a strict mode reserved word, and so it would be permissible // to allow 'interface' and the name of the interface to be on separate lines; diff --git a/tests/baselines/reference/assignFromBooleanInterface.errors.txt b/tests/baselines/reference/assignFromBooleanInterface.errors.txt index 6671373734381..95a9628c1336b 100644 --- a/tests/baselines/reference/assignFromBooleanInterface.errors.txt +++ b/tests/baselines/reference/assignFromBooleanInterface.errors.txt @@ -4,7 +4,7 @@ assignFromBooleanInterface.ts(3,1): error TS2322: Type 'Boolean' is not assignab ==== assignFromBooleanInterface.ts (1 errors) ==== var x = true; - var a: Boolean; + declare var a: Boolean; x = a; ~ !!! error TS2322: Type 'Boolean' is not assignable to type 'boolean'. diff --git a/tests/baselines/reference/assignFromBooleanInterface.js b/tests/baselines/reference/assignFromBooleanInterface.js index f539081384d0e..21b05dedd0d14 100644 --- a/tests/baselines/reference/assignFromBooleanInterface.js +++ b/tests/baselines/reference/assignFromBooleanInterface.js @@ -2,12 +2,11 @@ //// [assignFromBooleanInterface.ts] var x = true; -var a: Boolean; +declare var a: Boolean; x = a; a = x; //// [assignFromBooleanInterface.js] var x = true; -var a; x = a; a = x; diff --git a/tests/baselines/reference/assignFromBooleanInterface.symbols b/tests/baselines/reference/assignFromBooleanInterface.symbols index 4177c7169e5b0..569459faeaecc 100644 --- a/tests/baselines/reference/assignFromBooleanInterface.symbols +++ b/tests/baselines/reference/assignFromBooleanInterface.symbols @@ -4,15 +4,15 @@ var x = true; >x : Symbol(x, Decl(assignFromBooleanInterface.ts, 0, 3)) -var a: Boolean; ->a : Symbol(a, Decl(assignFromBooleanInterface.ts, 1, 3)) +declare var a: Boolean; +>a : Symbol(a, Decl(assignFromBooleanInterface.ts, 1, 11)) >Boolean : Symbol(Boolean, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) x = a; >x : Symbol(x, Decl(assignFromBooleanInterface.ts, 0, 3)) ->a : Symbol(a, Decl(assignFromBooleanInterface.ts, 1, 3)) +>a : Symbol(a, Decl(assignFromBooleanInterface.ts, 1, 11)) a = x; ->a : Symbol(a, Decl(assignFromBooleanInterface.ts, 1, 3)) +>a : Symbol(a, Decl(assignFromBooleanInterface.ts, 1, 11)) >x : Symbol(x, Decl(assignFromBooleanInterface.ts, 0, 3)) diff --git a/tests/baselines/reference/assignFromBooleanInterface.types b/tests/baselines/reference/assignFromBooleanInterface.types index 8959ee10ba076..15b4bfbb9c866 100644 --- a/tests/baselines/reference/assignFromBooleanInterface.types +++ b/tests/baselines/reference/assignFromBooleanInterface.types @@ -7,7 +7,7 @@ var x = true; >true : true > : ^^^^ -var a: Boolean; +declare var a: Boolean; >a : Boolean > : ^^^^^^^ diff --git a/tests/baselines/reference/assignFromBooleanInterface2.errors.txt b/tests/baselines/reference/assignFromBooleanInterface2.errors.txt index ebd3e9a5477b9..cb2ee61e45fbc 100644 --- a/tests/baselines/reference/assignFromBooleanInterface2.errors.txt +++ b/tests/baselines/reference/assignFromBooleanInterface2.errors.txt @@ -16,8 +16,8 @@ assignFromBooleanInterface2.ts(20,1): error TS2322: Type 'NotBoolean' is not ass } var x = true; - var a: Boolean; - var b: NotBoolean; + declare var a: Boolean; + declare var b: NotBoolean; a = x; a = b; diff --git a/tests/baselines/reference/assignFromBooleanInterface2.js b/tests/baselines/reference/assignFromBooleanInterface2.js index 5a903182bb980..0ac4657706ff4 100644 --- a/tests/baselines/reference/assignFromBooleanInterface2.js +++ b/tests/baselines/reference/assignFromBooleanInterface2.js @@ -10,8 +10,8 @@ interface NotBoolean { } var x = true; -var a: Boolean; -var b: NotBoolean; +declare var a: Boolean; +declare var b: NotBoolean; a = x; a = b; @@ -26,8 +26,6 @@ x = b; // expected error //// [assignFromBooleanInterface2.js] var x = true; -var a; -var b; a = x; a = b; b = a; diff --git a/tests/baselines/reference/assignFromBooleanInterface2.symbols b/tests/baselines/reference/assignFromBooleanInterface2.symbols index 1d3dc6b474e0c..51cfc18382fea 100644 --- a/tests/baselines/reference/assignFromBooleanInterface2.symbols +++ b/tests/baselines/reference/assignFromBooleanInterface2.symbols @@ -18,36 +18,36 @@ interface NotBoolean { var x = true; >x : Symbol(x, Decl(assignFromBooleanInterface2.ts, 8, 3)) -var a: Boolean; ->a : Symbol(a, Decl(assignFromBooleanInterface2.ts, 9, 3)) +declare var a: Boolean; +>a : Symbol(a, Decl(assignFromBooleanInterface2.ts, 9, 11)) >Boolean : Symbol(Boolean, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(assignFromBooleanInterface2.ts, 0, 0)) -var b: NotBoolean; ->b : Symbol(b, Decl(assignFromBooleanInterface2.ts, 10, 3)) +declare var b: NotBoolean; +>b : Symbol(b, Decl(assignFromBooleanInterface2.ts, 10, 11)) >NotBoolean : Symbol(NotBoolean, Decl(assignFromBooleanInterface2.ts, 2, 1)) a = x; ->a : Symbol(a, Decl(assignFromBooleanInterface2.ts, 9, 3)) +>a : Symbol(a, Decl(assignFromBooleanInterface2.ts, 9, 11)) >x : Symbol(x, Decl(assignFromBooleanInterface2.ts, 8, 3)) a = b; ->a : Symbol(a, Decl(assignFromBooleanInterface2.ts, 9, 3)) ->b : Symbol(b, Decl(assignFromBooleanInterface2.ts, 10, 3)) +>a : Symbol(a, Decl(assignFromBooleanInterface2.ts, 9, 11)) +>b : Symbol(b, Decl(assignFromBooleanInterface2.ts, 10, 11)) b = a; ->b : Symbol(b, Decl(assignFromBooleanInterface2.ts, 10, 3)) ->a : Symbol(a, Decl(assignFromBooleanInterface2.ts, 9, 3)) +>b : Symbol(b, Decl(assignFromBooleanInterface2.ts, 10, 11)) +>a : Symbol(a, Decl(assignFromBooleanInterface2.ts, 9, 11)) b = x; ->b : Symbol(b, Decl(assignFromBooleanInterface2.ts, 10, 3)) +>b : Symbol(b, Decl(assignFromBooleanInterface2.ts, 10, 11)) >x : Symbol(x, Decl(assignFromBooleanInterface2.ts, 8, 3)) x = a; // expected error >x : Symbol(x, Decl(assignFromBooleanInterface2.ts, 8, 3)) ->a : Symbol(a, Decl(assignFromBooleanInterface2.ts, 9, 3)) +>a : Symbol(a, Decl(assignFromBooleanInterface2.ts, 9, 11)) x = b; // expected error >x : Symbol(x, Decl(assignFromBooleanInterface2.ts, 8, 3)) ->b : Symbol(b, Decl(assignFromBooleanInterface2.ts, 10, 3)) +>b : Symbol(b, Decl(assignFromBooleanInterface2.ts, 10, 11)) diff --git a/tests/baselines/reference/assignFromBooleanInterface2.types b/tests/baselines/reference/assignFromBooleanInterface2.types index 75691bba1997b..0038c4b696d03 100644 --- a/tests/baselines/reference/assignFromBooleanInterface2.types +++ b/tests/baselines/reference/assignFromBooleanInterface2.types @@ -19,11 +19,11 @@ var x = true; >true : true > : ^^^^ -var a: Boolean; +declare var a: Boolean; >a : Boolean > : ^^^^^^^ -var b: NotBoolean; +declare var b: NotBoolean; >b : NotBoolean > : ^^^^^^^^^^ diff --git a/tests/baselines/reference/assignFromNumberInterface.errors.txt b/tests/baselines/reference/assignFromNumberInterface.errors.txt index 421e4d34e5c2e..bc3e7f8f40ca2 100644 --- a/tests/baselines/reference/assignFromNumberInterface.errors.txt +++ b/tests/baselines/reference/assignFromNumberInterface.errors.txt @@ -4,7 +4,7 @@ assignFromNumberInterface.ts(3,1): error TS2322: Type 'Number' is not assignable ==== assignFromNumberInterface.ts (1 errors) ==== var x = 1; - var a: Number; + declare var a: Number; x = a; ~ !!! error TS2322: Type 'Number' is not assignable to type 'number'. diff --git a/tests/baselines/reference/assignFromNumberInterface.js b/tests/baselines/reference/assignFromNumberInterface.js index ea4cd1b8b6814..d4b57147fd22c 100644 --- a/tests/baselines/reference/assignFromNumberInterface.js +++ b/tests/baselines/reference/assignFromNumberInterface.js @@ -2,12 +2,11 @@ //// [assignFromNumberInterface.ts] var x = 1; -var a: Number; +declare var a: Number; x = a; a = x; //// [assignFromNumberInterface.js] var x = 1; -var a; x = a; a = x; diff --git a/tests/baselines/reference/assignFromNumberInterface.symbols b/tests/baselines/reference/assignFromNumberInterface.symbols index f0f7c8443d81c..35300e180e8e3 100644 --- a/tests/baselines/reference/assignFromNumberInterface.symbols +++ b/tests/baselines/reference/assignFromNumberInterface.symbols @@ -4,15 +4,15 @@ var x = 1; >x : Symbol(x, Decl(assignFromNumberInterface.ts, 0, 3)) -var a: Number; ->a : Symbol(a, Decl(assignFromNumberInterface.ts, 1, 3)) +declare var a: Number; +>a : Symbol(a, Decl(assignFromNumberInterface.ts, 1, 11)) >Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) x = a; >x : Symbol(x, Decl(assignFromNumberInterface.ts, 0, 3)) ->a : Symbol(a, Decl(assignFromNumberInterface.ts, 1, 3)) +>a : Symbol(a, Decl(assignFromNumberInterface.ts, 1, 11)) a = x; ->a : Symbol(a, Decl(assignFromNumberInterface.ts, 1, 3)) +>a : Symbol(a, Decl(assignFromNumberInterface.ts, 1, 11)) >x : Symbol(x, Decl(assignFromNumberInterface.ts, 0, 3)) diff --git a/tests/baselines/reference/assignFromNumberInterface.types b/tests/baselines/reference/assignFromNumberInterface.types index ad33c6cccaa47..92edae097dd3e 100644 --- a/tests/baselines/reference/assignFromNumberInterface.types +++ b/tests/baselines/reference/assignFromNumberInterface.types @@ -7,7 +7,7 @@ var x = 1; >1 : 1 > : ^ -var a: Number; +declare var a: Number; >a : Number > : ^^^^^^ diff --git a/tests/baselines/reference/assignFromNumberInterface2.errors.txt b/tests/baselines/reference/assignFromNumberInterface2.errors.txt index eae1519fd6d6d..112f1a5fc0023 100644 --- a/tests/baselines/reference/assignFromNumberInterface2.errors.txt +++ b/tests/baselines/reference/assignFromNumberInterface2.errors.txt @@ -18,8 +18,8 @@ assignFromNumberInterface2.ts(25,1): error TS2322: Type 'NotNumber' is not assig } var x = 1; - var a: Number; - var b: NotNumber; + declare var a: Number; + declare var b: NotNumber; a = x; a = b; diff --git a/tests/baselines/reference/assignFromNumberInterface2.js b/tests/baselines/reference/assignFromNumberInterface2.js index fac0aba9ff5e9..7fd396aa7673d 100644 --- a/tests/baselines/reference/assignFromNumberInterface2.js +++ b/tests/baselines/reference/assignFromNumberInterface2.js @@ -15,8 +15,8 @@ interface NotNumber { } var x = 1; -var a: Number; -var b: NotNumber; +declare var a: Number; +declare var b: NotNumber; a = x; a = b; @@ -31,8 +31,6 @@ x = b; // expected error //// [assignFromNumberInterface2.js] var x = 1; -var a; -var b; a = x; a = b; b = a; diff --git a/tests/baselines/reference/assignFromNumberInterface2.symbols b/tests/baselines/reference/assignFromNumberInterface2.symbols index 2a1f46e208195..a163ba3a31afd 100644 --- a/tests/baselines/reference/assignFromNumberInterface2.symbols +++ b/tests/baselines/reference/assignFromNumberInterface2.symbols @@ -37,36 +37,36 @@ interface NotNumber { var x = 1; >x : Symbol(x, Decl(assignFromNumberInterface2.ts, 13, 3)) -var a: Number; ->a : Symbol(a, Decl(assignFromNumberInterface2.ts, 14, 3)) +declare var a: Number; +>a : Symbol(a, Decl(assignFromNumberInterface2.ts, 14, 11)) >Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(assignFromNumberInterface2.ts, 0, 0)) -var b: NotNumber; ->b : Symbol(b, Decl(assignFromNumberInterface2.ts, 15, 3)) +declare var b: NotNumber; +>b : Symbol(b, Decl(assignFromNumberInterface2.ts, 15, 11)) >NotNumber : Symbol(NotNumber, Decl(assignFromNumberInterface2.ts, 2, 1)) a = x; ->a : Symbol(a, Decl(assignFromNumberInterface2.ts, 14, 3)) +>a : Symbol(a, Decl(assignFromNumberInterface2.ts, 14, 11)) >x : Symbol(x, Decl(assignFromNumberInterface2.ts, 13, 3)) a = b; ->a : Symbol(a, Decl(assignFromNumberInterface2.ts, 14, 3)) ->b : Symbol(b, Decl(assignFromNumberInterface2.ts, 15, 3)) +>a : Symbol(a, Decl(assignFromNumberInterface2.ts, 14, 11)) +>b : Symbol(b, Decl(assignFromNumberInterface2.ts, 15, 11)) b = a; ->b : Symbol(b, Decl(assignFromNumberInterface2.ts, 15, 3)) ->a : Symbol(a, Decl(assignFromNumberInterface2.ts, 14, 3)) +>b : Symbol(b, Decl(assignFromNumberInterface2.ts, 15, 11)) +>a : Symbol(a, Decl(assignFromNumberInterface2.ts, 14, 11)) b = x; ->b : Symbol(b, Decl(assignFromNumberInterface2.ts, 15, 3)) +>b : Symbol(b, Decl(assignFromNumberInterface2.ts, 15, 11)) >x : Symbol(x, Decl(assignFromNumberInterface2.ts, 13, 3)) x = a; // expected error >x : Symbol(x, Decl(assignFromNumberInterface2.ts, 13, 3)) ->a : Symbol(a, Decl(assignFromNumberInterface2.ts, 14, 3)) +>a : Symbol(a, Decl(assignFromNumberInterface2.ts, 14, 11)) x = b; // expected error >x : Symbol(x, Decl(assignFromNumberInterface2.ts, 13, 3)) ->b : Symbol(b, Decl(assignFromNumberInterface2.ts, 15, 3)) +>b : Symbol(b, Decl(assignFromNumberInterface2.ts, 15, 11)) diff --git a/tests/baselines/reference/assignFromNumberInterface2.types b/tests/baselines/reference/assignFromNumberInterface2.types index fb717bf271921..c3cc6fb24a7db 100644 --- a/tests/baselines/reference/assignFromNumberInterface2.types +++ b/tests/baselines/reference/assignFromNumberInterface2.types @@ -47,11 +47,11 @@ var x = 1; >1 : 1 > : ^ -var a: Number; +declare var a: Number; >a : Number > : ^^^^^^ -var b: NotNumber; +declare var b: NotNumber; >b : NotNumber > : ^^^^^^^^^ diff --git a/tests/baselines/reference/assignFromStringInterface.errors.txt b/tests/baselines/reference/assignFromStringInterface.errors.txt index d01a2c1e33524..d043b7155812c 100644 --- a/tests/baselines/reference/assignFromStringInterface.errors.txt +++ b/tests/baselines/reference/assignFromStringInterface.errors.txt @@ -4,7 +4,7 @@ assignFromStringInterface.ts(3,1): error TS2322: Type 'String' is not assignable ==== assignFromStringInterface.ts (1 errors) ==== var x = ''; - var a: String; + declare var a: String; x = a; ~ !!! error TS2322: Type 'String' is not assignable to type 'string'. diff --git a/tests/baselines/reference/assignFromStringInterface.js b/tests/baselines/reference/assignFromStringInterface.js index c458439013a2f..bb220c9ae28f8 100644 --- a/tests/baselines/reference/assignFromStringInterface.js +++ b/tests/baselines/reference/assignFromStringInterface.js @@ -2,12 +2,11 @@ //// [assignFromStringInterface.ts] var x = ''; -var a: String; +declare var a: String; x = a; a = x; //// [assignFromStringInterface.js] var x = ''; -var a; x = a; a = x; diff --git a/tests/baselines/reference/assignFromStringInterface.symbols b/tests/baselines/reference/assignFromStringInterface.symbols index 3b128582ab842..6f82db0b86eb0 100644 --- a/tests/baselines/reference/assignFromStringInterface.symbols +++ b/tests/baselines/reference/assignFromStringInterface.symbols @@ -4,15 +4,15 @@ var x = ''; >x : Symbol(x, Decl(assignFromStringInterface.ts, 0, 3)) -var a: String; ->a : Symbol(a, Decl(assignFromStringInterface.ts, 1, 3)) +declare var a: String; +>a : Symbol(a, Decl(assignFromStringInterface.ts, 1, 11)) >String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 1 more) x = a; >x : Symbol(x, Decl(assignFromStringInterface.ts, 0, 3)) ->a : Symbol(a, Decl(assignFromStringInterface.ts, 1, 3)) +>a : Symbol(a, Decl(assignFromStringInterface.ts, 1, 11)) a = x; ->a : Symbol(a, Decl(assignFromStringInterface.ts, 1, 3)) +>a : Symbol(a, Decl(assignFromStringInterface.ts, 1, 11)) >x : Symbol(x, Decl(assignFromStringInterface.ts, 0, 3)) diff --git a/tests/baselines/reference/assignFromStringInterface.types b/tests/baselines/reference/assignFromStringInterface.types index 7c921267f7ee8..7a434edc5986a 100644 --- a/tests/baselines/reference/assignFromStringInterface.types +++ b/tests/baselines/reference/assignFromStringInterface.types @@ -7,7 +7,7 @@ var x = ''; >'' : "" > : ^^ -var a: String; +declare var a: String; >a : String > : ^^^^^^ diff --git a/tests/baselines/reference/assignFromStringInterface2.errors.txt b/tests/baselines/reference/assignFromStringInterface2.errors.txt index 3517bf4d1d9f4..6aff3eb4bce0f 100644 --- a/tests/baselines/reference/assignFromStringInterface2.errors.txt +++ b/tests/baselines/reference/assignFromStringInterface2.errors.txt @@ -42,8 +42,8 @@ assignFromStringInterface2.ts(48,1): error TS2322: Type 'NotString' is not assig } var x = ''; - var a: String; - var b: NotString; + declare var a: String; + declare var b: NotString; a = x; a = b; diff --git a/tests/baselines/reference/assignFromStringInterface2.js b/tests/baselines/reference/assignFromStringInterface2.js index 308491f89cee8..653ba0bce6ef0 100644 --- a/tests/baselines/reference/assignFromStringInterface2.js +++ b/tests/baselines/reference/assignFromStringInterface2.js @@ -38,8 +38,8 @@ interface NotString { } var x = ''; -var a: String; -var b: NotString; +declare var a: String; +declare var b: NotString; a = x; a = b; @@ -54,8 +54,6 @@ x = b; // expected error //// [assignFromStringInterface2.js] var x = ''; -var a; -var b; a = x; a = b; b = a; diff --git a/tests/baselines/reference/assignFromStringInterface2.symbols b/tests/baselines/reference/assignFromStringInterface2.symbols index d1e77cda723f8..f0a452d9e6d59 100644 --- a/tests/baselines/reference/assignFromStringInterface2.symbols +++ b/tests/baselines/reference/assignFromStringInterface2.symbols @@ -143,36 +143,36 @@ interface NotString { var x = ''; >x : Symbol(x, Decl(assignFromStringInterface2.ts, 36, 3)) -var a: String; ->a : Symbol(a, Decl(assignFromStringInterface2.ts, 37, 3)) +declare var a: String; +>a : Symbol(a, Decl(assignFromStringInterface2.ts, 37, 11)) >String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 2 more) -var b: NotString; ->b : Symbol(b, Decl(assignFromStringInterface2.ts, 38, 3)) +declare var b: NotString; +>b : Symbol(b, Decl(assignFromStringInterface2.ts, 38, 11)) >NotString : Symbol(NotString, Decl(assignFromStringInterface2.ts, 2, 1)) a = x; ->a : Symbol(a, Decl(assignFromStringInterface2.ts, 37, 3)) +>a : Symbol(a, Decl(assignFromStringInterface2.ts, 37, 11)) >x : Symbol(x, Decl(assignFromStringInterface2.ts, 36, 3)) a = b; ->a : Symbol(a, Decl(assignFromStringInterface2.ts, 37, 3)) ->b : Symbol(b, Decl(assignFromStringInterface2.ts, 38, 3)) +>a : Symbol(a, Decl(assignFromStringInterface2.ts, 37, 11)) +>b : Symbol(b, Decl(assignFromStringInterface2.ts, 38, 11)) b = a; ->b : Symbol(b, Decl(assignFromStringInterface2.ts, 38, 3)) ->a : Symbol(a, Decl(assignFromStringInterface2.ts, 37, 3)) +>b : Symbol(b, Decl(assignFromStringInterface2.ts, 38, 11)) +>a : Symbol(a, Decl(assignFromStringInterface2.ts, 37, 11)) b = x; ->b : Symbol(b, Decl(assignFromStringInterface2.ts, 38, 3)) +>b : Symbol(b, Decl(assignFromStringInterface2.ts, 38, 11)) >x : Symbol(x, Decl(assignFromStringInterface2.ts, 36, 3)) x = a; // expected error >x : Symbol(x, Decl(assignFromStringInterface2.ts, 36, 3)) ->a : Symbol(a, Decl(assignFromStringInterface2.ts, 37, 3)) +>a : Symbol(a, Decl(assignFromStringInterface2.ts, 37, 11)) x = b; // expected error >x : Symbol(x, Decl(assignFromStringInterface2.ts, 36, 3)) ->b : Symbol(b, Decl(assignFromStringInterface2.ts, 38, 3)) +>b : Symbol(b, Decl(assignFromStringInterface2.ts, 38, 11)) diff --git a/tests/baselines/reference/assignFromStringInterface2.types b/tests/baselines/reference/assignFromStringInterface2.types index ad5e66cff4334..07abd49b32fc4 100644 --- a/tests/baselines/reference/assignFromStringInterface2.types +++ b/tests/baselines/reference/assignFromStringInterface2.types @@ -199,11 +199,11 @@ var x = ''; >'' : "" > : ^^ -var a: String; +declare var a: String; >a : String > : ^^^^^^ -var b: NotString; +declare var b: NotString; >b : NotString > : ^^^^^^^^^ diff --git a/tests/baselines/reference/assigningFromObjectToAnythingElse.errors.txt b/tests/baselines/reference/assigningFromObjectToAnythingElse.errors.txt index 828311e627ef9..5252d2b49a4ab 100644 --- a/tests/baselines/reference/assigningFromObjectToAnythingElse.errors.txt +++ b/tests/baselines/reference/assigningFromObjectToAnythingElse.errors.txt @@ -7,7 +7,7 @@ assigningFromObjectToAnythingElse.ts(8,5): error TS2696: The 'Object' type is as ==== assigningFromObjectToAnythingElse.ts (4 errors) ==== - var x: Object; + declare var x: Object; var y: RegExp; y = x; ~ diff --git a/tests/baselines/reference/assigningFromObjectToAnythingElse.js b/tests/baselines/reference/assigningFromObjectToAnythingElse.js index 39cddae6eee45..393cda52bead6 100644 --- a/tests/baselines/reference/assigningFromObjectToAnythingElse.js +++ b/tests/baselines/reference/assigningFromObjectToAnythingElse.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assigningFromObjectToAnythingElse.ts] //// //// [assigningFromObjectToAnythingElse.ts] -var x: Object; +declare var x: Object; var y: RegExp; y = x; @@ -12,7 +12,6 @@ var w: Error = new Object(); //// [assigningFromObjectToAnythingElse.js] -var x; var y; y = x; var a = Object.create(""); diff --git a/tests/baselines/reference/assigningFromObjectToAnythingElse.symbols b/tests/baselines/reference/assigningFromObjectToAnythingElse.symbols index b9981cbf27c77..2dfe427e64294 100644 --- a/tests/baselines/reference/assigningFromObjectToAnythingElse.symbols +++ b/tests/baselines/reference/assigningFromObjectToAnythingElse.symbols @@ -1,8 +1,8 @@ //// [tests/cases/compiler/assigningFromObjectToAnythingElse.ts] //// === assigningFromObjectToAnythingElse.ts === -var x: Object; ->x : Symbol(x, Decl(assigningFromObjectToAnythingElse.ts, 0, 3)) +declare var x: Object; +>x : Symbol(x, Decl(assigningFromObjectToAnythingElse.ts, 0, 11)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) var y: RegExp; @@ -11,7 +11,7 @@ var y: RegExp; y = x; >y : Symbol(y, Decl(assigningFromObjectToAnythingElse.ts, 1, 3)) ->x : Symbol(x, Decl(assigningFromObjectToAnythingElse.ts, 0, 3)) +>x : Symbol(x, Decl(assigningFromObjectToAnythingElse.ts, 0, 11)) var a: String = Object.create(""); >a : Symbol(a, Decl(assigningFromObjectToAnythingElse.ts, 4, 3)) diff --git a/tests/baselines/reference/assigningFromObjectToAnythingElse.types b/tests/baselines/reference/assigningFromObjectToAnythingElse.types index ac2b3e1d33cb6..5cca0414e9679 100644 --- a/tests/baselines/reference/assigningFromObjectToAnythingElse.types +++ b/tests/baselines/reference/assigningFromObjectToAnythingElse.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assigningFromObjectToAnythingElse.ts] //// === assigningFromObjectToAnythingElse.ts === -var x: Object; +declare var x: Object; >x : Object > : ^^^^^^ diff --git a/tests/baselines/reference/assignmentCompat1.errors.txt b/tests/baselines/reference/assignmentCompat1.errors.txt index 21f47f1464878..7c0d0ad0e4cfa 100644 --- a/tests/baselines/reference/assignmentCompat1.errors.txt +++ b/tests/baselines/reference/assignmentCompat1.errors.txt @@ -6,8 +6,8 @@ assignmentCompat1.ts(10,1): error TS2322: Type 'boolean' is not assignable to ty ==== assignmentCompat1.ts (4 errors) ==== var x = { one: 1 }; - var y: { [index: string]: any }; - var z: { [index: number]: any }; + declare var y: { [index: string]: any }; + declare var z: { [index: number]: any }; x = y; // Error ~ !!! error TS2741: Property 'one' is missing in type '{ [index: string]: any; }' but required in type '{ one: number; }'. diff --git a/tests/baselines/reference/assignmentCompat1.js b/tests/baselines/reference/assignmentCompat1.js index 7aa4680ff2a04..46129a3486827 100644 --- a/tests/baselines/reference/assignmentCompat1.js +++ b/tests/baselines/reference/assignmentCompat1.js @@ -2,8 +2,8 @@ //// [assignmentCompat1.ts] var x = { one: 1 }; -var y: { [index: string]: any }; -var z: { [index: number]: any }; +declare var y: { [index: string]: any }; +declare var z: { [index: number]: any }; x = y; // Error y = x; // Ok because index signature type is any x = z; // Error @@ -16,8 +16,6 @@ z = false; // Error //// [assignmentCompat1.js] var x = { one: 1 }; -var y; -var z; x = y; // Error y = x; // Ok because index signature type is any x = z; // Error diff --git a/tests/baselines/reference/assignmentCompat1.symbols b/tests/baselines/reference/assignmentCompat1.symbols index 8603aabcaea2e..a1d5f7470abf1 100644 --- a/tests/baselines/reference/assignmentCompat1.symbols +++ b/tests/baselines/reference/assignmentCompat1.symbols @@ -5,37 +5,37 @@ var x = { one: 1 }; >x : Symbol(x, Decl(assignmentCompat1.ts, 0, 3)) >one : Symbol(one, Decl(assignmentCompat1.ts, 0, 9)) -var y: { [index: string]: any }; ->y : Symbol(y, Decl(assignmentCompat1.ts, 1, 3)) ->index : Symbol(index, Decl(assignmentCompat1.ts, 1, 10)) +declare var y: { [index: string]: any }; +>y : Symbol(y, Decl(assignmentCompat1.ts, 1, 11)) +>index : Symbol(index, Decl(assignmentCompat1.ts, 1, 18)) -var z: { [index: number]: any }; ->z : Symbol(z, Decl(assignmentCompat1.ts, 2, 3)) ->index : Symbol(index, Decl(assignmentCompat1.ts, 2, 10)) +declare var z: { [index: number]: any }; +>z : Symbol(z, Decl(assignmentCompat1.ts, 2, 11)) +>index : Symbol(index, Decl(assignmentCompat1.ts, 2, 18)) x = y; // Error >x : Symbol(x, Decl(assignmentCompat1.ts, 0, 3)) ->y : Symbol(y, Decl(assignmentCompat1.ts, 1, 3)) +>y : Symbol(y, Decl(assignmentCompat1.ts, 1, 11)) y = x; // Ok because index signature type is any ->y : Symbol(y, Decl(assignmentCompat1.ts, 1, 3)) +>y : Symbol(y, Decl(assignmentCompat1.ts, 1, 11)) >x : Symbol(x, Decl(assignmentCompat1.ts, 0, 3)) x = z; // Error >x : Symbol(x, Decl(assignmentCompat1.ts, 0, 3)) ->z : Symbol(z, Decl(assignmentCompat1.ts, 2, 3)) +>z : Symbol(z, Decl(assignmentCompat1.ts, 2, 11)) z = x; // Ok because index signature type is any ->z : Symbol(z, Decl(assignmentCompat1.ts, 2, 3)) +>z : Symbol(z, Decl(assignmentCompat1.ts, 2, 11)) >x : Symbol(x, Decl(assignmentCompat1.ts, 0, 3)) y = "foo"; // Error ->y : Symbol(y, Decl(assignmentCompat1.ts, 1, 3)) +>y : Symbol(y, Decl(assignmentCompat1.ts, 1, 11)) z = "foo"; // OK, string has numeric indexer ->z : Symbol(z, Decl(assignmentCompat1.ts, 2, 3)) +>z : Symbol(z, Decl(assignmentCompat1.ts, 2, 11)) z = false; // Error ->z : Symbol(z, Decl(assignmentCompat1.ts, 2, 3)) +>z : Symbol(z, Decl(assignmentCompat1.ts, 2, 11)) diff --git a/tests/baselines/reference/assignmentCompat1.types b/tests/baselines/reference/assignmentCompat1.types index 6eb5a6ae394df..0e44dbe8a1923 100644 --- a/tests/baselines/reference/assignmentCompat1.types +++ b/tests/baselines/reference/assignmentCompat1.types @@ -11,13 +11,13 @@ var x = { one: 1 }; >1 : 1 > : ^ -var y: { [index: string]: any }; +declare var y: { [index: string]: any }; >y : { [index: string]: any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >index : string > : ^^^^^^ -var z: { [index: number]: any }; +declare var z: { [index: number]: any }; >z : { [index: number]: any; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >index : number diff --git a/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.errors.txt b/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.errors.txt index 861f1ca4a05a1..d470f57434ed2 100644 --- a/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.errors.txt +++ b/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.errors.txt @@ -6,13 +6,13 @@ assignmentCompatBetweenTupleAndArray.ts(18,1): error TS2322: Type '{}[]' is not ==== assignmentCompatBetweenTupleAndArray.ts (2 errors) ==== - var numStrTuple: [number, string]; - var numNumTuple: [number, number]; - var numEmptyObjTuple: [number, {}]; - var emptyObjTuple: [{}]; + declare var numStrTuple: [number, string]; + declare var numNumTuple: [number, number]; + declare var numEmptyObjTuple: [number, {}]; + declare var emptyObjTuple: [{}]; - var numArray: number[]; - var emptyObjArray: {}[]; + declare var numArray: number[]; + declare var emptyObjArray: {}[]; // no error numArray = numNumTuple; diff --git a/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.js b/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.js index eab8267b89688..682af0db3825c 100644 --- a/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.js +++ b/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.js @@ -1,13 +1,13 @@ //// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts] //// //// [assignmentCompatBetweenTupleAndArray.ts] -var numStrTuple: [number, string]; -var numNumTuple: [number, number]; -var numEmptyObjTuple: [number, {}]; -var emptyObjTuple: [{}]; +declare var numStrTuple: [number, string]; +declare var numNumTuple: [number, number]; +declare var numEmptyObjTuple: [number, {}]; +declare var emptyObjTuple: [{}]; -var numArray: number[]; -var emptyObjArray: {}[]; +declare var numArray: number[]; +declare var emptyObjArray: {}[]; // no error numArray = numNumTuple; @@ -22,12 +22,6 @@ emptyObjTuple = emptyObjArray; //// [assignmentCompatBetweenTupleAndArray.js] -var numStrTuple; -var numNumTuple; -var numEmptyObjTuple; -var emptyObjTuple; -var numArray; -var emptyObjArray; // no error numArray = numNumTuple; emptyObjArray = emptyObjTuple; diff --git a/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.symbols b/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.symbols index ebc52c1ccc15e..1a0b2cd7e0743 100644 --- a/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.symbols +++ b/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.symbols @@ -1,51 +1,51 @@ //// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts] //// === assignmentCompatBetweenTupleAndArray.ts === -var numStrTuple: [number, string]; ->numStrTuple : Symbol(numStrTuple, Decl(assignmentCompatBetweenTupleAndArray.ts, 0, 3)) +declare var numStrTuple: [number, string]; +>numStrTuple : Symbol(numStrTuple, Decl(assignmentCompatBetweenTupleAndArray.ts, 0, 11)) -var numNumTuple: [number, number]; ->numNumTuple : Symbol(numNumTuple, Decl(assignmentCompatBetweenTupleAndArray.ts, 1, 3)) +declare var numNumTuple: [number, number]; +>numNumTuple : Symbol(numNumTuple, Decl(assignmentCompatBetweenTupleAndArray.ts, 1, 11)) -var numEmptyObjTuple: [number, {}]; ->numEmptyObjTuple : Symbol(numEmptyObjTuple, Decl(assignmentCompatBetweenTupleAndArray.ts, 2, 3)) +declare var numEmptyObjTuple: [number, {}]; +>numEmptyObjTuple : Symbol(numEmptyObjTuple, Decl(assignmentCompatBetweenTupleAndArray.ts, 2, 11)) -var emptyObjTuple: [{}]; ->emptyObjTuple : Symbol(emptyObjTuple, Decl(assignmentCompatBetweenTupleAndArray.ts, 3, 3)) +declare var emptyObjTuple: [{}]; +>emptyObjTuple : Symbol(emptyObjTuple, Decl(assignmentCompatBetweenTupleAndArray.ts, 3, 11)) -var numArray: number[]; ->numArray : Symbol(numArray, Decl(assignmentCompatBetweenTupleAndArray.ts, 5, 3)) +declare var numArray: number[]; +>numArray : Symbol(numArray, Decl(assignmentCompatBetweenTupleAndArray.ts, 5, 11)) -var emptyObjArray: {}[]; ->emptyObjArray : Symbol(emptyObjArray, Decl(assignmentCompatBetweenTupleAndArray.ts, 6, 3)) +declare var emptyObjArray: {}[]; +>emptyObjArray : Symbol(emptyObjArray, Decl(assignmentCompatBetweenTupleAndArray.ts, 6, 11)) // no error numArray = numNumTuple; ->numArray : Symbol(numArray, Decl(assignmentCompatBetweenTupleAndArray.ts, 5, 3)) ->numNumTuple : Symbol(numNumTuple, Decl(assignmentCompatBetweenTupleAndArray.ts, 1, 3)) +>numArray : Symbol(numArray, Decl(assignmentCompatBetweenTupleAndArray.ts, 5, 11)) +>numNumTuple : Symbol(numNumTuple, Decl(assignmentCompatBetweenTupleAndArray.ts, 1, 11)) emptyObjArray = emptyObjTuple; ->emptyObjArray : Symbol(emptyObjArray, Decl(assignmentCompatBetweenTupleAndArray.ts, 6, 3)) ->emptyObjTuple : Symbol(emptyObjTuple, Decl(assignmentCompatBetweenTupleAndArray.ts, 3, 3)) +>emptyObjArray : Symbol(emptyObjArray, Decl(assignmentCompatBetweenTupleAndArray.ts, 6, 11)) +>emptyObjTuple : Symbol(emptyObjTuple, Decl(assignmentCompatBetweenTupleAndArray.ts, 3, 11)) emptyObjArray = numStrTuple; ->emptyObjArray : Symbol(emptyObjArray, Decl(assignmentCompatBetweenTupleAndArray.ts, 6, 3)) ->numStrTuple : Symbol(numStrTuple, Decl(assignmentCompatBetweenTupleAndArray.ts, 0, 3)) +>emptyObjArray : Symbol(emptyObjArray, Decl(assignmentCompatBetweenTupleAndArray.ts, 6, 11)) +>numStrTuple : Symbol(numStrTuple, Decl(assignmentCompatBetweenTupleAndArray.ts, 0, 11)) emptyObjArray = numNumTuple; ->emptyObjArray : Symbol(emptyObjArray, Decl(assignmentCompatBetweenTupleAndArray.ts, 6, 3)) ->numNumTuple : Symbol(numNumTuple, Decl(assignmentCompatBetweenTupleAndArray.ts, 1, 3)) +>emptyObjArray : Symbol(emptyObjArray, Decl(assignmentCompatBetweenTupleAndArray.ts, 6, 11)) +>numNumTuple : Symbol(numNumTuple, Decl(assignmentCompatBetweenTupleAndArray.ts, 1, 11)) emptyObjArray = numEmptyObjTuple; ->emptyObjArray : Symbol(emptyObjArray, Decl(assignmentCompatBetweenTupleAndArray.ts, 6, 3)) ->numEmptyObjTuple : Symbol(numEmptyObjTuple, Decl(assignmentCompatBetweenTupleAndArray.ts, 2, 3)) +>emptyObjArray : Symbol(emptyObjArray, Decl(assignmentCompatBetweenTupleAndArray.ts, 6, 11)) +>numEmptyObjTuple : Symbol(numEmptyObjTuple, Decl(assignmentCompatBetweenTupleAndArray.ts, 2, 11)) // error numArray = numStrTuple; ->numArray : Symbol(numArray, Decl(assignmentCompatBetweenTupleAndArray.ts, 5, 3)) ->numStrTuple : Symbol(numStrTuple, Decl(assignmentCompatBetweenTupleAndArray.ts, 0, 3)) +>numArray : Symbol(numArray, Decl(assignmentCompatBetweenTupleAndArray.ts, 5, 11)) +>numStrTuple : Symbol(numStrTuple, Decl(assignmentCompatBetweenTupleAndArray.ts, 0, 11)) emptyObjTuple = emptyObjArray; ->emptyObjTuple : Symbol(emptyObjTuple, Decl(assignmentCompatBetweenTupleAndArray.ts, 3, 3)) ->emptyObjArray : Symbol(emptyObjArray, Decl(assignmentCompatBetweenTupleAndArray.ts, 6, 3)) +>emptyObjTuple : Symbol(emptyObjTuple, Decl(assignmentCompatBetweenTupleAndArray.ts, 3, 11)) +>emptyObjArray : Symbol(emptyObjArray, Decl(assignmentCompatBetweenTupleAndArray.ts, 6, 11)) diff --git a/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.types b/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.types index 1c9bc07b8fd3a..424c0b64baf86 100644 --- a/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.types +++ b/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.types @@ -1,27 +1,27 @@ //// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts] //// === assignmentCompatBetweenTupleAndArray.ts === -var numStrTuple: [number, string]; +declare var numStrTuple: [number, string]; >numStrTuple : [number, string] > : ^^^^^^^^^^^^^^^^ -var numNumTuple: [number, number]; +declare var numNumTuple: [number, number]; >numNumTuple : [number, number] > : ^^^^^^^^^^^^^^^^ -var numEmptyObjTuple: [number, {}]; +declare var numEmptyObjTuple: [number, {}]; >numEmptyObjTuple : [number, {}] > : ^^^^^^^^^^^^ -var emptyObjTuple: [{}]; +declare var emptyObjTuple: [{}]; >emptyObjTuple : [{}] > : ^^^^ -var numArray: number[]; +declare var numArray: number[]; >numArray : number[] > : ^^^^^^^^ -var emptyObjArray: {}[]; +declare var emptyObjArray: {}[]; >emptyObjArray : {}[] > : ^^^^ diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures.errors.txt index 905c8e33ce6ff..3810663a12145 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures.errors.txt @@ -30,8 +30,8 @@ assignmentCompatWithCallSignatures.ts(42,1): error TS2322: Type '(x: string) => interface T { (x: number): void; } - var t: T; - var a: { (x: number): void }; + declare var t: T; + declare var a: { (x: number): void }; t = a; a = t; @@ -39,8 +39,8 @@ assignmentCompatWithCallSignatures.ts(42,1): error TS2322: Type '(x: string) => interface S { (x: number): string; } - var s: S; - var a2: { (x: number): string }; + declare var s: S; + declare var a2: { (x: number): string }; t = s; t = a2; a = s; @@ -56,8 +56,8 @@ assignmentCompatWithCallSignatures.ts(42,1): error TS2322: Type '(x: string) => interface S2 { (x: string): void; } - var s2: S2; - var a3: { (x: string): void }; + declare var s2: S2; + declare var a3: { (x: string): void }; // these are errors t = s2; ~ diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures.js b/tests/baselines/reference/assignmentCompatWithCallSignatures.js index b590146a43b3a..c22e0d3b838af 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures.js @@ -6,8 +6,8 @@ interface T { (x: number): void; } -var t: T; -var a: { (x: number): void }; +declare var t: T; +declare var a: { (x: number): void }; t = a; a = t; @@ -15,8 +15,8 @@ a = t; interface S { (x: number): string; } -var s: S; -var a2: { (x: number): string }; +declare var s: S; +declare var a2: { (x: number): string }; t = s; t = a2; a = s; @@ -32,8 +32,8 @@ a = function (x: number) { return ''; } interface S2 { (x: string): void; } -var s2: S2; -var a3: { (x: string): void }; +declare var s2: S2; +declare var a3: { (x: string): void }; // these are errors t = s2; t = a3; @@ -47,12 +47,8 @@ a = function (x: string) { return ''; } //// [assignmentCompatWithCallSignatures.js] // void returning call signatures can be assigned a non-void returning call signature that otherwise matches -var t; -var a; t = a; a = t; -var s; -var a2; t = s; t = a2; a = s; @@ -63,8 +59,6 @@ t = function (x) { return ''; }; a = function (x) { return 1; }; a = function () { return 1; }; a = function (x) { return ''; }; -var s2; -var a3; // these are errors t = s2; t = a3; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures.symbols b/tests/baselines/reference/assignmentCompatWithCallSignatures.symbols index aeaaa7a460154..5dac03976e3ab 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures.symbols +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures.symbols @@ -9,21 +9,21 @@ interface T { (x: number): void; >x : Symbol(x, Decl(assignmentCompatWithCallSignatures.ts, 3, 5)) } -var t: T; ->t : Symbol(t, Decl(assignmentCompatWithCallSignatures.ts, 5, 3)) +declare var t: T; +>t : Symbol(t, Decl(assignmentCompatWithCallSignatures.ts, 5, 11)) >T : Symbol(T, Decl(assignmentCompatWithCallSignatures.ts, 0, 0)) -var a: { (x: number): void }; ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures.ts, 6, 3)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures.ts, 6, 10)) +declare var a: { (x: number): void }; +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures.ts, 6, 11)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures.ts, 6, 18)) t = a; ->t : Symbol(t, Decl(assignmentCompatWithCallSignatures.ts, 5, 3)) ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures.ts, 6, 3)) +>t : Symbol(t, Decl(assignmentCompatWithCallSignatures.ts, 5, 11)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures.ts, 6, 11)) a = t; ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures.ts, 6, 3)) ->t : Symbol(t, Decl(assignmentCompatWithCallSignatures.ts, 5, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures.ts, 6, 11)) +>t : Symbol(t, Decl(assignmentCompatWithCallSignatures.ts, 5, 11)) interface S { >S : Symbol(S, Decl(assignmentCompatWithCallSignatures.ts, 9, 6)) @@ -31,54 +31,54 @@ interface S { (x: number): string; >x : Symbol(x, Decl(assignmentCompatWithCallSignatures.ts, 12, 5)) } -var s: S; ->s : Symbol(s, Decl(assignmentCompatWithCallSignatures.ts, 14, 3)) +declare var s: S; +>s : Symbol(s, Decl(assignmentCompatWithCallSignatures.ts, 14, 11)) >S : Symbol(S, Decl(assignmentCompatWithCallSignatures.ts, 9, 6)) -var a2: { (x: number): string }; ->a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures.ts, 15, 3)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures.ts, 15, 11)) +declare var a2: { (x: number): string }; +>a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures.ts, 15, 11)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures.ts, 15, 19)) t = s; ->t : Symbol(t, Decl(assignmentCompatWithCallSignatures.ts, 5, 3)) ->s : Symbol(s, Decl(assignmentCompatWithCallSignatures.ts, 14, 3)) +>t : Symbol(t, Decl(assignmentCompatWithCallSignatures.ts, 5, 11)) +>s : Symbol(s, Decl(assignmentCompatWithCallSignatures.ts, 14, 11)) t = a2; ->t : Symbol(t, Decl(assignmentCompatWithCallSignatures.ts, 5, 3)) ->a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures.ts, 15, 3)) +>t : Symbol(t, Decl(assignmentCompatWithCallSignatures.ts, 5, 11)) +>a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures.ts, 15, 11)) a = s; ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures.ts, 6, 3)) ->s : Symbol(s, Decl(assignmentCompatWithCallSignatures.ts, 14, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures.ts, 6, 11)) +>s : Symbol(s, Decl(assignmentCompatWithCallSignatures.ts, 14, 11)) a = a2; ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures.ts, 6, 3)) ->a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures.ts, 15, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures.ts, 6, 11)) +>a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures.ts, 15, 11)) t = (x: T) => 1; ->t : Symbol(t, Decl(assignmentCompatWithCallSignatures.ts, 5, 3)) +>t : Symbol(t, Decl(assignmentCompatWithCallSignatures.ts, 5, 11)) >T : Symbol(T, Decl(assignmentCompatWithCallSignatures.ts, 21, 5)) >x : Symbol(x, Decl(assignmentCompatWithCallSignatures.ts, 21, 8)) >T : Symbol(T, Decl(assignmentCompatWithCallSignatures.ts, 21, 5)) t = () => 1; ->t : Symbol(t, Decl(assignmentCompatWithCallSignatures.ts, 5, 3)) +>t : Symbol(t, Decl(assignmentCompatWithCallSignatures.ts, 5, 11)) t = function (x: number) { return ''; } ->t : Symbol(t, Decl(assignmentCompatWithCallSignatures.ts, 5, 3)) +>t : Symbol(t, Decl(assignmentCompatWithCallSignatures.ts, 5, 11)) >x : Symbol(x, Decl(assignmentCompatWithCallSignatures.ts, 23, 14)) a = (x: T) => 1; ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures.ts, 6, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures.ts, 6, 11)) >T : Symbol(T, Decl(assignmentCompatWithCallSignatures.ts, 24, 5)) >x : Symbol(x, Decl(assignmentCompatWithCallSignatures.ts, 24, 8)) >T : Symbol(T, Decl(assignmentCompatWithCallSignatures.ts, 24, 5)) a = () => 1; ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures.ts, 6, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures.ts, 6, 11)) a = function (x: number) { return ''; } ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures.ts, 6, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures.ts, 6, 11)) >x : Symbol(x, Decl(assignmentCompatWithCallSignatures.ts, 26, 14)) interface S2 { @@ -87,44 +87,44 @@ interface S2 { (x: string): void; >x : Symbol(x, Decl(assignmentCompatWithCallSignatures.ts, 29, 5)) } -var s2: S2; ->s2 : Symbol(s2, Decl(assignmentCompatWithCallSignatures.ts, 31, 3)) +declare var s2: S2; +>s2 : Symbol(s2, Decl(assignmentCompatWithCallSignatures.ts, 31, 11)) >S2 : Symbol(S2, Decl(assignmentCompatWithCallSignatures.ts, 26, 39)) -var a3: { (x: string): void }; ->a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures.ts, 32, 3)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures.ts, 32, 11)) +declare var a3: { (x: string): void }; +>a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures.ts, 32, 11)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures.ts, 32, 19)) // these are errors t = s2; ->t : Symbol(t, Decl(assignmentCompatWithCallSignatures.ts, 5, 3)) ->s2 : Symbol(s2, Decl(assignmentCompatWithCallSignatures.ts, 31, 3)) +>t : Symbol(t, Decl(assignmentCompatWithCallSignatures.ts, 5, 11)) +>s2 : Symbol(s2, Decl(assignmentCompatWithCallSignatures.ts, 31, 11)) t = a3; ->t : Symbol(t, Decl(assignmentCompatWithCallSignatures.ts, 5, 3)) ->a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures.ts, 32, 3)) +>t : Symbol(t, Decl(assignmentCompatWithCallSignatures.ts, 5, 11)) +>a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures.ts, 32, 11)) t = (x: string) => 1; ->t : Symbol(t, Decl(assignmentCompatWithCallSignatures.ts, 5, 3)) +>t : Symbol(t, Decl(assignmentCompatWithCallSignatures.ts, 5, 11)) >x : Symbol(x, Decl(assignmentCompatWithCallSignatures.ts, 36, 5)) t = function (x: string) { return ''; } ->t : Symbol(t, Decl(assignmentCompatWithCallSignatures.ts, 5, 3)) +>t : Symbol(t, Decl(assignmentCompatWithCallSignatures.ts, 5, 11)) >x : Symbol(x, Decl(assignmentCompatWithCallSignatures.ts, 37, 14)) a = s2; ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures.ts, 6, 3)) ->s2 : Symbol(s2, Decl(assignmentCompatWithCallSignatures.ts, 31, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures.ts, 6, 11)) +>s2 : Symbol(s2, Decl(assignmentCompatWithCallSignatures.ts, 31, 11)) a = a3; ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures.ts, 6, 3)) ->a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures.ts, 32, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures.ts, 6, 11)) +>a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures.ts, 32, 11)) a = (x: string) => 1; ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures.ts, 6, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures.ts, 6, 11)) >x : Symbol(x, Decl(assignmentCompatWithCallSignatures.ts, 40, 5)) a = function (x: string) { return ''; } ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures.ts, 6, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures.ts, 6, 11)) >x : Symbol(x, Decl(assignmentCompatWithCallSignatures.ts, 41, 14)) diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures.types b/tests/baselines/reference/assignmentCompatWithCallSignatures.types index ebe2000df48b2..c7ff1dcf1fc1f 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures.types +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures.types @@ -8,11 +8,11 @@ interface T { >x : number > : ^^^^^^ } -var t: T; +declare var t: T; >t : T > : ^ -var a: { (x: number): void }; +declare var a: { (x: number): void }; >a : (x: number) => void > : ^ ^^ ^^^^^ >x : number @@ -39,11 +39,11 @@ interface S { >x : number > : ^^^^^^ } -var s: S; +declare var s: S; >s : S > : ^ -var a2: { (x: number): string }; +declare var a2: { (x: number): string }; >a2 : (x: number) => string > : ^ ^^ ^^^^^ >x : number @@ -154,11 +154,11 @@ interface S2 { >x : string > : ^^^^^^ } -var s2: S2; +declare var s2: S2; >s2 : S2 > : ^^ -var a3: { (x: string): void }; +declare var a3: { (x: string): void }; >a3 : (x: string) => void > : ^ ^^ ^^^^^ >x : string diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures2.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures2.errors.txt index 3cefc45caab17..62137d31048c1 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures2.errors.txt @@ -34,8 +34,8 @@ assignmentCompatWithCallSignatures2.ts(49,1): error TS2322: Type '(x: string) => interface T { f(x: number): void; } - var t: T; - var a: { f(x: number): void }; + declare var t: T; + declare var a: { f(x: number): void }; t = a; a = t; @@ -43,8 +43,8 @@ assignmentCompatWithCallSignatures2.ts(49,1): error TS2322: Type '(x: string) => interface S { f(x: number): string; } - var s: S; - var a2: { f(x: number): string }; + declare var s: S; + declare var a2: { f(x: number): string }; t = s; t = a2; a = s; @@ -75,8 +75,8 @@ assignmentCompatWithCallSignatures2.ts(49,1): error TS2322: Type '(x: string) => interface S2 { f(x: string): void; } - var s2: S2; - var a3: { f(x: string): void }; + declare var s2: S2; + declare var a3: { f(x: string): void }; // these are errors t = s2; ~ diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures2.js b/tests/baselines/reference/assignmentCompatWithCallSignatures2.js index c7bf9a81f5a58..1528b9305f2a7 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures2.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures2.js @@ -6,8 +6,8 @@ interface T { f(x: number): void; } -var t: T; -var a: { f(x: number): void }; +declare var t: T; +declare var a: { f(x: number): void }; t = a; a = t; @@ -15,8 +15,8 @@ a = t; interface S { f(x: number): string; } -var s: S; -var a2: { f(x: number): string }; +declare var s: S; +declare var a2: { f(x: number): string }; t = s; t = a2; a = s; @@ -39,8 +39,8 @@ a = function (x: number) { return ''; } interface S2 { f(x: string): void; } -var s2: S2; -var a3: { f(x: string): void }; +declare var s2: S2; +declare var a3: { f(x: string): void }; // these are errors t = s2; t = a3; @@ -54,12 +54,8 @@ a = function (x: string) { return ''; } //// [assignmentCompatWithCallSignatures2.js] // void returning call signatures can be assigned a non-void returning call signature that otherwise matches -var t; -var a; t = a; a = t; -var s; -var a2; t = s; t = a2; a = s; @@ -76,8 +72,6 @@ t = function () { return 1; }; t = function (x) { return ''; }; a = function () { return 1; }; a = function (x) { return ''; }; -var s2; -var a3; // these are errors t = s2; t = a3; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures2.symbols b/tests/baselines/reference/assignmentCompatWithCallSignatures2.symbols index b861c36caeeb8..788bf1f479bae 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures2.symbols +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures2.symbols @@ -10,22 +10,22 @@ interface T { >f : Symbol(T.f, Decl(assignmentCompatWithCallSignatures2.ts, 2, 13)) >x : Symbol(x, Decl(assignmentCompatWithCallSignatures2.ts, 3, 6)) } -var t: T; ->t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 3)) +declare var t: T; +>t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 11)) >T : Symbol(T, Decl(assignmentCompatWithCallSignatures2.ts, 0, 0)) -var a: { f(x: number): void }; ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures2.ts, 6, 3)) ->f : Symbol(f, Decl(assignmentCompatWithCallSignatures2.ts, 6, 8)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures2.ts, 6, 11)) +declare var a: { f(x: number): void }; +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures2.ts, 6, 11)) +>f : Symbol(f, Decl(assignmentCompatWithCallSignatures2.ts, 6, 16)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures2.ts, 6, 19)) t = a; ->t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 3)) ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures2.ts, 6, 3)) +>t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 11)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures2.ts, 6, 11)) a = t; ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures2.ts, 6, 3)) ->t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures2.ts, 6, 11)) +>t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 11)) interface S { >S : Symbol(S, Decl(assignmentCompatWithCallSignatures2.ts, 9, 6)) @@ -34,81 +34,81 @@ interface S { >f : Symbol(S.f, Decl(assignmentCompatWithCallSignatures2.ts, 11, 13)) >x : Symbol(x, Decl(assignmentCompatWithCallSignatures2.ts, 12, 6)) } -var s: S; ->s : Symbol(s, Decl(assignmentCompatWithCallSignatures2.ts, 14, 3)) +declare var s: S; +>s : Symbol(s, Decl(assignmentCompatWithCallSignatures2.ts, 14, 11)) >S : Symbol(S, Decl(assignmentCompatWithCallSignatures2.ts, 9, 6)) -var a2: { f(x: number): string }; ->a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures2.ts, 15, 3)) ->f : Symbol(f, Decl(assignmentCompatWithCallSignatures2.ts, 15, 9)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures2.ts, 15, 12)) +declare var a2: { f(x: number): string }; +>a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures2.ts, 15, 11)) +>f : Symbol(f, Decl(assignmentCompatWithCallSignatures2.ts, 15, 17)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures2.ts, 15, 20)) t = s; ->t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 3)) ->s : Symbol(s, Decl(assignmentCompatWithCallSignatures2.ts, 14, 3)) +>t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 11)) +>s : Symbol(s, Decl(assignmentCompatWithCallSignatures2.ts, 14, 11)) t = a2; ->t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 3)) ->a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures2.ts, 15, 3)) +>t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 11)) +>a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures2.ts, 15, 11)) a = s; ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures2.ts, 6, 3)) ->s : Symbol(s, Decl(assignmentCompatWithCallSignatures2.ts, 14, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures2.ts, 6, 11)) +>s : Symbol(s, Decl(assignmentCompatWithCallSignatures2.ts, 14, 11)) a = a2; ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures2.ts, 6, 3)) ->a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures2.ts, 15, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures2.ts, 6, 11)) +>a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures2.ts, 15, 11)) t = { f: () => 1 }; ->t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 3)) +>t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 11)) >f : Symbol(f, Decl(assignmentCompatWithCallSignatures2.ts, 21, 5)) t = { f: (x:T) => 1 }; ->t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 3)) +>t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 11)) >f : Symbol(f, Decl(assignmentCompatWithCallSignatures2.ts, 22, 5)) >T : Symbol(T, Decl(assignmentCompatWithCallSignatures2.ts, 22, 10)) >x : Symbol(x, Decl(assignmentCompatWithCallSignatures2.ts, 22, 13)) >T : Symbol(T, Decl(assignmentCompatWithCallSignatures2.ts, 22, 10)) t = { f: function f() { return 1 } }; ->t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 3)) +>t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 11)) >f : Symbol(f, Decl(assignmentCompatWithCallSignatures2.ts, 23, 5)) >f : Symbol(f, Decl(assignmentCompatWithCallSignatures2.ts, 23, 8)) t = { f(x: number) { return ''; } } ->t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 3)) +>t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 11)) >f : Symbol(f, Decl(assignmentCompatWithCallSignatures2.ts, 24, 5)) >x : Symbol(x, Decl(assignmentCompatWithCallSignatures2.ts, 24, 8)) a = { f: () => 1 } ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures2.ts, 6, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures2.ts, 6, 11)) >f : Symbol(f, Decl(assignmentCompatWithCallSignatures2.ts, 25, 5)) a = { f: (x: T) => 1 }; ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures2.ts, 6, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures2.ts, 6, 11)) >f : Symbol(f, Decl(assignmentCompatWithCallSignatures2.ts, 26, 5)) >T : Symbol(T, Decl(assignmentCompatWithCallSignatures2.ts, 26, 10)) >x : Symbol(x, Decl(assignmentCompatWithCallSignatures2.ts, 26, 13)) >T : Symbol(T, Decl(assignmentCompatWithCallSignatures2.ts, 26, 10)) a = { f: function (x: number) { return ''; } } ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures2.ts, 6, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures2.ts, 6, 11)) >f : Symbol(f, Decl(assignmentCompatWithCallSignatures2.ts, 27, 5)) >x : Symbol(x, Decl(assignmentCompatWithCallSignatures2.ts, 27, 19)) // errors t = () => 1; ->t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 3)) +>t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 11)) t = function (x: number) { return ''; } ->t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 3)) +>t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 11)) >x : Symbol(x, Decl(assignmentCompatWithCallSignatures2.ts, 31, 14)) a = () => 1; ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures2.ts, 6, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures2.ts, 6, 11)) a = function (x: number) { return ''; } ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures2.ts, 6, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures2.ts, 6, 11)) >x : Symbol(x, Decl(assignmentCompatWithCallSignatures2.ts, 33, 14)) interface S2 { @@ -118,45 +118,45 @@ interface S2 { >f : Symbol(S2.f, Decl(assignmentCompatWithCallSignatures2.ts, 35, 14)) >x : Symbol(x, Decl(assignmentCompatWithCallSignatures2.ts, 36, 6)) } -var s2: S2; ->s2 : Symbol(s2, Decl(assignmentCompatWithCallSignatures2.ts, 38, 3)) +declare var s2: S2; +>s2 : Symbol(s2, Decl(assignmentCompatWithCallSignatures2.ts, 38, 11)) >S2 : Symbol(S2, Decl(assignmentCompatWithCallSignatures2.ts, 33, 39)) -var a3: { f(x: string): void }; ->a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures2.ts, 39, 3)) ->f : Symbol(f, Decl(assignmentCompatWithCallSignatures2.ts, 39, 9)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures2.ts, 39, 12)) +declare var a3: { f(x: string): void }; +>a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures2.ts, 39, 11)) +>f : Symbol(f, Decl(assignmentCompatWithCallSignatures2.ts, 39, 17)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures2.ts, 39, 20)) // these are errors t = s2; ->t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 3)) ->s2 : Symbol(s2, Decl(assignmentCompatWithCallSignatures2.ts, 38, 3)) +>t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 11)) +>s2 : Symbol(s2, Decl(assignmentCompatWithCallSignatures2.ts, 38, 11)) t = a3; ->t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 3)) ->a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures2.ts, 39, 3)) +>t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 11)) +>a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures2.ts, 39, 11)) t = (x: string) => 1; ->t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 3)) +>t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 11)) >x : Symbol(x, Decl(assignmentCompatWithCallSignatures2.ts, 43, 5)) t = function (x: string) { return ''; } ->t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 3)) +>t : Symbol(t, Decl(assignmentCompatWithCallSignatures2.ts, 5, 11)) >x : Symbol(x, Decl(assignmentCompatWithCallSignatures2.ts, 44, 14)) a = s2; ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures2.ts, 6, 3)) ->s2 : Symbol(s2, Decl(assignmentCompatWithCallSignatures2.ts, 38, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures2.ts, 6, 11)) +>s2 : Symbol(s2, Decl(assignmentCompatWithCallSignatures2.ts, 38, 11)) a = a3; ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures2.ts, 6, 3)) ->a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures2.ts, 39, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures2.ts, 6, 11)) +>a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures2.ts, 39, 11)) a = (x: string) => 1; ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures2.ts, 6, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures2.ts, 6, 11)) >x : Symbol(x, Decl(assignmentCompatWithCallSignatures2.ts, 47, 5)) a = function (x: string) { return ''; } ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures2.ts, 6, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures2.ts, 6, 11)) >x : Symbol(x, Decl(assignmentCompatWithCallSignatures2.ts, 48, 14)) diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures2.types b/tests/baselines/reference/assignmentCompatWithCallSignatures2.types index 1da1324ee7c3f..8d6b4d5cde730 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures2.types +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures2.types @@ -10,11 +10,11 @@ interface T { >x : number > : ^^^^^^ } -var t: T; +declare var t: T; >t : T > : ^ -var a: { f(x: number): void }; +declare var a: { f(x: number): void }; >a : { f(x: number): void; } > : ^^^^ ^^ ^^^ ^^^ >f : (x: number) => void @@ -45,11 +45,11 @@ interface S { >x : number > : ^^^^^^ } -var s: S; +declare var s: S; >s : S > : ^ -var a2: { f(x: number): string }; +declare var a2: { f(x: number): string }; >a2 : { f(x: number): string; } > : ^^^^ ^^ ^^^ ^^^ >f : (x: number) => string @@ -247,11 +247,11 @@ interface S2 { >x : string > : ^^^^^^ } -var s2: S2; +declare var s2: S2; >s2 : S2 > : ^^ -var a3: { f(x: string): void }; +declare var a3: { f(x: string): void }; >a3 : { f(x: string): void; } > : ^^^^ ^^ ^^^ ^^^ >f : (x: string) => void diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures3.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures3.errors.txt index 1d1c9bfdcebd3..b72fa97762c6f 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures3.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures3.errors.txt @@ -70,33 +70,33 @@ assignmentCompatWithCallSignatures3.ts(86,1): error TS2322: Type '(x: { a: strin class Derived2 extends Derived { baz: string; } class OtherDerived extends Base { bing: string; } - var a: (x: number) => number[]; - var a2: (x: number) => string[]; - var a3: (x: number) => void; - var a4: (x: string, y: number) => string; - var a5: (x: (arg: string) => number) => string; - var a6: (x: (arg: Base) => Derived) => Base; - var a7: (x: (arg: Base) => Derived) => (r: Base) => Derived; - var a8: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; - var a9: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; - var a10: (...x: Derived[]) => Derived; - var a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base; - var a12: (x: Array, y: Array) => Array; - var a13: (x: Array, y: Array) => Array; - var a14: (x: { a: string; b: number }) => Object; - var a15: { + declare var a: (x: number) => number[]; + declare var a2: (x: number) => string[]; + declare var a3: (x: number) => void; + declare var a4: (x: string, y: number) => string; + declare var a5: (x: (arg: string) => number) => string; + declare var a6: (x: (arg: Base) => Derived) => Base; + declare var a7: (x: (arg: Base) => Derived) => (r: Base) => Derived; + declare var a8: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; + declare var a9: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; + declare var a10: (...x: Derived[]) => Derived; + declare var a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base; + declare var a12: (x: Array, y: Array) => Array; + declare var a13: (x: Array, y: Array) => Array; + declare var a14: (x: { a: string; b: number }) => Object; + declare var a15: { (x: number): number[]; (x: string): string[]; } - var a16: { + declare var a16: { (x: T): number[]; (x: U): number[]; } - var a17: { + declare var a17: { (x: (a: number) => number): number[]; (x: (a: string) => string): string[]; }; - var a18: { + declare var a18: { (x: { (a: number): number; (a: string): string; @@ -107,39 +107,39 @@ assignmentCompatWithCallSignatures3.ts(86,1): error TS2322: Type '(x: { a: strin }): any[]; } - var b: (x: T) => T[]; + declare var b: (x: T) => T[]; a = b; // ok b = a; // ok ~ !!! error TS2322: Type '(x: number) => number[]' is not assignable to type '(x: T) => T[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'number'. -!!! related TS2208 assignmentCompatWithCallSignatures3.ts:45:9: This type parameter might need an `extends number` constraint. - var b2: (x: T) => string[]; +!!! related TS2208 assignmentCompatWithCallSignatures3.ts:45:17: This type parameter might need an `extends number` constraint. + declare var b2: (x: T) => string[]; a2 = b2; // ok b2 = a2; // ok ~~ !!! error TS2322: Type '(x: number) => string[]' is not assignable to type '(x: T) => string[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'number'. -!!! related TS2208 assignmentCompatWithCallSignatures3.ts:48:10: This type parameter might need an `extends number` constraint. - var b3: (x: T) => T; +!!! related TS2208 assignmentCompatWithCallSignatures3.ts:48:18: This type parameter might need an `extends number` constraint. + declare var b3: (x: T) => T; a3 = b3; // ok b3 = a3; // ok ~~ !!! error TS2322: Type '(x: number) => void' is not assignable to type '(x: T) => T'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'number'. -!!! related TS2208 assignmentCompatWithCallSignatures3.ts:51:10: This type parameter might need an `extends number` constraint. - var b4: (x: T, y: U) => T; +!!! related TS2208 assignmentCompatWithCallSignatures3.ts:51:18: This type parameter might need an `extends number` constraint. + declare var b4: (x: T, y: U) => T; a4 = b4; // ok b4 = a4; // ok ~~ !!! error TS2322: Type '(x: string, y: number) => string' is not assignable to type '(x: T, y: U) => T'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'string'. -!!! related TS2208 assignmentCompatWithCallSignatures3.ts:54:10: This type parameter might need an `extends string` constraint. - var b5: (x: (arg: T) => U) => T; +!!! related TS2208 assignmentCompatWithCallSignatures3.ts:54:18: This type parameter might need an `extends string` constraint. + declare var b5: (x: (arg: T) => U) => T; a5 = b5; // ok b5 = a5; // ok ~~ @@ -148,7 +148,7 @@ assignmentCompatWithCallSignatures3.ts(86,1): error TS2322: Type '(x: { a: strin !!! error TS2322: Types of parameters 'arg' and 'arg' are incompatible. !!! error TS2322: Type 'string' is not assignable to type 'T'. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. - var b6: (x: (arg: T) => U) => T; + declare var b6: (x: (arg: T) => U) => T; a6 = b6; // ok b6 = a6; // ok ~~ @@ -157,7 +157,7 @@ assignmentCompatWithCallSignatures3.ts(86,1): error TS2322: Type '(x: { a: strin !!! error TS2322: Types of parameters 'arg' and 'arg' are incompatible. !!! error TS2322: Type 'Base' is not assignable to type 'T'. !!! error TS2322: 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. - var b7: (x: (arg: T) => U) => (r: T) => U; + declare var b7: (x: (arg: T) => U) => (r: T) => U; a7 = b7; // ok b7 = a7; // ok ~~ @@ -166,7 +166,7 @@ assignmentCompatWithCallSignatures3.ts(86,1): error TS2322: Type '(x: { a: strin !!! error TS2322: Types of parameters 'arg' and 'arg' are incompatible. !!! error TS2322: Type 'Base' is not assignable to type 'T'. !!! error TS2322: 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. - var b8: (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U; + declare var b8: (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U; a8 = b8; // ok b8 = a8; // ok ~~ @@ -175,7 +175,7 @@ assignmentCompatWithCallSignatures3.ts(86,1): error TS2322: Type '(x: { a: strin !!! error TS2322: Types of parameters 'arg' and 'arg' are incompatible. !!! error TS2322: Type 'Base' is not assignable to type 'T'. !!! error TS2322: 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. - var b9: (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; + declare var b9: (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; a9 = b9; // ok b9 = a9; // ok ~~ @@ -184,14 +184,14 @@ assignmentCompatWithCallSignatures3.ts(86,1): error TS2322: Type '(x: { a: strin !!! error TS2322: Types of parameters 'arg' and 'arg' are incompatible. !!! error TS2322: Type 'Base' is not assignable to type 'T'. !!! error TS2322: 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. - var b10: (...x: T[]) => T; + declare var b10: (...x: T[]) => T; a10 = b10; // ok b10 = a10; // ok ~~~ !!! error TS2322: Type '(...x: Derived[]) => Derived' is not assignable to type '(...x: T[]) => T'. !!! error TS2322: Type 'Derived' is not assignable to type 'T'. !!! error TS2322: 'Derived' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Derived'. - var b11: (x: T, y: T) => T; + declare var b11: (x: T, y: T) => T; a11 = b11; // ok b11 = a11; // ok ~~~ @@ -199,8 +199,8 @@ assignmentCompatWithCallSignatures3.ts(86,1): error TS2322: Type '(x: { a: strin !!! error TS2322: Types of parameters 'y' and 'y' are incompatible. !!! error TS2322: Type 'T' is not assignable to type '{ foo: string; bar: string; }'. !!! error TS2322: Property 'bar' is missing in type 'Base' but required in type '{ foo: string; bar: string; }'. -!!! related TS2728 assignmentCompatWithCallSignatures3.ts:18:49: 'bar' is declared here. - var b12: >(x: Array, y: T) => Array; +!!! related TS2728 assignmentCompatWithCallSignatures3.ts:18:57: 'bar' is declared here. + declare var b12: >(x: Array, y: T) => Array; a12 = b12; // ok b12 = a12; // ok ~~~ @@ -209,14 +209,14 @@ assignmentCompatWithCallSignatures3.ts(86,1): error TS2322: Type '(x: { a: strin !!! error TS2322: Type 'T' is not assignable to type 'Derived2[]'. !!! error TS2322: Type 'Base[]' is not assignable to type 'Derived2[]'. !!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': baz, bar - var b13: >(x: Array, y: T) => T; + declare var b13: >(x: Array, y: T) => T; a13 = b13; // ok b13 = a13; // ok ~~~ !!! error TS2322: Type '(x: Base[], y: Derived[]) => Derived[]' is not assignable to type '>(x: Base[], y: T) => T'. !!! error TS2322: Type 'Derived[]' is not assignable to type 'T'. !!! error TS2322: 'Derived[]' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Derived[]'. - var b14: (x: { a: T; b: T }) => T; + declare var b14: (x: { a: T; b: T }) => T; a14 = b14; // ok ~~~ !!! error TS2322: Type '(x: { a: T; b: T; }) => T' is not assignable to type '(x: { a: string; b: number; }) => Object'. @@ -231,17 +231,17 @@ assignmentCompatWithCallSignatures3.ts(86,1): error TS2322: Type '(x: { a: strin !!! error TS2322: Type '{ a: T; b: T; }' is not assignable to type '{ a: string; b: number; }'. !!! error TS2322: Types of property 'a' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'string'. -!!! related TS2208 assignmentCompatWithCallSignatures3.ts:84:11: This type parameter might need an `extends string` constraint. - var b15: (x: T) => T[]; +!!! related TS2208 assignmentCompatWithCallSignatures3.ts:84:19: This type parameter might need an `extends string` constraint. + declare var b15: (x: T) => T[]; a15 = b15; // ok b15 = a15; // ok - var b16: (x: T) => number[]; + declare var b16: (x: T) => number[]; a16 = b16; // ok b16 = a16; // ok - var b17: (x: (a: T) => T) => T[]; // ok + declare var b17: (x: (a: T) => T) => T[]; // ok a17 = b17; // ok b17 = a17; // ok - var b18: (x: (a: T) => T) => T[]; + declare var b18: (x: (a: T) => T) => T[]; a18 = b18; // ok b18 = a18; // ok \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js index 7c3cfb81b994f..cdc9bdebef257 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js @@ -8,33 +8,33 @@ class Derived extends Base { bar: string; } class Derived2 extends Derived { baz: string; } class OtherDerived extends Base { bing: string; } -var a: (x: number) => number[]; -var a2: (x: number) => string[]; -var a3: (x: number) => void; -var a4: (x: string, y: number) => string; -var a5: (x: (arg: string) => number) => string; -var a6: (x: (arg: Base) => Derived) => Base; -var a7: (x: (arg: Base) => Derived) => (r: Base) => Derived; -var a8: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; -var a9: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; -var a10: (...x: Derived[]) => Derived; -var a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base; -var a12: (x: Array, y: Array) => Array; -var a13: (x: Array, y: Array) => Array; -var a14: (x: { a: string; b: number }) => Object; -var a15: { +declare var a: (x: number) => number[]; +declare var a2: (x: number) => string[]; +declare var a3: (x: number) => void; +declare var a4: (x: string, y: number) => string; +declare var a5: (x: (arg: string) => number) => string; +declare var a6: (x: (arg: Base) => Derived) => Base; +declare var a7: (x: (arg: Base) => Derived) => (r: Base) => Derived; +declare var a8: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; +declare var a9: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; +declare var a10: (...x: Derived[]) => Derived; +declare var a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base; +declare var a12: (x: Array, y: Array) => Array; +declare var a13: (x: Array, y: Array) => Array; +declare var a14: (x: { a: string; b: number }) => Object; +declare var a15: { (x: number): number[]; (x: string): string[]; } -var a16: { +declare var a16: { (x: T): number[]; (x: U): number[]; } -var a17: { +declare var a17: { (x: (a: number) => number): number[]; (x: (a: string) => string): string[]; }; -var a18: { +declare var a18: { (x: { (a: number): number; (a: string): string; @@ -45,58 +45,58 @@ var a18: { }): any[]; } -var b: (x: T) => T[]; +declare var b: (x: T) => T[]; a = b; // ok b = a; // ok -var b2: (x: T) => string[]; +declare var b2: (x: T) => string[]; a2 = b2; // ok b2 = a2; // ok -var b3: (x: T) => T; +declare var b3: (x: T) => T; a3 = b3; // ok b3 = a3; // ok -var b4: (x: T, y: U) => T; +declare var b4: (x: T, y: U) => T; a4 = b4; // ok b4 = a4; // ok -var b5: (x: (arg: T) => U) => T; +declare var b5: (x: (arg: T) => U) => T; a5 = b5; // ok b5 = a5; // ok -var b6: (x: (arg: T) => U) => T; +declare var b6: (x: (arg: T) => U) => T; a6 = b6; // ok b6 = a6; // ok -var b7: (x: (arg: T) => U) => (r: T) => U; +declare var b7: (x: (arg: T) => U) => (r: T) => U; a7 = b7; // ok b7 = a7; // ok -var b8: (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U; +declare var b8: (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U; a8 = b8; // ok b8 = a8; // ok -var b9: (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; +declare var b9: (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; a9 = b9; // ok b9 = a9; // ok -var b10: (...x: T[]) => T; +declare var b10: (...x: T[]) => T; a10 = b10; // ok b10 = a10; // ok -var b11: (x: T, y: T) => T; +declare var b11: (x: T, y: T) => T; a11 = b11; // ok b11 = a11; // ok -var b12: >(x: Array, y: T) => Array; +declare var b12: >(x: Array, y: T) => Array; a12 = b12; // ok b12 = a12; // ok -var b13: >(x: Array, y: T) => T; +declare var b13: >(x: Array, y: T) => T; a13 = b13; // ok b13 = a13; // ok -var b14: (x: { a: T; b: T }) => T; +declare var b14: (x: { a: T; b: T }) => T; a14 = b14; // ok b14 = a14; // ok -var b15: (x: T) => T[]; +declare var b15: (x: T) => T[]; a15 = b15; // ok b15 = a15; // ok -var b16: (x: T) => number[]; +declare var b16: (x: T) => number[]; a16 = b16; // ok b16 = a16; // ok -var b17: (x: (a: T) => T) => T[]; // ok +declare var b17: (x: (a: T) => T) => T[]; // ok a17 = b17; // ok b17 = a17; // ok -var b18: (x: (a: T) => T) => T[]; +declare var b18: (x: (a: T) => T) => T[]; a18 = b18; // ok b18 = a18; // ok @@ -144,75 +144,39 @@ var OtherDerived = /** @class */ (function (_super) { } return OtherDerived; }(Base)); -var a; -var a2; -var a3; -var a4; -var a5; -var a6; -var a7; -var a8; -var a9; -var a10; -var a11; -var a12; -var a13; -var a14; -var a15; -var a16; -var a17; -var a18; -var b; a = b; // ok b = a; // ok -var b2; a2 = b2; // ok b2 = a2; // ok -var b3; a3 = b3; // ok b3 = a3; // ok -var b4; a4 = b4; // ok b4 = a4; // ok -var b5; a5 = b5; // ok b5 = a5; // ok -var b6; a6 = b6; // ok b6 = a6; // ok -var b7; a7 = b7; // ok b7 = a7; // ok -var b8; a8 = b8; // ok b8 = a8; // ok -var b9; a9 = b9; // ok b9 = a9; // ok -var b10; a10 = b10; // ok b10 = a10; // ok -var b11; a11 = b11; // ok b11 = a11; // ok -var b12; a12 = b12; // ok b12 = a12; // ok -var b13; a13 = b13; // ok b13 = a13; // ok -var b14; a14 = b14; // ok b14 = a14; // ok -var b15; a15 = b15; // ok b15 = a15; // ok -var b16; a16 = b16; // ok b16 = a16; // ok -var b17; // ok a17 = b17; // ok b17 = a17; // ok -var b18; a18 = b18; // ok b18 = a18; // ok diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures3.symbols b/tests/baselines/reference/assignmentCompatWithCallSignatures3.symbols index 6561c6e85dce7..3124eb15b5c01 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures3.symbols +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures3.symbols @@ -22,120 +22,120 @@ class OtherDerived extends Base { bing: string; } >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures3.ts, 0, 0)) >bing : Symbol(OtherDerived.bing, Decl(assignmentCompatWithCallSignatures3.ts, 5, 33)) -var a: (x: number) => number[]; ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures3.ts, 7, 3)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 7, 8)) - -var a2: (x: number) => string[]; ->a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures3.ts, 8, 3)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 8, 9)) - -var a3: (x: number) => void; ->a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures3.ts, 9, 3)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 9, 9)) - -var a4: (x: string, y: number) => string; ->a4 : Symbol(a4, Decl(assignmentCompatWithCallSignatures3.ts, 10, 3)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 10, 9)) ->y : Symbol(y, Decl(assignmentCompatWithCallSignatures3.ts, 10, 19)) - -var a5: (x: (arg: string) => number) => string; ->a5 : Symbol(a5, Decl(assignmentCompatWithCallSignatures3.ts, 11, 3)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 11, 9)) ->arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures3.ts, 11, 13)) - -var a6: (x: (arg: Base) => Derived) => Base; ->a6 : Symbol(a6, Decl(assignmentCompatWithCallSignatures3.ts, 12, 3)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 12, 9)) ->arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures3.ts, 12, 13)) +declare var a: (x: number) => number[]; +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures3.ts, 7, 11)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 7, 16)) + +declare var a2: (x: number) => string[]; +>a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures3.ts, 8, 11)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 8, 17)) + +declare var a3: (x: number) => void; +>a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures3.ts, 9, 11)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 9, 17)) + +declare var a4: (x: string, y: number) => string; +>a4 : Symbol(a4, Decl(assignmentCompatWithCallSignatures3.ts, 10, 11)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 10, 17)) +>y : Symbol(y, Decl(assignmentCompatWithCallSignatures3.ts, 10, 27)) + +declare var a5: (x: (arg: string) => number) => string; +>a5 : Symbol(a5, Decl(assignmentCompatWithCallSignatures3.ts, 11, 11)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 11, 17)) +>arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures3.ts, 11, 21)) + +declare var a6: (x: (arg: Base) => Derived) => Base; +>a6 : Symbol(a6, Decl(assignmentCompatWithCallSignatures3.ts, 12, 11)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 12, 17)) +>arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures3.ts, 12, 21)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures3.ts, 0, 0)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures3.ts, 2, 27)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures3.ts, 0, 0)) -var a7: (x: (arg: Base) => Derived) => (r: Base) => Derived; ->a7 : Symbol(a7, Decl(assignmentCompatWithCallSignatures3.ts, 13, 3)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 13, 9)) ->arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures3.ts, 13, 13)) +declare var a7: (x: (arg: Base) => Derived) => (r: Base) => Derived; +>a7 : Symbol(a7, Decl(assignmentCompatWithCallSignatures3.ts, 13, 11)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 13, 17)) +>arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures3.ts, 13, 21)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures3.ts, 0, 0)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures3.ts, 2, 27)) ->r : Symbol(r, Decl(assignmentCompatWithCallSignatures3.ts, 13, 40)) +>r : Symbol(r, Decl(assignmentCompatWithCallSignatures3.ts, 13, 48)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures3.ts, 0, 0)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures3.ts, 2, 27)) -var a8: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; ->a8 : Symbol(a8, Decl(assignmentCompatWithCallSignatures3.ts, 14, 3)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 14, 9)) ->arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures3.ts, 14, 13)) +declare var a8: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; +>a8 : Symbol(a8, Decl(assignmentCompatWithCallSignatures3.ts, 14, 11)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 14, 17)) +>arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures3.ts, 14, 21)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures3.ts, 0, 0)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures3.ts, 2, 27)) ->y : Symbol(y, Decl(assignmentCompatWithCallSignatures3.ts, 14, 35)) ->arg2 : Symbol(arg2, Decl(assignmentCompatWithCallSignatures3.ts, 14, 40)) +>y : Symbol(y, Decl(assignmentCompatWithCallSignatures3.ts, 14, 43)) +>arg2 : Symbol(arg2, Decl(assignmentCompatWithCallSignatures3.ts, 14, 48)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures3.ts, 0, 0)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures3.ts, 2, 27)) ->r : Symbol(r, Decl(assignmentCompatWithCallSignatures3.ts, 14, 68)) +>r : Symbol(r, Decl(assignmentCompatWithCallSignatures3.ts, 14, 76)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures3.ts, 0, 0)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures3.ts, 2, 27)) -var a9: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; ->a9 : Symbol(a9, Decl(assignmentCompatWithCallSignatures3.ts, 15, 3)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 15, 9)) ->arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures3.ts, 15, 13)) +declare var a9: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; +>a9 : Symbol(a9, Decl(assignmentCompatWithCallSignatures3.ts, 15, 11)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 15, 17)) +>arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures3.ts, 15, 21)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures3.ts, 0, 0)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures3.ts, 2, 27)) ->y : Symbol(y, Decl(assignmentCompatWithCallSignatures3.ts, 15, 35)) ->arg2 : Symbol(arg2, Decl(assignmentCompatWithCallSignatures3.ts, 15, 40)) +>y : Symbol(y, Decl(assignmentCompatWithCallSignatures3.ts, 15, 43)) +>arg2 : Symbol(arg2, Decl(assignmentCompatWithCallSignatures3.ts, 15, 48)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures3.ts, 0, 0)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures3.ts, 2, 27)) ->r : Symbol(r, Decl(assignmentCompatWithCallSignatures3.ts, 15, 68)) +>r : Symbol(r, Decl(assignmentCompatWithCallSignatures3.ts, 15, 76)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures3.ts, 0, 0)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures3.ts, 2, 27)) -var a10: (...x: Derived[]) => Derived; ->a10 : Symbol(a10, Decl(assignmentCompatWithCallSignatures3.ts, 16, 3)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 16, 10)) +declare var a10: (...x: Derived[]) => Derived; +>a10 : Symbol(a10, Decl(assignmentCompatWithCallSignatures3.ts, 16, 11)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 16, 18)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures3.ts, 2, 27)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures3.ts, 2, 27)) -var a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base; ->a11 : Symbol(a11, Decl(assignmentCompatWithCallSignatures3.ts, 17, 3)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 17, 10)) ->foo : Symbol(foo, Decl(assignmentCompatWithCallSignatures3.ts, 17, 14)) ->y : Symbol(y, Decl(assignmentCompatWithCallSignatures3.ts, 17, 29)) ->foo : Symbol(foo, Decl(assignmentCompatWithCallSignatures3.ts, 17, 34)) ->bar : Symbol(bar, Decl(assignmentCompatWithCallSignatures3.ts, 17, 47)) +declare var a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base; +>a11 : Symbol(a11, Decl(assignmentCompatWithCallSignatures3.ts, 17, 11)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 17, 18)) +>foo : Symbol(foo, Decl(assignmentCompatWithCallSignatures3.ts, 17, 22)) +>y : Symbol(y, Decl(assignmentCompatWithCallSignatures3.ts, 17, 37)) +>foo : Symbol(foo, Decl(assignmentCompatWithCallSignatures3.ts, 17, 42)) +>bar : Symbol(bar, Decl(assignmentCompatWithCallSignatures3.ts, 17, 55)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures3.ts, 0, 0)) -var a12: (x: Array, y: Array) => Array; ->a12 : Symbol(a12, Decl(assignmentCompatWithCallSignatures3.ts, 18, 3)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 18, 10)) +declare var a12: (x: Array, y: Array) => Array; +>a12 : Symbol(a12, Decl(assignmentCompatWithCallSignatures3.ts, 18, 11)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 18, 18)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures3.ts, 0, 0)) ->y : Symbol(y, Decl(assignmentCompatWithCallSignatures3.ts, 18, 25)) +>y : Symbol(y, Decl(assignmentCompatWithCallSignatures3.ts, 18, 33)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithCallSignatures3.ts, 3, 43)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures3.ts, 2, 27)) -var a13: (x: Array, y: Array) => Array; ->a13 : Symbol(a13, Decl(assignmentCompatWithCallSignatures3.ts, 19, 3)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 19, 10)) +declare var a13: (x: Array, y: Array) => Array; +>a13 : Symbol(a13, Decl(assignmentCompatWithCallSignatures3.ts, 19, 11)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 19, 18)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures3.ts, 0, 0)) ->y : Symbol(y, Decl(assignmentCompatWithCallSignatures3.ts, 19, 25)) +>y : Symbol(y, Decl(assignmentCompatWithCallSignatures3.ts, 19, 33)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures3.ts, 2, 27)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures3.ts, 2, 27)) -var a14: (x: { a: string; b: number }) => Object; ->a14 : Symbol(a14, Decl(assignmentCompatWithCallSignatures3.ts, 20, 3)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 20, 10)) ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures3.ts, 20, 14)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignatures3.ts, 20, 25)) +declare var a14: (x: { a: string; b: number }) => Object; +>a14 : Symbol(a14, Decl(assignmentCompatWithCallSignatures3.ts, 20, 11)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 20, 18)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures3.ts, 20, 22)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignatures3.ts, 20, 33)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) -var a15: { ->a15 : Symbol(a15, Decl(assignmentCompatWithCallSignatures3.ts, 21, 3)) +declare var a15: { +>a15 : Symbol(a15, Decl(assignmentCompatWithCallSignatures3.ts, 21, 11)) (x: number): number[]; >x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 22, 5)) @@ -143,8 +143,8 @@ var a15: { (x: string): string[]; >x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 23, 5)) } -var a16: { ->a16 : Symbol(a16, Decl(assignmentCompatWithCallSignatures3.ts, 25, 3)) +declare var a16: { +>a16 : Symbol(a16, Decl(assignmentCompatWithCallSignatures3.ts, 25, 11)) (x: T): number[]; >T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 26, 5)) @@ -158,8 +158,8 @@ var a16: { >x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 27, 21)) >U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 27, 5)) } -var a17: { ->a17 : Symbol(a17, Decl(assignmentCompatWithCallSignatures3.ts, 29, 3)) +declare var a17: { +>a17 : Symbol(a17, Decl(assignmentCompatWithCallSignatures3.ts, 29, 11)) (x: (a: number) => number): number[]; >x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 30, 5)) @@ -170,8 +170,8 @@ var a17: { >a : Symbol(a, Decl(assignmentCompatWithCallSignatures3.ts, 31, 9)) }; -var a18: { ->a18 : Symbol(a18, Decl(assignmentCompatWithCallSignatures3.ts, 33, 3)) +declare var a18: { +>a18 : Symbol(a18, Decl(assignmentCompatWithCallSignatures3.ts, 33, 11)) (x: { >x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 34, 5)) @@ -197,335 +197,335 @@ var a18: { }): any[]; } -var b: (x: T) => T[]; ->b : Symbol(b, Decl(assignmentCompatWithCallSignatures3.ts, 44, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 44, 8)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 44, 11)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 44, 8)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 44, 8)) +declare var b: (x: T) => T[]; +>b : Symbol(b, Decl(assignmentCompatWithCallSignatures3.ts, 44, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 44, 16)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 44, 19)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 44, 16)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 44, 16)) a = b; // ok ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures3.ts, 7, 3)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignatures3.ts, 44, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures3.ts, 7, 11)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignatures3.ts, 44, 11)) b = a; // ok ->b : Symbol(b, Decl(assignmentCompatWithCallSignatures3.ts, 44, 3)) ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures3.ts, 7, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignatures3.ts, 44, 11)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures3.ts, 7, 11)) -var b2: (x: T) => string[]; ->b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures3.ts, 47, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 47, 9)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 47, 12)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 47, 9)) +declare var b2: (x: T) => string[]; +>b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures3.ts, 47, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 47, 17)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 47, 20)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 47, 17)) a2 = b2; // ok ->a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures3.ts, 8, 3)) ->b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures3.ts, 47, 3)) +>a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures3.ts, 8, 11)) +>b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures3.ts, 47, 11)) b2 = a2; // ok ->b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures3.ts, 47, 3)) ->a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures3.ts, 8, 3)) +>b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures3.ts, 47, 11)) +>a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures3.ts, 8, 11)) -var b3: (x: T) => T; ->b3 : Symbol(b3, Decl(assignmentCompatWithCallSignatures3.ts, 50, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 50, 9)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 50, 12)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 50, 9)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 50, 9)) +declare var b3: (x: T) => T; +>b3 : Symbol(b3, Decl(assignmentCompatWithCallSignatures3.ts, 50, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 50, 17)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 50, 20)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 50, 17)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 50, 17)) a3 = b3; // ok ->a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures3.ts, 9, 3)) ->b3 : Symbol(b3, Decl(assignmentCompatWithCallSignatures3.ts, 50, 3)) +>a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures3.ts, 9, 11)) +>b3 : Symbol(b3, Decl(assignmentCompatWithCallSignatures3.ts, 50, 11)) b3 = a3; // ok ->b3 : Symbol(b3, Decl(assignmentCompatWithCallSignatures3.ts, 50, 3)) ->a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures3.ts, 9, 3)) - -var b4: (x: T, y: U) => T; ->b4 : Symbol(b4, Decl(assignmentCompatWithCallSignatures3.ts, 53, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 53, 9)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 53, 11)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 53, 15)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 53, 9)) ->y : Symbol(y, Decl(assignmentCompatWithCallSignatures3.ts, 53, 20)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 53, 11)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 53, 9)) +>b3 : Symbol(b3, Decl(assignmentCompatWithCallSignatures3.ts, 50, 11)) +>a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures3.ts, 9, 11)) + +declare var b4: (x: T, y: U) => T; +>b4 : Symbol(b4, Decl(assignmentCompatWithCallSignatures3.ts, 53, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 53, 17)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 53, 19)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 53, 23)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 53, 17)) +>y : Symbol(y, Decl(assignmentCompatWithCallSignatures3.ts, 53, 28)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 53, 19)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 53, 17)) a4 = b4; // ok ->a4 : Symbol(a4, Decl(assignmentCompatWithCallSignatures3.ts, 10, 3)) ->b4 : Symbol(b4, Decl(assignmentCompatWithCallSignatures3.ts, 53, 3)) +>a4 : Symbol(a4, Decl(assignmentCompatWithCallSignatures3.ts, 10, 11)) +>b4 : Symbol(b4, Decl(assignmentCompatWithCallSignatures3.ts, 53, 11)) b4 = a4; // ok ->b4 : Symbol(b4, Decl(assignmentCompatWithCallSignatures3.ts, 53, 3)) ->a4 : Symbol(a4, Decl(assignmentCompatWithCallSignatures3.ts, 10, 3)) - -var b5: (x: (arg: T) => U) => T; ->b5 : Symbol(b5, Decl(assignmentCompatWithCallSignatures3.ts, 56, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 56, 9)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 56, 11)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 56, 15)) ->arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures3.ts, 56, 19)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 56, 9)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 56, 11)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 56, 9)) +>b4 : Symbol(b4, Decl(assignmentCompatWithCallSignatures3.ts, 53, 11)) +>a4 : Symbol(a4, Decl(assignmentCompatWithCallSignatures3.ts, 10, 11)) + +declare var b5: (x: (arg: T) => U) => T; +>b5 : Symbol(b5, Decl(assignmentCompatWithCallSignatures3.ts, 56, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 56, 17)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 56, 19)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 56, 23)) +>arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures3.ts, 56, 27)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 56, 17)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 56, 19)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 56, 17)) a5 = b5; // ok ->a5 : Symbol(a5, Decl(assignmentCompatWithCallSignatures3.ts, 11, 3)) ->b5 : Symbol(b5, Decl(assignmentCompatWithCallSignatures3.ts, 56, 3)) +>a5 : Symbol(a5, Decl(assignmentCompatWithCallSignatures3.ts, 11, 11)) +>b5 : Symbol(b5, Decl(assignmentCompatWithCallSignatures3.ts, 56, 11)) b5 = a5; // ok ->b5 : Symbol(b5, Decl(assignmentCompatWithCallSignatures3.ts, 56, 3)) ->a5 : Symbol(a5, Decl(assignmentCompatWithCallSignatures3.ts, 11, 3)) +>b5 : Symbol(b5, Decl(assignmentCompatWithCallSignatures3.ts, 56, 11)) +>a5 : Symbol(a5, Decl(assignmentCompatWithCallSignatures3.ts, 11, 11)) -var b6: (x: (arg: T) => U) => T; ->b6 : Symbol(b6, Decl(assignmentCompatWithCallSignatures3.ts, 59, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 59, 9)) +declare var b6: (x: (arg: T) => U) => T; +>b6 : Symbol(b6, Decl(assignmentCompatWithCallSignatures3.ts, 59, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 59, 17)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures3.ts, 0, 0)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 59, 24)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 59, 32)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures3.ts, 2, 27)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 59, 44)) ->arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures3.ts, 59, 48)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 59, 9)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 59, 24)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 59, 9)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 59, 52)) +>arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures3.ts, 59, 56)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 59, 17)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 59, 32)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 59, 17)) a6 = b6; // ok ->a6 : Symbol(a6, Decl(assignmentCompatWithCallSignatures3.ts, 12, 3)) ->b6 : Symbol(b6, Decl(assignmentCompatWithCallSignatures3.ts, 59, 3)) +>a6 : Symbol(a6, Decl(assignmentCompatWithCallSignatures3.ts, 12, 11)) +>b6 : Symbol(b6, Decl(assignmentCompatWithCallSignatures3.ts, 59, 11)) b6 = a6; // ok ->b6 : Symbol(b6, Decl(assignmentCompatWithCallSignatures3.ts, 59, 3)) ->a6 : Symbol(a6, Decl(assignmentCompatWithCallSignatures3.ts, 12, 3)) +>b6 : Symbol(b6, Decl(assignmentCompatWithCallSignatures3.ts, 59, 11)) +>a6 : Symbol(a6, Decl(assignmentCompatWithCallSignatures3.ts, 12, 11)) -var b7: (x: (arg: T) => U) => (r: T) => U; ->b7 : Symbol(b7, Decl(assignmentCompatWithCallSignatures3.ts, 62, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 62, 9)) +declare var b7: (x: (arg: T) => U) => (r: T) => U; +>b7 : Symbol(b7, Decl(assignmentCompatWithCallSignatures3.ts, 62, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 62, 17)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures3.ts, 0, 0)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 62, 24)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 62, 32)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures3.ts, 2, 27)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 62, 44)) ->arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures3.ts, 62, 48)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 62, 9)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 62, 24)) ->r : Symbol(r, Decl(assignmentCompatWithCallSignatures3.ts, 62, 66)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 62, 9)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 62, 24)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 62, 52)) +>arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures3.ts, 62, 56)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 62, 17)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 62, 32)) +>r : Symbol(r, Decl(assignmentCompatWithCallSignatures3.ts, 62, 74)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 62, 17)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 62, 32)) a7 = b7; // ok ->a7 : Symbol(a7, Decl(assignmentCompatWithCallSignatures3.ts, 13, 3)) ->b7 : Symbol(b7, Decl(assignmentCompatWithCallSignatures3.ts, 62, 3)) +>a7 : Symbol(a7, Decl(assignmentCompatWithCallSignatures3.ts, 13, 11)) +>b7 : Symbol(b7, Decl(assignmentCompatWithCallSignatures3.ts, 62, 11)) b7 = a7; // ok ->b7 : Symbol(b7, Decl(assignmentCompatWithCallSignatures3.ts, 62, 3)) ->a7 : Symbol(a7, Decl(assignmentCompatWithCallSignatures3.ts, 13, 3)) +>b7 : Symbol(b7, Decl(assignmentCompatWithCallSignatures3.ts, 62, 11)) +>a7 : Symbol(a7, Decl(assignmentCompatWithCallSignatures3.ts, 13, 11)) -var b8: (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U; ->b8 : Symbol(b8, Decl(assignmentCompatWithCallSignatures3.ts, 65, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 65, 9)) +declare var b8: (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U; +>b8 : Symbol(b8, Decl(assignmentCompatWithCallSignatures3.ts, 65, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 65, 17)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures3.ts, 0, 0)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 65, 24)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 65, 32)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures3.ts, 2, 27)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 65, 44)) ->arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures3.ts, 65, 48)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 65, 9)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 65, 24)) ->y : Symbol(y, Decl(assignmentCompatWithCallSignatures3.ts, 65, 61)) ->arg2 : Symbol(arg2, Decl(assignmentCompatWithCallSignatures3.ts, 65, 66)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 65, 9)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 65, 24)) ->r : Symbol(r, Decl(assignmentCompatWithCallSignatures3.ts, 65, 85)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 65, 9)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 65, 24)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 65, 52)) +>arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures3.ts, 65, 56)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 65, 17)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 65, 32)) +>y : Symbol(y, Decl(assignmentCompatWithCallSignatures3.ts, 65, 69)) +>arg2 : Symbol(arg2, Decl(assignmentCompatWithCallSignatures3.ts, 65, 74)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 65, 17)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 65, 32)) +>r : Symbol(r, Decl(assignmentCompatWithCallSignatures3.ts, 65, 93)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 65, 17)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 65, 32)) a8 = b8; // ok ->a8 : Symbol(a8, Decl(assignmentCompatWithCallSignatures3.ts, 14, 3)) ->b8 : Symbol(b8, Decl(assignmentCompatWithCallSignatures3.ts, 65, 3)) +>a8 : Symbol(a8, Decl(assignmentCompatWithCallSignatures3.ts, 14, 11)) +>b8 : Symbol(b8, Decl(assignmentCompatWithCallSignatures3.ts, 65, 11)) b8 = a8; // ok ->b8 : Symbol(b8, Decl(assignmentCompatWithCallSignatures3.ts, 65, 3)) ->a8 : Symbol(a8, Decl(assignmentCompatWithCallSignatures3.ts, 14, 3)) +>b8 : Symbol(b8, Decl(assignmentCompatWithCallSignatures3.ts, 65, 11)) +>a8 : Symbol(a8, Decl(assignmentCompatWithCallSignatures3.ts, 14, 11)) -var b9: (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; ->b9 : Symbol(b9, Decl(assignmentCompatWithCallSignatures3.ts, 68, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 68, 9)) +declare var b9: (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; +>b9 : Symbol(b9, Decl(assignmentCompatWithCallSignatures3.ts, 68, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 68, 17)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures3.ts, 0, 0)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 68, 24)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 68, 32)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures3.ts, 2, 27)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 68, 44)) ->arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures3.ts, 68, 48)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 68, 9)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 68, 24)) ->y : Symbol(y, Decl(assignmentCompatWithCallSignatures3.ts, 68, 61)) ->arg2 : Symbol(arg2, Decl(assignmentCompatWithCallSignatures3.ts, 68, 66)) ->foo : Symbol(foo, Decl(assignmentCompatWithCallSignatures3.ts, 68, 73)) ->bing : Symbol(bing, Decl(assignmentCompatWithCallSignatures3.ts, 68, 86)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 68, 24)) ->r : Symbol(r, Decl(assignmentCompatWithCallSignatures3.ts, 68, 113)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 68, 9)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 68, 24)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 68, 52)) +>arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures3.ts, 68, 56)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 68, 17)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 68, 32)) +>y : Symbol(y, Decl(assignmentCompatWithCallSignatures3.ts, 68, 69)) +>arg2 : Symbol(arg2, Decl(assignmentCompatWithCallSignatures3.ts, 68, 74)) +>foo : Symbol(foo, Decl(assignmentCompatWithCallSignatures3.ts, 68, 81)) +>bing : Symbol(bing, Decl(assignmentCompatWithCallSignatures3.ts, 68, 94)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 68, 32)) +>r : Symbol(r, Decl(assignmentCompatWithCallSignatures3.ts, 68, 121)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 68, 17)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures3.ts, 68, 32)) a9 = b9; // ok ->a9 : Symbol(a9, Decl(assignmentCompatWithCallSignatures3.ts, 15, 3)) ->b9 : Symbol(b9, Decl(assignmentCompatWithCallSignatures3.ts, 68, 3)) +>a9 : Symbol(a9, Decl(assignmentCompatWithCallSignatures3.ts, 15, 11)) +>b9 : Symbol(b9, Decl(assignmentCompatWithCallSignatures3.ts, 68, 11)) b9 = a9; // ok ->b9 : Symbol(b9, Decl(assignmentCompatWithCallSignatures3.ts, 68, 3)) ->a9 : Symbol(a9, Decl(assignmentCompatWithCallSignatures3.ts, 15, 3)) +>b9 : Symbol(b9, Decl(assignmentCompatWithCallSignatures3.ts, 68, 11)) +>a9 : Symbol(a9, Decl(assignmentCompatWithCallSignatures3.ts, 15, 11)) -var b10: (...x: T[]) => T; ->b10 : Symbol(b10, Decl(assignmentCompatWithCallSignatures3.ts, 71, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 71, 10)) +declare var b10: (...x: T[]) => T; +>b10 : Symbol(b10, Decl(assignmentCompatWithCallSignatures3.ts, 71, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 71, 18)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures3.ts, 2, 27)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 71, 29)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 71, 10)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 71, 10)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 71, 37)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 71, 18)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 71, 18)) a10 = b10; // ok ->a10 : Symbol(a10, Decl(assignmentCompatWithCallSignatures3.ts, 16, 3)) ->b10 : Symbol(b10, Decl(assignmentCompatWithCallSignatures3.ts, 71, 3)) +>a10 : Symbol(a10, Decl(assignmentCompatWithCallSignatures3.ts, 16, 11)) +>b10 : Symbol(b10, Decl(assignmentCompatWithCallSignatures3.ts, 71, 11)) b10 = a10; // ok ->b10 : Symbol(b10, Decl(assignmentCompatWithCallSignatures3.ts, 71, 3)) ->a10 : Symbol(a10, Decl(assignmentCompatWithCallSignatures3.ts, 16, 3)) +>b10 : Symbol(b10, Decl(assignmentCompatWithCallSignatures3.ts, 71, 11)) +>a10 : Symbol(a10, Decl(assignmentCompatWithCallSignatures3.ts, 16, 11)) -var b11: (x: T, y: T) => T; ->b11 : Symbol(b11, Decl(assignmentCompatWithCallSignatures3.ts, 74, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 74, 10)) +declare var b11: (x: T, y: T) => T; +>b11 : Symbol(b11, Decl(assignmentCompatWithCallSignatures3.ts, 74, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 74, 18)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures3.ts, 0, 0)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 74, 26)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 74, 10)) ->y : Symbol(y, Decl(assignmentCompatWithCallSignatures3.ts, 74, 31)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 74, 10)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 74, 10)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 74, 34)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 74, 18)) +>y : Symbol(y, Decl(assignmentCompatWithCallSignatures3.ts, 74, 39)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 74, 18)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 74, 18)) a11 = b11; // ok ->a11 : Symbol(a11, Decl(assignmentCompatWithCallSignatures3.ts, 17, 3)) ->b11 : Symbol(b11, Decl(assignmentCompatWithCallSignatures3.ts, 74, 3)) +>a11 : Symbol(a11, Decl(assignmentCompatWithCallSignatures3.ts, 17, 11)) +>b11 : Symbol(b11, Decl(assignmentCompatWithCallSignatures3.ts, 74, 11)) b11 = a11; // ok ->b11 : Symbol(b11, Decl(assignmentCompatWithCallSignatures3.ts, 74, 3)) ->a11 : Symbol(a11, Decl(assignmentCompatWithCallSignatures3.ts, 17, 3)) +>b11 : Symbol(b11, Decl(assignmentCompatWithCallSignatures3.ts, 74, 11)) +>a11 : Symbol(a11, Decl(assignmentCompatWithCallSignatures3.ts, 17, 11)) -var b12: >(x: Array, y: T) => Array; ->b12 : Symbol(b12, Decl(assignmentCompatWithCallSignatures3.ts, 77, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 77, 10)) +declare var b12: >(x: Array, y: T) => Array; +>b12 : Symbol(b12, Decl(assignmentCompatWithCallSignatures3.ts, 77, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 77, 18)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures3.ts, 0, 0)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 77, 33)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 77, 41)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures3.ts, 0, 0)) ->y : Symbol(y, Decl(assignmentCompatWithCallSignatures3.ts, 77, 48)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 77, 10)) +>y : Symbol(y, Decl(assignmentCompatWithCallSignatures3.ts, 77, 56)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 77, 18)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures3.ts, 2, 27)) a12 = b12; // ok ->a12 : Symbol(a12, Decl(assignmentCompatWithCallSignatures3.ts, 18, 3)) ->b12 : Symbol(b12, Decl(assignmentCompatWithCallSignatures3.ts, 77, 3)) +>a12 : Symbol(a12, Decl(assignmentCompatWithCallSignatures3.ts, 18, 11)) +>b12 : Symbol(b12, Decl(assignmentCompatWithCallSignatures3.ts, 77, 11)) b12 = a12; // ok ->b12 : Symbol(b12, Decl(assignmentCompatWithCallSignatures3.ts, 77, 3)) ->a12 : Symbol(a12, Decl(assignmentCompatWithCallSignatures3.ts, 18, 3)) +>b12 : Symbol(b12, Decl(assignmentCompatWithCallSignatures3.ts, 77, 11)) +>a12 : Symbol(a12, Decl(assignmentCompatWithCallSignatures3.ts, 18, 11)) -var b13: >(x: Array, y: T) => T; ->b13 : Symbol(b13, Decl(assignmentCompatWithCallSignatures3.ts, 80, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 80, 10)) +declare var b13: >(x: Array, y: T) => T; +>b13 : Symbol(b13, Decl(assignmentCompatWithCallSignatures3.ts, 80, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 80, 18)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures3.ts, 2, 27)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 80, 36)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 80, 44)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures3.ts, 0, 0)) ->y : Symbol(y, Decl(assignmentCompatWithCallSignatures3.ts, 80, 51)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 80, 10)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 80, 10)) +>y : Symbol(y, Decl(assignmentCompatWithCallSignatures3.ts, 80, 59)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 80, 18)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 80, 18)) a13 = b13; // ok ->a13 : Symbol(a13, Decl(assignmentCompatWithCallSignatures3.ts, 19, 3)) ->b13 : Symbol(b13, Decl(assignmentCompatWithCallSignatures3.ts, 80, 3)) +>a13 : Symbol(a13, Decl(assignmentCompatWithCallSignatures3.ts, 19, 11)) +>b13 : Symbol(b13, Decl(assignmentCompatWithCallSignatures3.ts, 80, 11)) b13 = a13; // ok ->b13 : Symbol(b13, Decl(assignmentCompatWithCallSignatures3.ts, 80, 3)) ->a13 : Symbol(a13, Decl(assignmentCompatWithCallSignatures3.ts, 19, 3)) - -var b14: (x: { a: T; b: T }) => T; ->b14 : Symbol(b14, Decl(assignmentCompatWithCallSignatures3.ts, 83, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 83, 10)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 83, 13)) ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures3.ts, 83, 17)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 83, 10)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignatures3.ts, 83, 23)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 83, 10)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 83, 10)) +>b13 : Symbol(b13, Decl(assignmentCompatWithCallSignatures3.ts, 80, 11)) +>a13 : Symbol(a13, Decl(assignmentCompatWithCallSignatures3.ts, 19, 11)) + +declare var b14: (x: { a: T; b: T }) => T; +>b14 : Symbol(b14, Decl(assignmentCompatWithCallSignatures3.ts, 83, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 83, 18)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 83, 21)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures3.ts, 83, 25)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 83, 18)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignatures3.ts, 83, 31)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 83, 18)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 83, 18)) a14 = b14; // ok ->a14 : Symbol(a14, Decl(assignmentCompatWithCallSignatures3.ts, 20, 3)) ->b14 : Symbol(b14, Decl(assignmentCompatWithCallSignatures3.ts, 83, 3)) +>a14 : Symbol(a14, Decl(assignmentCompatWithCallSignatures3.ts, 20, 11)) +>b14 : Symbol(b14, Decl(assignmentCompatWithCallSignatures3.ts, 83, 11)) b14 = a14; // ok ->b14 : Symbol(b14, Decl(assignmentCompatWithCallSignatures3.ts, 83, 3)) ->a14 : Symbol(a14, Decl(assignmentCompatWithCallSignatures3.ts, 20, 3)) +>b14 : Symbol(b14, Decl(assignmentCompatWithCallSignatures3.ts, 83, 11)) +>a14 : Symbol(a14, Decl(assignmentCompatWithCallSignatures3.ts, 20, 11)) -var b15: (x: T) => T[]; ->b15 : Symbol(b15, Decl(assignmentCompatWithCallSignatures3.ts, 86, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 86, 10)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 86, 13)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 86, 10)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 86, 10)) +declare var b15: (x: T) => T[]; +>b15 : Symbol(b15, Decl(assignmentCompatWithCallSignatures3.ts, 86, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 86, 18)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 86, 21)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 86, 18)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 86, 18)) a15 = b15; // ok ->a15 : Symbol(a15, Decl(assignmentCompatWithCallSignatures3.ts, 21, 3)) ->b15 : Symbol(b15, Decl(assignmentCompatWithCallSignatures3.ts, 86, 3)) +>a15 : Symbol(a15, Decl(assignmentCompatWithCallSignatures3.ts, 21, 11)) +>b15 : Symbol(b15, Decl(assignmentCompatWithCallSignatures3.ts, 86, 11)) b15 = a15; // ok ->b15 : Symbol(b15, Decl(assignmentCompatWithCallSignatures3.ts, 86, 3)) ->a15 : Symbol(a15, Decl(assignmentCompatWithCallSignatures3.ts, 21, 3)) +>b15 : Symbol(b15, Decl(assignmentCompatWithCallSignatures3.ts, 86, 11)) +>a15 : Symbol(a15, Decl(assignmentCompatWithCallSignatures3.ts, 21, 11)) -var b16: (x: T) => number[]; ->b16 : Symbol(b16, Decl(assignmentCompatWithCallSignatures3.ts, 89, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 89, 10)) +declare var b16: (x: T) => number[]; +>b16 : Symbol(b16, Decl(assignmentCompatWithCallSignatures3.ts, 89, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 89, 18)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures3.ts, 0, 0)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 89, 26)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 89, 10)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 89, 34)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 89, 18)) a16 = b16; // ok ->a16 : Symbol(a16, Decl(assignmentCompatWithCallSignatures3.ts, 25, 3)) ->b16 : Symbol(b16, Decl(assignmentCompatWithCallSignatures3.ts, 89, 3)) +>a16 : Symbol(a16, Decl(assignmentCompatWithCallSignatures3.ts, 25, 11)) +>b16 : Symbol(b16, Decl(assignmentCompatWithCallSignatures3.ts, 89, 11)) b16 = a16; // ok ->b16 : Symbol(b16, Decl(assignmentCompatWithCallSignatures3.ts, 89, 3)) ->a16 : Symbol(a16, Decl(assignmentCompatWithCallSignatures3.ts, 25, 3)) - -var b17: (x: (a: T) => T) => T[]; // ok ->b17 : Symbol(b17, Decl(assignmentCompatWithCallSignatures3.ts, 92, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 92, 10)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 92, 13)) ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures3.ts, 92, 17)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 92, 10)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 92, 10)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 92, 10)) +>b16 : Symbol(b16, Decl(assignmentCompatWithCallSignatures3.ts, 89, 11)) +>a16 : Symbol(a16, Decl(assignmentCompatWithCallSignatures3.ts, 25, 11)) + +declare var b17: (x: (a: T) => T) => T[]; // ok +>b17 : Symbol(b17, Decl(assignmentCompatWithCallSignatures3.ts, 92, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 92, 18)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 92, 21)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures3.ts, 92, 25)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 92, 18)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 92, 18)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 92, 18)) a17 = b17; // ok ->a17 : Symbol(a17, Decl(assignmentCompatWithCallSignatures3.ts, 29, 3)) ->b17 : Symbol(b17, Decl(assignmentCompatWithCallSignatures3.ts, 92, 3)) +>a17 : Symbol(a17, Decl(assignmentCompatWithCallSignatures3.ts, 29, 11)) +>b17 : Symbol(b17, Decl(assignmentCompatWithCallSignatures3.ts, 92, 11)) b17 = a17; // ok ->b17 : Symbol(b17, Decl(assignmentCompatWithCallSignatures3.ts, 92, 3)) ->a17 : Symbol(a17, Decl(assignmentCompatWithCallSignatures3.ts, 29, 3)) - -var b18: (x: (a: T) => T) => T[]; ->b18 : Symbol(b18, Decl(assignmentCompatWithCallSignatures3.ts, 95, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 95, 10)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 95, 13)) ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures3.ts, 95, 17)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 95, 10)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 95, 10)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 95, 10)) +>b17 : Symbol(b17, Decl(assignmentCompatWithCallSignatures3.ts, 92, 11)) +>a17 : Symbol(a17, Decl(assignmentCompatWithCallSignatures3.ts, 29, 11)) + +declare var b18: (x: (a: T) => T) => T[]; +>b18 : Symbol(b18, Decl(assignmentCompatWithCallSignatures3.ts, 95, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 95, 18)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 95, 21)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures3.ts, 95, 25)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 95, 18)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 95, 18)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 95, 18)) a18 = b18; // ok ->a18 : Symbol(a18, Decl(assignmentCompatWithCallSignatures3.ts, 33, 3)) ->b18 : Symbol(b18, Decl(assignmentCompatWithCallSignatures3.ts, 95, 3)) +>a18 : Symbol(a18, Decl(assignmentCompatWithCallSignatures3.ts, 33, 11)) +>b18 : Symbol(b18, Decl(assignmentCompatWithCallSignatures3.ts, 95, 11)) b18 = a18; // ok ->b18 : Symbol(b18, Decl(assignmentCompatWithCallSignatures3.ts, 95, 3)) ->a18 : Symbol(a18, Decl(assignmentCompatWithCallSignatures3.ts, 33, 3)) +>b18 : Symbol(b18, Decl(assignmentCompatWithCallSignatures3.ts, 95, 11)) +>a18 : Symbol(a18, Decl(assignmentCompatWithCallSignatures3.ts, 33, 11)) diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures3.types b/tests/baselines/reference/assignmentCompatWithCallSignatures3.types index 225a7032edf1a..8792ad4ccc335 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures3.types +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures3.types @@ -33,25 +33,25 @@ class OtherDerived extends Base { bing: string; } >bing : string > : ^^^^^^ -var a: (x: number) => number[]; +declare var a: (x: number) => number[]; >a : (x: number) => number[] > : ^ ^^ ^^^^^ >x : number > : ^^^^^^ -var a2: (x: number) => string[]; +declare var a2: (x: number) => string[]; >a2 : (x: number) => string[] > : ^ ^^ ^^^^^ >x : number > : ^^^^^^ -var a3: (x: number) => void; +declare var a3: (x: number) => void; >a3 : (x: number) => void > : ^ ^^ ^^^^^ >x : number > : ^^^^^^ -var a4: (x: string, y: number) => string; +declare var a4: (x: string, y: number) => string; >a4 : (x: string, y: number) => string > : ^ ^^ ^^ ^^ ^^^^^ >x : string @@ -59,7 +59,7 @@ var a4: (x: string, y: number) => string; >y : number > : ^^^^^^ -var a5: (x: (arg: string) => number) => string; +declare var a5: (x: (arg: string) => number) => string; >a5 : (x: (arg: string) => number) => string > : ^ ^^ ^^^^^ >x : (arg: string) => number @@ -67,7 +67,7 @@ var a5: (x: (arg: string) => number) => string; >arg : string > : ^^^^^^ -var a6: (x: (arg: Base) => Derived) => Base; +declare var a6: (x: (arg: Base) => Derived) => Base; >a6 : (x: (arg: Base) => Derived) => Base > : ^ ^^ ^^^^^ >x : (arg: Base) => Derived @@ -75,7 +75,7 @@ var a6: (x: (arg: Base) => Derived) => Base; >arg : Base > : ^^^^ -var a7: (x: (arg: Base) => Derived) => (r: Base) => Derived; +declare var a7: (x: (arg: Base) => Derived) => (r: Base) => Derived; >a7 : (x: (arg: Base) => Derived) => (r: Base) => Derived > : ^ ^^ ^^^^^ >x : (arg: Base) => Derived @@ -85,7 +85,7 @@ var a7: (x: (arg: Base) => Derived) => (r: Base) => Derived; >r : Base > : ^^^^ -var a8: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; +declare var a8: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; >a8 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived > : ^ ^^ ^^ ^^ ^^^^^ >x : (arg: Base) => Derived @@ -99,7 +99,7 @@ var a8: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => >r : Base > : ^^^^ -var a9: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; +declare var a9: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; >a9 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived > : ^ ^^ ^^ ^^ ^^^^^ >x : (arg: Base) => Derived @@ -113,13 +113,13 @@ var a9: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => >r : Base > : ^^^^ -var a10: (...x: Derived[]) => Derived; +declare var a10: (...x: Derived[]) => Derived; >a10 : (...x: Derived[]) => Derived > : ^^^^ ^^ ^^^^^ >x : Derived[] > : ^^^^^^^^^ -var a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base; +declare var a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base; >a11 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base > : ^ ^^ ^^ ^^ ^^^^^ >x : { foo: string; } @@ -133,7 +133,7 @@ var a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base; >bar : string > : ^^^^^^ -var a12: (x: Array, y: Array) => Array; +declare var a12: (x: Array, y: Array) => Array; >a12 : (x: Array, y: Array) => Array > : ^ ^^ ^^ ^^ ^^^^^ >x : Base[] @@ -141,7 +141,7 @@ var a12: (x: Array, y: Array) => Array; >y : Derived2[] > : ^^^^^^^^^^ -var a13: (x: Array, y: Array) => Array; +declare var a13: (x: Array, y: Array) => Array; >a13 : (x: Array, y: Array) => Array > : ^ ^^ ^^ ^^ ^^^^^ >x : Base[] @@ -149,7 +149,7 @@ var a13: (x: Array, y: Array) => Array; >y : Derived[] > : ^^^^^^^^^ -var a14: (x: { a: string; b: number }) => Object; +declare var a14: (x: { a: string; b: number }) => Object; >a14 : (x: { a: string; b: number; }) => Object > : ^ ^^ ^^^^^ >x : { a: string; b: number; } @@ -159,7 +159,7 @@ var a14: (x: { a: string; b: number }) => Object; >b : number > : ^^^^^^ -var a15: { +declare var a15: { >a15 : { (x: number): number[]; (x: string): string[]; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ @@ -171,7 +171,7 @@ var a15: { >x : string > : ^^^^^^ } -var a16: { +declare var a16: { >a16 : { (x: T): number[]; (x: U): number[]; } > : ^^^ ^^^^^^^^^ ^^ ^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^ ^^^ ^^^ @@ -183,7 +183,7 @@ var a16: { >x : U > : ^ } -var a17: { +declare var a17: { >a17 : { (x: (a: number) => number): number[]; (x: (a: string) => string): string[]; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ @@ -200,7 +200,7 @@ var a17: { > : ^^^^^^ }; -var a18: { +declare var a18: { >a18 : { (x: { (a: number): number; (a: string): string; }): any[]; (x: { (a: boolean): boolean; (a: Date): Date; }): any[]; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ @@ -232,7 +232,7 @@ var a18: { }): any[]; } -var b: (x: T) => T[]; +declare var b: (x: T) => T[]; >b : (x: T) => T[] > : ^ ^^ ^^ ^^^^^ >x : T @@ -254,7 +254,7 @@ b = a; // ok >a : (x: number) => number[] > : ^ ^^ ^^^^^ -var b2: (x: T) => string[]; +declare var b2: (x: T) => string[]; >b2 : (x: T) => string[] > : ^ ^^ ^^ ^^^^^ >x : T @@ -276,7 +276,7 @@ b2 = a2; // ok >a2 : (x: number) => string[] > : ^ ^^ ^^^^^ -var b3: (x: T) => T; +declare var b3: (x: T) => T; >b3 : (x: T) => T > : ^ ^^ ^^ ^^^^^ >x : T @@ -298,7 +298,7 @@ b3 = a3; // ok >a3 : (x: number) => void > : ^ ^^ ^^^^^ -var b4: (x: T, y: U) => T; +declare var b4: (x: T, y: U) => T; >b4 : (x: T, y: U) => T > : ^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >x : T @@ -322,7 +322,7 @@ b4 = a4; // ok >a4 : (x: string, y: number) => string > : ^ ^^ ^^ ^^ ^^^^^ -var b5: (x: (arg: T) => U) => T; +declare var b5: (x: (arg: T) => U) => T; >b5 : (x: (arg: T) => U) => T > : ^ ^^ ^^ ^^ ^^^^^ >x : (arg: T) => U @@ -346,7 +346,7 @@ b5 = a5; // ok >a5 : (x: (arg: string) => number) => string > : ^ ^^ ^^^^^ -var b6: (x: (arg: T) => U) => T; +declare var b6: (x: (arg: T) => U) => T; >b6 : (x: (arg: T) => U) => T > : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^ >x : (arg: T) => U @@ -370,7 +370,7 @@ b6 = a6; // ok >a6 : (x: (arg: Base) => Derived) => Base > : ^ ^^ ^^^^^ -var b7: (x: (arg: T) => U) => (r: T) => U; +declare var b7: (x: (arg: T) => U) => (r: T) => U; >b7 : (x: (arg: T) => U) => (r: T) => U > : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^ >x : (arg: T) => U @@ -396,7 +396,7 @@ b7 = a7; // ok >a7 : (x: (arg: Base) => Derived) => (r: Base) => Derived > : ^ ^^ ^^^^^ -var b8: (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U; +declare var b8: (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U; >b8 : (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U > : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >x : (arg: T) => U @@ -426,7 +426,7 @@ b8 = a8; // ok >a8 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived > : ^ ^^ ^^ ^^ ^^^^^ -var b9: (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; +declare var b9: (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; >b9 : (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U > : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >x : (arg: T) => U @@ -460,7 +460,7 @@ b9 = a9; // ok >a9 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived > : ^ ^^ ^^ ^^ ^^^^^ -var b10: (...x: T[]) => T; +declare var b10: (...x: T[]) => T; >b10 : (...x: T[]) => T > : ^ ^^^^^^^^^ ^^^^^ ^^ ^^^^^ >x : T[] @@ -482,7 +482,7 @@ b10 = a10; // ok >a10 : (...x: Derived[]) => Derived > : ^^^^ ^^ ^^^^^ -var b11: (x: T, y: T) => T; +declare var b11: (x: T, y: T) => T; >b11 : (x: T, y: T) => T > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >x : T @@ -506,7 +506,7 @@ b11 = a11; // ok >a11 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base > : ^ ^^ ^^ ^^ ^^^^^ -var b12: >(x: Array, y: T) => Array; +declare var b12: >(x: Array, y: T) => Array; >b12 : >(x: Array, y: T) => Array > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >x : Base[] @@ -530,7 +530,7 @@ b12 = a12; // ok >a12 : (x: Array, y: Array) => Array > : ^ ^^ ^^ ^^ ^^^^^ -var b13: >(x: Array, y: T) => T; +declare var b13: >(x: Array, y: T) => T; >b13 : >(x: Array, y: T) => T > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >x : Base[] @@ -554,7 +554,7 @@ b13 = a13; // ok >a13 : (x: Array, y: Array) => Array > : ^ ^^ ^^ ^^ ^^^^^ -var b14: (x: { a: T; b: T }) => T; +declare var b14: (x: { a: T; b: T }) => T; >b14 : (x: { a: T; b: T; }) => T > : ^ ^^ ^^ ^^^^^ >x : { a: T; b: T; } @@ -580,7 +580,7 @@ b14 = a14; // ok >a14 : (x: { a: string; b: number; }) => Object > : ^ ^^ ^^^^^ -var b15: (x: T) => T[]; +declare var b15: (x: T) => T[]; >b15 : (x: T) => T[] > : ^ ^^ ^^ ^^^^^ >x : T @@ -602,7 +602,7 @@ b15 = a15; // ok >a15 : { (x: number): number[]; (x: string): string[]; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ -var b16: (x: T) => number[]; +declare var b16: (x: T) => number[]; >b16 : (x: T) => number[] > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >x : T @@ -624,7 +624,7 @@ b16 = a16; // ok >a16 : { (x: T): number[]; (x: U): number[]; } > : ^^^ ^^^^^^^^^ ^^ ^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^ ^^^ ^^^ -var b17: (x: (a: T) => T) => T[]; // ok +declare var b17: (x: (a: T) => T) => T[]; // ok >b17 : (x: (a: T) => T) => T[] > : ^ ^^ ^^ ^^^^^ >x : (a: T) => T @@ -648,7 +648,7 @@ b17 = a17; // ok >a17 : { (x: (a: number) => number): number[]; (x: (a: string) => string): string[]; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ -var b18: (x: (a: T) => T) => T[]; +declare var b18: (x: (a: T) => T) => T[]; >b18 : (x: (a: T) => T) => T[] > : ^ ^^ ^^ ^^^^^ >x : (a: T) => T diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt index 47b298347b0c1..20203d4160ab4 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt @@ -74,18 +74,18 @@ assignmentCompatWithCallSignatures4.ts(96,9): error TS2322: Type '(x: T) => s namespace WithNonGenericSignaturesInBaseType { // target type with non-generic call signatures - var a2: (x: number) => string[]; - var a7: (x: (arg: Base) => Derived) => (r: Base) => Derived2; - var a8: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; - var a10: (...x: Base[]) => Base; - var a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base; - var a12: (x: Array, y: Array) => Array; - var a14: { + declare var a2: (x: number) => string[]; + declare var a7: (x: (arg: Base) => Derived) => (r: Base) => Derived2; + declare var a8: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; + declare var a10: (...x: Base[]) => Base; + declare var a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base; + declare var a12: (x: Array, y: Array) => Array; + declare var a14: { (x: number): number[]; (x: string): string[]; }; - var a15: (x: { a: string; b: number }) => number; - var a16: { + declare var a15: (x: { a: string; b: number }) => number; + declare var a16: { (x: { (a: number): number; (a?: number): number; @@ -95,7 +95,7 @@ assignmentCompatWithCallSignatures4.ts(96,9): error TS2322: Type '(x: T) => s (a?: boolean): boolean; }): boolean[]; }; - var a17: { + declare var a17: { (x: { (a: T): T; (a: T): T; @@ -106,16 +106,16 @@ assignmentCompatWithCallSignatures4.ts(96,9): error TS2322: Type '(x: T) => s }): any[]; }; - var b2: (x: T) => U[]; + declare var b2: (x: T) => U[]; a2 = b2; b2 = a2; ~~ !!! error TS2322: Type '(x: number) => string[]' is not assignable to type '(x: T) => U[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'number'. -!!! related TS2208 assignmentCompatWithCallSignatures4.ts:43:18: This type parameter might need an `extends number` constraint. +!!! related TS2208 assignmentCompatWithCallSignatures4.ts:43:26: This type parameter might need an `extends number` constraint. - var b7: (x: (arg: T) => U) => (r: T) => V; + declare var b7: (x: (arg: T) => U) => (r: T) => V; a7 = b7; b7 = a7; ~~ @@ -125,7 +125,7 @@ assignmentCompatWithCallSignatures4.ts(96,9): error TS2322: Type '(x: T) => s !!! error TS2322: Type 'Base' is not assignable to type 'T'. !!! error TS2322: 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. - var b8: (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; + declare var b8: (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; a8 = b8; // error, { foo: number } and Base are incompatible ~~ !!! error TS2322: Type '(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'. @@ -143,7 +143,7 @@ assignmentCompatWithCallSignatures4.ts(96,9): error TS2322: Type '(x: T) => s !!! error TS2322: 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. - var b10: (...x: T[]) => T; + declare var b10: (...x: T[]) => T; a10 = b10; b10 = a10; ~~~ @@ -151,7 +151,7 @@ assignmentCompatWithCallSignatures4.ts(96,9): error TS2322: Type '(x: T) => s !!! error TS2322: Type 'Base' is not assignable to type 'T'. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'Base'. - var b11: (x: T, y: T) => T; + declare var b11: (x: T, y: T) => T; a11 = b11; b11 = a11; ~~~ @@ -159,7 +159,7 @@ assignmentCompatWithCallSignatures4.ts(96,9): error TS2322: Type '(x: T) => s !!! error TS2322: Type 'Base' is not assignable to type 'T'. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'Base'. - var b12: >(x: Array, y: Array) => T; + declare var b12: >(x: Array, y: Array) => T; a12 = b12; b12 = a12; ~~~ @@ -167,7 +167,7 @@ assignmentCompatWithCallSignatures4.ts(96,9): error TS2322: Type '(x: T) => s !!! error TS2322: Type 'Derived[]' is not assignable to type 'T'. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'Derived[]'. - var b15: (x: { a: T; b: T }) => T; + declare var b15: (x: { a: T; b: T }) => T; a15 = b15; ~~~ !!! error TS2322: Type '(x: { a: T; b: T; }) => T' is not assignable to type '(x: { a: string; b: number; }) => number'. @@ -182,9 +182,9 @@ assignmentCompatWithCallSignatures4.ts(96,9): error TS2322: Type '(x: T) => s !!! error TS2322: Type '{ a: T; b: T; }' is not assignable to type '{ a: string; b: number; }'. !!! error TS2322: Types of property 'a' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'string'. -!!! related TS2208 assignmentCompatWithCallSignatures4.ts:68:19: This type parameter might need an `extends string` constraint. +!!! related TS2208 assignmentCompatWithCallSignatures4.ts:68:27: This type parameter might need an `extends string` constraint. - var b15a: (x: { a: T; b: T }) => number; + declare var b15a: (x: { a: T; b: T }) => number; a15 = b15a; ~~~ !!! error TS2322: Type '(x: { a: T; b: T; }) => number' is not assignable to type '(x: { a: string; b: number; }) => number'. @@ -201,19 +201,19 @@ assignmentCompatWithCallSignatures4.ts(96,9): error TS2322: Type '(x: T) => s !!! error TS2322: Type 'T' is not assignable to type 'string'. !!! error TS2322: Type 'Base' is not assignable to type 'string'. - var b16: (x: (a: T) => T) => T[]; + declare var b16: (x: (a: T) => T) => T[]; a16 = b16; b16 = a16; - var b17: (x: (a: T) => T) => any[]; + declare var b17: (x: (a: T) => T) => any[]; a17 = b17; b17 = a17; } namespace WithGenericSignaturesInBaseType { // target type has generic call signature - var a2: (x: T) => T[]; - var b2: (x: T) => string[]; + declare var a2: (x: T) => T[]; + declare var b2: (x: T) => string[]; a2 = b2; ~~ !!! error TS2322: Type '(x: T) => string[]' is not assignable to type '(x: T) => T[]'. @@ -225,17 +225,17 @@ assignmentCompatWithCallSignatures4.ts(96,9): error TS2322: Type '(x: T) => s !!! error TS2322: Type '(x: T) => T[]' is not assignable to type '(x: T) => string[]'. !!! error TS2322: Type 'T[]' is not assignable to type 'string[]'. !!! error TS2322: Type 'T' is not assignable to type 'string'. -!!! related TS2208 assignmentCompatWithCallSignatures4.ts:88:18: This type parameter might need an `extends string` constraint. +!!! related TS2208 assignmentCompatWithCallSignatures4.ts:88:26: This type parameter might need an `extends string` constraint. // target type has generic call signature - var a3: (x: T) => string[]; - var b3: (x: T) => T[]; + declare var a3: (x: T) => string[]; + declare var b3: (x: T) => T[]; a3 = b3; ~~ !!! error TS2322: Type '(x: T) => T[]' is not assignable to type '(x: T) => string[]'. !!! error TS2322: Type 'T[]' is not assignable to type 'string[]'. !!! error TS2322: Type 'T' is not assignable to type 'string'. -!!! related TS2208 assignmentCompatWithCallSignatures4.ts:93:18: This type parameter might need an `extends string` constraint. +!!! related TS2208 assignmentCompatWithCallSignatures4.ts:93:26: This type parameter might need an `extends string` constraint. b3 = a3; ~~ !!! error TS2322: Type '(x: T) => string[]' is not assignable to type '(x: T) => T[]'. diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js index 90fd3cc7e6ae4..7be077910bbdb 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js @@ -11,18 +11,18 @@ namespace Errors { namespace WithNonGenericSignaturesInBaseType { // target type with non-generic call signatures - var a2: (x: number) => string[]; - var a7: (x: (arg: Base) => Derived) => (r: Base) => Derived2; - var a8: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; - var a10: (...x: Base[]) => Base; - var a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base; - var a12: (x: Array, y: Array) => Array; - var a14: { + declare var a2: (x: number) => string[]; + declare var a7: (x: (arg: Base) => Derived) => (r: Base) => Derived2; + declare var a8: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; + declare var a10: (...x: Base[]) => Base; + declare var a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base; + declare var a12: (x: Array, y: Array) => Array; + declare var a14: { (x: number): number[]; (x: string): string[]; }; - var a15: (x: { a: string; b: number }) => number; - var a16: { + declare var a15: (x: { a: string; b: number }) => number; + declare var a16: { (x: { (a: number): number; (a?: number): number; @@ -32,7 +32,7 @@ namespace Errors { (a?: boolean): boolean; }): boolean[]; }; - var a17: { + declare var a17: { (x: { (a: T): T; (a: T): T; @@ -43,58 +43,58 @@ namespace Errors { }): any[]; }; - var b2: (x: T) => U[]; + declare var b2: (x: T) => U[]; a2 = b2; b2 = a2; - var b7: (x: (arg: T) => U) => (r: T) => V; + declare var b7: (x: (arg: T) => U) => (r: T) => V; a7 = b7; b7 = a7; - var b8: (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; + declare var b8: (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; a8 = b8; // error, { foo: number } and Base are incompatible b8 = a8; // error, { foo: number } and Base are incompatible - var b10: (...x: T[]) => T; + declare var b10: (...x: T[]) => T; a10 = b10; b10 = a10; - var b11: (x: T, y: T) => T; + declare var b11: (x: T, y: T) => T; a11 = b11; b11 = a11; - var b12: >(x: Array, y: Array) => T; + declare var b12: >(x: Array, y: Array) => T; a12 = b12; b12 = a12; - var b15: (x: { a: T; b: T }) => T; + declare var b15: (x: { a: T; b: T }) => T; a15 = b15; b15 = a15; - var b15a: (x: { a: T; b: T }) => number; + declare var b15a: (x: { a: T; b: T }) => number; a15 = b15a; b15a = a15; - var b16: (x: (a: T) => T) => T[]; + declare var b16: (x: (a: T) => T) => T[]; a16 = b16; b16 = a16; - var b17: (x: (a: T) => T) => any[]; + declare var b17: (x: (a: T) => T) => any[]; a17 = b17; b17 = a17; } namespace WithGenericSignaturesInBaseType { // target type has generic call signature - var a2: (x: T) => T[]; - var b2: (x: T) => string[]; + declare var a2: (x: T) => T[]; + declare var b2: (x: T) => string[]; a2 = b2; b2 = a2; // target type has generic call signature - var a3: (x: T) => string[]; - var b3: (x: T) => T[]; + declare var a3: (x: T) => string[]; + declare var b3: (x: T) => T[]; a3 = b3; b3 = a3; } @@ -147,58 +147,31 @@ var Errors; }(Base)); var WithNonGenericSignaturesInBaseType; (function (WithNonGenericSignaturesInBaseType) { - // target type with non-generic call signatures - var a2; - var a7; - var a8; - var a10; - var a11; - var a12; - var a14; - var a15; - var a16; - var a17; - var b2; a2 = b2; b2 = a2; - var b7; a7 = b7; b7 = a7; - var b8; a8 = b8; // error, { foo: number } and Base are incompatible b8 = a8; // error, { foo: number } and Base are incompatible - var b10; a10 = b10; b10 = a10; - var b11; a11 = b11; b11 = a11; - var b12; a12 = b12; b12 = a12; - var b15; a15 = b15; b15 = a15; - var b15a; a15 = b15a; b15a = a15; - var b16; a16 = b16; b16 = a16; - var b17; a17 = b17; b17 = a17; })(WithNonGenericSignaturesInBaseType || (WithNonGenericSignaturesInBaseType = {})); var WithGenericSignaturesInBaseType; (function (WithGenericSignaturesInBaseType) { - // target type has generic call signature - var a2; - var b2; a2 = b2; b2 = a2; - // target type has generic call signature - var a3; - var b3; a3 = b3; b3 = a3; })(WithGenericSignaturesInBaseType || (WithGenericSignaturesInBaseType = {})); diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.symbols b/tests/baselines/reference/assignmentCompatWithCallSignatures4.symbols index 3048b50967426..027674a0350df 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.symbols +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.symbols @@ -29,62 +29,62 @@ namespace Errors { >WithNonGenericSignaturesInBaseType : Symbol(WithNonGenericSignaturesInBaseType, Decl(assignmentCompatWithCallSignatures4.ts, 6, 53)) // target type with non-generic call signatures - var a2: (x: number) => string[]; ->a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures4.ts, 10, 11)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 10, 17)) - - var a7: (x: (arg: Base) => Derived) => (r: Base) => Derived2; ->a7 : Symbol(a7, Decl(assignmentCompatWithCallSignatures4.ts, 11, 11)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 11, 17)) ->arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures4.ts, 11, 21)) + declare var a2: (x: number) => string[]; +>a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures4.ts, 10, 19)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 10, 25)) + + declare var a7: (x: (arg: Base) => Derived) => (r: Base) => Derived2; +>a7 : Symbol(a7, Decl(assignmentCompatWithCallSignatures4.ts, 11, 19)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 11, 25)) +>arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures4.ts, 11, 29)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures4.ts, 2, 18)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures4.ts, 3, 31)) ->r : Symbol(r, Decl(assignmentCompatWithCallSignatures4.ts, 11, 48)) +>r : Symbol(r, Decl(assignmentCompatWithCallSignatures4.ts, 11, 56)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures4.ts, 2, 18)) >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithCallSignatures4.ts, 4, 47)) - var a8: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; ->a8 : Symbol(a8, Decl(assignmentCompatWithCallSignatures4.ts, 12, 11)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 12, 17)) ->arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures4.ts, 12, 21)) + declare var a8: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; +>a8 : Symbol(a8, Decl(assignmentCompatWithCallSignatures4.ts, 12, 19)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 12, 25)) +>arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures4.ts, 12, 29)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures4.ts, 2, 18)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures4.ts, 3, 31)) ->y : Symbol(y, Decl(assignmentCompatWithCallSignatures4.ts, 12, 43)) ->arg2 : Symbol(arg2, Decl(assignmentCompatWithCallSignatures4.ts, 12, 48)) +>y : Symbol(y, Decl(assignmentCompatWithCallSignatures4.ts, 12, 51)) +>arg2 : Symbol(arg2, Decl(assignmentCompatWithCallSignatures4.ts, 12, 56)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures4.ts, 2, 18)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures4.ts, 3, 31)) ->r : Symbol(r, Decl(assignmentCompatWithCallSignatures4.ts, 12, 76)) +>r : Symbol(r, Decl(assignmentCompatWithCallSignatures4.ts, 12, 84)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures4.ts, 2, 18)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures4.ts, 3, 31)) - var a10: (...x: Base[]) => Base; ->a10 : Symbol(a10, Decl(assignmentCompatWithCallSignatures4.ts, 13, 11)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 13, 18)) + declare var a10: (...x: Base[]) => Base; +>a10 : Symbol(a10, Decl(assignmentCompatWithCallSignatures4.ts, 13, 19)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 13, 26)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures4.ts, 2, 18)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures4.ts, 2, 18)) - var a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base; ->a11 : Symbol(a11, Decl(assignmentCompatWithCallSignatures4.ts, 14, 11)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 14, 18)) ->foo : Symbol(foo, Decl(assignmentCompatWithCallSignatures4.ts, 14, 22)) ->y : Symbol(y, Decl(assignmentCompatWithCallSignatures4.ts, 14, 37)) ->foo : Symbol(foo, Decl(assignmentCompatWithCallSignatures4.ts, 14, 42)) ->bar : Symbol(bar, Decl(assignmentCompatWithCallSignatures4.ts, 14, 55)) + declare var a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base; +>a11 : Symbol(a11, Decl(assignmentCompatWithCallSignatures4.ts, 14, 19)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 14, 26)) +>foo : Symbol(foo, Decl(assignmentCompatWithCallSignatures4.ts, 14, 30)) +>y : Symbol(y, Decl(assignmentCompatWithCallSignatures4.ts, 14, 45)) +>foo : Symbol(foo, Decl(assignmentCompatWithCallSignatures4.ts, 14, 50)) +>bar : Symbol(bar, Decl(assignmentCompatWithCallSignatures4.ts, 14, 63)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures4.ts, 2, 18)) - var a12: (x: Array, y: Array) => Array; ->a12 : Symbol(a12, Decl(assignmentCompatWithCallSignatures4.ts, 15, 11)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 15, 18)) + declare var a12: (x: Array, y: Array) => Array; +>a12 : Symbol(a12, Decl(assignmentCompatWithCallSignatures4.ts, 15, 19)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 15, 26)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures4.ts, 2, 18)) ->y : Symbol(y, Decl(assignmentCompatWithCallSignatures4.ts, 15, 33)) +>y : Symbol(y, Decl(assignmentCompatWithCallSignatures4.ts, 15, 41)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithCallSignatures4.ts, 4, 47)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures4.ts, 3, 31)) - var a14: { ->a14 : Symbol(a14, Decl(assignmentCompatWithCallSignatures4.ts, 16, 11)) + declare var a14: { +>a14 : Symbol(a14, Decl(assignmentCompatWithCallSignatures4.ts, 16, 19)) (x: number): number[]; >x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 17, 17)) @@ -93,14 +93,14 @@ namespace Errors { >x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 18, 17)) }; - var a15: (x: { a: string; b: number }) => number; ->a15 : Symbol(a15, Decl(assignmentCompatWithCallSignatures4.ts, 20, 11)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 20, 18)) ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures4.ts, 20, 22)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignatures4.ts, 20, 33)) + declare var a15: (x: { a: string; b: number }) => number; +>a15 : Symbol(a15, Decl(assignmentCompatWithCallSignatures4.ts, 20, 19)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 20, 26)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures4.ts, 20, 30)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignatures4.ts, 20, 41)) - var a16: { ->a16 : Symbol(a16, Decl(assignmentCompatWithCallSignatures4.ts, 21, 11)) + declare var a16: { +>a16 : Symbol(a16, Decl(assignmentCompatWithCallSignatures4.ts, 21, 19)) (x: { >x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 22, 17)) @@ -123,8 +123,8 @@ namespace Errors { }): boolean[]; }; - var a17: { ->a17 : Symbol(a17, Decl(assignmentCompatWithCallSignatures4.ts, 31, 11)) + declare var a17: { +>a17 : Symbol(a17, Decl(assignmentCompatWithCallSignatures4.ts, 31, 19)) (x: { >x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 32, 17)) @@ -164,243 +164,243 @@ namespace Errors { }): any[]; }; - var b2: (x: T) => U[]; ->b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures4.ts, 42, 11)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 42, 17)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures4.ts, 42, 19)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 42, 23)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 42, 17)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures4.ts, 42, 19)) + declare var b2: (x: T) => U[]; +>b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures4.ts, 42, 19)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 42, 25)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures4.ts, 42, 27)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 42, 31)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 42, 25)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures4.ts, 42, 27)) a2 = b2; ->a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures4.ts, 10, 11)) ->b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures4.ts, 42, 11)) +>a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures4.ts, 10, 19)) +>b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures4.ts, 42, 19)) b2 = a2; ->b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures4.ts, 42, 11)) ->a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures4.ts, 10, 11)) +>b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures4.ts, 42, 19)) +>a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures4.ts, 10, 19)) - var b7: (x: (arg: T) => U) => (r: T) => V; ->b7 : Symbol(b7, Decl(assignmentCompatWithCallSignatures4.ts, 46, 11)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 46, 17)) + declare var b7: (x: (arg: T) => U) => (r: T) => V; +>b7 : Symbol(b7, Decl(assignmentCompatWithCallSignatures4.ts, 46, 19)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 46, 25)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures4.ts, 2, 18)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures4.ts, 46, 32)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures4.ts, 46, 40)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures4.ts, 3, 31)) ->V : Symbol(V, Decl(assignmentCompatWithCallSignatures4.ts, 46, 51)) +>V : Symbol(V, Decl(assignmentCompatWithCallSignatures4.ts, 46, 59)) >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithCallSignatures4.ts, 4, 47)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 46, 72)) ->arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures4.ts, 46, 76)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 46, 17)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures4.ts, 46, 32)) ->r : Symbol(r, Decl(assignmentCompatWithCallSignatures4.ts, 46, 94)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 46, 17)) ->V : Symbol(V, Decl(assignmentCompatWithCallSignatures4.ts, 46, 51)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 46, 80)) +>arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures4.ts, 46, 84)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 46, 25)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures4.ts, 46, 40)) +>r : Symbol(r, Decl(assignmentCompatWithCallSignatures4.ts, 46, 102)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 46, 25)) +>V : Symbol(V, Decl(assignmentCompatWithCallSignatures4.ts, 46, 59)) a7 = b7; ->a7 : Symbol(a7, Decl(assignmentCompatWithCallSignatures4.ts, 11, 11)) ->b7 : Symbol(b7, Decl(assignmentCompatWithCallSignatures4.ts, 46, 11)) +>a7 : Symbol(a7, Decl(assignmentCompatWithCallSignatures4.ts, 11, 19)) +>b7 : Symbol(b7, Decl(assignmentCompatWithCallSignatures4.ts, 46, 19)) b7 = a7; ->b7 : Symbol(b7, Decl(assignmentCompatWithCallSignatures4.ts, 46, 11)) ->a7 : Symbol(a7, Decl(assignmentCompatWithCallSignatures4.ts, 11, 11)) +>b7 : Symbol(b7, Decl(assignmentCompatWithCallSignatures4.ts, 46, 19)) +>a7 : Symbol(a7, Decl(assignmentCompatWithCallSignatures4.ts, 11, 19)) - var b8: (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; ->b8 : Symbol(b8, Decl(assignmentCompatWithCallSignatures4.ts, 50, 11)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 50, 17)) + declare var b8: (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; +>b8 : Symbol(b8, Decl(assignmentCompatWithCallSignatures4.ts, 50, 19)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 50, 25)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures4.ts, 2, 18)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures4.ts, 50, 32)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures4.ts, 50, 40)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures4.ts, 3, 31)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 50, 52)) ->arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures4.ts, 50, 56)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 50, 17)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures4.ts, 50, 32)) ->y : Symbol(y, Decl(assignmentCompatWithCallSignatures4.ts, 50, 69)) ->arg2 : Symbol(arg2, Decl(assignmentCompatWithCallSignatures4.ts, 50, 74)) ->foo : Symbol(foo, Decl(assignmentCompatWithCallSignatures4.ts, 50, 81)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures4.ts, 50, 32)) ->r : Symbol(r, Decl(assignmentCompatWithCallSignatures4.ts, 50, 108)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 50, 17)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures4.ts, 50, 32)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 50, 60)) +>arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures4.ts, 50, 64)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 50, 25)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures4.ts, 50, 40)) +>y : Symbol(y, Decl(assignmentCompatWithCallSignatures4.ts, 50, 77)) +>arg2 : Symbol(arg2, Decl(assignmentCompatWithCallSignatures4.ts, 50, 82)) +>foo : Symbol(foo, Decl(assignmentCompatWithCallSignatures4.ts, 50, 89)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures4.ts, 50, 40)) +>r : Symbol(r, Decl(assignmentCompatWithCallSignatures4.ts, 50, 116)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 50, 25)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures4.ts, 50, 40)) a8 = b8; // error, { foo: number } and Base are incompatible ->a8 : Symbol(a8, Decl(assignmentCompatWithCallSignatures4.ts, 12, 11)) ->b8 : Symbol(b8, Decl(assignmentCompatWithCallSignatures4.ts, 50, 11)) +>a8 : Symbol(a8, Decl(assignmentCompatWithCallSignatures4.ts, 12, 19)) +>b8 : Symbol(b8, Decl(assignmentCompatWithCallSignatures4.ts, 50, 19)) b8 = a8; // error, { foo: number } and Base are incompatible ->b8 : Symbol(b8, Decl(assignmentCompatWithCallSignatures4.ts, 50, 11)) ->a8 : Symbol(a8, Decl(assignmentCompatWithCallSignatures4.ts, 12, 11)) +>b8 : Symbol(b8, Decl(assignmentCompatWithCallSignatures4.ts, 50, 19)) +>a8 : Symbol(a8, Decl(assignmentCompatWithCallSignatures4.ts, 12, 19)) - var b10: (...x: T[]) => T; ->b10 : Symbol(b10, Decl(assignmentCompatWithCallSignatures4.ts, 55, 11)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 55, 18)) + declare var b10: (...x: T[]) => T; +>b10 : Symbol(b10, Decl(assignmentCompatWithCallSignatures4.ts, 55, 19)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 55, 26)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures4.ts, 3, 31)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 55, 37)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 55, 18)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 55, 18)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 55, 45)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 55, 26)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 55, 26)) a10 = b10; ->a10 : Symbol(a10, Decl(assignmentCompatWithCallSignatures4.ts, 13, 11)) ->b10 : Symbol(b10, Decl(assignmentCompatWithCallSignatures4.ts, 55, 11)) +>a10 : Symbol(a10, Decl(assignmentCompatWithCallSignatures4.ts, 13, 19)) +>b10 : Symbol(b10, Decl(assignmentCompatWithCallSignatures4.ts, 55, 19)) b10 = a10; ->b10 : Symbol(b10, Decl(assignmentCompatWithCallSignatures4.ts, 55, 11)) ->a10 : Symbol(a10, Decl(assignmentCompatWithCallSignatures4.ts, 13, 11)) +>b10 : Symbol(b10, Decl(assignmentCompatWithCallSignatures4.ts, 55, 19)) +>a10 : Symbol(a10, Decl(assignmentCompatWithCallSignatures4.ts, 13, 19)) - var b11: (x: T, y: T) => T; ->b11 : Symbol(b11, Decl(assignmentCompatWithCallSignatures4.ts, 59, 11)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 59, 18)) + declare var b11: (x: T, y: T) => T; +>b11 : Symbol(b11, Decl(assignmentCompatWithCallSignatures4.ts, 59, 19)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 59, 26)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures4.ts, 3, 31)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 59, 37)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 59, 18)) ->y : Symbol(y, Decl(assignmentCompatWithCallSignatures4.ts, 59, 42)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 59, 18)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 59, 18)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 59, 45)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 59, 26)) +>y : Symbol(y, Decl(assignmentCompatWithCallSignatures4.ts, 59, 50)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 59, 26)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 59, 26)) a11 = b11; ->a11 : Symbol(a11, Decl(assignmentCompatWithCallSignatures4.ts, 14, 11)) ->b11 : Symbol(b11, Decl(assignmentCompatWithCallSignatures4.ts, 59, 11)) +>a11 : Symbol(a11, Decl(assignmentCompatWithCallSignatures4.ts, 14, 19)) +>b11 : Symbol(b11, Decl(assignmentCompatWithCallSignatures4.ts, 59, 19)) b11 = a11; ->b11 : Symbol(b11, Decl(assignmentCompatWithCallSignatures4.ts, 59, 11)) ->a11 : Symbol(a11, Decl(assignmentCompatWithCallSignatures4.ts, 14, 11)) +>b11 : Symbol(b11, Decl(assignmentCompatWithCallSignatures4.ts, 59, 19)) +>a11 : Symbol(a11, Decl(assignmentCompatWithCallSignatures4.ts, 14, 19)) - var b12: >(x: Array, y: Array) => T; ->b12 : Symbol(b12, Decl(assignmentCompatWithCallSignatures4.ts, 63, 11)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 63, 18)) + declare var b12: >(x: Array, y: Array) => T; +>b12 : Symbol(b12, Decl(assignmentCompatWithCallSignatures4.ts, 63, 19)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 63, 26)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithCallSignatures4.ts, 4, 47)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 63, 45)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 63, 53)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures4.ts, 2, 18)) ->y : Symbol(y, Decl(assignmentCompatWithCallSignatures4.ts, 63, 60)) +>y : Symbol(y, Decl(assignmentCompatWithCallSignatures4.ts, 63, 68)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures4.ts, 2, 18)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 63, 18)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 63, 26)) a12 = b12; ->a12 : Symbol(a12, Decl(assignmentCompatWithCallSignatures4.ts, 15, 11)) ->b12 : Symbol(b12, Decl(assignmentCompatWithCallSignatures4.ts, 63, 11)) +>a12 : Symbol(a12, Decl(assignmentCompatWithCallSignatures4.ts, 15, 19)) +>b12 : Symbol(b12, Decl(assignmentCompatWithCallSignatures4.ts, 63, 19)) b12 = a12; ->b12 : Symbol(b12, Decl(assignmentCompatWithCallSignatures4.ts, 63, 11)) ->a12 : Symbol(a12, Decl(assignmentCompatWithCallSignatures4.ts, 15, 11)) - - var b15: (x: { a: T; b: T }) => T; ->b15 : Symbol(b15, Decl(assignmentCompatWithCallSignatures4.ts, 67, 11)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 67, 18)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 67, 21)) ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures4.ts, 67, 25)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 67, 18)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignatures4.ts, 67, 31)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 67, 18)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 67, 18)) +>b12 : Symbol(b12, Decl(assignmentCompatWithCallSignatures4.ts, 63, 19)) +>a12 : Symbol(a12, Decl(assignmentCompatWithCallSignatures4.ts, 15, 19)) + + declare var b15: (x: { a: T; b: T }) => T; +>b15 : Symbol(b15, Decl(assignmentCompatWithCallSignatures4.ts, 67, 19)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 67, 26)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 67, 29)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures4.ts, 67, 33)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 67, 26)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignatures4.ts, 67, 39)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 67, 26)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 67, 26)) a15 = b15; ->a15 : Symbol(a15, Decl(assignmentCompatWithCallSignatures4.ts, 20, 11)) ->b15 : Symbol(b15, Decl(assignmentCompatWithCallSignatures4.ts, 67, 11)) +>a15 : Symbol(a15, Decl(assignmentCompatWithCallSignatures4.ts, 20, 19)) +>b15 : Symbol(b15, Decl(assignmentCompatWithCallSignatures4.ts, 67, 19)) b15 = a15; ->b15 : Symbol(b15, Decl(assignmentCompatWithCallSignatures4.ts, 67, 11)) ->a15 : Symbol(a15, Decl(assignmentCompatWithCallSignatures4.ts, 20, 11)) +>b15 : Symbol(b15, Decl(assignmentCompatWithCallSignatures4.ts, 67, 19)) +>a15 : Symbol(a15, Decl(assignmentCompatWithCallSignatures4.ts, 20, 19)) - var b15a: (x: { a: T; b: T }) => number; ->b15a : Symbol(b15a, Decl(assignmentCompatWithCallSignatures4.ts, 71, 11)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 71, 19)) + declare var b15a: (x: { a: T; b: T }) => number; +>b15a : Symbol(b15a, Decl(assignmentCompatWithCallSignatures4.ts, 71, 19)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 71, 27)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures4.ts, 2, 18)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 71, 35)) ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures4.ts, 71, 39)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 71, 19)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignatures4.ts, 71, 45)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 71, 19)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 71, 43)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures4.ts, 71, 47)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 71, 27)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignatures4.ts, 71, 53)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 71, 27)) a15 = b15a; ->a15 : Symbol(a15, Decl(assignmentCompatWithCallSignatures4.ts, 20, 11)) ->b15a : Symbol(b15a, Decl(assignmentCompatWithCallSignatures4.ts, 71, 11)) +>a15 : Symbol(a15, Decl(assignmentCompatWithCallSignatures4.ts, 20, 19)) +>b15a : Symbol(b15a, Decl(assignmentCompatWithCallSignatures4.ts, 71, 19)) b15a = a15; ->b15a : Symbol(b15a, Decl(assignmentCompatWithCallSignatures4.ts, 71, 11)) ->a15 : Symbol(a15, Decl(assignmentCompatWithCallSignatures4.ts, 20, 11)) - - var b16: (x: (a: T) => T) => T[]; ->b16 : Symbol(b16, Decl(assignmentCompatWithCallSignatures4.ts, 75, 11)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 75, 18)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 75, 21)) ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures4.ts, 75, 25)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 75, 18)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 75, 18)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 75, 18)) +>b15a : Symbol(b15a, Decl(assignmentCompatWithCallSignatures4.ts, 71, 19)) +>a15 : Symbol(a15, Decl(assignmentCompatWithCallSignatures4.ts, 20, 19)) + + declare var b16: (x: (a: T) => T) => T[]; +>b16 : Symbol(b16, Decl(assignmentCompatWithCallSignatures4.ts, 75, 19)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 75, 26)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 75, 29)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures4.ts, 75, 33)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 75, 26)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 75, 26)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 75, 26)) a16 = b16; ->a16 : Symbol(a16, Decl(assignmentCompatWithCallSignatures4.ts, 21, 11)) ->b16 : Symbol(b16, Decl(assignmentCompatWithCallSignatures4.ts, 75, 11)) +>a16 : Symbol(a16, Decl(assignmentCompatWithCallSignatures4.ts, 21, 19)) +>b16 : Symbol(b16, Decl(assignmentCompatWithCallSignatures4.ts, 75, 19)) b16 = a16; ->b16 : Symbol(b16, Decl(assignmentCompatWithCallSignatures4.ts, 75, 11)) ->a16 : Symbol(a16, Decl(assignmentCompatWithCallSignatures4.ts, 21, 11)) +>b16 : Symbol(b16, Decl(assignmentCompatWithCallSignatures4.ts, 75, 19)) +>a16 : Symbol(a16, Decl(assignmentCompatWithCallSignatures4.ts, 21, 19)) - var b17: (x: (a: T) => T) => any[]; ->b17 : Symbol(b17, Decl(assignmentCompatWithCallSignatures4.ts, 79, 11)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 79, 18)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 79, 21)) ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures4.ts, 79, 25)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 79, 18)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 79, 18)) + declare var b17: (x: (a: T) => T) => any[]; +>b17 : Symbol(b17, Decl(assignmentCompatWithCallSignatures4.ts, 79, 19)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 79, 26)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 79, 29)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures4.ts, 79, 33)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 79, 26)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 79, 26)) a17 = b17; ->a17 : Symbol(a17, Decl(assignmentCompatWithCallSignatures4.ts, 31, 11)) ->b17 : Symbol(b17, Decl(assignmentCompatWithCallSignatures4.ts, 79, 11)) +>a17 : Symbol(a17, Decl(assignmentCompatWithCallSignatures4.ts, 31, 19)) +>b17 : Symbol(b17, Decl(assignmentCompatWithCallSignatures4.ts, 79, 19)) b17 = a17; ->b17 : Symbol(b17, Decl(assignmentCompatWithCallSignatures4.ts, 79, 11)) ->a17 : Symbol(a17, Decl(assignmentCompatWithCallSignatures4.ts, 31, 11)) +>b17 : Symbol(b17, Decl(assignmentCompatWithCallSignatures4.ts, 79, 19)) +>a17 : Symbol(a17, Decl(assignmentCompatWithCallSignatures4.ts, 31, 19)) } namespace WithGenericSignaturesInBaseType { >WithGenericSignaturesInBaseType : Symbol(WithGenericSignaturesInBaseType, Decl(assignmentCompatWithCallSignatures4.ts, 82, 5)) // target type has generic call signature - var a2: (x: T) => T[]; ->a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures4.ts, 86, 11)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 86, 17)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 86, 20)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 86, 17)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 86, 17)) - - var b2: (x: T) => string[]; ->b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures4.ts, 87, 11)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 87, 17)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 87, 20)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 87, 17)) + declare var a2: (x: T) => T[]; +>a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures4.ts, 86, 19)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 86, 25)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 86, 28)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 86, 25)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 86, 25)) + + declare var b2: (x: T) => string[]; +>b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures4.ts, 87, 19)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 87, 25)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 87, 28)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 87, 25)) a2 = b2; ->a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures4.ts, 86, 11)) ->b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures4.ts, 87, 11)) +>a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures4.ts, 86, 19)) +>b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures4.ts, 87, 19)) b2 = a2; ->b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures4.ts, 87, 11)) ->a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures4.ts, 86, 11)) +>b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures4.ts, 87, 19)) +>a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures4.ts, 86, 19)) // target type has generic call signature - var a3: (x: T) => string[]; ->a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures4.ts, 92, 11)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 92, 17)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 92, 20)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 92, 17)) - - var b3: (x: T) => T[]; ->b3 : Symbol(b3, Decl(assignmentCompatWithCallSignatures4.ts, 93, 11)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 93, 17)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 93, 20)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 93, 17)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 93, 17)) + declare var a3: (x: T) => string[]; +>a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures4.ts, 92, 19)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 92, 25)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 92, 28)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 92, 25)) + + declare var b3: (x: T) => T[]; +>b3 : Symbol(b3, Decl(assignmentCompatWithCallSignatures4.ts, 93, 19)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 93, 25)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures4.ts, 93, 28)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 93, 25)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures4.ts, 93, 25)) a3 = b3; ->a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures4.ts, 92, 11)) ->b3 : Symbol(b3, Decl(assignmentCompatWithCallSignatures4.ts, 93, 11)) +>a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures4.ts, 92, 19)) +>b3 : Symbol(b3, Decl(assignmentCompatWithCallSignatures4.ts, 93, 19)) b3 = a3; ->b3 : Symbol(b3, Decl(assignmentCompatWithCallSignatures4.ts, 93, 11)) ->a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures4.ts, 92, 11)) +>b3 : Symbol(b3, Decl(assignmentCompatWithCallSignatures4.ts, 93, 19)) +>a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures4.ts, 92, 19)) } } diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.types b/tests/baselines/reference/assignmentCompatWithCallSignatures4.types index 1e00fbdafbe72..95ef2a827ac37 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.types +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.types @@ -42,13 +42,13 @@ namespace Errors { > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // target type with non-generic call signatures - var a2: (x: number) => string[]; + declare var a2: (x: number) => string[]; >a2 : (x: number) => string[] > : ^ ^^ ^^^^^ >x : number > : ^^^^^^ - var a7: (x: (arg: Base) => Derived) => (r: Base) => Derived2; + declare var a7: (x: (arg: Base) => Derived) => (r: Base) => Derived2; >a7 : (x: (arg: Base) => Derived) => (r: Base) => Derived2 > : ^ ^^ ^^^^^ >x : (arg: Base) => Derived @@ -58,7 +58,7 @@ namespace Errors { >r : Base > : ^^^^ - var a8: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; + declare var a8: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; >a8 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived > : ^ ^^ ^^ ^^ ^^^^^ >x : (arg: Base) => Derived @@ -72,13 +72,13 @@ namespace Errors { >r : Base > : ^^^^ - var a10: (...x: Base[]) => Base; + declare var a10: (...x: Base[]) => Base; >a10 : (...x: Base[]) => Base > : ^^^^ ^^ ^^^^^ >x : Base[] > : ^^^^^^ - var a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base; + declare var a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base; >a11 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base > : ^ ^^ ^^ ^^ ^^^^^ >x : { foo: string; } @@ -92,7 +92,7 @@ namespace Errors { >bar : string > : ^^^^^^ - var a12: (x: Array, y: Array) => Array; + declare var a12: (x: Array, y: Array) => Array; >a12 : (x: Array, y: Array) => Array > : ^ ^^ ^^ ^^ ^^^^^ >x : Base[] @@ -100,7 +100,7 @@ namespace Errors { >y : Derived2[] > : ^^^^^^^^^^ - var a14: { + declare var a14: { >a14 : { (x: number): number[]; (x: string): string[]; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ @@ -113,7 +113,7 @@ namespace Errors { > : ^^^^^^ }; - var a15: (x: { a: string; b: number }) => number; + declare var a15: (x: { a: string; b: number }) => number; >a15 : (x: { a: string; b: number; }) => number > : ^ ^^ ^^^^^ >x : { a: string; b: number; } @@ -123,7 +123,7 @@ namespace Errors { >b : number > : ^^^^^^ - var a16: { + declare var a16: { >a16 : { (x: { (a: number): number; (a?: number): number; }): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean; }): boolean[]; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ @@ -154,7 +154,7 @@ namespace Errors { }): boolean[]; }; - var a17: { + declare var a17: { >a17 : { (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ @@ -186,7 +186,7 @@ namespace Errors { }): any[]; }; - var b2: (x: T) => U[]; + declare var b2: (x: T) => U[]; >b2 : (x: T) => U[] > : ^ ^^ ^^ ^^ ^^^^^ >x : T @@ -208,7 +208,7 @@ namespace Errors { >a2 : (x: number) => string[] > : ^ ^^ ^^^^^ - var b7: (x: (arg: T) => U) => (r: T) => V; + declare var b7: (x: (arg: T) => U) => (r: T) => V; >b7 : (x: (arg: T) => U) => (r: T) => V > : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^ >x : (arg: T) => U @@ -234,7 +234,7 @@ namespace Errors { >a7 : (x: (arg: Base) => Derived) => (r: Base) => Derived2 > : ^ ^^ ^^^^^ - var b8: (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; + declare var b8: (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; >b8 : (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U > : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >x : (arg: T) => U @@ -267,7 +267,7 @@ namespace Errors { > : ^ ^^ ^^ ^^ ^^^^^ - var b10: (...x: T[]) => T; + declare var b10: (...x: T[]) => T; >b10 : (...x: T[]) => T > : ^ ^^^^^^^^^ ^^^^^ ^^ ^^^^^ >x : T[] @@ -289,7 +289,7 @@ namespace Errors { >a10 : (...x: Base[]) => Base > : ^^^^ ^^ ^^^^^ - var b11: (x: T, y: T) => T; + declare var b11: (x: T, y: T) => T; >b11 : (x: T, y: T) => T > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >x : T @@ -313,7 +313,7 @@ namespace Errors { >a11 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base > : ^ ^^ ^^ ^^ ^^^^^ - var b12: >(x: Array, y: Array) => T; + declare var b12: >(x: Array, y: Array) => T; >b12 : >(x: Array, y: Array) => T > : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >x : Base[] @@ -337,7 +337,7 @@ namespace Errors { >a12 : (x: Array, y: Array) => Array > : ^ ^^ ^^ ^^ ^^^^^ - var b15: (x: { a: T; b: T }) => T; + declare var b15: (x: { a: T; b: T }) => T; >b15 : (x: { a: T; b: T; }) => T > : ^ ^^ ^^ ^^^^^ >x : { a: T; b: T; } @@ -363,7 +363,7 @@ namespace Errors { >a15 : (x: { a: string; b: number; }) => number > : ^ ^^ ^^^^^ - var b15a: (x: { a: T; b: T }) => number; + declare var b15a: (x: { a: T; b: T }) => number; >b15a : (x: { a: T; b: T; }) => number > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >x : { a: T; b: T; } @@ -389,7 +389,7 @@ namespace Errors { >a15 : (x: { a: string; b: number; }) => number > : ^ ^^ ^^^^^ - var b16: (x: (a: T) => T) => T[]; + declare var b16: (x: (a: T) => T) => T[]; >b16 : (x: (a: T) => T) => T[] > : ^ ^^ ^^ ^^^^^ >x : (a: T) => T @@ -413,7 +413,7 @@ namespace Errors { >a16 : { (x: { (a: number): number; (a?: number): number; }): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean; }): boolean[]; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ - var b17: (x: (a: T) => T) => any[]; + declare var b17: (x: (a: T) => T) => any[]; >b17 : (x: (a: T) => T) => any[] > : ^ ^^ ^^ ^^^^^ >x : (a: T) => T @@ -443,13 +443,13 @@ namespace Errors { > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // target type has generic call signature - var a2: (x: T) => T[]; + declare var a2: (x: T) => T[]; >a2 : (x: T) => T[] > : ^ ^^ ^^ ^^^^^ >x : T > : ^ - var b2: (x: T) => string[]; + declare var b2: (x: T) => string[]; >b2 : (x: T) => string[] > : ^ ^^ ^^ ^^^^^ >x : T @@ -472,13 +472,13 @@ namespace Errors { > : ^ ^^ ^^ ^^^^^ // target type has generic call signature - var a3: (x: T) => string[]; + declare var a3: (x: T) => string[]; >a3 : (x: T) => string[] > : ^ ^^ ^^ ^^^^^ >x : T > : ^ - var b3: (x: T) => T[]; + declare var b3: (x: T) => T[]; >b3 : (x: T) => T[] > : ^ ^^ ^^ ^^^^^ >x : T diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures5.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures5.errors.txt index 07d3fc5394645..2d140be8e62f0 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures5.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures5.errors.txt @@ -28,20 +28,20 @@ assignmentCompatWithCallSignatures5.ts(58,1): error TS2322: Type '(x: T) => T[]; - var a2: (x: T) => string[]; - var a3: (x: T) => void; - var a4: (x: T, y: U) => string; - var a5: (x: (arg: T) => U) => T; - var a6: (x: (arg: T) => Derived) => T; - var a11: (x: { foo: T }, y: { foo: T; bar: T }) => Base; - var a15: (x: { a: T; b: T }) => T[]; - var a16: (x: { a: T; b: T }) => T[]; - var a17: { + declare var a: (x: T) => T[]; + declare var a2: (x: T) => string[]; + declare var a3: (x: T) => void; + declare var a4: (x: T, y: U) => string; + declare var a5: (x: (arg: T) => U) => T; + declare var a6: (x: (arg: T) => Derived) => T; + declare var a11: (x: { foo: T }, y: { foo: T; bar: T }) => Base; + declare var a15: (x: { a: T; b: T }) => T[]; + declare var a16: (x: { a: T; b: T }) => T[]; + declare var a17: { (x: (a: T) => T): T[]; (x: (a: T) => T): T[]; }; - var a18: { + declare var a18: { (x: { (a: T): T; (a: T): T; @@ -52,29 +52,29 @@ assignmentCompatWithCallSignatures5.ts(58,1): error TS2322: Type '(x: T) => T[]; + declare var b: (x: T) => T[]; a = b; // ok b = a; // ok - var b2: (x: T) => string[]; + declare var b2: (x: T) => string[]; a2 = b2; // ok b2 = a2; // ok - var b3: (x: T) => T; + declare var b3: (x: T) => T; a3 = b3; // ok b3 = a3; // ok ~~ !!! error TS2322: Type '(x: T) => void' is not assignable to type '(x: T) => T'. !!! error TS2322: Type 'void' is not assignable to type 'T'. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'void'. - var b4: (x: T, y: U) => string; + declare var b4: (x: T, y: U) => string; a4 = b4; // ok b4 = a4; // ok - var b5: (x: (arg: T) => U) => T; + declare var b5: (x: (arg: T) => U) => T; a5 = b5; // ok b5 = a5; // ok - var b6: (x: (arg: T) => U) => T; + declare var b6: (x: (arg: T) => U) => T; a6 = b6; // ok b6 = a6; // ok - var b11: (x: { foo: T }, y: { foo: U; bar: U }) => Base; + declare var b11: (x: { foo: T }, y: { foo: U; bar: U }) => Base; a11 = b11; // ok b11 = a11; // ok ~~~ @@ -84,8 +84,8 @@ assignmentCompatWithCallSignatures5.ts(58,1): error TS2322: Type '(x: { a: U; b: V; }) => U[]; +!!! related TS2208 assignmentCompatWithCallSignatures5.ts:50:22: This type parameter might need an `extends T` constraint. + declare var b15: (x: { a: U; b: V; }) => U[]; a15 = b15; // ok, T = U, T = V b15 = a15; // ok ~~~ @@ -95,8 +95,8 @@ assignmentCompatWithCallSignatures5.ts(58,1): error TS2322: Type '(x: { a: T; b: T }) => T[]; +!!! related TS2208 assignmentCompatWithCallSignatures5.ts:53:22: This type parameter might need an `extends U` constraint. + declare var b16: (x: { a: T; b: T }) => T[]; a15 = b16; // ok b15 = a16; // ok ~~~ @@ -105,11 +105,11 @@ assignmentCompatWithCallSignatures5.ts(58,1): error TS2322: Type '(x: (a: T) => T) => T[]; +!!! related TS2208 assignmentCompatWithCallSignatures5.ts:53:19: This type parameter might need an `extends Base` constraint. + declare var b17: (x: (a: T) => T) => T[]; a17 = b17; // ok b17 = a17; // ok - var b18: (x: (a: T) => T) => any[]; + declare var b18: (x: (a: T) => T) => any[]; a18 = b18; // ok b18 = a18; // ok \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js index 097f6ac2dca22..458d0f9444d57 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js @@ -8,20 +8,20 @@ class Derived extends Base { bar: string; } class Derived2 extends Derived { baz: string; } class OtherDerived extends Base { bing: string; } -var a: (x: T) => T[]; -var a2: (x: T) => string[]; -var a3: (x: T) => void; -var a4: (x: T, y: U) => string; -var a5: (x: (arg: T) => U) => T; -var a6: (x: (arg: T) => Derived) => T; -var a11: (x: { foo: T }, y: { foo: T; bar: T }) => Base; -var a15: (x: { a: T; b: T }) => T[]; -var a16: (x: { a: T; b: T }) => T[]; -var a17: { +declare var a: (x: T) => T[]; +declare var a2: (x: T) => string[]; +declare var a3: (x: T) => void; +declare var a4: (x: T, y: U) => string; +declare var a5: (x: (arg: T) => U) => T; +declare var a6: (x: (arg: T) => Derived) => T; +declare var a11: (x: { foo: T }, y: { foo: T; bar: T }) => Base; +declare var a15: (x: { a: T; b: T }) => T[]; +declare var a16: (x: { a: T; b: T }) => T[]; +declare var a17: { (x: (a: T) => T): T[]; (x: (a: T) => T): T[]; }; -var a18: { +declare var a18: { (x: { (a: T): T; (a: T): T; @@ -32,37 +32,37 @@ var a18: { }): any[]; }; -var b: (x: T) => T[]; +declare var b: (x: T) => T[]; a = b; // ok b = a; // ok -var b2: (x: T) => string[]; +declare var b2: (x: T) => string[]; a2 = b2; // ok b2 = a2; // ok -var b3: (x: T) => T; +declare var b3: (x: T) => T; a3 = b3; // ok b3 = a3; // ok -var b4: (x: T, y: U) => string; +declare var b4: (x: T, y: U) => string; a4 = b4; // ok b4 = a4; // ok -var b5: (x: (arg: T) => U) => T; +declare var b5: (x: (arg: T) => U) => T; a5 = b5; // ok b5 = a5; // ok -var b6: (x: (arg: T) => U) => T; +declare var b6: (x: (arg: T) => U) => T; a6 = b6; // ok b6 = a6; // ok -var b11: (x: { foo: T }, y: { foo: U; bar: U }) => Base; +declare var b11: (x: { foo: T }, y: { foo: U; bar: U }) => Base; a11 = b11; // ok b11 = a11; // ok -var b15: (x: { a: U; b: V; }) => U[]; +declare var b15: (x: { a: U; b: V; }) => U[]; a15 = b15; // ok, T = U, T = V b15 = a15; // ok -var b16: (x: { a: T; b: T }) => T[]; +declare var b16: (x: { a: T; b: T }) => T[]; a15 = b16; // ok b15 = a16; // ok -var b17: (x: (a: T) => T) => T[]; +declare var b17: (x: (a: T) => T) => T[]; a17 = b17; // ok b17 = a17; // ok -var b18: (x: (a: T) => T) => any[]; +declare var b18: (x: (a: T) => T) => any[]; a18 = b18; // ok b18 = a18; // ok @@ -110,47 +110,25 @@ var OtherDerived = /** @class */ (function (_super) { } return OtherDerived; }(Base)); -var a; -var a2; -var a3; -var a4; -var a5; -var a6; -var a11; -var a15; -var a16; -var a17; -var a18; -var b; a = b; // ok b = a; // ok -var b2; a2 = b2; // ok b2 = a2; // ok -var b3; a3 = b3; // ok b3 = a3; // ok -var b4; a4 = b4; // ok b4 = a4; // ok -var b5; a5 = b5; // ok b5 = a5; // ok -var b6; a6 = b6; // ok b6 = a6; // ok -var b11; a11 = b11; // ok b11 = a11; // ok -var b15; a15 = b15; // ok, T = U, T = V b15 = a15; // ok -var b16; a15 = b16; // ok b15 = a16; // ok -var b17; a17 = b17; // ok b17 = a17; // ok -var b18; a18 = b18; // ok b18 = a18; // ok diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures5.symbols b/tests/baselines/reference/assignmentCompatWithCallSignatures5.symbols index de33824ac824c..ebe43f0d007ee 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures5.symbols +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures5.symbols @@ -22,90 +22,90 @@ class OtherDerived extends Base { bing: string; } >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures5.ts, 0, 0)) >bing : Symbol(OtherDerived.bing, Decl(assignmentCompatWithCallSignatures5.ts, 5, 33)) -var a: (x: T) => T[]; ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures5.ts, 7, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 7, 8)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 7, 11)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 7, 8)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 7, 8)) - -var a2: (x: T) => string[]; ->a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures5.ts, 8, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 8, 9)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 8, 12)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 8, 9)) - -var a3: (x: T) => void; ->a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures5.ts, 9, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 9, 9)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 9, 12)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 9, 9)) - -var a4: (x: T, y: U) => string; ->a4 : Symbol(a4, Decl(assignmentCompatWithCallSignatures5.ts, 10, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 10, 9)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 10, 11)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 10, 14)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 10, 9)) ->y : Symbol(y, Decl(assignmentCompatWithCallSignatures5.ts, 10, 19)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 10, 11)) - -var a5: (x: (arg: T) => U) => T; ->a5 : Symbol(a5, Decl(assignmentCompatWithCallSignatures5.ts, 11, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 11, 9)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 11, 11)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 11, 14)) ->arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures5.ts, 11, 18)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 11, 9)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 11, 11)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 11, 9)) - -var a6: (x: (arg: T) => Derived) => T; ->a6 : Symbol(a6, Decl(assignmentCompatWithCallSignatures5.ts, 12, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 12, 9)) +declare var a: (x: T) => T[]; +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures5.ts, 7, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 7, 16)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 7, 19)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 7, 16)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 7, 16)) + +declare var a2: (x: T) => string[]; +>a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures5.ts, 8, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 8, 17)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 8, 20)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 8, 17)) + +declare var a3: (x: T) => void; +>a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures5.ts, 9, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 9, 17)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 9, 20)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 9, 17)) + +declare var a4: (x: T, y: U) => string; +>a4 : Symbol(a4, Decl(assignmentCompatWithCallSignatures5.ts, 10, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 10, 17)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 10, 19)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 10, 22)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 10, 17)) +>y : Symbol(y, Decl(assignmentCompatWithCallSignatures5.ts, 10, 27)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 10, 19)) + +declare var a5: (x: (arg: T) => U) => T; +>a5 : Symbol(a5, Decl(assignmentCompatWithCallSignatures5.ts, 11, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 11, 17)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 11, 19)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 11, 22)) +>arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures5.ts, 11, 26)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 11, 17)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 11, 19)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 11, 17)) + +declare var a6: (x: (arg: T) => Derived) => T; +>a6 : Symbol(a6, Decl(assignmentCompatWithCallSignatures5.ts, 12, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 12, 17)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures5.ts, 0, 0)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 12, 25)) ->arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures5.ts, 12, 29)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 12, 9)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 12, 33)) +>arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures5.ts, 12, 37)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 12, 17)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures5.ts, 2, 27)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 12, 9)) - -var a11: (x: { foo: T }, y: { foo: T; bar: T }) => Base; ->a11 : Symbol(a11, Decl(assignmentCompatWithCallSignatures5.ts, 13, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 13, 10)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 13, 13)) ->foo : Symbol(foo, Decl(assignmentCompatWithCallSignatures5.ts, 13, 17)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 13, 10)) ->y : Symbol(y, Decl(assignmentCompatWithCallSignatures5.ts, 13, 27)) ->foo : Symbol(foo, Decl(assignmentCompatWithCallSignatures5.ts, 13, 32)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 13, 10)) ->bar : Symbol(bar, Decl(assignmentCompatWithCallSignatures5.ts, 13, 40)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 13, 10)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 12, 17)) + +declare var a11: (x: { foo: T }, y: { foo: T; bar: T }) => Base; +>a11 : Symbol(a11, Decl(assignmentCompatWithCallSignatures5.ts, 13, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 13, 18)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 13, 21)) +>foo : Symbol(foo, Decl(assignmentCompatWithCallSignatures5.ts, 13, 25)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 13, 18)) +>y : Symbol(y, Decl(assignmentCompatWithCallSignatures5.ts, 13, 35)) +>foo : Symbol(foo, Decl(assignmentCompatWithCallSignatures5.ts, 13, 40)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 13, 18)) +>bar : Symbol(bar, Decl(assignmentCompatWithCallSignatures5.ts, 13, 48)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 13, 18)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures5.ts, 0, 0)) -var a15: (x: { a: T; b: T }) => T[]; ->a15 : Symbol(a15, Decl(assignmentCompatWithCallSignatures5.ts, 14, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 14, 10)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 14, 13)) ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures5.ts, 14, 17)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 14, 10)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignatures5.ts, 14, 23)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 14, 10)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 14, 10)) - -var a16: (x: { a: T; b: T }) => T[]; ->a16 : Symbol(a16, Decl(assignmentCompatWithCallSignatures5.ts, 15, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 15, 10)) +declare var a15: (x: { a: T; b: T }) => T[]; +>a15 : Symbol(a15, Decl(assignmentCompatWithCallSignatures5.ts, 14, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 14, 18)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 14, 21)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures5.ts, 14, 25)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 14, 18)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignatures5.ts, 14, 31)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 14, 18)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 14, 18)) + +declare var a16: (x: { a: T; b: T }) => T[]; +>a16 : Symbol(a16, Decl(assignmentCompatWithCallSignatures5.ts, 15, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 15, 18)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures5.ts, 0, 0)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 15, 26)) ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures5.ts, 15, 30)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 15, 10)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignatures5.ts, 15, 36)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 15, 10)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 15, 10)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 15, 34)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures5.ts, 15, 38)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 15, 18)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignatures5.ts, 15, 44)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 15, 18)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 15, 18)) -var a17: { ->a17 : Symbol(a17, Decl(assignmentCompatWithCallSignatures5.ts, 16, 3)) +declare var a17: { +>a17 : Symbol(a17, Decl(assignmentCompatWithCallSignatures5.ts, 16, 11)) (x: (a: T) => T): T[]; >T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 17, 5)) @@ -126,8 +126,8 @@ var a17: { >T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 18, 5)) }; -var a18: { ->a18 : Symbol(a18, Decl(assignmentCompatWithCallSignatures5.ts, 20, 3)) +declare var a18: { +>a18 : Symbol(a18, Decl(assignmentCompatWithCallSignatures5.ts, 20, 11)) (x: { >x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 21, 5)) @@ -167,194 +167,194 @@ var a18: { }): any[]; }; -var b: (x: T) => T[]; ->b : Symbol(b, Decl(assignmentCompatWithCallSignatures5.ts, 31, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 31, 8)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 31, 11)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 31, 8)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 31, 8)) +declare var b: (x: T) => T[]; +>b : Symbol(b, Decl(assignmentCompatWithCallSignatures5.ts, 31, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 31, 16)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 31, 19)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 31, 16)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 31, 16)) a = b; // ok ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures5.ts, 7, 3)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignatures5.ts, 31, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures5.ts, 7, 11)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignatures5.ts, 31, 11)) b = a; // ok ->b : Symbol(b, Decl(assignmentCompatWithCallSignatures5.ts, 31, 3)) ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures5.ts, 7, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignatures5.ts, 31, 11)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures5.ts, 7, 11)) -var b2: (x: T) => string[]; ->b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures5.ts, 34, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 34, 9)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 34, 12)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 34, 9)) +declare var b2: (x: T) => string[]; +>b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures5.ts, 34, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 34, 17)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 34, 20)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 34, 17)) a2 = b2; // ok ->a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures5.ts, 8, 3)) ->b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures5.ts, 34, 3)) +>a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures5.ts, 8, 11)) +>b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures5.ts, 34, 11)) b2 = a2; // ok ->b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures5.ts, 34, 3)) ->a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures5.ts, 8, 3)) +>b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures5.ts, 34, 11)) +>a2 : Symbol(a2, Decl(assignmentCompatWithCallSignatures5.ts, 8, 11)) -var b3: (x: T) => T; ->b3 : Symbol(b3, Decl(assignmentCompatWithCallSignatures5.ts, 37, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 37, 9)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 37, 12)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 37, 9)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 37, 9)) +declare var b3: (x: T) => T; +>b3 : Symbol(b3, Decl(assignmentCompatWithCallSignatures5.ts, 37, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 37, 17)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 37, 20)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 37, 17)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 37, 17)) a3 = b3; // ok ->a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures5.ts, 9, 3)) ->b3 : Symbol(b3, Decl(assignmentCompatWithCallSignatures5.ts, 37, 3)) +>a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures5.ts, 9, 11)) +>b3 : Symbol(b3, Decl(assignmentCompatWithCallSignatures5.ts, 37, 11)) b3 = a3; // ok ->b3 : Symbol(b3, Decl(assignmentCompatWithCallSignatures5.ts, 37, 3)) ->a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures5.ts, 9, 3)) - -var b4: (x: T, y: U) => string; ->b4 : Symbol(b4, Decl(assignmentCompatWithCallSignatures5.ts, 40, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 40, 9)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 40, 11)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 40, 15)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 40, 9)) ->y : Symbol(y, Decl(assignmentCompatWithCallSignatures5.ts, 40, 20)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 40, 11)) +>b3 : Symbol(b3, Decl(assignmentCompatWithCallSignatures5.ts, 37, 11)) +>a3 : Symbol(a3, Decl(assignmentCompatWithCallSignatures5.ts, 9, 11)) + +declare var b4: (x: T, y: U) => string; +>b4 : Symbol(b4, Decl(assignmentCompatWithCallSignatures5.ts, 40, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 40, 17)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 40, 19)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 40, 23)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 40, 17)) +>y : Symbol(y, Decl(assignmentCompatWithCallSignatures5.ts, 40, 28)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 40, 19)) a4 = b4; // ok ->a4 : Symbol(a4, Decl(assignmentCompatWithCallSignatures5.ts, 10, 3)) ->b4 : Symbol(b4, Decl(assignmentCompatWithCallSignatures5.ts, 40, 3)) +>a4 : Symbol(a4, Decl(assignmentCompatWithCallSignatures5.ts, 10, 11)) +>b4 : Symbol(b4, Decl(assignmentCompatWithCallSignatures5.ts, 40, 11)) b4 = a4; // ok ->b4 : Symbol(b4, Decl(assignmentCompatWithCallSignatures5.ts, 40, 3)) ->a4 : Symbol(a4, Decl(assignmentCompatWithCallSignatures5.ts, 10, 3)) - -var b5: (x: (arg: T) => U) => T; ->b5 : Symbol(b5, Decl(assignmentCompatWithCallSignatures5.ts, 43, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 43, 9)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 43, 11)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 43, 15)) ->arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures5.ts, 43, 19)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 43, 9)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 43, 11)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 43, 9)) +>b4 : Symbol(b4, Decl(assignmentCompatWithCallSignatures5.ts, 40, 11)) +>a4 : Symbol(a4, Decl(assignmentCompatWithCallSignatures5.ts, 10, 11)) + +declare var b5: (x: (arg: T) => U) => T; +>b5 : Symbol(b5, Decl(assignmentCompatWithCallSignatures5.ts, 43, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 43, 17)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 43, 19)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 43, 23)) +>arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures5.ts, 43, 27)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 43, 17)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 43, 19)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 43, 17)) a5 = b5; // ok ->a5 : Symbol(a5, Decl(assignmentCompatWithCallSignatures5.ts, 11, 3)) ->b5 : Symbol(b5, Decl(assignmentCompatWithCallSignatures5.ts, 43, 3)) +>a5 : Symbol(a5, Decl(assignmentCompatWithCallSignatures5.ts, 11, 11)) +>b5 : Symbol(b5, Decl(assignmentCompatWithCallSignatures5.ts, 43, 11)) b5 = a5; // ok ->b5 : Symbol(b5, Decl(assignmentCompatWithCallSignatures5.ts, 43, 3)) ->a5 : Symbol(a5, Decl(assignmentCompatWithCallSignatures5.ts, 11, 3)) +>b5 : Symbol(b5, Decl(assignmentCompatWithCallSignatures5.ts, 43, 11)) +>a5 : Symbol(a5, Decl(assignmentCompatWithCallSignatures5.ts, 11, 11)) -var b6: (x: (arg: T) => U) => T; ->b6 : Symbol(b6, Decl(assignmentCompatWithCallSignatures5.ts, 46, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 46, 9)) +declare var b6: (x: (arg: T) => U) => T; +>b6 : Symbol(b6, Decl(assignmentCompatWithCallSignatures5.ts, 46, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 46, 17)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures5.ts, 0, 0)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 46, 24)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 46, 32)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures5.ts, 2, 27)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 46, 44)) ->arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures5.ts, 46, 48)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 46, 9)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 46, 24)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 46, 9)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 46, 52)) +>arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures5.ts, 46, 56)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 46, 17)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 46, 32)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 46, 17)) a6 = b6; // ok ->a6 : Symbol(a6, Decl(assignmentCompatWithCallSignatures5.ts, 12, 3)) ->b6 : Symbol(b6, Decl(assignmentCompatWithCallSignatures5.ts, 46, 3)) +>a6 : Symbol(a6, Decl(assignmentCompatWithCallSignatures5.ts, 12, 11)) +>b6 : Symbol(b6, Decl(assignmentCompatWithCallSignatures5.ts, 46, 11)) b6 = a6; // ok ->b6 : Symbol(b6, Decl(assignmentCompatWithCallSignatures5.ts, 46, 3)) ->a6 : Symbol(a6, Decl(assignmentCompatWithCallSignatures5.ts, 12, 3)) - -var b11: (x: { foo: T }, y: { foo: U; bar: U }) => Base; ->b11 : Symbol(b11, Decl(assignmentCompatWithCallSignatures5.ts, 49, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 49, 10)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 49, 12)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 49, 16)) ->foo : Symbol(foo, Decl(assignmentCompatWithCallSignatures5.ts, 49, 20)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 49, 10)) ->y : Symbol(y, Decl(assignmentCompatWithCallSignatures5.ts, 49, 30)) ->foo : Symbol(foo, Decl(assignmentCompatWithCallSignatures5.ts, 49, 35)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 49, 12)) ->bar : Symbol(bar, Decl(assignmentCompatWithCallSignatures5.ts, 49, 43)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 49, 12)) +>b6 : Symbol(b6, Decl(assignmentCompatWithCallSignatures5.ts, 46, 11)) +>a6 : Symbol(a6, Decl(assignmentCompatWithCallSignatures5.ts, 12, 11)) + +declare var b11: (x: { foo: T }, y: { foo: U; bar: U }) => Base; +>b11 : Symbol(b11, Decl(assignmentCompatWithCallSignatures5.ts, 49, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 49, 18)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 49, 20)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 49, 24)) +>foo : Symbol(foo, Decl(assignmentCompatWithCallSignatures5.ts, 49, 28)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 49, 18)) +>y : Symbol(y, Decl(assignmentCompatWithCallSignatures5.ts, 49, 38)) +>foo : Symbol(foo, Decl(assignmentCompatWithCallSignatures5.ts, 49, 43)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 49, 20)) +>bar : Symbol(bar, Decl(assignmentCompatWithCallSignatures5.ts, 49, 51)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 49, 20)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures5.ts, 0, 0)) a11 = b11; // ok ->a11 : Symbol(a11, Decl(assignmentCompatWithCallSignatures5.ts, 13, 3)) ->b11 : Symbol(b11, Decl(assignmentCompatWithCallSignatures5.ts, 49, 3)) +>a11 : Symbol(a11, Decl(assignmentCompatWithCallSignatures5.ts, 13, 11)) +>b11 : Symbol(b11, Decl(assignmentCompatWithCallSignatures5.ts, 49, 11)) b11 = a11; // ok ->b11 : Symbol(b11, Decl(assignmentCompatWithCallSignatures5.ts, 49, 3)) ->a11 : Symbol(a11, Decl(assignmentCompatWithCallSignatures5.ts, 13, 3)) - -var b15: (x: { a: U; b: V; }) => U[]; ->b15 : Symbol(b15, Decl(assignmentCompatWithCallSignatures5.ts, 52, 3)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 52, 10)) ->V : Symbol(V, Decl(assignmentCompatWithCallSignatures5.ts, 52, 12)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 52, 16)) ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures5.ts, 52, 20)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 52, 10)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignatures5.ts, 52, 26)) ->V : Symbol(V, Decl(assignmentCompatWithCallSignatures5.ts, 52, 12)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 52, 10)) +>b11 : Symbol(b11, Decl(assignmentCompatWithCallSignatures5.ts, 49, 11)) +>a11 : Symbol(a11, Decl(assignmentCompatWithCallSignatures5.ts, 13, 11)) + +declare var b15: (x: { a: U; b: V; }) => U[]; +>b15 : Symbol(b15, Decl(assignmentCompatWithCallSignatures5.ts, 52, 11)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 52, 18)) +>V : Symbol(V, Decl(assignmentCompatWithCallSignatures5.ts, 52, 20)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 52, 24)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures5.ts, 52, 28)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 52, 18)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignatures5.ts, 52, 34)) +>V : Symbol(V, Decl(assignmentCompatWithCallSignatures5.ts, 52, 20)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures5.ts, 52, 18)) a15 = b15; // ok, T = U, T = V ->a15 : Symbol(a15, Decl(assignmentCompatWithCallSignatures5.ts, 14, 3)) ->b15 : Symbol(b15, Decl(assignmentCompatWithCallSignatures5.ts, 52, 3)) +>a15 : Symbol(a15, Decl(assignmentCompatWithCallSignatures5.ts, 14, 11)) +>b15 : Symbol(b15, Decl(assignmentCompatWithCallSignatures5.ts, 52, 11)) b15 = a15; // ok ->b15 : Symbol(b15, Decl(assignmentCompatWithCallSignatures5.ts, 52, 3)) ->a15 : Symbol(a15, Decl(assignmentCompatWithCallSignatures5.ts, 14, 3)) - -var b16: (x: { a: T; b: T }) => T[]; ->b16 : Symbol(b16, Decl(assignmentCompatWithCallSignatures5.ts, 55, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 55, 10)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 55, 13)) ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures5.ts, 55, 17)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 55, 10)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignatures5.ts, 55, 23)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 55, 10)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 55, 10)) +>b15 : Symbol(b15, Decl(assignmentCompatWithCallSignatures5.ts, 52, 11)) +>a15 : Symbol(a15, Decl(assignmentCompatWithCallSignatures5.ts, 14, 11)) + +declare var b16: (x: { a: T; b: T }) => T[]; +>b16 : Symbol(b16, Decl(assignmentCompatWithCallSignatures5.ts, 55, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 55, 18)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 55, 21)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures5.ts, 55, 25)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 55, 18)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignatures5.ts, 55, 31)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 55, 18)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 55, 18)) a15 = b16; // ok ->a15 : Symbol(a15, Decl(assignmentCompatWithCallSignatures5.ts, 14, 3)) ->b16 : Symbol(b16, Decl(assignmentCompatWithCallSignatures5.ts, 55, 3)) +>a15 : Symbol(a15, Decl(assignmentCompatWithCallSignatures5.ts, 14, 11)) +>b16 : Symbol(b16, Decl(assignmentCompatWithCallSignatures5.ts, 55, 11)) b15 = a16; // ok ->b15 : Symbol(b15, Decl(assignmentCompatWithCallSignatures5.ts, 52, 3)) ->a16 : Symbol(a16, Decl(assignmentCompatWithCallSignatures5.ts, 15, 3)) - -var b17: (x: (a: T) => T) => T[]; ->b17 : Symbol(b17, Decl(assignmentCompatWithCallSignatures5.ts, 58, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 58, 10)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 58, 13)) ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures5.ts, 58, 17)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 58, 10)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 58, 10)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 58, 10)) +>b15 : Symbol(b15, Decl(assignmentCompatWithCallSignatures5.ts, 52, 11)) +>a16 : Symbol(a16, Decl(assignmentCompatWithCallSignatures5.ts, 15, 11)) + +declare var b17: (x: (a: T) => T) => T[]; +>b17 : Symbol(b17, Decl(assignmentCompatWithCallSignatures5.ts, 58, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 58, 18)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 58, 21)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures5.ts, 58, 25)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 58, 18)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 58, 18)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 58, 18)) a17 = b17; // ok ->a17 : Symbol(a17, Decl(assignmentCompatWithCallSignatures5.ts, 16, 3)) ->b17 : Symbol(b17, Decl(assignmentCompatWithCallSignatures5.ts, 58, 3)) +>a17 : Symbol(a17, Decl(assignmentCompatWithCallSignatures5.ts, 16, 11)) +>b17 : Symbol(b17, Decl(assignmentCompatWithCallSignatures5.ts, 58, 11)) b17 = a17; // ok ->b17 : Symbol(b17, Decl(assignmentCompatWithCallSignatures5.ts, 58, 3)) ->a17 : Symbol(a17, Decl(assignmentCompatWithCallSignatures5.ts, 16, 3)) +>b17 : Symbol(b17, Decl(assignmentCompatWithCallSignatures5.ts, 58, 11)) +>a17 : Symbol(a17, Decl(assignmentCompatWithCallSignatures5.ts, 16, 11)) -var b18: (x: (a: T) => T) => any[]; ->b18 : Symbol(b18, Decl(assignmentCompatWithCallSignatures5.ts, 61, 3)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 61, 10)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 61, 14)) ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures5.ts, 61, 17)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 61, 14)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 61, 14)) +declare var b18: (x: (a: T) => T) => any[]; +>b18 : Symbol(b18, Decl(assignmentCompatWithCallSignatures5.ts, 61, 11)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures5.ts, 61, 18)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 61, 22)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures5.ts, 61, 25)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 61, 22)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures5.ts, 61, 22)) a18 = b18; // ok ->a18 : Symbol(a18, Decl(assignmentCompatWithCallSignatures5.ts, 20, 3)) ->b18 : Symbol(b18, Decl(assignmentCompatWithCallSignatures5.ts, 61, 3)) +>a18 : Symbol(a18, Decl(assignmentCompatWithCallSignatures5.ts, 20, 11)) +>b18 : Symbol(b18, Decl(assignmentCompatWithCallSignatures5.ts, 61, 11)) b18 = a18; // ok ->b18 : Symbol(b18, Decl(assignmentCompatWithCallSignatures5.ts, 61, 3)) ->a18 : Symbol(a18, Decl(assignmentCompatWithCallSignatures5.ts, 20, 3)) +>b18 : Symbol(b18, Decl(assignmentCompatWithCallSignatures5.ts, 61, 11)) +>a18 : Symbol(a18, Decl(assignmentCompatWithCallSignatures5.ts, 20, 11)) diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures5.types b/tests/baselines/reference/assignmentCompatWithCallSignatures5.types index 911c4db793b3f..5eece3edd4c48 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures5.types +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures5.types @@ -33,25 +33,25 @@ class OtherDerived extends Base { bing: string; } >bing : string > : ^^^^^^ -var a: (x: T) => T[]; +declare var a: (x: T) => T[]; >a : (x: T) => T[] > : ^ ^^ ^^ ^^^^^ >x : T > : ^ -var a2: (x: T) => string[]; +declare var a2: (x: T) => string[]; >a2 : (x: T) => string[] > : ^ ^^ ^^ ^^^^^ >x : T > : ^ -var a3: (x: T) => void; +declare var a3: (x: T) => void; >a3 : (x: T) => void > : ^ ^^ ^^ ^^^^^ >x : T > : ^ -var a4: (x: T, y: U) => string; +declare var a4: (x: T, y: U) => string; >a4 : (x: T, y: U) => string > : ^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >x : T @@ -59,7 +59,7 @@ var a4: (x: T, y: U) => string; >y : U > : ^ -var a5: (x: (arg: T) => U) => T; +declare var a5: (x: (arg: T) => U) => T; >a5 : (x: (arg: T) => U) => T > : ^ ^^ ^^ ^^ ^^^^^ >x : (arg: T) => U @@ -67,7 +67,7 @@ var a5: (x: (arg: T) => U) => T; >arg : T > : ^ -var a6: (x: (arg: T) => Derived) => T; +declare var a6: (x: (arg: T) => Derived) => T; >a6 : (x: (arg: T) => Derived) => T > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >x : (arg: T) => Derived @@ -75,7 +75,7 @@ var a6: (x: (arg: T) => Derived) => T; >arg : T > : ^ -var a11: (x: { foo: T }, y: { foo: T; bar: T }) => Base; +declare var a11: (x: { foo: T }, y: { foo: T; bar: T }) => Base; >a11 : (x: { foo: T; }, y: { foo: T; bar: T; }) => Base > : ^ ^^ ^^ ^^ ^^ ^^^^^ >x : { foo: T; } @@ -89,7 +89,7 @@ var a11: (x: { foo: T }, y: { foo: T; bar: T }) => Base; >bar : T > : ^ -var a15: (x: { a: T; b: T }) => T[]; +declare var a15: (x: { a: T; b: T }) => T[]; >a15 : (x: { a: T; b: T; }) => T[] > : ^ ^^ ^^ ^^^^^ >x : { a: T; b: T; } @@ -99,7 +99,7 @@ var a15: (x: { a: T; b: T }) => T[]; >b : T > : ^ -var a16: (x: { a: T; b: T }) => T[]; +declare var a16: (x: { a: T; b: T }) => T[]; >a16 : (x: { a: T; b: T; }) => T[] > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >x : { a: T; b: T; } @@ -109,7 +109,7 @@ var a16: (x: { a: T; b: T }) => T[]; >b : T > : ^ -var a17: { +declare var a17: { >a17 : { (x: (a: T) => T): T[]; (x: (a: T) => T): T[]; } > : ^^^ ^^^^^^^^^ ^^ ^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^ ^^^ ^^^ @@ -126,7 +126,7 @@ var a17: { > : ^ }; -var a18: { +declare var a18: { >a18 : { (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; } > : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ @@ -158,7 +158,7 @@ var a18: { }): any[]; }; -var b: (x: T) => T[]; +declare var b: (x: T) => T[]; >b : (x: T) => T[] > : ^ ^^ ^^ ^^^^^ >x : T @@ -180,7 +180,7 @@ b = a; // ok >a : (x: T) => T[] > : ^ ^^ ^^ ^^^^^ -var b2: (x: T) => string[]; +declare var b2: (x: T) => string[]; >b2 : (x: T) => string[] > : ^ ^^ ^^ ^^^^^ >x : T @@ -202,7 +202,7 @@ b2 = a2; // ok >a2 : (x: T) => string[] > : ^ ^^ ^^ ^^^^^ -var b3: (x: T) => T; +declare var b3: (x: T) => T; >b3 : (x: T) => T > : ^ ^^ ^^ ^^^^^ >x : T @@ -224,7 +224,7 @@ b3 = a3; // ok >a3 : (x: T) => void > : ^ ^^ ^^ ^^^^^ -var b4: (x: T, y: U) => string; +declare var b4: (x: T, y: U) => string; >b4 : (x: T, y: U) => string > : ^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >x : T @@ -248,7 +248,7 @@ b4 = a4; // ok >a4 : (x: T, y: U) => string > : ^ ^^ ^^ ^^ ^^ ^^ ^^^^^ -var b5: (x: (arg: T) => U) => T; +declare var b5: (x: (arg: T) => U) => T; >b5 : (x: (arg: T) => U) => T > : ^ ^^ ^^ ^^ ^^^^^ >x : (arg: T) => U @@ -272,7 +272,7 @@ b5 = a5; // ok >a5 : (x: (arg: T) => U) => T > : ^ ^^ ^^ ^^ ^^^^^ -var b6: (x: (arg: T) => U) => T; +declare var b6: (x: (arg: T) => U) => T; >b6 : (x: (arg: T) => U) => T > : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^ >x : (arg: T) => U @@ -296,7 +296,7 @@ b6 = a6; // ok >a6 : (x: (arg: T) => Derived) => T > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ -var b11: (x: { foo: T }, y: { foo: U; bar: U }) => Base; +declare var b11: (x: { foo: T }, y: { foo: U; bar: U }) => Base; >b11 : (x: { foo: T; }, y: { foo: U; bar: U; }) => Base > : ^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >x : { foo: T; } @@ -326,7 +326,7 @@ b11 = a11; // ok >a11 : (x: { foo: T; }, y: { foo: T; bar: T; }) => Base > : ^ ^^ ^^ ^^ ^^ ^^^^^ -var b15: (x: { a: U; b: V; }) => U[]; +declare var b15: (x: { a: U; b: V; }) => U[]; >b15 : (x: { a: U; b: V; }) => U[] > : ^ ^^ ^^ ^^ ^^^^^ >x : { a: U; b: V; } @@ -352,7 +352,7 @@ b15 = a15; // ok >a15 : (x: { a: T; b: T; }) => T[] > : ^ ^^ ^^ ^^^^^ -var b16: (x: { a: T; b: T }) => T[]; +declare var b16: (x: { a: T; b: T }) => T[]; >b16 : (x: { a: T; b: T; }) => T[] > : ^ ^^ ^^ ^^^^^ >x : { a: T; b: T; } @@ -378,7 +378,7 @@ b15 = a16; // ok >a16 : (x: { a: T; b: T; }) => T[] > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ -var b17: (x: (a: T) => T) => T[]; +declare var b17: (x: (a: T) => T) => T[]; >b17 : (x: (a: T) => T) => T[] > : ^ ^^ ^^ ^^^^^ >x : (a: T) => T @@ -402,7 +402,7 @@ b17 = a17; // ok >a17 : { (x: (a: T) => T): T[]; (x: (a: T) => T): T[]; } > : ^^^ ^^^^^^^^^ ^^ ^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^ ^^^ ^^^ -var b18: (x: (a: T) => T) => any[]; +declare var b18: (x: (a: T) => T) => any[]; >b18 : (x: (a: T) => T) => any[] > : ^ ^^ ^^^^^ >x : (a: T) => T diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures6.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures6.errors.txt index 98d798bde9a81..8d25046286fd1 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures6.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures6.errors.txt @@ -34,28 +34,28 @@ assignmentCompatWithCallSignatures6.ts(42,1): error TS2322: Type '(x: { a: T; b: T }) => T[]; } - var x: A; + declare var x: A; - var b: (x: T) => T[]; + declare var b: (x: T) => T[]; x.a = b; b = x.a; - var b2: (x: T) => string[]; + declare var b2: (x: T) => string[]; x.a2 = b2; b2 = x.a2; - var b3: (x: T) => T; + declare var b3: (x: T) => T; x.a3 = b3; b3 = x.a3; ~~ !!! error TS2322: Type '(x: T) => void' is not assignable to type '(x: T) => T'. !!! error TS2322: Type 'void' is not assignable to type 'T'. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'void'. - var b4: (x: T, y: U) => string; + declare var b4: (x: T, y: U) => string; x.a4 = b4; b4 = x.a4; - var b5: (x: (arg: T) => U) => T; + declare var b5: (x: (arg: T) => U) => T; x.a5 = b5; b5 = x.a5; - var b11: (x: { foo: T }, y: { foo: U; bar: U }) => Base; + declare var b11: (x: { foo: T }, y: { foo: U; bar: U }) => Base; x.a11 = b11; b11 = x.a11; ~~~ @@ -65,8 +65,8 @@ assignmentCompatWithCallSignatures6.ts(42,1): error TS2322: Type '(x: { a: T; b: T }) => T[]; +!!! related TS2208 assignmentCompatWithCallSignatures6.ts:37:22: This type parameter might need an `extends T` constraint. + declare var b16: (x: { a: T; b: T }) => T[]; x.a16 = b16; b16 = x.a16; ~~~ @@ -75,4 +75,4 @@ assignmentCompatWithCallSignatures6.ts(42,1): error TS2322: Type '(x: { a: T; b: T }) => T[]; } -var x: A; +declare var x: A; -var b: (x: T) => T[]; +declare var b: (x: T) => T[]; x.a = b; b = x.a; -var b2: (x: T) => string[]; +declare var b2: (x: T) => string[]; x.a2 = b2; b2 = x.a2; -var b3: (x: T) => T; +declare var b3: (x: T) => T; x.a3 = b3; b3 = x.a3; -var b4: (x: T, y: U) => string; +declare var b4: (x: T, y: U) => string; x.a4 = b4; b4 = x.a4; -var b5: (x: (arg: T) => U) => T; +declare var b5: (x: (arg: T) => U) => T; x.a5 = b5; b5 = x.a5; -var b11: (x: { foo: T }, y: { foo: U; bar: U }) => Base; +declare var b11: (x: { foo: T }, y: { foo: U; bar: U }) => Base; x.a11 = b11; b11 = x.a11; -var b16: (x: { a: T; b: T }) => T[]; +declare var b16: (x: { a: T; b: T }) => T[]; x.a16 = b16; b16 = x.a16; @@ -87,25 +87,17 @@ var OtherDerived = /** @class */ (function (_super) { } return OtherDerived; }(Base)); -var x; -var b; x.a = b; b = x.a; -var b2; x.a2 = b2; b2 = x.a2; -var b3; x.a3 = b3; b3 = x.a3; -var b4; x.a4 = b4; b4 = x.a4; -var b5; x.a5 = b5; b5 = x.a5; -var b11; x.a11 = b11; b11 = x.a11; -var b16; x.a16 = b16; b16 = x.a16; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures6.symbols b/tests/baselines/reference/assignmentCompatWithCallSignatures6.symbols index 95b783cdecaeb..b260d20308cb3 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures6.symbols +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures6.symbols @@ -108,154 +108,154 @@ interface A { >T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 16, 10)) } -var x: A; ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 3)) +declare var x: A; +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 11)) >A : Symbol(A, Decl(assignmentCompatWithCallSignatures6.ts, 5, 49)) -var b: (x: T) => T[]; ->b : Symbol(b, Decl(assignmentCompatWithCallSignatures6.ts, 21, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 21, 8)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 21, 11)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 21, 8)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 21, 8)) +declare var b: (x: T) => T[]; +>b : Symbol(b, Decl(assignmentCompatWithCallSignatures6.ts, 21, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 21, 16)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 21, 19)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 21, 16)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 21, 16)) x.a = b; >x.a : Symbol(A.a, Decl(assignmentCompatWithCallSignatures6.ts, 7, 13)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 3)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 11)) >a : Symbol(A.a, Decl(assignmentCompatWithCallSignatures6.ts, 7, 13)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignatures6.ts, 21, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignatures6.ts, 21, 11)) b = x.a; ->b : Symbol(b, Decl(assignmentCompatWithCallSignatures6.ts, 21, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignatures6.ts, 21, 11)) >x.a : Symbol(A.a, Decl(assignmentCompatWithCallSignatures6.ts, 7, 13)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 3)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 11)) >a : Symbol(A.a, Decl(assignmentCompatWithCallSignatures6.ts, 7, 13)) -var b2: (x: T) => string[]; ->b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures6.ts, 24, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 24, 9)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 24, 12)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 24, 9)) +declare var b2: (x: T) => string[]; +>b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures6.ts, 24, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 24, 17)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 24, 20)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 24, 17)) x.a2 = b2; >x.a2 : Symbol(A.a2, Decl(assignmentCompatWithCallSignatures6.ts, 8, 24)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 3)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 11)) >a2 : Symbol(A.a2, Decl(assignmentCompatWithCallSignatures6.ts, 8, 24)) ->b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures6.ts, 24, 3)) +>b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures6.ts, 24, 11)) b2 = x.a2; ->b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures6.ts, 24, 3)) +>b2 : Symbol(b2, Decl(assignmentCompatWithCallSignatures6.ts, 24, 11)) >x.a2 : Symbol(A.a2, Decl(assignmentCompatWithCallSignatures6.ts, 8, 24)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 3)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 11)) >a2 : Symbol(A.a2, Decl(assignmentCompatWithCallSignatures6.ts, 8, 24)) -var b3: (x: T) => T; ->b3 : Symbol(b3, Decl(assignmentCompatWithCallSignatures6.ts, 27, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 27, 9)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 27, 12)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 27, 9)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 27, 9)) +declare var b3: (x: T) => T; +>b3 : Symbol(b3, Decl(assignmentCompatWithCallSignatures6.ts, 27, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 27, 17)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 27, 20)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 27, 17)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 27, 17)) x.a3 = b3; >x.a3 : Symbol(A.a3, Decl(assignmentCompatWithCallSignatures6.ts, 9, 30)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 3)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 11)) >a3 : Symbol(A.a3, Decl(assignmentCompatWithCallSignatures6.ts, 9, 30)) ->b3 : Symbol(b3, Decl(assignmentCompatWithCallSignatures6.ts, 27, 3)) +>b3 : Symbol(b3, Decl(assignmentCompatWithCallSignatures6.ts, 27, 11)) b3 = x.a3; ->b3 : Symbol(b3, Decl(assignmentCompatWithCallSignatures6.ts, 27, 3)) +>b3 : Symbol(b3, Decl(assignmentCompatWithCallSignatures6.ts, 27, 11)) >x.a3 : Symbol(A.a3, Decl(assignmentCompatWithCallSignatures6.ts, 9, 30)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 3)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 11)) >a3 : Symbol(A.a3, Decl(assignmentCompatWithCallSignatures6.ts, 9, 30)) -var b4: (x: T, y: U) => string; ->b4 : Symbol(b4, Decl(assignmentCompatWithCallSignatures6.ts, 30, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 30, 9)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures6.ts, 30, 11)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 30, 15)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 30, 9)) ->y : Symbol(y, Decl(assignmentCompatWithCallSignatures6.ts, 30, 20)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures6.ts, 30, 11)) +declare var b4: (x: T, y: U) => string; +>b4 : Symbol(b4, Decl(assignmentCompatWithCallSignatures6.ts, 30, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 30, 17)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures6.ts, 30, 19)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 30, 23)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 30, 17)) +>y : Symbol(y, Decl(assignmentCompatWithCallSignatures6.ts, 30, 28)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures6.ts, 30, 19)) x.a4 = b4; >x.a4 : Symbol(A.a4, Decl(assignmentCompatWithCallSignatures6.ts, 10, 26)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 3)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 11)) >a4 : Symbol(A.a4, Decl(assignmentCompatWithCallSignatures6.ts, 10, 26)) ->b4 : Symbol(b4, Decl(assignmentCompatWithCallSignatures6.ts, 30, 3)) +>b4 : Symbol(b4, Decl(assignmentCompatWithCallSignatures6.ts, 30, 11)) b4 = x.a4; ->b4 : Symbol(b4, Decl(assignmentCompatWithCallSignatures6.ts, 30, 3)) +>b4 : Symbol(b4, Decl(assignmentCompatWithCallSignatures6.ts, 30, 11)) >x.a4 : Symbol(A.a4, Decl(assignmentCompatWithCallSignatures6.ts, 10, 26)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 3)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 11)) >a4 : Symbol(A.a4, Decl(assignmentCompatWithCallSignatures6.ts, 10, 26)) -var b5: (x: (arg: T) => U) => T; ->b5 : Symbol(b5, Decl(assignmentCompatWithCallSignatures6.ts, 33, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 33, 9)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures6.ts, 33, 11)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 33, 15)) ->arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures6.ts, 33, 19)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 33, 9)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures6.ts, 33, 11)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 33, 9)) +declare var b5: (x: (arg: T) => U) => T; +>b5 : Symbol(b5, Decl(assignmentCompatWithCallSignatures6.ts, 33, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 33, 17)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures6.ts, 33, 19)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 33, 23)) +>arg : Symbol(arg, Decl(assignmentCompatWithCallSignatures6.ts, 33, 27)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 33, 17)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures6.ts, 33, 19)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 33, 17)) x.a5 = b5; >x.a5 : Symbol(A.a5, Decl(assignmentCompatWithCallSignatures6.ts, 11, 36)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 3)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 11)) >a5 : Symbol(A.a5, Decl(assignmentCompatWithCallSignatures6.ts, 11, 36)) ->b5 : Symbol(b5, Decl(assignmentCompatWithCallSignatures6.ts, 33, 3)) +>b5 : Symbol(b5, Decl(assignmentCompatWithCallSignatures6.ts, 33, 11)) b5 = x.a5; ->b5 : Symbol(b5, Decl(assignmentCompatWithCallSignatures6.ts, 33, 3)) +>b5 : Symbol(b5, Decl(assignmentCompatWithCallSignatures6.ts, 33, 11)) >x.a5 : Symbol(A.a5, Decl(assignmentCompatWithCallSignatures6.ts, 11, 36)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 3)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 11)) >a5 : Symbol(A.a5, Decl(assignmentCompatWithCallSignatures6.ts, 11, 36)) -var b11: (x: { foo: T }, y: { foo: U; bar: U }) => Base; ->b11 : Symbol(b11, Decl(assignmentCompatWithCallSignatures6.ts, 36, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 36, 10)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures6.ts, 36, 12)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 36, 16)) ->foo : Symbol(foo, Decl(assignmentCompatWithCallSignatures6.ts, 36, 20)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 36, 10)) ->y : Symbol(y, Decl(assignmentCompatWithCallSignatures6.ts, 36, 30)) ->foo : Symbol(foo, Decl(assignmentCompatWithCallSignatures6.ts, 36, 35)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures6.ts, 36, 12)) ->bar : Symbol(bar, Decl(assignmentCompatWithCallSignatures6.ts, 36, 43)) ->U : Symbol(U, Decl(assignmentCompatWithCallSignatures6.ts, 36, 12)) +declare var b11: (x: { foo: T }, y: { foo: U; bar: U }) => Base; +>b11 : Symbol(b11, Decl(assignmentCompatWithCallSignatures6.ts, 36, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 36, 18)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures6.ts, 36, 20)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 36, 24)) +>foo : Symbol(foo, Decl(assignmentCompatWithCallSignatures6.ts, 36, 28)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 36, 18)) +>y : Symbol(y, Decl(assignmentCompatWithCallSignatures6.ts, 36, 38)) +>foo : Symbol(foo, Decl(assignmentCompatWithCallSignatures6.ts, 36, 43)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures6.ts, 36, 20)) +>bar : Symbol(bar, Decl(assignmentCompatWithCallSignatures6.ts, 36, 51)) +>U : Symbol(U, Decl(assignmentCompatWithCallSignatures6.ts, 36, 20)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures6.ts, 0, 0)) x.a11 = b11; >x.a11 : Symbol(A.a11, Decl(assignmentCompatWithCallSignatures6.ts, 13, 54)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 3)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 11)) >a11 : Symbol(A.a11, Decl(assignmentCompatWithCallSignatures6.ts, 13, 54)) ->b11 : Symbol(b11, Decl(assignmentCompatWithCallSignatures6.ts, 36, 3)) +>b11 : Symbol(b11, Decl(assignmentCompatWithCallSignatures6.ts, 36, 11)) b11 = x.a11; ->b11 : Symbol(b11, Decl(assignmentCompatWithCallSignatures6.ts, 36, 3)) +>b11 : Symbol(b11, Decl(assignmentCompatWithCallSignatures6.ts, 36, 11)) >x.a11 : Symbol(A.a11, Decl(assignmentCompatWithCallSignatures6.ts, 13, 54)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 3)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 11)) >a11 : Symbol(A.a11, Decl(assignmentCompatWithCallSignatures6.ts, 13, 54)) -var b16: (x: { a: T; b: T }) => T[]; ->b16 : Symbol(b16, Decl(assignmentCompatWithCallSignatures6.ts, 39, 3)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 39, 10)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 39, 13)) ->a : Symbol(a, Decl(assignmentCompatWithCallSignatures6.ts, 39, 17)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 39, 10)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignatures6.ts, 39, 23)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 39, 10)) ->T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 39, 10)) +declare var b16: (x: { a: T; b: T }) => T[]; +>b16 : Symbol(b16, Decl(assignmentCompatWithCallSignatures6.ts, 39, 11)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 39, 18)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 39, 21)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignatures6.ts, 39, 25)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 39, 18)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignatures6.ts, 39, 31)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 39, 18)) +>T : Symbol(T, Decl(assignmentCompatWithCallSignatures6.ts, 39, 18)) x.a16 = b16; >x.a16 : Symbol(A.a16, Decl(assignmentCompatWithCallSignatures6.ts, 15, 39)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 3)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 11)) >a16 : Symbol(A.a16, Decl(assignmentCompatWithCallSignatures6.ts, 15, 39)) ->b16 : Symbol(b16, Decl(assignmentCompatWithCallSignatures6.ts, 39, 3)) +>b16 : Symbol(b16, Decl(assignmentCompatWithCallSignatures6.ts, 39, 11)) b16 = x.a16; ->b16 : Symbol(b16, Decl(assignmentCompatWithCallSignatures6.ts, 39, 3)) +>b16 : Symbol(b16, Decl(assignmentCompatWithCallSignatures6.ts, 39, 11)) >x.a16 : Symbol(A.a16, Decl(assignmentCompatWithCallSignatures6.ts, 15, 39)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 3)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignatures6.ts, 19, 11)) >a16 : Symbol(A.a16, Decl(assignmentCompatWithCallSignatures6.ts, 15, 39)) diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures6.types b/tests/baselines/reference/assignmentCompatWithCallSignatures6.types index 0fecc27a18058..2e452e5038952 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures6.types +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures6.types @@ -111,11 +111,11 @@ interface A { > : ^ } -var x: A; +declare var x: A; >x : A > : ^ -var b: (x: T) => T[]; +declare var b: (x: T) => T[]; >b : (x: T) => T[] > : ^ ^^ ^^ ^^^^^ >x : T @@ -145,7 +145,7 @@ b = x.a; >a : (x: T) => T[] > : ^ ^^ ^^ ^^^^^ -var b2: (x: T) => string[]; +declare var b2: (x: T) => string[]; >b2 : (x: T) => string[] > : ^ ^^ ^^ ^^^^^ >x : T @@ -175,7 +175,7 @@ b2 = x.a2; >a2 : (x: T) => string[] > : ^ ^^ ^^ ^^^^^ -var b3: (x: T) => T; +declare var b3: (x: T) => T; >b3 : (x: T) => T > : ^ ^^ ^^ ^^^^^ >x : T @@ -205,7 +205,7 @@ b3 = x.a3; >a3 : (x: T) => void > : ^ ^^ ^^ ^^^^^ -var b4: (x: T, y: U) => string; +declare var b4: (x: T, y: U) => string; >b4 : (x: T, y: U) => string > : ^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >x : T @@ -237,7 +237,7 @@ b4 = x.a4; >a4 : (x: T, y: U) => string > : ^ ^^ ^^ ^^ ^^ ^^ ^^^^^ -var b5: (x: (arg: T) => U) => T; +declare var b5: (x: (arg: T) => U) => T; >b5 : (x: (arg: T) => U) => T > : ^ ^^ ^^ ^^ ^^^^^ >x : (arg: T) => U @@ -269,7 +269,7 @@ b5 = x.a5; >a5 : (x: (arg: T) => U) => T > : ^ ^^ ^^ ^^ ^^^^^ -var b11: (x: { foo: T }, y: { foo: U; bar: U }) => Base; +declare var b11: (x: { foo: T }, y: { foo: U; bar: U }) => Base; >b11 : (x: { foo: T; }, y: { foo: U; bar: U; }) => Base > : ^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >x : { foo: T; } @@ -307,7 +307,7 @@ b11 = x.a11; >a11 : (x: { foo: T; }, y: { foo: T; bar: T; }) => Base > : ^ ^^ ^^ ^^ ^^ ^^^^^ -var b16: (x: { a: T; b: T }) => T[]; +declare var b16: (x: { a: T; b: T }) => T[]; >b16 : (x: { a: T; b: T; }) => T[] > : ^ ^^ ^^ ^^^^^ >x : { a: T; b: T; } diff --git a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.errors.txt index 0563b2842532d..60511bef2fe75 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.errors.txt @@ -25,9 +25,9 @@ assignmentCompatWithCallSignaturesWithOptionalParameters.ts(45,5): error TS2322: a5: (x?: number, y?: number) => number; a6: (x: number, y: number) => number; } - var b: Base; + declare var b: Base; - var a: () => number; + declare var a: () => number; a = () => 1 // ok, same number of required params a = (x?: number) => 1; // ok, same number of required params a = (x: number) => 1; // error, too many required params @@ -50,7 +50,7 @@ assignmentCompatWithCallSignaturesWithOptionalParameters.ts(45,5): error TS2322: !!! error TS2322: Type '(x: number, y: number) => number' is not assignable to type '() => number'. !!! error TS2322: Target signature provides too few arguments. Expected 2 or more, but got 0. - var a2: (x?: number) => number; + declare var a2: (x?: number) => number; a2 = () => 1; // ok, same number of required params a2 = (x?: number) => 1; // ok, same number of required params a2 = (x: number) => 1; // ok, same number of params @@ -64,7 +64,7 @@ assignmentCompatWithCallSignaturesWithOptionalParameters.ts(45,5): error TS2322: !!! error TS2322: Type '(x: number, y: number) => number' is not assignable to type '(x?: number) => number'. !!! error TS2322: Target signature provides too few arguments. Expected 2 or more, but got 1. - var a3: (x: number) => number; + declare var a3: (x: number) => number; a3 = () => 1; // ok, fewer required params a3 = (x?: number) => 1; // ok, fewer required params a3 = (x: number) => 1; // ok, same number of required params @@ -82,7 +82,7 @@ assignmentCompatWithCallSignaturesWithOptionalParameters.ts(45,5): error TS2322: !!! error TS2322: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'. !!! error TS2322: Target signature provides too few arguments. Expected 2 or more, but got 1. - var a4: (x: number, y?: number) => number; + declare var a4: (x: number, y?: number) => number; a4 = () => 1; // ok, fewer required params a4 = (x?: number, y?: number) => 1; // ok, fewer required params a4 = (x: number) => 1; // ok, same number of required params @@ -94,7 +94,7 @@ assignmentCompatWithCallSignaturesWithOptionalParameters.ts(45,5): error TS2322: a4 = b.a5; // ok a4 = b.a6; // ok, same number of params - var a5: (x?: number, y?: number) => number; + declare var a5: (x?: number, y?: number) => number; a5 = () => 1; // ok, fewer required params a5 = (x?: number, y?: number) => 1; // ok, fewer required params a5 = (x: number) => 1; // ok, fewer params in lambda diff --git a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.js b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.js index 255e10e1ecf13..21cabbf0bea02 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.js @@ -11,9 +11,9 @@ interface Base { a5: (x?: number, y?: number) => number; a6: (x: number, y: number) => number; } -var b: Base; +declare var b: Base; -var a: () => number; +declare var a: () => number; a = () => 1 // ok, same number of required params a = (x?: number) => 1; // ok, same number of required params a = (x: number) => 1; // error, too many required params @@ -24,7 +24,7 @@ var a: () => number; a = b.a5; // ok a = b.a6; // error -var a2: (x?: number) => number; +declare var a2: (x?: number) => number; a2 = () => 1; // ok, same number of required params a2 = (x?: number) => 1; // ok, same number of required params a2 = (x: number) => 1; // ok, same number of params @@ -35,7 +35,7 @@ var a2: (x?: number) => number; a2 = b.a5; // ok a2 = b.a6; // error -var a3: (x: number) => number; +declare var a3: (x: number) => number; a3 = () => 1; // ok, fewer required params a3 = (x?: number) => 1; // ok, fewer required params a3 = (x: number) => 1; // ok, same number of required params @@ -47,7 +47,7 @@ var a3: (x: number) => number; a3 = b.a5; // ok a3 = b.a6; // error -var a4: (x: number, y?: number) => number; +declare var a4: (x: number, y?: number) => number; a4 = () => 1; // ok, fewer required params a4 = (x?: number, y?: number) => 1; // ok, fewer required params a4 = (x: number) => 1; // ok, same number of required params @@ -59,7 +59,7 @@ var a4: (x: number, y?: number) => number; a4 = b.a5; // ok a4 = b.a6; // ok, same number of params -var a5: (x?: number, y?: number) => number; +declare var a5: (x?: number, y?: number) => number; a5 = () => 1; // ok, fewer required params a5 = (x?: number, y?: number) => 1; // ok, fewer required params a5 = (x: number) => 1; // ok, fewer params in lambda @@ -73,8 +73,6 @@ var a5: (x?: number, y?: number) => number; //// [assignmentCompatWithCallSignaturesWithOptionalParameters.js] // call signatures in derived types must have the same or fewer optional parameters as the base type -var b; -var a; a = function () { return 1; }; // ok, same number of required params a = function (x) { return 1; }; // ok, same number of required params a = function (x) { return 1; }; // error, too many required params @@ -84,7 +82,6 @@ a = b.a3; // error a = b.a4; // error a = b.a5; // ok a = b.a6; // error -var a2; a2 = function () { return 1; }; // ok, same number of required params a2 = function (x) { return 1; }; // ok, same number of required params a2 = function (x) { return 1; }; // ok, same number of params @@ -94,7 +91,6 @@ a2 = b.a3; // ok, same number of params a2 = b.a4; // ok, excess params are optional in b.a3 a2 = b.a5; // ok a2 = b.a6; // error -var a3; a3 = function () { return 1; }; // ok, fewer required params a3 = function (x) { return 1; }; // ok, fewer required params a3 = function (x) { return 1; }; // ok, same number of required params @@ -105,7 +101,6 @@ a3 = b.a3; // ok a3 = b.a4; // ok a3 = b.a5; // ok a3 = b.a6; // error -var a4; a4 = function () { return 1; }; // ok, fewer required params a4 = function (x, y) { return 1; }; // ok, fewer required params a4 = function (x) { return 1; }; // ok, same number of required params @@ -116,7 +111,6 @@ a4 = b.a3; // ok a4 = b.a4; // ok a4 = b.a5; // ok a4 = b.a6; // ok, same number of params -var a5; a5 = function () { return 1; }; // ok, fewer required params a5 = function (x, y) { return 1; }; // ok, fewer required params a5 = function (x) { return 1; }; // ok, fewer params in lambda diff --git a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.symbols b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.symbols index c0328bd27141a..10eaed7c30204 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.symbols +++ b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.symbols @@ -32,280 +32,280 @@ interface Base { >x : Symbol(x, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 8, 9)) >y : Symbol(y, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 8, 19)) } -var b: Base; ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +declare var b: Base; +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 0, 0)) -var a: () => number; ->a : Symbol(a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 12, 3)) +declare var a: () => number; +>a : Symbol(a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 12, 11)) a = () => 1 // ok, same number of required params ->a : Symbol(a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 12, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 12, 11)) a = (x?: number) => 1; // ok, same number of required params ->a : Symbol(a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 12, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 12, 11)) >x : Symbol(x, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 14, 9)) a = (x: number) => 1; // error, too many required params ->a : Symbol(a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 12, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 12, 11)) >x : Symbol(x, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 15, 9)) a = b.a; // ok ->a : Symbol(a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 12, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 12, 11)) >b.a : Symbol(Base.a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 2, 16)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a : Symbol(Base.a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 2, 16)) a = b.a2; // ok ->a : Symbol(a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 12, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 12, 11)) >b.a2 : Symbol(Base.a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 3, 20)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a2 : Symbol(Base.a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 3, 20)) a = b.a3; // error ->a : Symbol(a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 12, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 12, 11)) >b.a3 : Symbol(Base.a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 4, 31)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a3 : Symbol(Base.a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 4, 31)) a = b.a4; // error ->a : Symbol(a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 12, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 12, 11)) >b.a4 : Symbol(Base.a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 5, 30)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a4 : Symbol(Base.a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 5, 30)) a = b.a5; // ok ->a : Symbol(a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 12, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 12, 11)) >b.a5 : Symbol(Base.a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 6, 42)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a5 : Symbol(Base.a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 6, 42)) a = b.a6; // error ->a : Symbol(a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 12, 3)) +>a : Symbol(a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 12, 11)) >b.a6 : Symbol(Base.a6, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 7, 43)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a6 : Symbol(Base.a6, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 7, 43)) -var a2: (x?: number) => number; ->a2 : Symbol(a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 23, 3)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 23, 9)) +declare var a2: (x?: number) => number; +>a2 : Symbol(a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 23, 11)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 23, 17)) a2 = () => 1; // ok, same number of required params ->a2 : Symbol(a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 23, 3)) +>a2 : Symbol(a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 23, 11)) a2 = (x?: number) => 1; // ok, same number of required params ->a2 : Symbol(a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 23, 3)) +>a2 : Symbol(a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 23, 11)) >x : Symbol(x, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 25, 10)) a2 = (x: number) => 1; // ok, same number of params ->a2 : Symbol(a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 23, 3)) +>a2 : Symbol(a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 23, 11)) >x : Symbol(x, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 26, 10)) a2 = b.a; // ok ->a2 : Symbol(a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 23, 3)) +>a2 : Symbol(a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 23, 11)) >b.a : Symbol(Base.a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 2, 16)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a : Symbol(Base.a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 2, 16)) a2 = b.a2; // ok ->a2 : Symbol(a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 23, 3)) +>a2 : Symbol(a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 23, 11)) >b.a2 : Symbol(Base.a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 3, 20)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a2 : Symbol(Base.a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 3, 20)) a2 = b.a3; // ok, same number of params ->a2 : Symbol(a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 23, 3)) +>a2 : Symbol(a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 23, 11)) >b.a3 : Symbol(Base.a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 4, 31)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a3 : Symbol(Base.a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 4, 31)) a2 = b.a4; // ok, excess params are optional in b.a3 ->a2 : Symbol(a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 23, 3)) +>a2 : Symbol(a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 23, 11)) >b.a4 : Symbol(Base.a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 5, 30)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a4 : Symbol(Base.a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 5, 30)) a2 = b.a5; // ok ->a2 : Symbol(a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 23, 3)) +>a2 : Symbol(a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 23, 11)) >b.a5 : Symbol(Base.a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 6, 42)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a5 : Symbol(Base.a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 6, 42)) a2 = b.a6; // error ->a2 : Symbol(a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 23, 3)) +>a2 : Symbol(a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 23, 11)) >b.a6 : Symbol(Base.a6, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 7, 43)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a6 : Symbol(Base.a6, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 7, 43)) -var a3: (x: number) => number; ->a3 : Symbol(a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 34, 3)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 34, 9)) +declare var a3: (x: number) => number; +>a3 : Symbol(a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 34, 11)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 34, 17)) a3 = () => 1; // ok, fewer required params ->a3 : Symbol(a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 34, 3)) +>a3 : Symbol(a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 34, 11)) a3 = (x?: number) => 1; // ok, fewer required params ->a3 : Symbol(a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 34, 3)) +>a3 : Symbol(a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 34, 11)) >x : Symbol(x, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 36, 10)) a3 = (x: number) => 1; // ok, same number of required params ->a3 : Symbol(a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 34, 3)) +>a3 : Symbol(a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 34, 11)) >x : Symbol(x, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 37, 10)) a3 = (x: number, y: number) => 1; // error, too many required params ->a3 : Symbol(a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 34, 3)) +>a3 : Symbol(a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 34, 11)) >x : Symbol(x, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 38, 10)) >y : Symbol(y, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 38, 20)) a3 = b.a; // ok ->a3 : Symbol(a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 34, 3)) +>a3 : Symbol(a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 34, 11)) >b.a : Symbol(Base.a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 2, 16)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a : Symbol(Base.a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 2, 16)) a3 = b.a2; // ok ->a3 : Symbol(a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 34, 3)) +>a3 : Symbol(a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 34, 11)) >b.a2 : Symbol(Base.a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 3, 20)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a2 : Symbol(Base.a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 3, 20)) a3 = b.a3; // ok ->a3 : Symbol(a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 34, 3)) +>a3 : Symbol(a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 34, 11)) >b.a3 : Symbol(Base.a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 4, 31)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a3 : Symbol(Base.a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 4, 31)) a3 = b.a4; // ok ->a3 : Symbol(a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 34, 3)) +>a3 : Symbol(a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 34, 11)) >b.a4 : Symbol(Base.a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 5, 30)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a4 : Symbol(Base.a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 5, 30)) a3 = b.a5; // ok ->a3 : Symbol(a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 34, 3)) +>a3 : Symbol(a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 34, 11)) >b.a5 : Symbol(Base.a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 6, 42)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a5 : Symbol(Base.a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 6, 42)) a3 = b.a6; // error ->a3 : Symbol(a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 34, 3)) +>a3 : Symbol(a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 34, 11)) >b.a6 : Symbol(Base.a6, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 7, 43)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a6 : Symbol(Base.a6, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 7, 43)) -var a4: (x: number, y?: number) => number; ->a4 : Symbol(a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 46, 3)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 46, 9)) ->y : Symbol(y, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 46, 19)) +declare var a4: (x: number, y?: number) => number; +>a4 : Symbol(a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 46, 11)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 46, 17)) +>y : Symbol(y, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 46, 27)) a4 = () => 1; // ok, fewer required params ->a4 : Symbol(a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 46, 3)) +>a4 : Symbol(a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 46, 11)) a4 = (x?: number, y?: number) => 1; // ok, fewer required params ->a4 : Symbol(a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 46, 3)) +>a4 : Symbol(a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 46, 11)) >x : Symbol(x, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 48, 10)) >y : Symbol(y, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 48, 21)) a4 = (x: number) => 1; // ok, same number of required params ->a4 : Symbol(a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 46, 3)) +>a4 : Symbol(a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 46, 11)) >x : Symbol(x, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 49, 10)) a4 = (x: number, y: number) => 1; // ok, same number of params ->a4 : Symbol(a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 46, 3)) +>a4 : Symbol(a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 46, 11)) >x : Symbol(x, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 50, 10)) >y : Symbol(y, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 50, 20)) a4 = b.a; // ok ->a4 : Symbol(a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 46, 3)) +>a4 : Symbol(a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 46, 11)) >b.a : Symbol(Base.a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 2, 16)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a : Symbol(Base.a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 2, 16)) a4 = b.a2; // ok ->a4 : Symbol(a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 46, 3)) +>a4 : Symbol(a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 46, 11)) >b.a2 : Symbol(Base.a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 3, 20)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a2 : Symbol(Base.a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 3, 20)) a4 = b.a3; // ok ->a4 : Symbol(a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 46, 3)) +>a4 : Symbol(a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 46, 11)) >b.a3 : Symbol(Base.a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 4, 31)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a3 : Symbol(Base.a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 4, 31)) a4 = b.a4; // ok ->a4 : Symbol(a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 46, 3)) +>a4 : Symbol(a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 46, 11)) >b.a4 : Symbol(Base.a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 5, 30)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a4 : Symbol(Base.a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 5, 30)) a4 = b.a5; // ok ->a4 : Symbol(a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 46, 3)) +>a4 : Symbol(a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 46, 11)) >b.a5 : Symbol(Base.a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 6, 42)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a5 : Symbol(Base.a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 6, 42)) a4 = b.a6; // ok, same number of params ->a4 : Symbol(a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 46, 3)) +>a4 : Symbol(a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 46, 11)) >b.a6 : Symbol(Base.a6, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 7, 43)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a6 : Symbol(Base.a6, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 7, 43)) -var a5: (x?: number, y?: number) => number; ->a5 : Symbol(a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 58, 3)) ->x : Symbol(x, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 58, 9)) ->y : Symbol(y, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 58, 20)) +declare var a5: (x?: number, y?: number) => number; +>a5 : Symbol(a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 58, 11)) +>x : Symbol(x, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 58, 17)) +>y : Symbol(y, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 58, 28)) a5 = () => 1; // ok, fewer required params ->a5 : Symbol(a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 58, 3)) +>a5 : Symbol(a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 58, 11)) a5 = (x?: number, y?: number) => 1; // ok, fewer required params ->a5 : Symbol(a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 58, 3)) +>a5 : Symbol(a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 58, 11)) >x : Symbol(x, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 60, 10)) >y : Symbol(y, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 60, 21)) a5 = (x: number) => 1; // ok, fewer params in lambda ->a5 : Symbol(a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 58, 3)) +>a5 : Symbol(a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 58, 11)) >x : Symbol(x, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 61, 10)) a5 = (x: number, y: number) => 1; // ok, same number of params ->a5 : Symbol(a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 58, 3)) +>a5 : Symbol(a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 58, 11)) >x : Symbol(x, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 62, 10)) >y : Symbol(y, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 62, 20)) a5 = b.a; // ok ->a5 : Symbol(a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 58, 3)) +>a5 : Symbol(a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 58, 11)) >b.a : Symbol(Base.a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 2, 16)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a : Symbol(Base.a, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 2, 16)) a5 = b.a2; // ok ->a5 : Symbol(a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 58, 3)) +>a5 : Symbol(a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 58, 11)) >b.a2 : Symbol(Base.a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 3, 20)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a2 : Symbol(Base.a2, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 3, 20)) a5 = b.a3; // ok, fewer params in b.a3 ->a5 : Symbol(a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 58, 3)) +>a5 : Symbol(a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 58, 11)) >b.a3 : Symbol(Base.a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 4, 31)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a3 : Symbol(Base.a3, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 4, 31)) a5 = b.a4; // ok, same number of params ->a5 : Symbol(a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 58, 3)) +>a5 : Symbol(a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 58, 11)) >b.a4 : Symbol(Base.a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 5, 30)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a4 : Symbol(Base.a4, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 5, 30)) a5 = b.a5; // ok ->a5 : Symbol(a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 58, 3)) +>a5 : Symbol(a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 58, 11)) >b.a5 : Symbol(Base.a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 6, 42)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a5 : Symbol(Base.a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 6, 42)) a5 = b.a6; // ok, same number of params ->a5 : Symbol(a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 58, 3)) +>a5 : Symbol(a5, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 58, 11)) >b.a6 : Symbol(Base.a6, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 7, 43)) ->b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 10, 11)) >a6 : Symbol(Base.a6, Decl(assignmentCompatWithCallSignaturesWithOptionalParameters.ts, 7, 43)) diff --git a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.types b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.types index d8155c6bf4f84..fd29872450ef3 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.types +++ b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.types @@ -44,11 +44,11 @@ interface Base { >y : number > : ^^^^^^ } -var b: Base; +declare var b: Base; >b : Base > : ^^^^ -var a: () => number; +declare var a: () => number; >a : () => number > : ^^^^^^ @@ -158,7 +158,7 @@ var a: () => number; >a6 : (x: number, y: number) => number > : ^ ^^ ^^ ^^ ^^^^^ -var a2: (x?: number) => number; +declare var a2: (x?: number) => number; >a2 : (x?: number) => number > : ^ ^^^ ^^^^^ >x : number @@ -270,7 +270,7 @@ var a2: (x?: number) => number; >a6 : (x: number, y: number) => number > : ^ ^^ ^^ ^^ ^^^^^ -var a3: (x: number) => number; +declare var a3: (x: number) => number; >a3 : (x: number) => number > : ^ ^^ ^^^^^ >x : number @@ -396,7 +396,7 @@ var a3: (x: number) => number; >a6 : (x: number, y: number) => number > : ^ ^^ ^^ ^^ ^^^^^ -var a4: (x: number, y?: number) => number; +declare var a4: (x: number, y?: number) => number; >a4 : (x: number, y?: number) => number > : ^ ^^ ^^ ^^^ ^^^^^ >x : number @@ -526,7 +526,7 @@ var a4: (x: number, y?: number) => number; >a6 : (x: number, y: number) => number > : ^ ^^ ^^ ^^ ^^^^^ -var a5: (x?: number, y?: number) => number; +declare var a5: (x?: number, y?: number) => number; >a5 : (x?: number, y?: number) => number > : ^ ^^^ ^^ ^^^ ^^^^^ >x : number diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures.errors.txt index 7ce4e3e9b02c9..8cb0c28423fd6 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures.errors.txt @@ -22,8 +22,8 @@ assignmentCompatWithConstructSignatures.ts(35,1): error TS2322: Type '(x: string interface T { new (x: number): void; } - var t: T; - var a: { new (x: number): void }; + declare var t: T; + declare var a: { new (x: number): void }; t = a; a = t; @@ -31,8 +31,8 @@ assignmentCompatWithConstructSignatures.ts(35,1): error TS2322: Type '(x: string interface S { new (x: number): string; } - var s: S; - var a2: { new (x: number): string }; + declare var s: S; + declare var a2: { new (x: number): string }; t = s; t = a2; a = s; @@ -41,8 +41,8 @@ assignmentCompatWithConstructSignatures.ts(35,1): error TS2322: Type '(x: string interface S2 { (x: string): void; } - var s2: S2; - var a3: { (x: string): void }; + declare var s2: S2; + declare var a3: { (x: string): void }; // these are errors t = s2; ~ diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures.js index 91f4bad4f16ed..fc3f1032914b4 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures.js @@ -6,8 +6,8 @@ interface T { new (x: number): void; } -var t: T; -var a: { new (x: number): void }; +declare var t: T; +declare var a: { new (x: number): void }; t = a; a = t; @@ -15,8 +15,8 @@ a = t; interface S { new (x: number): string; } -var s: S; -var a2: { new (x: number): string }; +declare var s: S; +declare var a2: { new (x: number): string }; t = s; t = a2; a = s; @@ -25,8 +25,8 @@ a = a2; interface S2 { (x: string): void; } -var s2: S2; -var a3: { (x: string): void }; +declare var s2: S2; +declare var a3: { (x: string): void }; // these are errors t = s2; t = a3; @@ -40,18 +40,12 @@ a = function (x: string) { return ''; } //// [assignmentCompatWithConstructSignatures.js] // void returning call signatures can be assigned a non-void returning call signature that otherwise matches -var t; -var a; t = a; a = t; -var s; -var a2; t = s; t = a2; a = s; a = a2; -var s2; -var a3; // these are errors t = s2; t = a3; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures.symbols b/tests/baselines/reference/assignmentCompatWithConstructSignatures.symbols index 669fbe2e80306..f821652ec2158 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures.symbols +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures.symbols @@ -9,21 +9,21 @@ interface T { new (x: number): void; >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures.ts, 3, 9)) } -var t: T; ->t : Symbol(t, Decl(assignmentCompatWithConstructSignatures.ts, 5, 3)) +declare var t: T; +>t : Symbol(t, Decl(assignmentCompatWithConstructSignatures.ts, 5, 11)) >T : Symbol(T, Decl(assignmentCompatWithConstructSignatures.ts, 0, 0)) -var a: { new (x: number): void }; ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures.ts, 6, 3)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures.ts, 6, 14)) +declare var a: { new (x: number): void }; +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures.ts, 6, 11)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures.ts, 6, 22)) t = a; ->t : Symbol(t, Decl(assignmentCompatWithConstructSignatures.ts, 5, 3)) ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures.ts, 6, 3)) +>t : Symbol(t, Decl(assignmentCompatWithConstructSignatures.ts, 5, 11)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures.ts, 6, 11)) a = t; ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures.ts, 6, 3)) ->t : Symbol(t, Decl(assignmentCompatWithConstructSignatures.ts, 5, 3)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures.ts, 6, 11)) +>t : Symbol(t, Decl(assignmentCompatWithConstructSignatures.ts, 5, 11)) interface S { >S : Symbol(S, Decl(assignmentCompatWithConstructSignatures.ts, 9, 6)) @@ -31,29 +31,29 @@ interface S { new (x: number): string; >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures.ts, 12, 9)) } -var s: S; ->s : Symbol(s, Decl(assignmentCompatWithConstructSignatures.ts, 14, 3)) +declare var s: S; +>s : Symbol(s, Decl(assignmentCompatWithConstructSignatures.ts, 14, 11)) >S : Symbol(S, Decl(assignmentCompatWithConstructSignatures.ts, 9, 6)) -var a2: { new (x: number): string }; ->a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures.ts, 15, 3)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures.ts, 15, 15)) +declare var a2: { new (x: number): string }; +>a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures.ts, 15, 11)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures.ts, 15, 23)) t = s; ->t : Symbol(t, Decl(assignmentCompatWithConstructSignatures.ts, 5, 3)) ->s : Symbol(s, Decl(assignmentCompatWithConstructSignatures.ts, 14, 3)) +>t : Symbol(t, Decl(assignmentCompatWithConstructSignatures.ts, 5, 11)) +>s : Symbol(s, Decl(assignmentCompatWithConstructSignatures.ts, 14, 11)) t = a2; ->t : Symbol(t, Decl(assignmentCompatWithConstructSignatures.ts, 5, 3)) ->a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures.ts, 15, 3)) +>t : Symbol(t, Decl(assignmentCompatWithConstructSignatures.ts, 5, 11)) +>a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures.ts, 15, 11)) a = s; ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures.ts, 6, 3)) ->s : Symbol(s, Decl(assignmentCompatWithConstructSignatures.ts, 14, 3)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures.ts, 6, 11)) +>s : Symbol(s, Decl(assignmentCompatWithConstructSignatures.ts, 14, 11)) a = a2; ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures.ts, 6, 3)) ->a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures.ts, 15, 3)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures.ts, 6, 11)) +>a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures.ts, 15, 11)) interface S2 { >S2 : Symbol(S2, Decl(assignmentCompatWithConstructSignatures.ts, 19, 7)) @@ -61,44 +61,44 @@ interface S2 { (x: string): void; >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures.ts, 22, 5)) } -var s2: S2; ->s2 : Symbol(s2, Decl(assignmentCompatWithConstructSignatures.ts, 24, 3)) +declare var s2: S2; +>s2 : Symbol(s2, Decl(assignmentCompatWithConstructSignatures.ts, 24, 11)) >S2 : Symbol(S2, Decl(assignmentCompatWithConstructSignatures.ts, 19, 7)) -var a3: { (x: string): void }; ->a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures.ts, 25, 3)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures.ts, 25, 11)) +declare var a3: { (x: string): void }; +>a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures.ts, 25, 11)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures.ts, 25, 19)) // these are errors t = s2; ->t : Symbol(t, Decl(assignmentCompatWithConstructSignatures.ts, 5, 3)) ->s2 : Symbol(s2, Decl(assignmentCompatWithConstructSignatures.ts, 24, 3)) +>t : Symbol(t, Decl(assignmentCompatWithConstructSignatures.ts, 5, 11)) +>s2 : Symbol(s2, Decl(assignmentCompatWithConstructSignatures.ts, 24, 11)) t = a3; ->t : Symbol(t, Decl(assignmentCompatWithConstructSignatures.ts, 5, 3)) ->a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures.ts, 25, 3)) +>t : Symbol(t, Decl(assignmentCompatWithConstructSignatures.ts, 5, 11)) +>a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures.ts, 25, 11)) t = (x: string) => 1; ->t : Symbol(t, Decl(assignmentCompatWithConstructSignatures.ts, 5, 3)) +>t : Symbol(t, Decl(assignmentCompatWithConstructSignatures.ts, 5, 11)) >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures.ts, 29, 5)) t = function (x: string) { return ''; } ->t : Symbol(t, Decl(assignmentCompatWithConstructSignatures.ts, 5, 3)) +>t : Symbol(t, Decl(assignmentCompatWithConstructSignatures.ts, 5, 11)) >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures.ts, 30, 14)) a = s2; ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures.ts, 6, 3)) ->s2 : Symbol(s2, Decl(assignmentCompatWithConstructSignatures.ts, 24, 3)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures.ts, 6, 11)) +>s2 : Symbol(s2, Decl(assignmentCompatWithConstructSignatures.ts, 24, 11)) a = a3; ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures.ts, 6, 3)) ->a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures.ts, 25, 3)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures.ts, 6, 11)) +>a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures.ts, 25, 11)) a = (x: string) => 1; ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures.ts, 6, 3)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures.ts, 6, 11)) >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures.ts, 33, 5)) a = function (x: string) { return ''; } ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures.ts, 6, 3)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures.ts, 6, 11)) >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures.ts, 34, 14)) diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures.types b/tests/baselines/reference/assignmentCompatWithConstructSignatures.types index d804a060bf046..90caadee6839f 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures.types +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures.types @@ -8,11 +8,11 @@ interface T { >x : number > : ^^^^^^ } -var t: T; +declare var t: T; >t : T > : ^ -var a: { new (x: number): void }; +declare var a: { new (x: number): void }; >a : new (x: number) => void > : ^^^^^ ^^ ^^^^^ >x : number @@ -39,11 +39,11 @@ interface S { >x : number > : ^^^^^^ } -var s: S; +declare var s: S; >s : S > : ^ -var a2: { new (x: number): string }; +declare var a2: { new (x: number): string }; >a2 : new (x: number) => string > : ^^^^^ ^^ ^^^^^ >x : number @@ -86,11 +86,11 @@ interface S2 { >x : string > : ^^^^^^ } -var s2: S2; +declare var s2: S2; >s2 : S2 > : ^^ -var a3: { (x: string): void }; +declare var a3: { (x: string): void }; >a3 : (x: string) => void > : ^ ^^ ^^^^^ >x : string diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt index e9d188fca97ec..45b8a1966e59a 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt @@ -30,8 +30,8 @@ assignmentCompatWithConstructSignatures2.ts(41,1): error TS2322: Type '(x: strin interface T { f: new (x: number) => void; } - var t: T; - var a: { f: new (x: number) => void }; + declare var t: T; + declare var a: { f: new (x: number) => void }; t = a; a = t; @@ -39,8 +39,8 @@ assignmentCompatWithConstructSignatures2.ts(41,1): error TS2322: Type '(x: strin interface S { f: new (x: number) => string; } - var s: S; - var a2: { f: new (x: number) => string }; + declare var s: S; + declare var a2: { f: new (x: number) => string }; t = s; t = a2; a = s; @@ -63,8 +63,8 @@ assignmentCompatWithConstructSignatures2.ts(41,1): error TS2322: Type '(x: strin interface S2 { f(x: string): void; } - var s2: S2; - var a3: { f(x: string): void }; + declare var s2: S2; + declare var a3: { f(x: string): void }; // these are errors t = s2; ~ diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.js index 68173d62aca87..137507b68a57b 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.js @@ -6,8 +6,8 @@ interface T { f: new (x: number) => void; } -var t: T; -var a: { f: new (x: number) => void }; +declare var t: T; +declare var a: { f: new (x: number) => void }; t = a; a = t; @@ -15,8 +15,8 @@ a = t; interface S { f: new (x: number) => string; } -var s: S; -var a2: { f: new (x: number) => string }; +declare var s: S; +declare var a2: { f: new (x: number) => string }; t = s; t = a2; a = s; @@ -31,8 +31,8 @@ a = function (x: number) { return ''; } interface S2 { f(x: string): void; } -var s2: S2; -var a3: { f(x: string): void }; +declare var s2: S2; +declare var a3: { f(x: string): void }; // these are errors t = s2; t = a3; @@ -46,12 +46,8 @@ a = function (x: string) { return ''; } //// [assignmentCompatWithConstructSignatures2.js] // void returning call signatures can be assigned a non-void returning call signature that otherwise matches -var t; -var a; t = a; a = t; -var s; -var a2; t = s; t = a2; a = s; @@ -61,8 +57,6 @@ t = function () { return 1; }; t = function (x) { return ''; }; a = function () { return 1; }; a = function (x) { return ''; }; -var s2; -var a3; // these are errors t = s2; t = a3; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.symbols b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.symbols index 5b543a5118a5d..a43f7aa6035ae 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.symbols +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.symbols @@ -10,22 +10,22 @@ interface T { >f : Symbol(T.f, Decl(assignmentCompatWithConstructSignatures2.ts, 2, 13)) >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures2.ts, 3, 12)) } -var t: T; ->t : Symbol(t, Decl(assignmentCompatWithConstructSignatures2.ts, 5, 3)) +declare var t: T; +>t : Symbol(t, Decl(assignmentCompatWithConstructSignatures2.ts, 5, 11)) >T : Symbol(T, Decl(assignmentCompatWithConstructSignatures2.ts, 0, 0)) -var a: { f: new (x: number) => void }; ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures2.ts, 6, 3)) ->f : Symbol(f, Decl(assignmentCompatWithConstructSignatures2.ts, 6, 8)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures2.ts, 6, 17)) +declare var a: { f: new (x: number) => void }; +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures2.ts, 6, 11)) +>f : Symbol(f, Decl(assignmentCompatWithConstructSignatures2.ts, 6, 16)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures2.ts, 6, 25)) t = a; ->t : Symbol(t, Decl(assignmentCompatWithConstructSignatures2.ts, 5, 3)) ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures2.ts, 6, 3)) +>t : Symbol(t, Decl(assignmentCompatWithConstructSignatures2.ts, 5, 11)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures2.ts, 6, 11)) a = t; ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures2.ts, 6, 3)) ->t : Symbol(t, Decl(assignmentCompatWithConstructSignatures2.ts, 5, 3)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures2.ts, 6, 11)) +>t : Symbol(t, Decl(assignmentCompatWithConstructSignatures2.ts, 5, 11)) interface S { >S : Symbol(S, Decl(assignmentCompatWithConstructSignatures2.ts, 9, 6)) @@ -34,44 +34,44 @@ interface S { >f : Symbol(S.f, Decl(assignmentCompatWithConstructSignatures2.ts, 11, 13)) >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures2.ts, 12, 12)) } -var s: S; ->s : Symbol(s, Decl(assignmentCompatWithConstructSignatures2.ts, 14, 3)) +declare var s: S; +>s : Symbol(s, Decl(assignmentCompatWithConstructSignatures2.ts, 14, 11)) >S : Symbol(S, Decl(assignmentCompatWithConstructSignatures2.ts, 9, 6)) -var a2: { f: new (x: number) => string }; ->a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures2.ts, 15, 3)) ->f : Symbol(f, Decl(assignmentCompatWithConstructSignatures2.ts, 15, 9)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures2.ts, 15, 18)) +declare var a2: { f: new (x: number) => string }; +>a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures2.ts, 15, 11)) +>f : Symbol(f, Decl(assignmentCompatWithConstructSignatures2.ts, 15, 17)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures2.ts, 15, 26)) t = s; ->t : Symbol(t, Decl(assignmentCompatWithConstructSignatures2.ts, 5, 3)) ->s : Symbol(s, Decl(assignmentCompatWithConstructSignatures2.ts, 14, 3)) +>t : Symbol(t, Decl(assignmentCompatWithConstructSignatures2.ts, 5, 11)) +>s : Symbol(s, Decl(assignmentCompatWithConstructSignatures2.ts, 14, 11)) t = a2; ->t : Symbol(t, Decl(assignmentCompatWithConstructSignatures2.ts, 5, 3)) ->a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures2.ts, 15, 3)) +>t : Symbol(t, Decl(assignmentCompatWithConstructSignatures2.ts, 5, 11)) +>a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures2.ts, 15, 11)) a = s; ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures2.ts, 6, 3)) ->s : Symbol(s, Decl(assignmentCompatWithConstructSignatures2.ts, 14, 3)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures2.ts, 6, 11)) +>s : Symbol(s, Decl(assignmentCompatWithConstructSignatures2.ts, 14, 11)) a = a2; ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures2.ts, 6, 3)) ->a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures2.ts, 15, 3)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures2.ts, 6, 11)) +>a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures2.ts, 15, 11)) // errors t = () => 1; ->t : Symbol(t, Decl(assignmentCompatWithConstructSignatures2.ts, 5, 3)) +>t : Symbol(t, Decl(assignmentCompatWithConstructSignatures2.ts, 5, 11)) t = function (x: number) { return ''; } ->t : Symbol(t, Decl(assignmentCompatWithConstructSignatures2.ts, 5, 3)) +>t : Symbol(t, Decl(assignmentCompatWithConstructSignatures2.ts, 5, 11)) >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures2.ts, 23, 14)) a = () => 1; ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures2.ts, 6, 3)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures2.ts, 6, 11)) a = function (x: number) { return ''; } ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures2.ts, 6, 3)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures2.ts, 6, 11)) >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures2.ts, 25, 14)) interface S2 { @@ -81,45 +81,45 @@ interface S2 { >f : Symbol(S2.f, Decl(assignmentCompatWithConstructSignatures2.ts, 27, 14)) >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures2.ts, 28, 6)) } -var s2: S2; ->s2 : Symbol(s2, Decl(assignmentCompatWithConstructSignatures2.ts, 30, 3)) +declare var s2: S2; +>s2 : Symbol(s2, Decl(assignmentCompatWithConstructSignatures2.ts, 30, 11)) >S2 : Symbol(S2, Decl(assignmentCompatWithConstructSignatures2.ts, 25, 39)) -var a3: { f(x: string): void }; ->a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures2.ts, 31, 3)) ->f : Symbol(f, Decl(assignmentCompatWithConstructSignatures2.ts, 31, 9)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures2.ts, 31, 12)) +declare var a3: { f(x: string): void }; +>a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures2.ts, 31, 11)) +>f : Symbol(f, Decl(assignmentCompatWithConstructSignatures2.ts, 31, 17)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures2.ts, 31, 20)) // these are errors t = s2; ->t : Symbol(t, Decl(assignmentCompatWithConstructSignatures2.ts, 5, 3)) ->s2 : Symbol(s2, Decl(assignmentCompatWithConstructSignatures2.ts, 30, 3)) +>t : Symbol(t, Decl(assignmentCompatWithConstructSignatures2.ts, 5, 11)) +>s2 : Symbol(s2, Decl(assignmentCompatWithConstructSignatures2.ts, 30, 11)) t = a3; ->t : Symbol(t, Decl(assignmentCompatWithConstructSignatures2.ts, 5, 3)) ->a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures2.ts, 31, 3)) +>t : Symbol(t, Decl(assignmentCompatWithConstructSignatures2.ts, 5, 11)) +>a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures2.ts, 31, 11)) t = (x: string) => 1; ->t : Symbol(t, Decl(assignmentCompatWithConstructSignatures2.ts, 5, 3)) +>t : Symbol(t, Decl(assignmentCompatWithConstructSignatures2.ts, 5, 11)) >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures2.ts, 35, 5)) t = function (x: string) { return ''; } ->t : Symbol(t, Decl(assignmentCompatWithConstructSignatures2.ts, 5, 3)) +>t : Symbol(t, Decl(assignmentCompatWithConstructSignatures2.ts, 5, 11)) >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures2.ts, 36, 14)) a = s2; ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures2.ts, 6, 3)) ->s2 : Symbol(s2, Decl(assignmentCompatWithConstructSignatures2.ts, 30, 3)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures2.ts, 6, 11)) +>s2 : Symbol(s2, Decl(assignmentCompatWithConstructSignatures2.ts, 30, 11)) a = a3; ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures2.ts, 6, 3)) ->a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures2.ts, 31, 3)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures2.ts, 6, 11)) +>a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures2.ts, 31, 11)) a = (x: string) => 1; ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures2.ts, 6, 3)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures2.ts, 6, 11)) >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures2.ts, 39, 5)) a = function (x: string) { return ''; } ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures2.ts, 6, 3)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures2.ts, 6, 11)) >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures2.ts, 40, 14)) diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.types b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.types index fe21cb472e55d..d60a719b76971 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.types +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.types @@ -10,11 +10,11 @@ interface T { >x : number > : ^^^^^^ } -var t: T; +declare var t: T; >t : T > : ^ -var a: { f: new (x: number) => void }; +declare var a: { f: new (x: number) => void }; >a : { f: new (x: number) => void; } > : ^^^^^ ^^^ >f : new (x: number) => void @@ -45,11 +45,11 @@ interface S { >x : number > : ^^^^^^ } -var s: S; +declare var s: S; >s : S > : ^ -var a2: { f: new (x: number) => string }; +declare var a2: { f: new (x: number) => string }; >a2 : { f: new (x: number) => string; } > : ^^^^^ ^^^ >f : new (x: number) => string @@ -141,11 +141,11 @@ interface S2 { >x : string > : ^^^^^^ } -var s2: S2; +declare var s2: S2; >s2 : S2 > : ^^ -var a3: { f(x: string): void }; +declare var a3: { f(x: string): void }; >a3 : { f(x: string): void; } > : ^^^^ ^^ ^^^ ^^^ >f : (x: string) => void diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.errors.txt index ce2b75804682f..6155cd83cf730 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.errors.txt @@ -70,33 +70,33 @@ assignmentCompatWithConstructSignatures3.ts(86,1): error TS2322: Type 'new (x: { class Derived2 extends Derived { baz: string; } class OtherDerived extends Base { bing: string; } - var a: new (x: number) => number[]; - var a2: new (x: number) => string[]; - var a3: new (x: number) => void; - var a4: new (x: string, y: number) => string; - var a5: new (x: (arg: string) => number) => string; - var a6: new (x: (arg: Base) => Derived) => Base; - var a7: new (x: (arg: Base) => Derived) => (r: Base) => Derived; - var a8: new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; - var a9: new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; - var a10: new (...x: Derived[]) => Derived; - var a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base; - var a12: new (x: Array, y: Array) => Array; - var a13: new (x: Array, y: Array) => Array; - var a14: new (x: { a: string; b: number }) => Object; - var a15: { + declare var a: new (x: number) => number[]; + declare var a2: new (x: number) => string[]; + declare var a3: new (x: number) => void; + declare var a4: new (x: string, y: number) => string; + declare var a5: new (x: (arg: string) => number) => string; + declare var a6: new (x: (arg: Base) => Derived) => Base; + declare var a7: new (x: (arg: Base) => Derived) => (r: Base) => Derived; + declare var a8: new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; + declare var a9: new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; + declare var a10: new (...x: Derived[]) => Derived; + declare var a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base; + declare var a12: new (x: Array, y: Array) => Array; + declare var a13: new (x: Array, y: Array) => Array; + declare var a14: new (x: { a: string; b: number }) => Object; + declare var a15: { new (x: number): number[]; new (x: string): string[]; } - var a16: { + declare var a16: { new (x: T): number[]; new (x: U): number[]; } - var a17: { + declare var a17: { new (x: new (a: number) => number): number[]; new (x: new (a: string) => string): string[]; }; - var a18: { + declare var a18: { new (x: { new (a: number): number; new (a: string): string; @@ -107,39 +107,39 @@ assignmentCompatWithConstructSignatures3.ts(86,1): error TS2322: Type 'new (x: { }): any[]; } - var b: new (x: T) => T[]; + declare var b: new (x: T) => T[]; a = b; // ok b = a; // ok ~ !!! error TS2322: Type 'new (x: number) => number[]' is not assignable to type 'new (x: T) => T[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'number'. -!!! related TS2208 assignmentCompatWithConstructSignatures3.ts:45:13: This type parameter might need an `extends number` constraint. - var b2: new (x: T) => string[]; +!!! related TS2208 assignmentCompatWithConstructSignatures3.ts:45:21: This type parameter might need an `extends number` constraint. + declare var b2: new (x: T) => string[]; a2 = b2; // ok b2 = a2; // ok ~~ !!! error TS2322: Type 'new (x: number) => string[]' is not assignable to type 'new (x: T) => string[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'number'. -!!! related TS2208 assignmentCompatWithConstructSignatures3.ts:48:14: This type parameter might need an `extends number` constraint. - var b3: new (x: T) => T; +!!! related TS2208 assignmentCompatWithConstructSignatures3.ts:48:22: This type parameter might need an `extends number` constraint. + declare var b3: new (x: T) => T; a3 = b3; // ok b3 = a3; // ok ~~ !!! error TS2322: Type 'new (x: number) => void' is not assignable to type 'new (x: T) => T'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'number'. -!!! related TS2208 assignmentCompatWithConstructSignatures3.ts:51:14: This type parameter might need an `extends number` constraint. - var b4: new (x: T, y: U) => T; +!!! related TS2208 assignmentCompatWithConstructSignatures3.ts:51:22: This type parameter might need an `extends number` constraint. + declare var b4: new (x: T, y: U) => T; a4 = b4; // ok b4 = a4; // ok ~~ !!! error TS2322: Type 'new (x: string, y: number) => string' is not assignable to type 'new (x: T, y: U) => T'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'string'. -!!! related TS2208 assignmentCompatWithConstructSignatures3.ts:54:14: This type parameter might need an `extends string` constraint. - var b5: new (x: (arg: T) => U) => T; +!!! related TS2208 assignmentCompatWithConstructSignatures3.ts:54:22: This type parameter might need an `extends string` constraint. + declare var b5: new (x: (arg: T) => U) => T; a5 = b5; // ok b5 = a5; // ok ~~ @@ -148,7 +148,7 @@ assignmentCompatWithConstructSignatures3.ts(86,1): error TS2322: Type 'new (x: { !!! error TS2322: Types of parameters 'arg' and 'arg' are incompatible. !!! error TS2322: Type 'string' is not assignable to type 'T'. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. - var b6: new (x: (arg: T) => U) => T; + declare var b6: new (x: (arg: T) => U) => T; a6 = b6; // ok b6 = a6; // ok ~~ @@ -157,7 +157,7 @@ assignmentCompatWithConstructSignatures3.ts(86,1): error TS2322: Type 'new (x: { !!! error TS2322: Types of parameters 'arg' and 'arg' are incompatible. !!! error TS2322: Type 'Base' is not assignable to type 'T'. !!! error TS2322: 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. - var b7: new (x: (arg: T) => U) => (r: T) => U; + declare var b7: new (x: (arg: T) => U) => (r: T) => U; a7 = b7; // ok b7 = a7; // ok ~~ @@ -166,7 +166,7 @@ assignmentCompatWithConstructSignatures3.ts(86,1): error TS2322: Type 'new (x: { !!! error TS2322: Types of parameters 'arg' and 'arg' are incompatible. !!! error TS2322: Type 'Base' is not assignable to type 'T'. !!! error TS2322: 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. - var b8: new (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U; + declare var b8: new (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U; a8 = b8; // ok b8 = a8; // ok ~~ @@ -175,7 +175,7 @@ assignmentCompatWithConstructSignatures3.ts(86,1): error TS2322: Type 'new (x: { !!! error TS2322: Types of parameters 'arg' and 'arg' are incompatible. !!! error TS2322: Type 'Base' is not assignable to type 'T'. !!! error TS2322: 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. - var b9: new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; + declare var b9: new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; a9 = b9; // ok b9 = a9; // ok ~~ @@ -184,14 +184,14 @@ assignmentCompatWithConstructSignatures3.ts(86,1): error TS2322: Type 'new (x: { !!! error TS2322: Types of parameters 'arg' and 'arg' are incompatible. !!! error TS2322: Type 'Base' is not assignable to type 'T'. !!! error TS2322: 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. - var b10: new (...x: T[]) => T; + declare var b10: new (...x: T[]) => T; a10 = b10; // ok b10 = a10; // ok ~~~ !!! error TS2322: Type 'new (...x: Derived[]) => Derived' is not assignable to type 'new (...x: T[]) => T'. !!! error TS2322: Type 'Derived' is not assignable to type 'T'. !!! error TS2322: 'Derived' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Derived'. - var b11: new (x: T, y: T) => T; + declare var b11: new (x: T, y: T) => T; a11 = b11; // ok b11 = a11; // ok ~~~ @@ -199,8 +199,8 @@ assignmentCompatWithConstructSignatures3.ts(86,1): error TS2322: Type 'new (x: { !!! error TS2322: Types of parameters 'y' and 'y' are incompatible. !!! error TS2322: Type 'T' is not assignable to type '{ foo: string; bar: string; }'. !!! error TS2322: Property 'bar' is missing in type 'Base' but required in type '{ foo: string; bar: string; }'. -!!! related TS2728 assignmentCompatWithConstructSignatures3.ts:18:53: 'bar' is declared here. - var b12: new >(x: Array, y: T) => Array; +!!! related TS2728 assignmentCompatWithConstructSignatures3.ts:18:61: 'bar' is declared here. + declare var b12: new >(x: Array, y: T) => Array; a12 = b12; // ok b12 = a12; // ok ~~~ @@ -209,14 +209,14 @@ assignmentCompatWithConstructSignatures3.ts(86,1): error TS2322: Type 'new (x: { !!! error TS2322: Type 'T' is not assignable to type 'Derived2[]'. !!! error TS2322: Type 'Base[]' is not assignable to type 'Derived2[]'. !!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': baz, bar - var b13: new >(x: Array, y: T) => T; + declare var b13: new >(x: Array, y: T) => T; a13 = b13; // ok b13 = a13; // ok ~~~ !!! error TS2322: Type 'new (x: Base[], y: Derived[]) => Derived[]' is not assignable to type 'new >(x: Base[], y: T) => T'. !!! error TS2322: Type 'Derived[]' is not assignable to type 'T'. !!! error TS2322: 'Derived[]' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Derived[]'. - var b14: new (x: { a: T; b: T }) => T; + declare var b14: new (x: { a: T; b: T }) => T; a14 = b14; // ok ~~~ !!! error TS2322: Type 'new (x: { a: T; b: T; }) => T' is not assignable to type 'new (x: { a: string; b: number; }) => Object'. @@ -231,17 +231,17 @@ assignmentCompatWithConstructSignatures3.ts(86,1): error TS2322: Type 'new (x: { !!! error TS2322: Type '{ a: T; b: T; }' is not assignable to type '{ a: string; b: number; }'. !!! error TS2322: Types of property 'a' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'string'. -!!! related TS2208 assignmentCompatWithConstructSignatures3.ts:84:15: This type parameter might need an `extends string` constraint. - var b15: new (x: T) => T[]; +!!! related TS2208 assignmentCompatWithConstructSignatures3.ts:84:23: This type parameter might need an `extends string` constraint. + declare var b15: new (x: T) => T[]; a15 = b15; // ok b15 = a15; // ok - var b16: new (x: T) => number[]; + declare var b16: new (x: T) => number[]; a16 = b16; // ok b16 = a16; // ok - var b17: new (x: new (a: T) => T) => T[]; // ok + declare var b17: new (x: new (a: T) => T) => T[]; // ok a17 = b17; // ok b17 = a17; // ok - var b18: new (x: new (a: T) => T) => T[]; + declare var b18: new (x: new (a: T) => T) => T[]; a18 = b18; // ok b18 = a18; // ok \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js index c529a6599cd05..4e018ae363ac3 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js @@ -8,33 +8,33 @@ class Derived extends Base { bar: string; } class Derived2 extends Derived { baz: string; } class OtherDerived extends Base { bing: string; } -var a: new (x: number) => number[]; -var a2: new (x: number) => string[]; -var a3: new (x: number) => void; -var a4: new (x: string, y: number) => string; -var a5: new (x: (arg: string) => number) => string; -var a6: new (x: (arg: Base) => Derived) => Base; -var a7: new (x: (arg: Base) => Derived) => (r: Base) => Derived; -var a8: new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; -var a9: new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; -var a10: new (...x: Derived[]) => Derived; -var a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base; -var a12: new (x: Array, y: Array) => Array; -var a13: new (x: Array, y: Array) => Array; -var a14: new (x: { a: string; b: number }) => Object; -var a15: { +declare var a: new (x: number) => number[]; +declare var a2: new (x: number) => string[]; +declare var a3: new (x: number) => void; +declare var a4: new (x: string, y: number) => string; +declare var a5: new (x: (arg: string) => number) => string; +declare var a6: new (x: (arg: Base) => Derived) => Base; +declare var a7: new (x: (arg: Base) => Derived) => (r: Base) => Derived; +declare var a8: new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; +declare var a9: new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; +declare var a10: new (...x: Derived[]) => Derived; +declare var a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base; +declare var a12: new (x: Array, y: Array) => Array; +declare var a13: new (x: Array, y: Array) => Array; +declare var a14: new (x: { a: string; b: number }) => Object; +declare var a15: { new (x: number): number[]; new (x: string): string[]; } -var a16: { +declare var a16: { new (x: T): number[]; new (x: U): number[]; } -var a17: { +declare var a17: { new (x: new (a: number) => number): number[]; new (x: new (a: string) => string): string[]; }; -var a18: { +declare var a18: { new (x: { new (a: number): number; new (a: string): string; @@ -45,58 +45,58 @@ var a18: { }): any[]; } -var b: new (x: T) => T[]; +declare var b: new (x: T) => T[]; a = b; // ok b = a; // ok -var b2: new (x: T) => string[]; +declare var b2: new (x: T) => string[]; a2 = b2; // ok b2 = a2; // ok -var b3: new (x: T) => T; +declare var b3: new (x: T) => T; a3 = b3; // ok b3 = a3; // ok -var b4: new (x: T, y: U) => T; +declare var b4: new (x: T, y: U) => T; a4 = b4; // ok b4 = a4; // ok -var b5: new (x: (arg: T) => U) => T; +declare var b5: new (x: (arg: T) => U) => T; a5 = b5; // ok b5 = a5; // ok -var b6: new (x: (arg: T) => U) => T; +declare var b6: new (x: (arg: T) => U) => T; a6 = b6; // ok b6 = a6; // ok -var b7: new (x: (arg: T) => U) => (r: T) => U; +declare var b7: new (x: (arg: T) => U) => (r: T) => U; a7 = b7; // ok b7 = a7; // ok -var b8: new (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U; +declare var b8: new (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U; a8 = b8; // ok b8 = a8; // ok -var b9: new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; +declare var b9: new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; a9 = b9; // ok b9 = a9; // ok -var b10: new (...x: T[]) => T; +declare var b10: new (...x: T[]) => T; a10 = b10; // ok b10 = a10; // ok -var b11: new (x: T, y: T) => T; +declare var b11: new (x: T, y: T) => T; a11 = b11; // ok b11 = a11; // ok -var b12: new >(x: Array, y: T) => Array; +declare var b12: new >(x: Array, y: T) => Array; a12 = b12; // ok b12 = a12; // ok -var b13: new >(x: Array, y: T) => T; +declare var b13: new >(x: Array, y: T) => T; a13 = b13; // ok b13 = a13; // ok -var b14: new (x: { a: T; b: T }) => T; +declare var b14: new (x: { a: T; b: T }) => T; a14 = b14; // ok b14 = a14; // ok -var b15: new (x: T) => T[]; +declare var b15: new (x: T) => T[]; a15 = b15; // ok b15 = a15; // ok -var b16: new (x: T) => number[]; +declare var b16: new (x: T) => number[]; a16 = b16; // ok b16 = a16; // ok -var b17: new (x: new (a: T) => T) => T[]; // ok +declare var b17: new (x: new (a: T) => T) => T[]; // ok a17 = b17; // ok b17 = a17; // ok -var b18: new (x: new (a: T) => T) => T[]; +declare var b18: new (x: new (a: T) => T) => T[]; a18 = b18; // ok b18 = a18; // ok @@ -144,75 +144,39 @@ var OtherDerived = /** @class */ (function (_super) { } return OtherDerived; }(Base)); -var a; -var a2; -var a3; -var a4; -var a5; -var a6; -var a7; -var a8; -var a9; -var a10; -var a11; -var a12; -var a13; -var a14; -var a15; -var a16; -var a17; -var a18; -var b; a = b; // ok b = a; // ok -var b2; a2 = b2; // ok b2 = a2; // ok -var b3; a3 = b3; // ok b3 = a3; // ok -var b4; a4 = b4; // ok b4 = a4; // ok -var b5; a5 = b5; // ok b5 = a5; // ok -var b6; a6 = b6; // ok b6 = a6; // ok -var b7; a7 = b7; // ok b7 = a7; // ok -var b8; a8 = b8; // ok b8 = a8; // ok -var b9; a9 = b9; // ok b9 = a9; // ok -var b10; a10 = b10; // ok b10 = a10; // ok -var b11; a11 = b11; // ok b11 = a11; // ok -var b12; a12 = b12; // ok b12 = a12; // ok -var b13; a13 = b13; // ok b13 = a13; // ok -var b14; a14 = b14; // ok b14 = a14; // ok -var b15; a15 = b15; // ok b15 = a15; // ok -var b16; a16 = b16; // ok b16 = a16; // ok -var b17; // ok a17 = b17; // ok b17 = a17; // ok -var b18; a18 = b18; // ok b18 = a18; // ok diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.symbols b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.symbols index ce07bd3084659..df21bb936122c 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.symbols +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.symbols @@ -22,120 +22,120 @@ class OtherDerived extends Base { bing: string; } >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures3.ts, 0, 0)) >bing : Symbol(OtherDerived.bing, Decl(assignmentCompatWithConstructSignatures3.ts, 5, 33)) -var a: new (x: number) => number[]; ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures3.ts, 7, 3)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 7, 12)) - -var a2: new (x: number) => string[]; ->a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures3.ts, 8, 3)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 8, 13)) - -var a3: new (x: number) => void; ->a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures3.ts, 9, 3)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 9, 13)) - -var a4: new (x: string, y: number) => string; ->a4 : Symbol(a4, Decl(assignmentCompatWithConstructSignatures3.ts, 10, 3)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 10, 13)) ->y : Symbol(y, Decl(assignmentCompatWithConstructSignatures3.ts, 10, 23)) - -var a5: new (x: (arg: string) => number) => string; ->a5 : Symbol(a5, Decl(assignmentCompatWithConstructSignatures3.ts, 11, 3)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 11, 13)) ->arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures3.ts, 11, 17)) - -var a6: new (x: (arg: Base) => Derived) => Base; ->a6 : Symbol(a6, Decl(assignmentCompatWithConstructSignatures3.ts, 12, 3)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 12, 13)) ->arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures3.ts, 12, 17)) +declare var a: new (x: number) => number[]; +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures3.ts, 7, 11)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 7, 20)) + +declare var a2: new (x: number) => string[]; +>a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures3.ts, 8, 11)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 8, 21)) + +declare var a3: new (x: number) => void; +>a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures3.ts, 9, 11)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 9, 21)) + +declare var a4: new (x: string, y: number) => string; +>a4 : Symbol(a4, Decl(assignmentCompatWithConstructSignatures3.ts, 10, 11)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 10, 21)) +>y : Symbol(y, Decl(assignmentCompatWithConstructSignatures3.ts, 10, 31)) + +declare var a5: new (x: (arg: string) => number) => string; +>a5 : Symbol(a5, Decl(assignmentCompatWithConstructSignatures3.ts, 11, 11)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 11, 21)) +>arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures3.ts, 11, 25)) + +declare var a6: new (x: (arg: Base) => Derived) => Base; +>a6 : Symbol(a6, Decl(assignmentCompatWithConstructSignatures3.ts, 12, 11)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 12, 21)) +>arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures3.ts, 12, 25)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures3.ts, 0, 0)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures3.ts, 2, 27)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures3.ts, 0, 0)) -var a7: new (x: (arg: Base) => Derived) => (r: Base) => Derived; ->a7 : Symbol(a7, Decl(assignmentCompatWithConstructSignatures3.ts, 13, 3)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 13, 13)) ->arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures3.ts, 13, 17)) +declare var a7: new (x: (arg: Base) => Derived) => (r: Base) => Derived; +>a7 : Symbol(a7, Decl(assignmentCompatWithConstructSignatures3.ts, 13, 11)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 13, 21)) +>arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures3.ts, 13, 25)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures3.ts, 0, 0)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures3.ts, 2, 27)) ->r : Symbol(r, Decl(assignmentCompatWithConstructSignatures3.ts, 13, 44)) +>r : Symbol(r, Decl(assignmentCompatWithConstructSignatures3.ts, 13, 52)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures3.ts, 0, 0)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures3.ts, 2, 27)) -var a8: new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; ->a8 : Symbol(a8, Decl(assignmentCompatWithConstructSignatures3.ts, 14, 3)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 14, 13)) ->arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures3.ts, 14, 17)) +declare var a8: new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; +>a8 : Symbol(a8, Decl(assignmentCompatWithConstructSignatures3.ts, 14, 11)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 14, 21)) +>arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures3.ts, 14, 25)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures3.ts, 0, 0)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures3.ts, 2, 27)) ->y : Symbol(y, Decl(assignmentCompatWithConstructSignatures3.ts, 14, 39)) ->arg2 : Symbol(arg2, Decl(assignmentCompatWithConstructSignatures3.ts, 14, 44)) +>y : Symbol(y, Decl(assignmentCompatWithConstructSignatures3.ts, 14, 47)) +>arg2 : Symbol(arg2, Decl(assignmentCompatWithConstructSignatures3.ts, 14, 52)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures3.ts, 0, 0)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures3.ts, 2, 27)) ->r : Symbol(r, Decl(assignmentCompatWithConstructSignatures3.ts, 14, 72)) +>r : Symbol(r, Decl(assignmentCompatWithConstructSignatures3.ts, 14, 80)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures3.ts, 0, 0)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures3.ts, 2, 27)) -var a9: new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; ->a9 : Symbol(a9, Decl(assignmentCompatWithConstructSignatures3.ts, 15, 3)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 15, 13)) ->arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures3.ts, 15, 17)) +declare var a9: new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; +>a9 : Symbol(a9, Decl(assignmentCompatWithConstructSignatures3.ts, 15, 11)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 15, 21)) +>arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures3.ts, 15, 25)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures3.ts, 0, 0)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures3.ts, 2, 27)) ->y : Symbol(y, Decl(assignmentCompatWithConstructSignatures3.ts, 15, 39)) ->arg2 : Symbol(arg2, Decl(assignmentCompatWithConstructSignatures3.ts, 15, 44)) +>y : Symbol(y, Decl(assignmentCompatWithConstructSignatures3.ts, 15, 47)) +>arg2 : Symbol(arg2, Decl(assignmentCompatWithConstructSignatures3.ts, 15, 52)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures3.ts, 0, 0)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures3.ts, 2, 27)) ->r : Symbol(r, Decl(assignmentCompatWithConstructSignatures3.ts, 15, 72)) +>r : Symbol(r, Decl(assignmentCompatWithConstructSignatures3.ts, 15, 80)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures3.ts, 0, 0)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures3.ts, 2, 27)) -var a10: new (...x: Derived[]) => Derived; ->a10 : Symbol(a10, Decl(assignmentCompatWithConstructSignatures3.ts, 16, 3)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 16, 14)) +declare var a10: new (...x: Derived[]) => Derived; +>a10 : Symbol(a10, Decl(assignmentCompatWithConstructSignatures3.ts, 16, 11)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 16, 22)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures3.ts, 2, 27)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures3.ts, 2, 27)) -var a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base; ->a11 : Symbol(a11, Decl(assignmentCompatWithConstructSignatures3.ts, 17, 3)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 17, 14)) ->foo : Symbol(foo, Decl(assignmentCompatWithConstructSignatures3.ts, 17, 18)) ->y : Symbol(y, Decl(assignmentCompatWithConstructSignatures3.ts, 17, 33)) ->foo : Symbol(foo, Decl(assignmentCompatWithConstructSignatures3.ts, 17, 38)) ->bar : Symbol(bar, Decl(assignmentCompatWithConstructSignatures3.ts, 17, 51)) +declare var a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base; +>a11 : Symbol(a11, Decl(assignmentCompatWithConstructSignatures3.ts, 17, 11)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 17, 22)) +>foo : Symbol(foo, Decl(assignmentCompatWithConstructSignatures3.ts, 17, 26)) +>y : Symbol(y, Decl(assignmentCompatWithConstructSignatures3.ts, 17, 41)) +>foo : Symbol(foo, Decl(assignmentCompatWithConstructSignatures3.ts, 17, 46)) +>bar : Symbol(bar, Decl(assignmentCompatWithConstructSignatures3.ts, 17, 59)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures3.ts, 0, 0)) -var a12: new (x: Array, y: Array) => Array; ->a12 : Symbol(a12, Decl(assignmentCompatWithConstructSignatures3.ts, 18, 3)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 18, 14)) +declare var a12: new (x: Array, y: Array) => Array; +>a12 : Symbol(a12, Decl(assignmentCompatWithConstructSignatures3.ts, 18, 11)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 18, 22)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures3.ts, 0, 0)) ->y : Symbol(y, Decl(assignmentCompatWithConstructSignatures3.ts, 18, 29)) +>y : Symbol(y, Decl(assignmentCompatWithConstructSignatures3.ts, 18, 37)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithConstructSignatures3.ts, 3, 43)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures3.ts, 2, 27)) -var a13: new (x: Array, y: Array) => Array; ->a13 : Symbol(a13, Decl(assignmentCompatWithConstructSignatures3.ts, 19, 3)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 19, 14)) +declare var a13: new (x: Array, y: Array) => Array; +>a13 : Symbol(a13, Decl(assignmentCompatWithConstructSignatures3.ts, 19, 11)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 19, 22)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures3.ts, 0, 0)) ->y : Symbol(y, Decl(assignmentCompatWithConstructSignatures3.ts, 19, 29)) +>y : Symbol(y, Decl(assignmentCompatWithConstructSignatures3.ts, 19, 37)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures3.ts, 2, 27)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures3.ts, 2, 27)) -var a14: new (x: { a: string; b: number }) => Object; ->a14 : Symbol(a14, Decl(assignmentCompatWithConstructSignatures3.ts, 20, 3)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 20, 14)) ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures3.ts, 20, 18)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignatures3.ts, 20, 29)) +declare var a14: new (x: { a: string; b: number }) => Object; +>a14 : Symbol(a14, Decl(assignmentCompatWithConstructSignatures3.ts, 20, 11)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 20, 22)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures3.ts, 20, 26)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignatures3.ts, 20, 37)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) -var a15: { ->a15 : Symbol(a15, Decl(assignmentCompatWithConstructSignatures3.ts, 21, 3)) +declare var a15: { +>a15 : Symbol(a15, Decl(assignmentCompatWithConstructSignatures3.ts, 21, 11)) new (x: number): number[]; >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 22, 9)) @@ -143,8 +143,8 @@ var a15: { new (x: string): string[]; >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 23, 9)) } -var a16: { ->a16 : Symbol(a16, Decl(assignmentCompatWithConstructSignatures3.ts, 25, 3)) +declare var a16: { +>a16 : Symbol(a16, Decl(assignmentCompatWithConstructSignatures3.ts, 25, 11)) new (x: T): number[]; >T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 26, 9)) @@ -158,8 +158,8 @@ var a16: { >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 27, 25)) >U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 27, 9)) } -var a17: { ->a17 : Symbol(a17, Decl(assignmentCompatWithConstructSignatures3.ts, 29, 3)) +declare var a17: { +>a17 : Symbol(a17, Decl(assignmentCompatWithConstructSignatures3.ts, 29, 11)) new (x: new (a: number) => number): number[]; >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 30, 9)) @@ -170,8 +170,8 @@ var a17: { >a : Symbol(a, Decl(assignmentCompatWithConstructSignatures3.ts, 31, 17)) }; -var a18: { ->a18 : Symbol(a18, Decl(assignmentCompatWithConstructSignatures3.ts, 33, 3)) +declare var a18: { +>a18 : Symbol(a18, Decl(assignmentCompatWithConstructSignatures3.ts, 33, 11)) new (x: { >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 34, 9)) @@ -197,335 +197,335 @@ var a18: { }): any[]; } -var b: new (x: T) => T[]; ->b : Symbol(b, Decl(assignmentCompatWithConstructSignatures3.ts, 44, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 44, 12)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 44, 15)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 44, 12)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 44, 12)) +declare var b: new (x: T) => T[]; +>b : Symbol(b, Decl(assignmentCompatWithConstructSignatures3.ts, 44, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 44, 20)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 44, 23)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 44, 20)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 44, 20)) a = b; // ok ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures3.ts, 7, 3)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignatures3.ts, 44, 3)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures3.ts, 7, 11)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignatures3.ts, 44, 11)) b = a; // ok ->b : Symbol(b, Decl(assignmentCompatWithConstructSignatures3.ts, 44, 3)) ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures3.ts, 7, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignatures3.ts, 44, 11)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures3.ts, 7, 11)) -var b2: new (x: T) => string[]; ->b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures3.ts, 47, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 47, 13)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 47, 16)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 47, 13)) +declare var b2: new (x: T) => string[]; +>b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures3.ts, 47, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 47, 21)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 47, 24)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 47, 21)) a2 = b2; // ok ->a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures3.ts, 8, 3)) ->b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures3.ts, 47, 3)) +>a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures3.ts, 8, 11)) +>b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures3.ts, 47, 11)) b2 = a2; // ok ->b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures3.ts, 47, 3)) ->a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures3.ts, 8, 3)) +>b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures3.ts, 47, 11)) +>a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures3.ts, 8, 11)) -var b3: new (x: T) => T; ->b3 : Symbol(b3, Decl(assignmentCompatWithConstructSignatures3.ts, 50, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 50, 13)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 50, 16)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 50, 13)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 50, 13)) +declare var b3: new (x: T) => T; +>b3 : Symbol(b3, Decl(assignmentCompatWithConstructSignatures3.ts, 50, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 50, 21)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 50, 24)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 50, 21)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 50, 21)) a3 = b3; // ok ->a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures3.ts, 9, 3)) ->b3 : Symbol(b3, Decl(assignmentCompatWithConstructSignatures3.ts, 50, 3)) +>a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures3.ts, 9, 11)) +>b3 : Symbol(b3, Decl(assignmentCompatWithConstructSignatures3.ts, 50, 11)) b3 = a3; // ok ->b3 : Symbol(b3, Decl(assignmentCompatWithConstructSignatures3.ts, 50, 3)) ->a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures3.ts, 9, 3)) - -var b4: new (x: T, y: U) => T; ->b4 : Symbol(b4, Decl(assignmentCompatWithConstructSignatures3.ts, 53, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 53, 13)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 53, 15)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 53, 19)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 53, 13)) ->y : Symbol(y, Decl(assignmentCompatWithConstructSignatures3.ts, 53, 24)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 53, 15)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 53, 13)) +>b3 : Symbol(b3, Decl(assignmentCompatWithConstructSignatures3.ts, 50, 11)) +>a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures3.ts, 9, 11)) + +declare var b4: new (x: T, y: U) => T; +>b4 : Symbol(b4, Decl(assignmentCompatWithConstructSignatures3.ts, 53, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 53, 21)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 53, 23)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 53, 27)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 53, 21)) +>y : Symbol(y, Decl(assignmentCompatWithConstructSignatures3.ts, 53, 32)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 53, 23)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 53, 21)) a4 = b4; // ok ->a4 : Symbol(a4, Decl(assignmentCompatWithConstructSignatures3.ts, 10, 3)) ->b4 : Symbol(b4, Decl(assignmentCompatWithConstructSignatures3.ts, 53, 3)) +>a4 : Symbol(a4, Decl(assignmentCompatWithConstructSignatures3.ts, 10, 11)) +>b4 : Symbol(b4, Decl(assignmentCompatWithConstructSignatures3.ts, 53, 11)) b4 = a4; // ok ->b4 : Symbol(b4, Decl(assignmentCompatWithConstructSignatures3.ts, 53, 3)) ->a4 : Symbol(a4, Decl(assignmentCompatWithConstructSignatures3.ts, 10, 3)) - -var b5: new (x: (arg: T) => U) => T; ->b5 : Symbol(b5, Decl(assignmentCompatWithConstructSignatures3.ts, 56, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 56, 13)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 56, 15)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 56, 19)) ->arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures3.ts, 56, 23)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 56, 13)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 56, 15)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 56, 13)) +>b4 : Symbol(b4, Decl(assignmentCompatWithConstructSignatures3.ts, 53, 11)) +>a4 : Symbol(a4, Decl(assignmentCompatWithConstructSignatures3.ts, 10, 11)) + +declare var b5: new (x: (arg: T) => U) => T; +>b5 : Symbol(b5, Decl(assignmentCompatWithConstructSignatures3.ts, 56, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 56, 21)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 56, 23)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 56, 27)) +>arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures3.ts, 56, 31)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 56, 21)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 56, 23)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 56, 21)) a5 = b5; // ok ->a5 : Symbol(a5, Decl(assignmentCompatWithConstructSignatures3.ts, 11, 3)) ->b5 : Symbol(b5, Decl(assignmentCompatWithConstructSignatures3.ts, 56, 3)) +>a5 : Symbol(a5, Decl(assignmentCompatWithConstructSignatures3.ts, 11, 11)) +>b5 : Symbol(b5, Decl(assignmentCompatWithConstructSignatures3.ts, 56, 11)) b5 = a5; // ok ->b5 : Symbol(b5, Decl(assignmentCompatWithConstructSignatures3.ts, 56, 3)) ->a5 : Symbol(a5, Decl(assignmentCompatWithConstructSignatures3.ts, 11, 3)) +>b5 : Symbol(b5, Decl(assignmentCompatWithConstructSignatures3.ts, 56, 11)) +>a5 : Symbol(a5, Decl(assignmentCompatWithConstructSignatures3.ts, 11, 11)) -var b6: new (x: (arg: T) => U) => T; ->b6 : Symbol(b6, Decl(assignmentCompatWithConstructSignatures3.ts, 59, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 59, 13)) +declare var b6: new (x: (arg: T) => U) => T; +>b6 : Symbol(b6, Decl(assignmentCompatWithConstructSignatures3.ts, 59, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 59, 21)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures3.ts, 0, 0)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 59, 28)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 59, 36)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures3.ts, 2, 27)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 59, 48)) ->arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures3.ts, 59, 52)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 59, 13)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 59, 28)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 59, 13)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 59, 56)) +>arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures3.ts, 59, 60)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 59, 21)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 59, 36)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 59, 21)) a6 = b6; // ok ->a6 : Symbol(a6, Decl(assignmentCompatWithConstructSignatures3.ts, 12, 3)) ->b6 : Symbol(b6, Decl(assignmentCompatWithConstructSignatures3.ts, 59, 3)) +>a6 : Symbol(a6, Decl(assignmentCompatWithConstructSignatures3.ts, 12, 11)) +>b6 : Symbol(b6, Decl(assignmentCompatWithConstructSignatures3.ts, 59, 11)) b6 = a6; // ok ->b6 : Symbol(b6, Decl(assignmentCompatWithConstructSignatures3.ts, 59, 3)) ->a6 : Symbol(a6, Decl(assignmentCompatWithConstructSignatures3.ts, 12, 3)) +>b6 : Symbol(b6, Decl(assignmentCompatWithConstructSignatures3.ts, 59, 11)) +>a6 : Symbol(a6, Decl(assignmentCompatWithConstructSignatures3.ts, 12, 11)) -var b7: new (x: (arg: T) => U) => (r: T) => U; ->b7 : Symbol(b7, Decl(assignmentCompatWithConstructSignatures3.ts, 62, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 62, 13)) +declare var b7: new (x: (arg: T) => U) => (r: T) => U; +>b7 : Symbol(b7, Decl(assignmentCompatWithConstructSignatures3.ts, 62, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 62, 21)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures3.ts, 0, 0)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 62, 28)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 62, 36)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures3.ts, 2, 27)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 62, 48)) ->arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures3.ts, 62, 52)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 62, 13)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 62, 28)) ->r : Symbol(r, Decl(assignmentCompatWithConstructSignatures3.ts, 62, 70)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 62, 13)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 62, 28)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 62, 56)) +>arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures3.ts, 62, 60)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 62, 21)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 62, 36)) +>r : Symbol(r, Decl(assignmentCompatWithConstructSignatures3.ts, 62, 78)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 62, 21)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 62, 36)) a7 = b7; // ok ->a7 : Symbol(a7, Decl(assignmentCompatWithConstructSignatures3.ts, 13, 3)) ->b7 : Symbol(b7, Decl(assignmentCompatWithConstructSignatures3.ts, 62, 3)) +>a7 : Symbol(a7, Decl(assignmentCompatWithConstructSignatures3.ts, 13, 11)) +>b7 : Symbol(b7, Decl(assignmentCompatWithConstructSignatures3.ts, 62, 11)) b7 = a7; // ok ->b7 : Symbol(b7, Decl(assignmentCompatWithConstructSignatures3.ts, 62, 3)) ->a7 : Symbol(a7, Decl(assignmentCompatWithConstructSignatures3.ts, 13, 3)) +>b7 : Symbol(b7, Decl(assignmentCompatWithConstructSignatures3.ts, 62, 11)) +>a7 : Symbol(a7, Decl(assignmentCompatWithConstructSignatures3.ts, 13, 11)) -var b8: new (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U; ->b8 : Symbol(b8, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 13)) +declare var b8: new (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U; +>b8 : Symbol(b8, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 21)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures3.ts, 0, 0)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 28)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 36)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures3.ts, 2, 27)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 48)) ->arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 52)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 13)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 28)) ->y : Symbol(y, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 65)) ->arg2 : Symbol(arg2, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 70)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 13)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 28)) ->r : Symbol(r, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 89)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 13)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 28)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 56)) +>arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 60)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 21)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 36)) +>y : Symbol(y, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 73)) +>arg2 : Symbol(arg2, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 78)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 21)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 36)) +>r : Symbol(r, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 97)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 21)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 36)) a8 = b8; // ok ->a8 : Symbol(a8, Decl(assignmentCompatWithConstructSignatures3.ts, 14, 3)) ->b8 : Symbol(b8, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 3)) +>a8 : Symbol(a8, Decl(assignmentCompatWithConstructSignatures3.ts, 14, 11)) +>b8 : Symbol(b8, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 11)) b8 = a8; // ok ->b8 : Symbol(b8, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 3)) ->a8 : Symbol(a8, Decl(assignmentCompatWithConstructSignatures3.ts, 14, 3)) +>b8 : Symbol(b8, Decl(assignmentCompatWithConstructSignatures3.ts, 65, 11)) +>a8 : Symbol(a8, Decl(assignmentCompatWithConstructSignatures3.ts, 14, 11)) -var b9: new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; ->b9 : Symbol(b9, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 13)) +declare var b9: new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; +>b9 : Symbol(b9, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 21)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures3.ts, 0, 0)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 28)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 36)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures3.ts, 2, 27)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 48)) ->arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 52)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 13)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 28)) ->y : Symbol(y, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 65)) ->arg2 : Symbol(arg2, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 70)) ->foo : Symbol(foo, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 77)) ->bing : Symbol(bing, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 90)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 28)) ->r : Symbol(r, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 117)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 13)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 28)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 56)) +>arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 60)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 21)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 36)) +>y : Symbol(y, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 73)) +>arg2 : Symbol(arg2, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 78)) +>foo : Symbol(foo, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 85)) +>bing : Symbol(bing, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 98)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 36)) +>r : Symbol(r, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 125)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 21)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 36)) a9 = b9; // ok ->a9 : Symbol(a9, Decl(assignmentCompatWithConstructSignatures3.ts, 15, 3)) ->b9 : Symbol(b9, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 3)) +>a9 : Symbol(a9, Decl(assignmentCompatWithConstructSignatures3.ts, 15, 11)) +>b9 : Symbol(b9, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 11)) b9 = a9; // ok ->b9 : Symbol(b9, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 3)) ->a9 : Symbol(a9, Decl(assignmentCompatWithConstructSignatures3.ts, 15, 3)) +>b9 : Symbol(b9, Decl(assignmentCompatWithConstructSignatures3.ts, 68, 11)) +>a9 : Symbol(a9, Decl(assignmentCompatWithConstructSignatures3.ts, 15, 11)) -var b10: new (...x: T[]) => T; ->b10 : Symbol(b10, Decl(assignmentCompatWithConstructSignatures3.ts, 71, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 71, 14)) +declare var b10: new (...x: T[]) => T; +>b10 : Symbol(b10, Decl(assignmentCompatWithConstructSignatures3.ts, 71, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 71, 22)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures3.ts, 2, 27)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 71, 33)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 71, 14)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 71, 14)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 71, 41)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 71, 22)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 71, 22)) a10 = b10; // ok ->a10 : Symbol(a10, Decl(assignmentCompatWithConstructSignatures3.ts, 16, 3)) ->b10 : Symbol(b10, Decl(assignmentCompatWithConstructSignatures3.ts, 71, 3)) +>a10 : Symbol(a10, Decl(assignmentCompatWithConstructSignatures3.ts, 16, 11)) +>b10 : Symbol(b10, Decl(assignmentCompatWithConstructSignatures3.ts, 71, 11)) b10 = a10; // ok ->b10 : Symbol(b10, Decl(assignmentCompatWithConstructSignatures3.ts, 71, 3)) ->a10 : Symbol(a10, Decl(assignmentCompatWithConstructSignatures3.ts, 16, 3)) +>b10 : Symbol(b10, Decl(assignmentCompatWithConstructSignatures3.ts, 71, 11)) +>a10 : Symbol(a10, Decl(assignmentCompatWithConstructSignatures3.ts, 16, 11)) -var b11: new (x: T, y: T) => T; ->b11 : Symbol(b11, Decl(assignmentCompatWithConstructSignatures3.ts, 74, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 74, 14)) +declare var b11: new (x: T, y: T) => T; +>b11 : Symbol(b11, Decl(assignmentCompatWithConstructSignatures3.ts, 74, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 74, 22)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures3.ts, 0, 0)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 74, 30)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 74, 14)) ->y : Symbol(y, Decl(assignmentCompatWithConstructSignatures3.ts, 74, 35)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 74, 14)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 74, 14)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 74, 38)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 74, 22)) +>y : Symbol(y, Decl(assignmentCompatWithConstructSignatures3.ts, 74, 43)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 74, 22)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 74, 22)) a11 = b11; // ok ->a11 : Symbol(a11, Decl(assignmentCompatWithConstructSignatures3.ts, 17, 3)) ->b11 : Symbol(b11, Decl(assignmentCompatWithConstructSignatures3.ts, 74, 3)) +>a11 : Symbol(a11, Decl(assignmentCompatWithConstructSignatures3.ts, 17, 11)) +>b11 : Symbol(b11, Decl(assignmentCompatWithConstructSignatures3.ts, 74, 11)) b11 = a11; // ok ->b11 : Symbol(b11, Decl(assignmentCompatWithConstructSignatures3.ts, 74, 3)) ->a11 : Symbol(a11, Decl(assignmentCompatWithConstructSignatures3.ts, 17, 3)) +>b11 : Symbol(b11, Decl(assignmentCompatWithConstructSignatures3.ts, 74, 11)) +>a11 : Symbol(a11, Decl(assignmentCompatWithConstructSignatures3.ts, 17, 11)) -var b12: new >(x: Array, y: T) => Array; ->b12 : Symbol(b12, Decl(assignmentCompatWithConstructSignatures3.ts, 77, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 77, 14)) +declare var b12: new >(x: Array, y: T) => Array; +>b12 : Symbol(b12, Decl(assignmentCompatWithConstructSignatures3.ts, 77, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 77, 22)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures3.ts, 0, 0)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 77, 37)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 77, 45)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures3.ts, 0, 0)) ->y : Symbol(y, Decl(assignmentCompatWithConstructSignatures3.ts, 77, 52)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 77, 14)) +>y : Symbol(y, Decl(assignmentCompatWithConstructSignatures3.ts, 77, 60)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 77, 22)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures3.ts, 2, 27)) a12 = b12; // ok ->a12 : Symbol(a12, Decl(assignmentCompatWithConstructSignatures3.ts, 18, 3)) ->b12 : Symbol(b12, Decl(assignmentCompatWithConstructSignatures3.ts, 77, 3)) +>a12 : Symbol(a12, Decl(assignmentCompatWithConstructSignatures3.ts, 18, 11)) +>b12 : Symbol(b12, Decl(assignmentCompatWithConstructSignatures3.ts, 77, 11)) b12 = a12; // ok ->b12 : Symbol(b12, Decl(assignmentCompatWithConstructSignatures3.ts, 77, 3)) ->a12 : Symbol(a12, Decl(assignmentCompatWithConstructSignatures3.ts, 18, 3)) +>b12 : Symbol(b12, Decl(assignmentCompatWithConstructSignatures3.ts, 77, 11)) +>a12 : Symbol(a12, Decl(assignmentCompatWithConstructSignatures3.ts, 18, 11)) -var b13: new >(x: Array, y: T) => T; ->b13 : Symbol(b13, Decl(assignmentCompatWithConstructSignatures3.ts, 80, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 80, 14)) +declare var b13: new >(x: Array, y: T) => T; +>b13 : Symbol(b13, Decl(assignmentCompatWithConstructSignatures3.ts, 80, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 80, 22)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures3.ts, 2, 27)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 80, 40)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 80, 48)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures3.ts, 0, 0)) ->y : Symbol(y, Decl(assignmentCompatWithConstructSignatures3.ts, 80, 55)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 80, 14)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 80, 14)) +>y : Symbol(y, Decl(assignmentCompatWithConstructSignatures3.ts, 80, 63)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 80, 22)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 80, 22)) a13 = b13; // ok ->a13 : Symbol(a13, Decl(assignmentCompatWithConstructSignatures3.ts, 19, 3)) ->b13 : Symbol(b13, Decl(assignmentCompatWithConstructSignatures3.ts, 80, 3)) +>a13 : Symbol(a13, Decl(assignmentCompatWithConstructSignatures3.ts, 19, 11)) +>b13 : Symbol(b13, Decl(assignmentCompatWithConstructSignatures3.ts, 80, 11)) b13 = a13; // ok ->b13 : Symbol(b13, Decl(assignmentCompatWithConstructSignatures3.ts, 80, 3)) ->a13 : Symbol(a13, Decl(assignmentCompatWithConstructSignatures3.ts, 19, 3)) - -var b14: new (x: { a: T; b: T }) => T; ->b14 : Symbol(b14, Decl(assignmentCompatWithConstructSignatures3.ts, 83, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 83, 14)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 83, 17)) ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures3.ts, 83, 21)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 83, 14)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignatures3.ts, 83, 27)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 83, 14)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 83, 14)) +>b13 : Symbol(b13, Decl(assignmentCompatWithConstructSignatures3.ts, 80, 11)) +>a13 : Symbol(a13, Decl(assignmentCompatWithConstructSignatures3.ts, 19, 11)) + +declare var b14: new (x: { a: T; b: T }) => T; +>b14 : Symbol(b14, Decl(assignmentCompatWithConstructSignatures3.ts, 83, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 83, 22)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 83, 25)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures3.ts, 83, 29)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 83, 22)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignatures3.ts, 83, 35)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 83, 22)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 83, 22)) a14 = b14; // ok ->a14 : Symbol(a14, Decl(assignmentCompatWithConstructSignatures3.ts, 20, 3)) ->b14 : Symbol(b14, Decl(assignmentCompatWithConstructSignatures3.ts, 83, 3)) +>a14 : Symbol(a14, Decl(assignmentCompatWithConstructSignatures3.ts, 20, 11)) +>b14 : Symbol(b14, Decl(assignmentCompatWithConstructSignatures3.ts, 83, 11)) b14 = a14; // ok ->b14 : Symbol(b14, Decl(assignmentCompatWithConstructSignatures3.ts, 83, 3)) ->a14 : Symbol(a14, Decl(assignmentCompatWithConstructSignatures3.ts, 20, 3)) +>b14 : Symbol(b14, Decl(assignmentCompatWithConstructSignatures3.ts, 83, 11)) +>a14 : Symbol(a14, Decl(assignmentCompatWithConstructSignatures3.ts, 20, 11)) -var b15: new (x: T) => T[]; ->b15 : Symbol(b15, Decl(assignmentCompatWithConstructSignatures3.ts, 86, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 86, 14)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 86, 17)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 86, 14)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 86, 14)) +declare var b15: new (x: T) => T[]; +>b15 : Symbol(b15, Decl(assignmentCompatWithConstructSignatures3.ts, 86, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 86, 22)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 86, 25)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 86, 22)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 86, 22)) a15 = b15; // ok ->a15 : Symbol(a15, Decl(assignmentCompatWithConstructSignatures3.ts, 21, 3)) ->b15 : Symbol(b15, Decl(assignmentCompatWithConstructSignatures3.ts, 86, 3)) +>a15 : Symbol(a15, Decl(assignmentCompatWithConstructSignatures3.ts, 21, 11)) +>b15 : Symbol(b15, Decl(assignmentCompatWithConstructSignatures3.ts, 86, 11)) b15 = a15; // ok ->b15 : Symbol(b15, Decl(assignmentCompatWithConstructSignatures3.ts, 86, 3)) ->a15 : Symbol(a15, Decl(assignmentCompatWithConstructSignatures3.ts, 21, 3)) +>b15 : Symbol(b15, Decl(assignmentCompatWithConstructSignatures3.ts, 86, 11)) +>a15 : Symbol(a15, Decl(assignmentCompatWithConstructSignatures3.ts, 21, 11)) -var b16: new (x: T) => number[]; ->b16 : Symbol(b16, Decl(assignmentCompatWithConstructSignatures3.ts, 89, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 89, 14)) +declare var b16: new (x: T) => number[]; +>b16 : Symbol(b16, Decl(assignmentCompatWithConstructSignatures3.ts, 89, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 89, 22)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures3.ts, 0, 0)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 89, 30)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 89, 14)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 89, 38)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 89, 22)) a16 = b16; // ok ->a16 : Symbol(a16, Decl(assignmentCompatWithConstructSignatures3.ts, 25, 3)) ->b16 : Symbol(b16, Decl(assignmentCompatWithConstructSignatures3.ts, 89, 3)) +>a16 : Symbol(a16, Decl(assignmentCompatWithConstructSignatures3.ts, 25, 11)) +>b16 : Symbol(b16, Decl(assignmentCompatWithConstructSignatures3.ts, 89, 11)) b16 = a16; // ok ->b16 : Symbol(b16, Decl(assignmentCompatWithConstructSignatures3.ts, 89, 3)) ->a16 : Symbol(a16, Decl(assignmentCompatWithConstructSignatures3.ts, 25, 3)) - -var b17: new (x: new (a: T) => T) => T[]; // ok ->b17 : Symbol(b17, Decl(assignmentCompatWithConstructSignatures3.ts, 92, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 92, 14)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 92, 17)) ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures3.ts, 92, 25)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 92, 14)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 92, 14)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 92, 14)) +>b16 : Symbol(b16, Decl(assignmentCompatWithConstructSignatures3.ts, 89, 11)) +>a16 : Symbol(a16, Decl(assignmentCompatWithConstructSignatures3.ts, 25, 11)) + +declare var b17: new (x: new (a: T) => T) => T[]; // ok +>b17 : Symbol(b17, Decl(assignmentCompatWithConstructSignatures3.ts, 92, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 92, 22)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 92, 25)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures3.ts, 92, 33)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 92, 22)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 92, 22)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 92, 22)) a17 = b17; // ok ->a17 : Symbol(a17, Decl(assignmentCompatWithConstructSignatures3.ts, 29, 3)) ->b17 : Symbol(b17, Decl(assignmentCompatWithConstructSignatures3.ts, 92, 3)) +>a17 : Symbol(a17, Decl(assignmentCompatWithConstructSignatures3.ts, 29, 11)) +>b17 : Symbol(b17, Decl(assignmentCompatWithConstructSignatures3.ts, 92, 11)) b17 = a17; // ok ->b17 : Symbol(b17, Decl(assignmentCompatWithConstructSignatures3.ts, 92, 3)) ->a17 : Symbol(a17, Decl(assignmentCompatWithConstructSignatures3.ts, 29, 3)) - -var b18: new (x: new (a: T) => T) => T[]; ->b18 : Symbol(b18, Decl(assignmentCompatWithConstructSignatures3.ts, 95, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 95, 14)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 95, 17)) ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures3.ts, 95, 25)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 95, 14)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 95, 14)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 95, 14)) +>b17 : Symbol(b17, Decl(assignmentCompatWithConstructSignatures3.ts, 92, 11)) +>a17 : Symbol(a17, Decl(assignmentCompatWithConstructSignatures3.ts, 29, 11)) + +declare var b18: new (x: new (a: T) => T) => T[]; +>b18 : Symbol(b18, Decl(assignmentCompatWithConstructSignatures3.ts, 95, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 95, 22)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 95, 25)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures3.ts, 95, 33)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 95, 22)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 95, 22)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 95, 22)) a18 = b18; // ok ->a18 : Symbol(a18, Decl(assignmentCompatWithConstructSignatures3.ts, 33, 3)) ->b18 : Symbol(b18, Decl(assignmentCompatWithConstructSignatures3.ts, 95, 3)) +>a18 : Symbol(a18, Decl(assignmentCompatWithConstructSignatures3.ts, 33, 11)) +>b18 : Symbol(b18, Decl(assignmentCompatWithConstructSignatures3.ts, 95, 11)) b18 = a18; // ok ->b18 : Symbol(b18, Decl(assignmentCompatWithConstructSignatures3.ts, 95, 3)) ->a18 : Symbol(a18, Decl(assignmentCompatWithConstructSignatures3.ts, 33, 3)) +>b18 : Symbol(b18, Decl(assignmentCompatWithConstructSignatures3.ts, 95, 11)) +>a18 : Symbol(a18, Decl(assignmentCompatWithConstructSignatures3.ts, 33, 11)) diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.types b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.types index db13d8160940d..b5050204c327f 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.types +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.types @@ -33,25 +33,25 @@ class OtherDerived extends Base { bing: string; } >bing : string > : ^^^^^^ -var a: new (x: number) => number[]; +declare var a: new (x: number) => number[]; >a : new (x: number) => number[] > : ^^^^^ ^^ ^^^^^ >x : number > : ^^^^^^ -var a2: new (x: number) => string[]; +declare var a2: new (x: number) => string[]; >a2 : new (x: number) => string[] > : ^^^^^ ^^ ^^^^^ >x : number > : ^^^^^^ -var a3: new (x: number) => void; +declare var a3: new (x: number) => void; >a3 : new (x: number) => void > : ^^^^^ ^^ ^^^^^ >x : number > : ^^^^^^ -var a4: new (x: string, y: number) => string; +declare var a4: new (x: string, y: number) => string; >a4 : new (x: string, y: number) => string > : ^^^^^ ^^ ^^ ^^ ^^^^^ >x : string @@ -59,7 +59,7 @@ var a4: new (x: string, y: number) => string; >y : number > : ^^^^^^ -var a5: new (x: (arg: string) => number) => string; +declare var a5: new (x: (arg: string) => number) => string; >a5 : new (x: (arg: string) => number) => string > : ^^^^^ ^^ ^^^^^ >x : (arg: string) => number @@ -67,7 +67,7 @@ var a5: new (x: (arg: string) => number) => string; >arg : string > : ^^^^^^ -var a6: new (x: (arg: Base) => Derived) => Base; +declare var a6: new (x: (arg: Base) => Derived) => Base; >a6 : new (x: (arg: Base) => Derived) => Base > : ^^^^^ ^^ ^^^^^ >x : (arg: Base) => Derived @@ -75,7 +75,7 @@ var a6: new (x: (arg: Base) => Derived) => Base; >arg : Base > : ^^^^ -var a7: new (x: (arg: Base) => Derived) => (r: Base) => Derived; +declare var a7: new (x: (arg: Base) => Derived) => (r: Base) => Derived; >a7 : new (x: (arg: Base) => Derived) => (r: Base) => Derived > : ^^^^^ ^^ ^^^^^ >x : (arg: Base) => Derived @@ -85,7 +85,7 @@ var a7: new (x: (arg: Base) => Derived) => (r: Base) => Derived; >r : Base > : ^^^^ -var a8: new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; +declare var a8: new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; >a8 : new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived > : ^^^^^ ^^ ^^ ^^ ^^^^^ >x : (arg: Base) => Derived @@ -99,7 +99,7 @@ var a8: new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) >r : Base > : ^^^^ -var a9: new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; +declare var a9: new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; >a9 : new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived > : ^^^^^ ^^ ^^ ^^ ^^^^^ >x : (arg: Base) => Derived @@ -113,13 +113,13 @@ var a9: new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) >r : Base > : ^^^^ -var a10: new (...x: Derived[]) => Derived; +declare var a10: new (...x: Derived[]) => Derived; >a10 : new (...x: Derived[]) => Derived > : ^^^^^^^^ ^^ ^^^^^ >x : Derived[] > : ^^^^^^^^^ -var a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base; +declare var a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base; >a11 : new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base > : ^^^^^ ^^ ^^ ^^ ^^^^^ >x : { foo: string; } @@ -133,7 +133,7 @@ var a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base; >bar : string > : ^^^^^^ -var a12: new (x: Array, y: Array) => Array; +declare var a12: new (x: Array, y: Array) => Array; >a12 : new (x: Array, y: Array) => Array > : ^^^^^ ^^ ^^ ^^ ^^^^^ >x : Base[] @@ -141,7 +141,7 @@ var a12: new (x: Array, y: Array) => Array; >y : Derived2[] > : ^^^^^^^^^^ -var a13: new (x: Array, y: Array) => Array; +declare var a13: new (x: Array, y: Array) => Array; >a13 : new (x: Array, y: Array) => Array > : ^^^^^ ^^ ^^ ^^ ^^^^^ >x : Base[] @@ -149,7 +149,7 @@ var a13: new (x: Array, y: Array) => Array; >y : Derived[] > : ^^^^^^^^^ -var a14: new (x: { a: string; b: number }) => Object; +declare var a14: new (x: { a: string; b: number }) => Object; >a14 : new (x: { a: string; b: number; }) => Object > : ^^^^^ ^^ ^^^^^ >x : { a: string; b: number; } @@ -159,7 +159,7 @@ var a14: new (x: { a: string; b: number }) => Object; >b : number > : ^^^^^^ -var a15: { +declare var a15: { >a15 : { new (x: number): number[]; new (x: string): string[]; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ @@ -171,7 +171,7 @@ var a15: { >x : string > : ^^^^^^ } -var a16: { +declare var a16: { >a16 : { new (x: T): number[]; new (x: U): number[]; } > : ^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^ ^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^ ^^^ @@ -183,7 +183,7 @@ var a16: { >x : U > : ^ } -var a17: { +declare var a17: { >a17 : { new (x: new (a: number) => number): number[]; new (x: new (a: string) => string): string[]; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ @@ -200,7 +200,7 @@ var a17: { > : ^^^^^^ }; -var a18: { +declare var a18: { >a18 : { new (x: { new (a: number): number; new (a: string): string; }): any[]; new (x: { new (a: boolean): boolean; new (a: Date): Date; }): any[]; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ @@ -232,7 +232,7 @@ var a18: { }): any[]; } -var b: new (x: T) => T[]; +declare var b: new (x: T) => T[]; >b : new (x: T) => T[] > : ^^^^^ ^^ ^^ ^^^^^ >x : T @@ -254,7 +254,7 @@ b = a; // ok >a : new (x: number) => number[] > : ^^^^^ ^^ ^^^^^ -var b2: new (x: T) => string[]; +declare var b2: new (x: T) => string[]; >b2 : new (x: T) => string[] > : ^^^^^ ^^ ^^ ^^^^^ >x : T @@ -276,7 +276,7 @@ b2 = a2; // ok >a2 : new (x: number) => string[] > : ^^^^^ ^^ ^^^^^ -var b3: new (x: T) => T; +declare var b3: new (x: T) => T; >b3 : new (x: T) => T > : ^^^^^ ^^ ^^ ^^^^^ >x : T @@ -298,7 +298,7 @@ b3 = a3; // ok >a3 : new (x: number) => void > : ^^^^^ ^^ ^^^^^ -var b4: new (x: T, y: U) => T; +declare var b4: new (x: T, y: U) => T; >b4 : new (x: T, y: U) => T > : ^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >x : T @@ -322,7 +322,7 @@ b4 = a4; // ok >a4 : new (x: string, y: number) => string > : ^^^^^ ^^ ^^ ^^ ^^^^^ -var b5: new (x: (arg: T) => U) => T; +declare var b5: new (x: (arg: T) => U) => T; >b5 : new (x: (arg: T) => U) => T > : ^^^^^ ^^ ^^ ^^ ^^^^^ >x : (arg: T) => U @@ -346,7 +346,7 @@ b5 = a5; // ok >a5 : new (x: (arg: string) => number) => string > : ^^^^^ ^^ ^^^^^ -var b6: new (x: (arg: T) => U) => T; +declare var b6: new (x: (arg: T) => U) => T; >b6 : new (x: (arg: T) => U) => T > : ^^^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^ >x : (arg: T) => U @@ -370,7 +370,7 @@ b6 = a6; // ok >a6 : new (x: (arg: Base) => Derived) => Base > : ^^^^^ ^^ ^^^^^ -var b7: new (x: (arg: T) => U) => (r: T) => U; +declare var b7: new (x: (arg: T) => U) => (r: T) => U; >b7 : new (x: (arg: T) => U) => (r: T) => U > : ^^^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^ >x : (arg: T) => U @@ -396,7 +396,7 @@ b7 = a7; // ok >a7 : new (x: (arg: Base) => Derived) => (r: Base) => Derived > : ^^^^^ ^^ ^^^^^ -var b8: new (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U; +declare var b8: new (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U; >b8 : new (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U > : ^^^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >x : (arg: T) => U @@ -426,7 +426,7 @@ b8 = a8; // ok >a8 : new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived > : ^^^^^ ^^ ^^ ^^ ^^^^^ -var b9: new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; +declare var b9: new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; >b9 : new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U > : ^^^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >x : (arg: T) => U @@ -460,7 +460,7 @@ b9 = a9; // ok >a9 : new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived > : ^^^^^ ^^ ^^ ^^ ^^^^^ -var b10: new (...x: T[]) => T; +declare var b10: new (...x: T[]) => T; >b10 : new (...x: T[]) => T > : ^^^^^ ^^^^^^^^^ ^^^^^ ^^ ^^^^^ >x : T[] @@ -482,7 +482,7 @@ b10 = a10; // ok >a10 : new (...x: Derived[]) => Derived > : ^^^^^^^^ ^^ ^^^^^ -var b11: new (x: T, y: T) => T; +declare var b11: new (x: T, y: T) => T; >b11 : new (x: T, y: T) => T > : ^^^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >x : T @@ -506,7 +506,7 @@ b11 = a11; // ok >a11 : new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base > : ^^^^^ ^^ ^^ ^^ ^^^^^ -var b12: new >(x: Array, y: T) => Array; +declare var b12: new >(x: Array, y: T) => Array; >b12 : new >(x: Array, y: T) => Array > : ^^^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >x : Base[] @@ -530,7 +530,7 @@ b12 = a12; // ok >a12 : new (x: Array, y: Array) => Array > : ^^^^^ ^^ ^^ ^^ ^^^^^ -var b13: new >(x: Array, y: T) => T; +declare var b13: new >(x: Array, y: T) => T; >b13 : new >(x: Array, y: T) => T > : ^^^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >x : Base[] @@ -554,7 +554,7 @@ b13 = a13; // ok >a13 : new (x: Array, y: Array) => Array > : ^^^^^ ^^ ^^ ^^ ^^^^^ -var b14: new (x: { a: T; b: T }) => T; +declare var b14: new (x: { a: T; b: T }) => T; >b14 : new (x: { a: T; b: T; }) => T > : ^^^^^ ^^ ^^ ^^^^^ >x : { a: T; b: T; } @@ -580,7 +580,7 @@ b14 = a14; // ok >a14 : new (x: { a: string; b: number; }) => Object > : ^^^^^ ^^ ^^^^^ -var b15: new (x: T) => T[]; +declare var b15: new (x: T) => T[]; >b15 : new (x: T) => T[] > : ^^^^^ ^^ ^^ ^^^^^ >x : T @@ -602,7 +602,7 @@ b15 = a15; // ok >a15 : { new (x: number): number[]; new (x: string): string[]; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ -var b16: new (x: T) => number[]; +declare var b16: new (x: T) => number[]; >b16 : new (x: T) => number[] > : ^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^ >x : T @@ -624,7 +624,7 @@ b16 = a16; // ok >a16 : { new (x: T): number[]; new (x: U): number[]; } > : ^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^ ^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^ ^^^ -var b17: new (x: new (a: T) => T) => T[]; // ok +declare var b17: new (x: new (a: T) => T) => T[]; // ok >b17 : new (x: new (a: T) => T) => T[] > : ^^^^^ ^^ ^^ ^^^^^ >x : new (a: T) => T @@ -648,7 +648,7 @@ b17 = a17; // ok >a17 : { new (x: new (a: number) => number): number[]; new (x: new (a: string) => string): string[]; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ -var b18: new (x: new (a: T) => T) => T[]; +declare var b18: new (x: new (a: T) => T) => T[]; >b18 : new (x: new (a: T) => T) => T[] > : ^^^^^ ^^ ^^ ^^^^^ >x : new (a: T) => T diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt index 92b02dd683491..ed38e53db46ea 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt @@ -90,18 +90,18 @@ assignmentCompatWithConstructSignatures4.ts(96,9): error TS2322: Type 'new (x namespace WithNonGenericSignaturesInBaseType { // target type with non-generic call signatures - var a2: new (x: number) => string[]; - var a7: new (x: (arg: Base) => Derived) => (r: Base) => Derived2; - var a8: new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; - var a10: new (...x: Base[]) => Base; - var a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base; - var a12: new (x: Array, y: Array) => Array; - var a14: { + declare var a2: new (x: number) => string[]; + declare var a7: new (x: (arg: Base) => Derived) => (r: Base) => Derived2; + declare var a8: new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; + declare var a10: new (...x: Base[]) => Base; + declare var a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base; + declare var a12: new (x: Array, y: Array) => Array; + declare var a14: { new (x: number): number[]; new (x: string): string[]; }; - var a15: new (x: { a: string; b: number }) => number; - var a16: { + declare var a15: new (x: { a: string; b: number }) => number; + declare var a16: { new (x: { new (a: number): number; new (a?: number): number; @@ -111,7 +111,7 @@ assignmentCompatWithConstructSignatures4.ts(96,9): error TS2322: Type 'new (x new (a?: boolean): boolean; }): boolean[]; }; - var a17: { + declare var a17: { new (x: { new (a: T): T; new (a: T): T; @@ -122,16 +122,16 @@ assignmentCompatWithConstructSignatures4.ts(96,9): error TS2322: Type 'new (x }): any[]; }; - var b2: new (x: T) => U[]; + declare var b2: new (x: T) => U[]; a2 = b2; // ok b2 = a2; // ok ~~ !!! error TS2322: Type 'new (x: number) => string[]' is not assignable to type 'new (x: T) => U[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'number'. -!!! related TS2208 assignmentCompatWithConstructSignatures4.ts:43:22: This type parameter might need an `extends number` constraint. +!!! related TS2208 assignmentCompatWithConstructSignatures4.ts:43:30: This type parameter might need an `extends number` constraint. - var b7: new (x: (arg: T) => U) => (r: T) => V; + declare var b7: new (x: (arg: T) => U) => (r: T) => V; a7 = b7; // ok b7 = a7; // ok ~~ @@ -141,7 +141,7 @@ assignmentCompatWithConstructSignatures4.ts(96,9): error TS2322: Type 'new (x !!! error TS2322: Type 'Base' is not assignable to type 'T'. !!! error TS2322: 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. - var b8: new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; + declare var b8: new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; a8 = b8; // error, type mismatch ~~ !!! error TS2322: Type 'new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'. @@ -159,7 +159,7 @@ assignmentCompatWithConstructSignatures4.ts(96,9): error TS2322: Type 'new (x !!! error TS2322: 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. - var b10: new (...x: T[]) => T; + declare var b10: new (...x: T[]) => T; a10 = b10; // ok b10 = a10; // ok ~~~ @@ -167,7 +167,7 @@ assignmentCompatWithConstructSignatures4.ts(96,9): error TS2322: Type 'new (x !!! error TS2322: Type 'Base' is not assignable to type 'T'. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'Base'. - var b11: new (x: T, y: T) => T; + declare var b11: new (x: T, y: T) => T; a11 = b11; // ok b11 = a11; // ok ~~~ @@ -175,7 +175,7 @@ assignmentCompatWithConstructSignatures4.ts(96,9): error TS2322: Type 'new (x !!! error TS2322: Type 'Base' is not assignable to type 'T'. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'Base'. - var b12: new >(x: Array, y: Array) => T; + declare var b12: new >(x: Array, y: Array) => T; a12 = b12; // ok b12 = a12; // ok ~~~ @@ -183,7 +183,7 @@ assignmentCompatWithConstructSignatures4.ts(96,9): error TS2322: Type 'new (x !!! error TS2322: Type 'Derived[]' is not assignable to type 'T'. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'Derived[]'. - var b15: new (x: { a: T; b: T }) => T; + declare var b15: new (x: { a: T; b: T }) => T; a15 = b15; // ok ~~~ !!! error TS2322: Type 'new (x: { a: T; b: T; }) => T' is not assignable to type 'new (x: { a: string; b: number; }) => number'. @@ -198,9 +198,9 @@ assignmentCompatWithConstructSignatures4.ts(96,9): error TS2322: Type 'new (x !!! error TS2322: Type '{ a: T; b: T; }' is not assignable to type '{ a: string; b: number; }'. !!! error TS2322: Types of property 'a' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'string'. -!!! related TS2208 assignmentCompatWithConstructSignatures4.ts:68:23: This type parameter might need an `extends string` constraint. +!!! related TS2208 assignmentCompatWithConstructSignatures4.ts:68:31: This type parameter might need an `extends string` constraint. - var b15a: new (x: { a: T; b: T }) => number; + declare var b15a: new (x: { a: T; b: T }) => number; a15 = b15a; // ok ~~~ !!! error TS2322: Type 'new (x: { a: T; b: T; }) => number' is not assignable to type 'new (x: { a: string; b: number; }) => number'. @@ -217,7 +217,7 @@ assignmentCompatWithConstructSignatures4.ts(96,9): error TS2322: Type 'new (x !!! error TS2322: Type 'T' is not assignable to type 'string'. !!! error TS2322: Type 'Base' is not assignable to type 'string'. - var b16: new (x: (a: T) => T) => T[]; + declare var b16: new (x: (a: T) => T) => T[]; a16 = b16; // error ~~~ !!! error TS2322: Type 'new (x: (a: T) => T) => T[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }'. @@ -231,7 +231,7 @@ assignmentCompatWithConstructSignatures4.ts(96,9): error TS2322: Type 'new (x !!! error TS2322: Type '(a: any) => any' is not assignable to type '{ new (a: number): number; new (a?: number): number; }'. !!! error TS2322: Type '(a: any) => any' provides no match for the signature 'new (a: number): number'. - var b17: new (x: (a: T) => T) => any[]; + declare var b17: new (x: (a: T) => T) => any[]; a17 = b17; // error ~~~ !!! error TS2322: Type 'new (x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }'. @@ -248,8 +248,8 @@ assignmentCompatWithConstructSignatures4.ts(96,9): error TS2322: Type 'new (x namespace WithGenericSignaturesInBaseType { // target type has generic call signature - var a2: new (x: T) => T[]; - var b2: new (x: T) => string[]; + declare var a2: new (x: T) => T[]; + declare var b2: new (x: T) => string[]; a2 = b2; // ok ~~ !!! error TS2322: Type 'new (x: T) => string[]' is not assignable to type 'new (x: T) => T[]'. @@ -261,17 +261,17 @@ assignmentCompatWithConstructSignatures4.ts(96,9): error TS2322: Type 'new (x !!! error TS2322: Type 'new (x: T) => T[]' is not assignable to type 'new (x: T) => string[]'. !!! error TS2322: Type 'T[]' is not assignable to type 'string[]'. !!! error TS2322: Type 'T' is not assignable to type 'string'. -!!! related TS2208 assignmentCompatWithConstructSignatures4.ts:88:22: This type parameter might need an `extends string` constraint. +!!! related TS2208 assignmentCompatWithConstructSignatures4.ts:88:30: This type parameter might need an `extends string` constraint. // target type has generic call signature - var a3: new (x: T) => string[]; - var b3: new (x: T) => T[]; + declare var a3: new (x: T) => string[]; + declare var b3: new (x: T) => T[]; a3 = b3; // ok ~~ !!! error TS2322: Type 'new (x: T) => T[]' is not assignable to type 'new (x: T) => string[]'. !!! error TS2322: Type 'T[]' is not assignable to type 'string[]'. !!! error TS2322: Type 'T' is not assignable to type 'string'. -!!! related TS2208 assignmentCompatWithConstructSignatures4.ts:93:22: This type parameter might need an `extends string` constraint. +!!! related TS2208 assignmentCompatWithConstructSignatures4.ts:93:30: This type parameter might need an `extends string` constraint. b3 = a3; // ok ~~ !!! error TS2322: Type 'new (x: T) => string[]' is not assignable to type 'new (x: T) => T[]'. diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js index 4962d658c18ec..9e3b6c58fc9e3 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js @@ -11,18 +11,18 @@ namespace Errors { namespace WithNonGenericSignaturesInBaseType { // target type with non-generic call signatures - var a2: new (x: number) => string[]; - var a7: new (x: (arg: Base) => Derived) => (r: Base) => Derived2; - var a8: new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; - var a10: new (...x: Base[]) => Base; - var a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base; - var a12: new (x: Array, y: Array) => Array; - var a14: { + declare var a2: new (x: number) => string[]; + declare var a7: new (x: (arg: Base) => Derived) => (r: Base) => Derived2; + declare var a8: new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; + declare var a10: new (...x: Base[]) => Base; + declare var a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base; + declare var a12: new (x: Array, y: Array) => Array; + declare var a14: { new (x: number): number[]; new (x: string): string[]; }; - var a15: new (x: { a: string; b: number }) => number; - var a16: { + declare var a15: new (x: { a: string; b: number }) => number; + declare var a16: { new (x: { new (a: number): number; new (a?: number): number; @@ -32,7 +32,7 @@ namespace Errors { new (a?: boolean): boolean; }): boolean[]; }; - var a17: { + declare var a17: { new (x: { new (a: T): T; new (a: T): T; @@ -43,58 +43,58 @@ namespace Errors { }): any[]; }; - var b2: new (x: T) => U[]; + declare var b2: new (x: T) => U[]; a2 = b2; // ok b2 = a2; // ok - var b7: new (x: (arg: T) => U) => (r: T) => V; + declare var b7: new (x: (arg: T) => U) => (r: T) => V; a7 = b7; // ok b7 = a7; // ok - var b8: new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; + declare var b8: new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; a8 = b8; // error, type mismatch b8 = a8; // error - var b10: new (...x: T[]) => T; + declare var b10: new (...x: T[]) => T; a10 = b10; // ok b10 = a10; // ok - var b11: new (x: T, y: T) => T; + declare var b11: new (x: T, y: T) => T; a11 = b11; // ok b11 = a11; // ok - var b12: new >(x: Array, y: Array) => T; + declare var b12: new >(x: Array, y: Array) => T; a12 = b12; // ok b12 = a12; // ok - var b15: new (x: { a: T; b: T }) => T; + declare var b15: new (x: { a: T; b: T }) => T; a15 = b15; // ok b15 = a15; // ok - var b15a: new (x: { a: T; b: T }) => number; + declare var b15a: new (x: { a: T; b: T }) => number; a15 = b15a; // ok b15a = a15; // ok - var b16: new (x: (a: T) => T) => T[]; + declare var b16: new (x: (a: T) => T) => T[]; a16 = b16; // error b16 = a16; // error - var b17: new (x: (a: T) => T) => any[]; + declare var b17: new (x: (a: T) => T) => any[]; a17 = b17; // error b17 = a17; // error } namespace WithGenericSignaturesInBaseType { // target type has generic call signature - var a2: new (x: T) => T[]; - var b2: new (x: T) => string[]; + declare var a2: new (x: T) => T[]; + declare var b2: new (x: T) => string[]; a2 = b2; // ok b2 = a2; // ok // target type has generic call signature - var a3: new (x: T) => string[]; - var b3: new (x: T) => T[]; + declare var a3: new (x: T) => string[]; + declare var b3: new (x: T) => T[]; a3 = b3; // ok b3 = a3; // ok } @@ -147,58 +147,31 @@ var Errors; }(Base)); var WithNonGenericSignaturesInBaseType; (function (WithNonGenericSignaturesInBaseType) { - // target type with non-generic call signatures - var a2; - var a7; - var a8; - var a10; - var a11; - var a12; - var a14; - var a15; - var a16; - var a17; - var b2; a2 = b2; // ok b2 = a2; // ok - var b7; a7 = b7; // ok b7 = a7; // ok - var b8; a8 = b8; // error, type mismatch b8 = a8; // error - var b10; a10 = b10; // ok b10 = a10; // ok - var b11; a11 = b11; // ok b11 = a11; // ok - var b12; a12 = b12; // ok b12 = a12; // ok - var b15; a15 = b15; // ok b15 = a15; // ok - var b15a; a15 = b15a; // ok b15a = a15; // ok - var b16; a16 = b16; // error b16 = a16; // error - var b17; a17 = b17; // error b17 = a17; // error })(WithNonGenericSignaturesInBaseType || (WithNonGenericSignaturesInBaseType = {})); var WithGenericSignaturesInBaseType; (function (WithGenericSignaturesInBaseType) { - // target type has generic call signature - var a2; - var b2; a2 = b2; // ok b2 = a2; // ok - // target type has generic call signature - var a3; - var b3; a3 = b3; // ok b3 = a3; // ok })(WithGenericSignaturesInBaseType || (WithGenericSignaturesInBaseType = {})); diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.symbols b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.symbols index 7e39e895ef646..8738577394051 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.symbols +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.symbols @@ -29,62 +29,62 @@ namespace Errors { >WithNonGenericSignaturesInBaseType : Symbol(WithNonGenericSignaturesInBaseType, Decl(assignmentCompatWithConstructSignatures4.ts, 6, 53)) // target type with non-generic call signatures - var a2: new (x: number) => string[]; ->a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures4.ts, 10, 11)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 10, 21)) - - var a7: new (x: (arg: Base) => Derived) => (r: Base) => Derived2; ->a7 : Symbol(a7, Decl(assignmentCompatWithConstructSignatures4.ts, 11, 11)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 11, 21)) ->arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures4.ts, 11, 25)) + declare var a2: new (x: number) => string[]; +>a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures4.ts, 10, 19)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 10, 29)) + + declare var a7: new (x: (arg: Base) => Derived) => (r: Base) => Derived2; +>a7 : Symbol(a7, Decl(assignmentCompatWithConstructSignatures4.ts, 11, 19)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 11, 29)) +>arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures4.ts, 11, 33)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures4.ts, 2, 18)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures4.ts, 3, 31)) ->r : Symbol(r, Decl(assignmentCompatWithConstructSignatures4.ts, 11, 52)) +>r : Symbol(r, Decl(assignmentCompatWithConstructSignatures4.ts, 11, 60)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures4.ts, 2, 18)) >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithConstructSignatures4.ts, 4, 47)) - var a8: new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; ->a8 : Symbol(a8, Decl(assignmentCompatWithConstructSignatures4.ts, 12, 11)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 12, 21)) ->arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures4.ts, 12, 25)) + declare var a8: new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; +>a8 : Symbol(a8, Decl(assignmentCompatWithConstructSignatures4.ts, 12, 19)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 12, 29)) +>arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures4.ts, 12, 33)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures4.ts, 2, 18)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures4.ts, 3, 31)) ->y : Symbol(y, Decl(assignmentCompatWithConstructSignatures4.ts, 12, 47)) ->arg2 : Symbol(arg2, Decl(assignmentCompatWithConstructSignatures4.ts, 12, 52)) +>y : Symbol(y, Decl(assignmentCompatWithConstructSignatures4.ts, 12, 55)) +>arg2 : Symbol(arg2, Decl(assignmentCompatWithConstructSignatures4.ts, 12, 60)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures4.ts, 2, 18)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures4.ts, 3, 31)) ->r : Symbol(r, Decl(assignmentCompatWithConstructSignatures4.ts, 12, 80)) +>r : Symbol(r, Decl(assignmentCompatWithConstructSignatures4.ts, 12, 88)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures4.ts, 2, 18)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures4.ts, 3, 31)) - var a10: new (...x: Base[]) => Base; ->a10 : Symbol(a10, Decl(assignmentCompatWithConstructSignatures4.ts, 13, 11)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 13, 22)) + declare var a10: new (...x: Base[]) => Base; +>a10 : Symbol(a10, Decl(assignmentCompatWithConstructSignatures4.ts, 13, 19)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 13, 30)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures4.ts, 2, 18)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures4.ts, 2, 18)) - var a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base; ->a11 : Symbol(a11, Decl(assignmentCompatWithConstructSignatures4.ts, 14, 11)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 14, 22)) ->foo : Symbol(foo, Decl(assignmentCompatWithConstructSignatures4.ts, 14, 26)) ->y : Symbol(y, Decl(assignmentCompatWithConstructSignatures4.ts, 14, 41)) ->foo : Symbol(foo, Decl(assignmentCompatWithConstructSignatures4.ts, 14, 46)) ->bar : Symbol(bar, Decl(assignmentCompatWithConstructSignatures4.ts, 14, 59)) + declare var a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base; +>a11 : Symbol(a11, Decl(assignmentCompatWithConstructSignatures4.ts, 14, 19)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 14, 30)) +>foo : Symbol(foo, Decl(assignmentCompatWithConstructSignatures4.ts, 14, 34)) +>y : Symbol(y, Decl(assignmentCompatWithConstructSignatures4.ts, 14, 49)) +>foo : Symbol(foo, Decl(assignmentCompatWithConstructSignatures4.ts, 14, 54)) +>bar : Symbol(bar, Decl(assignmentCompatWithConstructSignatures4.ts, 14, 67)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures4.ts, 2, 18)) - var a12: new (x: Array, y: Array) => Array; ->a12 : Symbol(a12, Decl(assignmentCompatWithConstructSignatures4.ts, 15, 11)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 15, 22)) + declare var a12: new (x: Array, y: Array) => Array; +>a12 : Symbol(a12, Decl(assignmentCompatWithConstructSignatures4.ts, 15, 19)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 15, 30)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures4.ts, 2, 18)) ->y : Symbol(y, Decl(assignmentCompatWithConstructSignatures4.ts, 15, 37)) +>y : Symbol(y, Decl(assignmentCompatWithConstructSignatures4.ts, 15, 45)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithConstructSignatures4.ts, 4, 47)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures4.ts, 3, 31)) - var a14: { ->a14 : Symbol(a14, Decl(assignmentCompatWithConstructSignatures4.ts, 16, 11)) + declare var a14: { +>a14 : Symbol(a14, Decl(assignmentCompatWithConstructSignatures4.ts, 16, 19)) new (x: number): number[]; >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 17, 21)) @@ -93,14 +93,14 @@ namespace Errors { >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 18, 21)) }; - var a15: new (x: { a: string; b: number }) => number; ->a15 : Symbol(a15, Decl(assignmentCompatWithConstructSignatures4.ts, 20, 11)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 20, 22)) ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures4.ts, 20, 26)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignatures4.ts, 20, 37)) + declare var a15: new (x: { a: string; b: number }) => number; +>a15 : Symbol(a15, Decl(assignmentCompatWithConstructSignatures4.ts, 20, 19)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 20, 30)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures4.ts, 20, 34)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignatures4.ts, 20, 45)) - var a16: { ->a16 : Symbol(a16, Decl(assignmentCompatWithConstructSignatures4.ts, 21, 11)) + declare var a16: { +>a16 : Symbol(a16, Decl(assignmentCompatWithConstructSignatures4.ts, 21, 19)) new (x: { >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 22, 21)) @@ -123,8 +123,8 @@ namespace Errors { }): boolean[]; }; - var a17: { ->a17 : Symbol(a17, Decl(assignmentCompatWithConstructSignatures4.ts, 31, 11)) + declare var a17: { +>a17 : Symbol(a17, Decl(assignmentCompatWithConstructSignatures4.ts, 31, 19)) new (x: { >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 32, 21)) @@ -164,243 +164,243 @@ namespace Errors { }): any[]; }; - var b2: new (x: T) => U[]; ->b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures4.ts, 42, 11)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 42, 21)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures4.ts, 42, 23)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 42, 27)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 42, 21)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures4.ts, 42, 23)) + declare var b2: new (x: T) => U[]; +>b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures4.ts, 42, 19)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 42, 29)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures4.ts, 42, 31)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 42, 35)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 42, 29)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures4.ts, 42, 31)) a2 = b2; // ok ->a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures4.ts, 10, 11)) ->b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures4.ts, 42, 11)) +>a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures4.ts, 10, 19)) +>b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures4.ts, 42, 19)) b2 = a2; // ok ->b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures4.ts, 42, 11)) ->a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures4.ts, 10, 11)) +>b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures4.ts, 42, 19)) +>a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures4.ts, 10, 19)) - var b7: new (x: (arg: T) => U) => (r: T) => V; ->b7 : Symbol(b7, Decl(assignmentCompatWithConstructSignatures4.ts, 46, 11)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 46, 21)) + declare var b7: new (x: (arg: T) => U) => (r: T) => V; +>b7 : Symbol(b7, Decl(assignmentCompatWithConstructSignatures4.ts, 46, 19)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 46, 29)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures4.ts, 2, 18)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures4.ts, 46, 36)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures4.ts, 46, 44)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures4.ts, 3, 31)) ->V : Symbol(V, Decl(assignmentCompatWithConstructSignatures4.ts, 46, 55)) +>V : Symbol(V, Decl(assignmentCompatWithConstructSignatures4.ts, 46, 63)) >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithConstructSignatures4.ts, 4, 47)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 46, 76)) ->arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures4.ts, 46, 80)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 46, 21)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures4.ts, 46, 36)) ->r : Symbol(r, Decl(assignmentCompatWithConstructSignatures4.ts, 46, 98)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 46, 21)) ->V : Symbol(V, Decl(assignmentCompatWithConstructSignatures4.ts, 46, 55)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 46, 84)) +>arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures4.ts, 46, 88)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 46, 29)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures4.ts, 46, 44)) +>r : Symbol(r, Decl(assignmentCompatWithConstructSignatures4.ts, 46, 106)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 46, 29)) +>V : Symbol(V, Decl(assignmentCompatWithConstructSignatures4.ts, 46, 63)) a7 = b7; // ok ->a7 : Symbol(a7, Decl(assignmentCompatWithConstructSignatures4.ts, 11, 11)) ->b7 : Symbol(b7, Decl(assignmentCompatWithConstructSignatures4.ts, 46, 11)) +>a7 : Symbol(a7, Decl(assignmentCompatWithConstructSignatures4.ts, 11, 19)) +>b7 : Symbol(b7, Decl(assignmentCompatWithConstructSignatures4.ts, 46, 19)) b7 = a7; // ok ->b7 : Symbol(b7, Decl(assignmentCompatWithConstructSignatures4.ts, 46, 11)) ->a7 : Symbol(a7, Decl(assignmentCompatWithConstructSignatures4.ts, 11, 11)) +>b7 : Symbol(b7, Decl(assignmentCompatWithConstructSignatures4.ts, 46, 19)) +>a7 : Symbol(a7, Decl(assignmentCompatWithConstructSignatures4.ts, 11, 19)) - var b8: new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; ->b8 : Symbol(b8, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 11)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 21)) + declare var b8: new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; +>b8 : Symbol(b8, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 19)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 29)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures4.ts, 2, 18)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 36)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 44)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures4.ts, 3, 31)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 56)) ->arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 60)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 21)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 36)) ->y : Symbol(y, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 73)) ->arg2 : Symbol(arg2, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 78)) ->foo : Symbol(foo, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 85)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 36)) ->r : Symbol(r, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 112)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 21)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 36)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 64)) +>arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 68)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 29)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 44)) +>y : Symbol(y, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 81)) +>arg2 : Symbol(arg2, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 86)) +>foo : Symbol(foo, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 93)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 44)) +>r : Symbol(r, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 120)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 29)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 44)) a8 = b8; // error, type mismatch ->a8 : Symbol(a8, Decl(assignmentCompatWithConstructSignatures4.ts, 12, 11)) ->b8 : Symbol(b8, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 11)) +>a8 : Symbol(a8, Decl(assignmentCompatWithConstructSignatures4.ts, 12, 19)) +>b8 : Symbol(b8, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 19)) b8 = a8; // error ->b8 : Symbol(b8, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 11)) ->a8 : Symbol(a8, Decl(assignmentCompatWithConstructSignatures4.ts, 12, 11)) +>b8 : Symbol(b8, Decl(assignmentCompatWithConstructSignatures4.ts, 50, 19)) +>a8 : Symbol(a8, Decl(assignmentCompatWithConstructSignatures4.ts, 12, 19)) - var b10: new (...x: T[]) => T; ->b10 : Symbol(b10, Decl(assignmentCompatWithConstructSignatures4.ts, 55, 11)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 55, 22)) + declare var b10: new (...x: T[]) => T; +>b10 : Symbol(b10, Decl(assignmentCompatWithConstructSignatures4.ts, 55, 19)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 55, 30)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures4.ts, 3, 31)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 55, 41)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 55, 22)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 55, 22)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 55, 49)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 55, 30)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 55, 30)) a10 = b10; // ok ->a10 : Symbol(a10, Decl(assignmentCompatWithConstructSignatures4.ts, 13, 11)) ->b10 : Symbol(b10, Decl(assignmentCompatWithConstructSignatures4.ts, 55, 11)) +>a10 : Symbol(a10, Decl(assignmentCompatWithConstructSignatures4.ts, 13, 19)) +>b10 : Symbol(b10, Decl(assignmentCompatWithConstructSignatures4.ts, 55, 19)) b10 = a10; // ok ->b10 : Symbol(b10, Decl(assignmentCompatWithConstructSignatures4.ts, 55, 11)) ->a10 : Symbol(a10, Decl(assignmentCompatWithConstructSignatures4.ts, 13, 11)) +>b10 : Symbol(b10, Decl(assignmentCompatWithConstructSignatures4.ts, 55, 19)) +>a10 : Symbol(a10, Decl(assignmentCompatWithConstructSignatures4.ts, 13, 19)) - var b11: new (x: T, y: T) => T; ->b11 : Symbol(b11, Decl(assignmentCompatWithConstructSignatures4.ts, 59, 11)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 59, 22)) + declare var b11: new (x: T, y: T) => T; +>b11 : Symbol(b11, Decl(assignmentCompatWithConstructSignatures4.ts, 59, 19)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 59, 30)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures4.ts, 3, 31)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 59, 41)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 59, 22)) ->y : Symbol(y, Decl(assignmentCompatWithConstructSignatures4.ts, 59, 46)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 59, 22)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 59, 22)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 59, 49)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 59, 30)) +>y : Symbol(y, Decl(assignmentCompatWithConstructSignatures4.ts, 59, 54)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 59, 30)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 59, 30)) a11 = b11; // ok ->a11 : Symbol(a11, Decl(assignmentCompatWithConstructSignatures4.ts, 14, 11)) ->b11 : Symbol(b11, Decl(assignmentCompatWithConstructSignatures4.ts, 59, 11)) +>a11 : Symbol(a11, Decl(assignmentCompatWithConstructSignatures4.ts, 14, 19)) +>b11 : Symbol(b11, Decl(assignmentCompatWithConstructSignatures4.ts, 59, 19)) b11 = a11; // ok ->b11 : Symbol(b11, Decl(assignmentCompatWithConstructSignatures4.ts, 59, 11)) ->a11 : Symbol(a11, Decl(assignmentCompatWithConstructSignatures4.ts, 14, 11)) +>b11 : Symbol(b11, Decl(assignmentCompatWithConstructSignatures4.ts, 59, 19)) +>a11 : Symbol(a11, Decl(assignmentCompatWithConstructSignatures4.ts, 14, 19)) - var b12: new >(x: Array, y: Array) => T; ->b12 : Symbol(b12, Decl(assignmentCompatWithConstructSignatures4.ts, 63, 11)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 63, 22)) + declare var b12: new >(x: Array, y: Array) => T; +>b12 : Symbol(b12, Decl(assignmentCompatWithConstructSignatures4.ts, 63, 19)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 63, 30)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithConstructSignatures4.ts, 4, 47)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 63, 49)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 63, 57)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures4.ts, 2, 18)) ->y : Symbol(y, Decl(assignmentCompatWithConstructSignatures4.ts, 63, 64)) +>y : Symbol(y, Decl(assignmentCompatWithConstructSignatures4.ts, 63, 72)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures4.ts, 2, 18)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 63, 22)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 63, 30)) a12 = b12; // ok ->a12 : Symbol(a12, Decl(assignmentCompatWithConstructSignatures4.ts, 15, 11)) ->b12 : Symbol(b12, Decl(assignmentCompatWithConstructSignatures4.ts, 63, 11)) +>a12 : Symbol(a12, Decl(assignmentCompatWithConstructSignatures4.ts, 15, 19)) +>b12 : Symbol(b12, Decl(assignmentCompatWithConstructSignatures4.ts, 63, 19)) b12 = a12; // ok ->b12 : Symbol(b12, Decl(assignmentCompatWithConstructSignatures4.ts, 63, 11)) ->a12 : Symbol(a12, Decl(assignmentCompatWithConstructSignatures4.ts, 15, 11)) - - var b15: new (x: { a: T; b: T }) => T; ->b15 : Symbol(b15, Decl(assignmentCompatWithConstructSignatures4.ts, 67, 11)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 67, 22)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 67, 25)) ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures4.ts, 67, 29)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 67, 22)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignatures4.ts, 67, 35)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 67, 22)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 67, 22)) +>b12 : Symbol(b12, Decl(assignmentCompatWithConstructSignatures4.ts, 63, 19)) +>a12 : Symbol(a12, Decl(assignmentCompatWithConstructSignatures4.ts, 15, 19)) + + declare var b15: new (x: { a: T; b: T }) => T; +>b15 : Symbol(b15, Decl(assignmentCompatWithConstructSignatures4.ts, 67, 19)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 67, 30)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 67, 33)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures4.ts, 67, 37)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 67, 30)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignatures4.ts, 67, 43)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 67, 30)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 67, 30)) a15 = b15; // ok ->a15 : Symbol(a15, Decl(assignmentCompatWithConstructSignatures4.ts, 20, 11)) ->b15 : Symbol(b15, Decl(assignmentCompatWithConstructSignatures4.ts, 67, 11)) +>a15 : Symbol(a15, Decl(assignmentCompatWithConstructSignatures4.ts, 20, 19)) +>b15 : Symbol(b15, Decl(assignmentCompatWithConstructSignatures4.ts, 67, 19)) b15 = a15; // ok ->b15 : Symbol(b15, Decl(assignmentCompatWithConstructSignatures4.ts, 67, 11)) ->a15 : Symbol(a15, Decl(assignmentCompatWithConstructSignatures4.ts, 20, 11)) +>b15 : Symbol(b15, Decl(assignmentCompatWithConstructSignatures4.ts, 67, 19)) +>a15 : Symbol(a15, Decl(assignmentCompatWithConstructSignatures4.ts, 20, 19)) - var b15a: new (x: { a: T; b: T }) => number; ->b15a : Symbol(b15a, Decl(assignmentCompatWithConstructSignatures4.ts, 71, 11)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 71, 23)) + declare var b15a: new (x: { a: T; b: T }) => number; +>b15a : Symbol(b15a, Decl(assignmentCompatWithConstructSignatures4.ts, 71, 19)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 71, 31)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures4.ts, 2, 18)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 71, 39)) ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures4.ts, 71, 43)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 71, 23)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignatures4.ts, 71, 49)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 71, 23)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 71, 47)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures4.ts, 71, 51)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 71, 31)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignatures4.ts, 71, 57)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 71, 31)) a15 = b15a; // ok ->a15 : Symbol(a15, Decl(assignmentCompatWithConstructSignatures4.ts, 20, 11)) ->b15a : Symbol(b15a, Decl(assignmentCompatWithConstructSignatures4.ts, 71, 11)) +>a15 : Symbol(a15, Decl(assignmentCompatWithConstructSignatures4.ts, 20, 19)) +>b15a : Symbol(b15a, Decl(assignmentCompatWithConstructSignatures4.ts, 71, 19)) b15a = a15; // ok ->b15a : Symbol(b15a, Decl(assignmentCompatWithConstructSignatures4.ts, 71, 11)) ->a15 : Symbol(a15, Decl(assignmentCompatWithConstructSignatures4.ts, 20, 11)) - - var b16: new (x: (a: T) => T) => T[]; ->b16 : Symbol(b16, Decl(assignmentCompatWithConstructSignatures4.ts, 75, 11)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 75, 22)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 75, 25)) ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures4.ts, 75, 29)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 75, 22)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 75, 22)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 75, 22)) +>b15a : Symbol(b15a, Decl(assignmentCompatWithConstructSignatures4.ts, 71, 19)) +>a15 : Symbol(a15, Decl(assignmentCompatWithConstructSignatures4.ts, 20, 19)) + + declare var b16: new (x: (a: T) => T) => T[]; +>b16 : Symbol(b16, Decl(assignmentCompatWithConstructSignatures4.ts, 75, 19)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 75, 30)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 75, 33)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures4.ts, 75, 37)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 75, 30)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 75, 30)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 75, 30)) a16 = b16; // error ->a16 : Symbol(a16, Decl(assignmentCompatWithConstructSignatures4.ts, 21, 11)) ->b16 : Symbol(b16, Decl(assignmentCompatWithConstructSignatures4.ts, 75, 11)) +>a16 : Symbol(a16, Decl(assignmentCompatWithConstructSignatures4.ts, 21, 19)) +>b16 : Symbol(b16, Decl(assignmentCompatWithConstructSignatures4.ts, 75, 19)) b16 = a16; // error ->b16 : Symbol(b16, Decl(assignmentCompatWithConstructSignatures4.ts, 75, 11)) ->a16 : Symbol(a16, Decl(assignmentCompatWithConstructSignatures4.ts, 21, 11)) +>b16 : Symbol(b16, Decl(assignmentCompatWithConstructSignatures4.ts, 75, 19)) +>a16 : Symbol(a16, Decl(assignmentCompatWithConstructSignatures4.ts, 21, 19)) - var b17: new (x: (a: T) => T) => any[]; ->b17 : Symbol(b17, Decl(assignmentCompatWithConstructSignatures4.ts, 79, 11)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 79, 22)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 79, 25)) ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures4.ts, 79, 29)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 79, 22)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 79, 22)) + declare var b17: new (x: (a: T) => T) => any[]; +>b17 : Symbol(b17, Decl(assignmentCompatWithConstructSignatures4.ts, 79, 19)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 79, 30)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 79, 33)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures4.ts, 79, 37)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 79, 30)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 79, 30)) a17 = b17; // error ->a17 : Symbol(a17, Decl(assignmentCompatWithConstructSignatures4.ts, 31, 11)) ->b17 : Symbol(b17, Decl(assignmentCompatWithConstructSignatures4.ts, 79, 11)) +>a17 : Symbol(a17, Decl(assignmentCompatWithConstructSignatures4.ts, 31, 19)) +>b17 : Symbol(b17, Decl(assignmentCompatWithConstructSignatures4.ts, 79, 19)) b17 = a17; // error ->b17 : Symbol(b17, Decl(assignmentCompatWithConstructSignatures4.ts, 79, 11)) ->a17 : Symbol(a17, Decl(assignmentCompatWithConstructSignatures4.ts, 31, 11)) +>b17 : Symbol(b17, Decl(assignmentCompatWithConstructSignatures4.ts, 79, 19)) +>a17 : Symbol(a17, Decl(assignmentCompatWithConstructSignatures4.ts, 31, 19)) } namespace WithGenericSignaturesInBaseType { >WithGenericSignaturesInBaseType : Symbol(WithGenericSignaturesInBaseType, Decl(assignmentCompatWithConstructSignatures4.ts, 82, 5)) // target type has generic call signature - var a2: new (x: T) => T[]; ->a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures4.ts, 86, 11)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 86, 21)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 86, 24)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 86, 21)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 86, 21)) - - var b2: new (x: T) => string[]; ->b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures4.ts, 87, 11)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 87, 21)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 87, 24)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 87, 21)) + declare var a2: new (x: T) => T[]; +>a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures4.ts, 86, 19)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 86, 29)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 86, 32)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 86, 29)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 86, 29)) + + declare var b2: new (x: T) => string[]; +>b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures4.ts, 87, 19)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 87, 29)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 87, 32)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 87, 29)) a2 = b2; // ok ->a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures4.ts, 86, 11)) ->b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures4.ts, 87, 11)) +>a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures4.ts, 86, 19)) +>b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures4.ts, 87, 19)) b2 = a2; // ok ->b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures4.ts, 87, 11)) ->a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures4.ts, 86, 11)) +>b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures4.ts, 87, 19)) +>a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures4.ts, 86, 19)) // target type has generic call signature - var a3: new (x: T) => string[]; ->a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures4.ts, 92, 11)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 92, 21)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 92, 24)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 92, 21)) - - var b3: new (x: T) => T[]; ->b3 : Symbol(b3, Decl(assignmentCompatWithConstructSignatures4.ts, 93, 11)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 93, 21)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 93, 24)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 93, 21)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 93, 21)) + declare var a3: new (x: T) => string[]; +>a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures4.ts, 92, 19)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 92, 29)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 92, 32)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 92, 29)) + + declare var b3: new (x: T) => T[]; +>b3 : Symbol(b3, Decl(assignmentCompatWithConstructSignatures4.ts, 93, 19)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 93, 29)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures4.ts, 93, 32)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 93, 29)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures4.ts, 93, 29)) a3 = b3; // ok ->a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures4.ts, 92, 11)) ->b3 : Symbol(b3, Decl(assignmentCompatWithConstructSignatures4.ts, 93, 11)) +>a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures4.ts, 92, 19)) +>b3 : Symbol(b3, Decl(assignmentCompatWithConstructSignatures4.ts, 93, 19)) b3 = a3; // ok ->b3 : Symbol(b3, Decl(assignmentCompatWithConstructSignatures4.ts, 93, 11)) ->a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures4.ts, 92, 11)) +>b3 : Symbol(b3, Decl(assignmentCompatWithConstructSignatures4.ts, 93, 19)) +>a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures4.ts, 92, 19)) } } diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.types b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.types index 965689ed74cab..8351243da4be8 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.types +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.types @@ -42,13 +42,13 @@ namespace Errors { > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // target type with non-generic call signatures - var a2: new (x: number) => string[]; + declare var a2: new (x: number) => string[]; >a2 : new (x: number) => string[] > : ^^^^^ ^^ ^^^^^ >x : number > : ^^^^^^ - var a7: new (x: (arg: Base) => Derived) => (r: Base) => Derived2; + declare var a7: new (x: (arg: Base) => Derived) => (r: Base) => Derived2; >a7 : new (x: (arg: Base) => Derived) => (r: Base) => Derived2 > : ^^^^^ ^^ ^^^^^ >x : (arg: Base) => Derived @@ -58,7 +58,7 @@ namespace Errors { >r : Base > : ^^^^ - var a8: new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; + declare var a8: new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; >a8 : new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived > : ^^^^^ ^^ ^^ ^^ ^^^^^ >x : (arg: Base) => Derived @@ -72,13 +72,13 @@ namespace Errors { >r : Base > : ^^^^ - var a10: new (...x: Base[]) => Base; + declare var a10: new (...x: Base[]) => Base; >a10 : new (...x: Base[]) => Base > : ^^^^^^^^ ^^ ^^^^^ >x : Base[] > : ^^^^^^ - var a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base; + declare var a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base; >a11 : new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base > : ^^^^^ ^^ ^^ ^^ ^^^^^ >x : { foo: string; } @@ -92,7 +92,7 @@ namespace Errors { >bar : string > : ^^^^^^ - var a12: new (x: Array, y: Array) => Array; + declare var a12: new (x: Array, y: Array) => Array; >a12 : new (x: Array, y: Array) => Array > : ^^^^^ ^^ ^^ ^^ ^^^^^ >x : Base[] @@ -100,7 +100,7 @@ namespace Errors { >y : Derived2[] > : ^^^^^^^^^^ - var a14: { + declare var a14: { >a14 : { new (x: number): number[]; new (x: string): string[]; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ @@ -113,7 +113,7 @@ namespace Errors { > : ^^^^^^ }; - var a15: new (x: { a: string; b: number }) => number; + declare var a15: new (x: { a: string; b: number }) => number; >a15 : new (x: { a: string; b: number; }) => number > : ^^^^^ ^^ ^^^^^ >x : { a: string; b: number; } @@ -123,7 +123,7 @@ namespace Errors { >b : number > : ^^^^^^ - var a16: { + declare var a16: { >a16 : { new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ @@ -154,7 +154,7 @@ namespace Errors { }): boolean[]; }; - var a17: { + declare var a17: { >a17 : { new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ @@ -186,7 +186,7 @@ namespace Errors { }): any[]; }; - var b2: new (x: T) => U[]; + declare var b2: new (x: T) => U[]; >b2 : new (x: T) => U[] > : ^^^^^ ^^ ^^ ^^ ^^^^^ >x : T @@ -208,7 +208,7 @@ namespace Errors { >a2 : new (x: number) => string[] > : ^^^^^ ^^ ^^^^^ - var b7: new (x: (arg: T) => U) => (r: T) => V; + declare var b7: new (x: (arg: T) => U) => (r: T) => V; >b7 : new (x: (arg: T) => U) => (r: T) => V > : ^^^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^ >x : (arg: T) => U @@ -234,7 +234,7 @@ namespace Errors { >a7 : new (x: (arg: Base) => Derived) => (r: Base) => Derived2 > : ^^^^^ ^^ ^^^^^ - var b8: new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; + declare var b8: new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; >b8 : new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U > : ^^^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >x : (arg: T) => U @@ -267,7 +267,7 @@ namespace Errors { > : ^^^^^ ^^ ^^ ^^ ^^^^^ - var b10: new (...x: T[]) => T; + declare var b10: new (...x: T[]) => T; >b10 : new (...x: T[]) => T > : ^^^^^ ^^^^^^^^^ ^^^^^ ^^ ^^^^^ >x : T[] @@ -289,7 +289,7 @@ namespace Errors { >a10 : new (...x: Base[]) => Base > : ^^^^^^^^ ^^ ^^^^^ - var b11: new (x: T, y: T) => T; + declare var b11: new (x: T, y: T) => T; >b11 : new (x: T, y: T) => T > : ^^^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >x : T @@ -313,7 +313,7 @@ namespace Errors { >a11 : new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base > : ^^^^^ ^^ ^^ ^^ ^^^^^ - var b12: new >(x: Array, y: Array) => T; + declare var b12: new >(x: Array, y: Array) => T; >b12 : new >(x: Array, y: Array) => T > : ^^^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >x : Base[] @@ -337,7 +337,7 @@ namespace Errors { >a12 : new (x: Array, y: Array) => Array > : ^^^^^ ^^ ^^ ^^ ^^^^^ - var b15: new (x: { a: T; b: T }) => T; + declare var b15: new (x: { a: T; b: T }) => T; >b15 : new (x: { a: T; b: T; }) => T > : ^^^^^ ^^ ^^ ^^^^^ >x : { a: T; b: T; } @@ -363,7 +363,7 @@ namespace Errors { >a15 : new (x: { a: string; b: number; }) => number > : ^^^^^ ^^ ^^^^^ - var b15a: new (x: { a: T; b: T }) => number; + declare var b15a: new (x: { a: T; b: T }) => number; >b15a : new (x: { a: T; b: T; }) => number > : ^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^ >x : { a: T; b: T; } @@ -389,7 +389,7 @@ namespace Errors { >a15 : new (x: { a: string; b: number; }) => number > : ^^^^^ ^^ ^^^^^ - var b16: new (x: (a: T) => T) => T[]; + declare var b16: new (x: (a: T) => T) => T[]; >b16 : new (x: (a: T) => T) => T[] > : ^^^^^ ^^ ^^ ^^^^^ >x : (a: T) => T @@ -413,7 +413,7 @@ namespace Errors { >a16 : { new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ - var b17: new (x: (a: T) => T) => any[]; + declare var b17: new (x: (a: T) => T) => any[]; >b17 : new (x: (a: T) => T) => any[] > : ^^^^^ ^^ ^^ ^^^^^ >x : (a: T) => T @@ -443,13 +443,13 @@ namespace Errors { > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // target type has generic call signature - var a2: new (x: T) => T[]; + declare var a2: new (x: T) => T[]; >a2 : new (x: T) => T[] > : ^^^^^ ^^ ^^ ^^^^^ >x : T > : ^ - var b2: new (x: T) => string[]; + declare var b2: new (x: T) => string[]; >b2 : new (x: T) => string[] > : ^^^^^ ^^ ^^ ^^^^^ >x : T @@ -472,13 +472,13 @@ namespace Errors { > : ^^^^^ ^^ ^^ ^^^^^ // target type has generic call signature - var a3: new (x: T) => string[]; + declare var a3: new (x: T) => string[]; >a3 : new (x: T) => string[] > : ^^^^^ ^^ ^^ ^^^^^ >x : T > : ^ - var b3: new (x: T) => T[]; + declare var b3: new (x: T) => T[]; >b3 : new (x: T) => T[] > : ^^^^^ ^^ ^^ ^^^^^ >x : T diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.errors.txt index adb0972082fdb..af7665124c159 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.errors.txt @@ -28,20 +28,20 @@ assignmentCompatWithConstructSignatures5.ts(58,1): error TS2322: Type 'new (x: T) => T[]; - var a2: new (x: T) => string[]; - var a3: new (x: T) => void; - var a4: new (x: T, y: U) => string; - var a5: new (x: new (arg: T) => U) => T; - var a6: new (x: new (arg: T) => Derived) => T; - var a11: new (x: { foo: T }, y: { foo: T; bar: T }) => Base; - var a15: new (x: { a: T; b: T }) => T[]; - var a16: new (x: { a: T; b: T }) => T[]; - var a17: { + declare var a: new (x: T) => T[]; + declare var a2: new (x: T) => string[]; + declare var a3: new (x: T) => void; + declare var a4: new (x: T, y: U) => string; + declare var a5: new (x: new (arg: T) => U) => T; + declare var a6: new (x: new (arg: T) => Derived) => T; + declare var a11: new (x: { foo: T }, y: { foo: T; bar: T }) => Base; + declare var a15: new (x: { a: T; b: T }) => T[]; + declare var a16: new (x: { a: T; b: T }) => T[]; + declare var a17: { new (x: new (a: T) => T): T[]; new (x: new (a: T) => T): T[]; }; - var a18: { + declare var a18: { new (x: { new (a: T): T; new (a: T): T; @@ -52,29 +52,29 @@ assignmentCompatWithConstructSignatures5.ts(58,1): error TS2322: Type 'new (x: T) => T[]; + declare var b: new (x: T) => T[]; a = b; // ok b = a; // ok - var b2: new (x: T) => string[]; + declare var b2: new (x: T) => string[]; a2 = b2; // ok b2 = a2; // ok - var b3: new (x: T) => T; + declare var b3: new (x: T) => T; a3 = b3; // ok b3 = a3; // ok ~~ !!! error TS2322: Type 'new (x: T) => void' is not assignable to type 'new (x: T) => T'. !!! error TS2322: Type 'void' is not assignable to type 'T'. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'void'. - var b4: new (x: T, y: U) => string; + declare var b4: new (x: T, y: U) => string; a4 = b4; // ok b4 = a4; // ok - var b5: new (x: new (arg: T) => U) => T; + declare var b5: new (x: new (arg: T) => U) => T; a5 = b5; // ok b5 = a5; // ok - var b6: new (x: new (arg: T) => U) => T; + declare var b6: new (x: new (arg: T) => U) => T; a6 = b6; // ok b6 = a6; // ok - var b11: new (x: { foo: T }, y: { foo: U; bar: U }) => Base; + declare var b11: new (x: { foo: T }, y: { foo: U; bar: U }) => Base; a11 = b11; // ok b11 = a11; // ok ~~~ @@ -84,8 +84,8 @@ assignmentCompatWithConstructSignatures5.ts(58,1): error TS2322: Type 'new (x: { a: U; b: V; }) => U[]; +!!! related TS2208 assignmentCompatWithConstructSignatures5.ts:50:26: This type parameter might need an `extends T` constraint. + declare var b15: new (x: { a: U; b: V; }) => U[]; a15 = b15; // ok b15 = a15; // ok ~~~ @@ -95,8 +95,8 @@ assignmentCompatWithConstructSignatures5.ts(58,1): error TS2322: Type 'new (x: { a: T; b: T }) => T[]; +!!! related TS2208 assignmentCompatWithConstructSignatures5.ts:53:26: This type parameter might need an `extends U` constraint. + declare var b16: new (x: { a: T; b: T }) => T[]; a15 = b16; // ok b15 = a16; // ok ~~~ @@ -105,11 +105,11 @@ assignmentCompatWithConstructSignatures5.ts(58,1): error TS2322: Type 'new (x: new (a: T) => T) => T[]; +!!! related TS2208 assignmentCompatWithConstructSignatures5.ts:53:23: This type parameter might need an `extends Base` constraint. + declare var b17: new (x: new (a: T) => T) => T[]; a17 = b17; // ok b17 = a17; // ok - var b18: new (x: new (a: T) => T) => any[]; + declare var b18: new (x: new (a: T) => T) => any[]; a18 = b18; // ok b18 = a18; // ok \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js index ccad983de027b..07460f736472f 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js @@ -8,20 +8,20 @@ class Derived extends Base { bar: string; } class Derived2 extends Derived { baz: string; } class OtherDerived extends Base { bing: string; } -var a: new (x: T) => T[]; -var a2: new (x: T) => string[]; -var a3: new (x: T) => void; -var a4: new (x: T, y: U) => string; -var a5: new (x: new (arg: T) => U) => T; -var a6: new (x: new (arg: T) => Derived) => T; -var a11: new (x: { foo: T }, y: { foo: T; bar: T }) => Base; -var a15: new (x: { a: T; b: T }) => T[]; -var a16: new (x: { a: T; b: T }) => T[]; -var a17: { +declare var a: new (x: T) => T[]; +declare var a2: new (x: T) => string[]; +declare var a3: new (x: T) => void; +declare var a4: new (x: T, y: U) => string; +declare var a5: new (x: new (arg: T) => U) => T; +declare var a6: new (x: new (arg: T) => Derived) => T; +declare var a11: new (x: { foo: T }, y: { foo: T; bar: T }) => Base; +declare var a15: new (x: { a: T; b: T }) => T[]; +declare var a16: new (x: { a: T; b: T }) => T[]; +declare var a17: { new (x: new (a: T) => T): T[]; new (x: new (a: T) => T): T[]; }; -var a18: { +declare var a18: { new (x: { new (a: T): T; new (a: T): T; @@ -32,37 +32,37 @@ var a18: { }): any[]; }; -var b: new (x: T) => T[]; +declare var b: new (x: T) => T[]; a = b; // ok b = a; // ok -var b2: new (x: T) => string[]; +declare var b2: new (x: T) => string[]; a2 = b2; // ok b2 = a2; // ok -var b3: new (x: T) => T; +declare var b3: new (x: T) => T; a3 = b3; // ok b3 = a3; // ok -var b4: new (x: T, y: U) => string; +declare var b4: new (x: T, y: U) => string; a4 = b4; // ok b4 = a4; // ok -var b5: new (x: new (arg: T) => U) => T; +declare var b5: new (x: new (arg: T) => U) => T; a5 = b5; // ok b5 = a5; // ok -var b6: new (x: new (arg: T) => U) => T; +declare var b6: new (x: new (arg: T) => U) => T; a6 = b6; // ok b6 = a6; // ok -var b11: new (x: { foo: T }, y: { foo: U; bar: U }) => Base; +declare var b11: new (x: { foo: T }, y: { foo: U; bar: U }) => Base; a11 = b11; // ok b11 = a11; // ok -var b15: new (x: { a: U; b: V; }) => U[]; +declare var b15: new (x: { a: U; b: V; }) => U[]; a15 = b15; // ok b15 = a15; // ok -var b16: new (x: { a: T; b: T }) => T[]; +declare var b16: new (x: { a: T; b: T }) => T[]; a15 = b16; // ok b15 = a16; // ok -var b17: new (x: new (a: T) => T) => T[]; +declare var b17: new (x: new (a: T) => T) => T[]; a17 = b17; // ok b17 = a17; // ok -var b18: new (x: new (a: T) => T) => any[]; +declare var b18: new (x: new (a: T) => T) => any[]; a18 = b18; // ok b18 = a18; // ok @@ -110,47 +110,25 @@ var OtherDerived = /** @class */ (function (_super) { } return OtherDerived; }(Base)); -var a; -var a2; -var a3; -var a4; -var a5; -var a6; -var a11; -var a15; -var a16; -var a17; -var a18; -var b; a = b; // ok b = a; // ok -var b2; a2 = b2; // ok b2 = a2; // ok -var b3; a3 = b3; // ok b3 = a3; // ok -var b4; a4 = b4; // ok b4 = a4; // ok -var b5; a5 = b5; // ok b5 = a5; // ok -var b6; a6 = b6; // ok b6 = a6; // ok -var b11; a11 = b11; // ok b11 = a11; // ok -var b15; a15 = b15; // ok b15 = a15; // ok -var b16; a15 = b16; // ok b15 = a16; // ok -var b17; a17 = b17; // ok b17 = a17; // ok -var b18; a18 = b18; // ok b18 = a18; // ok diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.symbols b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.symbols index fd01679e6a986..f67a6f262820d 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.symbols +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.symbols @@ -22,90 +22,90 @@ class OtherDerived extends Base { bing: string; } >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures5.ts, 0, 0)) >bing : Symbol(OtherDerived.bing, Decl(assignmentCompatWithConstructSignatures5.ts, 5, 33)) -var a: new (x: T) => T[]; ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures5.ts, 7, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 7, 12)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 7, 15)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 7, 12)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 7, 12)) - -var a2: new (x: T) => string[]; ->a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures5.ts, 8, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 8, 13)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 8, 16)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 8, 13)) - -var a3: new (x: T) => void; ->a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures5.ts, 9, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 9, 13)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 9, 16)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 9, 13)) - -var a4: new (x: T, y: U) => string; ->a4 : Symbol(a4, Decl(assignmentCompatWithConstructSignatures5.ts, 10, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 10, 13)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 10, 15)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 10, 19)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 10, 13)) ->y : Symbol(y, Decl(assignmentCompatWithConstructSignatures5.ts, 10, 24)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 10, 15)) - -var a5: new (x: new (arg: T) => U) => T; ->a5 : Symbol(a5, Decl(assignmentCompatWithConstructSignatures5.ts, 11, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 11, 13)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 11, 15)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 11, 19)) ->arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures5.ts, 11, 27)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 11, 13)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 11, 15)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 11, 13)) - -var a6: new (x: new (arg: T) => Derived) => T; ->a6 : Symbol(a6, Decl(assignmentCompatWithConstructSignatures5.ts, 12, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 12, 13)) +declare var a: new (x: T) => T[]; +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures5.ts, 7, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 7, 20)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 7, 23)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 7, 20)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 7, 20)) + +declare var a2: new (x: T) => string[]; +>a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures5.ts, 8, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 8, 21)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 8, 24)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 8, 21)) + +declare var a3: new (x: T) => void; +>a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures5.ts, 9, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 9, 21)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 9, 24)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 9, 21)) + +declare var a4: new (x: T, y: U) => string; +>a4 : Symbol(a4, Decl(assignmentCompatWithConstructSignatures5.ts, 10, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 10, 21)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 10, 23)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 10, 27)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 10, 21)) +>y : Symbol(y, Decl(assignmentCompatWithConstructSignatures5.ts, 10, 32)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 10, 23)) + +declare var a5: new (x: new (arg: T) => U) => T; +>a5 : Symbol(a5, Decl(assignmentCompatWithConstructSignatures5.ts, 11, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 11, 21)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 11, 23)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 11, 27)) +>arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures5.ts, 11, 35)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 11, 21)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 11, 23)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 11, 21)) + +declare var a6: new (x: new (arg: T) => Derived) => T; +>a6 : Symbol(a6, Decl(assignmentCompatWithConstructSignatures5.ts, 12, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 12, 21)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures5.ts, 0, 0)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 12, 29)) ->arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures5.ts, 12, 37)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 12, 13)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 12, 37)) +>arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures5.ts, 12, 45)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 12, 21)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures5.ts, 2, 27)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 12, 13)) - -var a11: new (x: { foo: T }, y: { foo: T; bar: T }) => Base; ->a11 : Symbol(a11, Decl(assignmentCompatWithConstructSignatures5.ts, 13, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 13, 14)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 13, 17)) ->foo : Symbol(foo, Decl(assignmentCompatWithConstructSignatures5.ts, 13, 21)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 13, 14)) ->y : Symbol(y, Decl(assignmentCompatWithConstructSignatures5.ts, 13, 31)) ->foo : Symbol(foo, Decl(assignmentCompatWithConstructSignatures5.ts, 13, 36)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 13, 14)) ->bar : Symbol(bar, Decl(assignmentCompatWithConstructSignatures5.ts, 13, 44)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 13, 14)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 12, 21)) + +declare var a11: new (x: { foo: T }, y: { foo: T; bar: T }) => Base; +>a11 : Symbol(a11, Decl(assignmentCompatWithConstructSignatures5.ts, 13, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 13, 22)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 13, 25)) +>foo : Symbol(foo, Decl(assignmentCompatWithConstructSignatures5.ts, 13, 29)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 13, 22)) +>y : Symbol(y, Decl(assignmentCompatWithConstructSignatures5.ts, 13, 39)) +>foo : Symbol(foo, Decl(assignmentCompatWithConstructSignatures5.ts, 13, 44)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 13, 22)) +>bar : Symbol(bar, Decl(assignmentCompatWithConstructSignatures5.ts, 13, 52)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 13, 22)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures5.ts, 0, 0)) -var a15: new (x: { a: T; b: T }) => T[]; ->a15 : Symbol(a15, Decl(assignmentCompatWithConstructSignatures5.ts, 14, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 14, 14)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 14, 17)) ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures5.ts, 14, 21)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 14, 14)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignatures5.ts, 14, 27)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 14, 14)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 14, 14)) - -var a16: new (x: { a: T; b: T }) => T[]; ->a16 : Symbol(a16, Decl(assignmentCompatWithConstructSignatures5.ts, 15, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 15, 14)) +declare var a15: new (x: { a: T; b: T }) => T[]; +>a15 : Symbol(a15, Decl(assignmentCompatWithConstructSignatures5.ts, 14, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 14, 22)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 14, 25)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures5.ts, 14, 29)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 14, 22)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignatures5.ts, 14, 35)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 14, 22)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 14, 22)) + +declare var a16: new (x: { a: T; b: T }) => T[]; +>a16 : Symbol(a16, Decl(assignmentCompatWithConstructSignatures5.ts, 15, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 15, 22)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures5.ts, 0, 0)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 15, 30)) ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures5.ts, 15, 34)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 15, 14)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignatures5.ts, 15, 40)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 15, 14)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 15, 14)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 15, 38)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures5.ts, 15, 42)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 15, 22)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignatures5.ts, 15, 48)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 15, 22)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 15, 22)) -var a17: { ->a17 : Symbol(a17, Decl(assignmentCompatWithConstructSignatures5.ts, 16, 3)) +declare var a17: { +>a17 : Symbol(a17, Decl(assignmentCompatWithConstructSignatures5.ts, 16, 11)) new (x: new (a: T) => T): T[]; >T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 17, 9)) @@ -126,8 +126,8 @@ var a17: { >T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 18, 9)) }; -var a18: { ->a18 : Symbol(a18, Decl(assignmentCompatWithConstructSignatures5.ts, 20, 3)) +declare var a18: { +>a18 : Symbol(a18, Decl(assignmentCompatWithConstructSignatures5.ts, 20, 11)) new (x: { >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 21, 9)) @@ -167,194 +167,194 @@ var a18: { }): any[]; }; -var b: new (x: T) => T[]; ->b : Symbol(b, Decl(assignmentCompatWithConstructSignatures5.ts, 31, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 31, 12)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 31, 15)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 31, 12)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 31, 12)) +declare var b: new (x: T) => T[]; +>b : Symbol(b, Decl(assignmentCompatWithConstructSignatures5.ts, 31, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 31, 20)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 31, 23)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 31, 20)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 31, 20)) a = b; // ok ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures5.ts, 7, 3)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignatures5.ts, 31, 3)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures5.ts, 7, 11)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignatures5.ts, 31, 11)) b = a; // ok ->b : Symbol(b, Decl(assignmentCompatWithConstructSignatures5.ts, 31, 3)) ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures5.ts, 7, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignatures5.ts, 31, 11)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures5.ts, 7, 11)) -var b2: new (x: T) => string[]; ->b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures5.ts, 34, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 34, 13)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 34, 16)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 34, 13)) +declare var b2: new (x: T) => string[]; +>b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures5.ts, 34, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 34, 21)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 34, 24)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 34, 21)) a2 = b2; // ok ->a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures5.ts, 8, 3)) ->b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures5.ts, 34, 3)) +>a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures5.ts, 8, 11)) +>b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures5.ts, 34, 11)) b2 = a2; // ok ->b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures5.ts, 34, 3)) ->a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures5.ts, 8, 3)) +>b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures5.ts, 34, 11)) +>a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures5.ts, 8, 11)) -var b3: new (x: T) => T; ->b3 : Symbol(b3, Decl(assignmentCompatWithConstructSignatures5.ts, 37, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 37, 13)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 37, 16)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 37, 13)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 37, 13)) +declare var b3: new (x: T) => T; +>b3 : Symbol(b3, Decl(assignmentCompatWithConstructSignatures5.ts, 37, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 37, 21)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 37, 24)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 37, 21)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 37, 21)) a3 = b3; // ok ->a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures5.ts, 9, 3)) ->b3 : Symbol(b3, Decl(assignmentCompatWithConstructSignatures5.ts, 37, 3)) +>a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures5.ts, 9, 11)) +>b3 : Symbol(b3, Decl(assignmentCompatWithConstructSignatures5.ts, 37, 11)) b3 = a3; // ok ->b3 : Symbol(b3, Decl(assignmentCompatWithConstructSignatures5.ts, 37, 3)) ->a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures5.ts, 9, 3)) - -var b4: new (x: T, y: U) => string; ->b4 : Symbol(b4, Decl(assignmentCompatWithConstructSignatures5.ts, 40, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 40, 13)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 40, 15)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 40, 19)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 40, 13)) ->y : Symbol(y, Decl(assignmentCompatWithConstructSignatures5.ts, 40, 24)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 40, 15)) +>b3 : Symbol(b3, Decl(assignmentCompatWithConstructSignatures5.ts, 37, 11)) +>a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures5.ts, 9, 11)) + +declare var b4: new (x: T, y: U) => string; +>b4 : Symbol(b4, Decl(assignmentCompatWithConstructSignatures5.ts, 40, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 40, 21)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 40, 23)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 40, 27)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 40, 21)) +>y : Symbol(y, Decl(assignmentCompatWithConstructSignatures5.ts, 40, 32)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 40, 23)) a4 = b4; // ok ->a4 : Symbol(a4, Decl(assignmentCompatWithConstructSignatures5.ts, 10, 3)) ->b4 : Symbol(b4, Decl(assignmentCompatWithConstructSignatures5.ts, 40, 3)) +>a4 : Symbol(a4, Decl(assignmentCompatWithConstructSignatures5.ts, 10, 11)) +>b4 : Symbol(b4, Decl(assignmentCompatWithConstructSignatures5.ts, 40, 11)) b4 = a4; // ok ->b4 : Symbol(b4, Decl(assignmentCompatWithConstructSignatures5.ts, 40, 3)) ->a4 : Symbol(a4, Decl(assignmentCompatWithConstructSignatures5.ts, 10, 3)) - -var b5: new (x: new (arg: T) => U) => T; ->b5 : Symbol(b5, Decl(assignmentCompatWithConstructSignatures5.ts, 43, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 43, 13)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 43, 15)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 43, 19)) ->arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures5.ts, 43, 27)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 43, 13)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 43, 15)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 43, 13)) +>b4 : Symbol(b4, Decl(assignmentCompatWithConstructSignatures5.ts, 40, 11)) +>a4 : Symbol(a4, Decl(assignmentCompatWithConstructSignatures5.ts, 10, 11)) + +declare var b5: new (x: new (arg: T) => U) => T; +>b5 : Symbol(b5, Decl(assignmentCompatWithConstructSignatures5.ts, 43, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 43, 21)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 43, 23)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 43, 27)) +>arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures5.ts, 43, 35)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 43, 21)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 43, 23)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 43, 21)) a5 = b5; // ok ->a5 : Symbol(a5, Decl(assignmentCompatWithConstructSignatures5.ts, 11, 3)) ->b5 : Symbol(b5, Decl(assignmentCompatWithConstructSignatures5.ts, 43, 3)) +>a5 : Symbol(a5, Decl(assignmentCompatWithConstructSignatures5.ts, 11, 11)) +>b5 : Symbol(b5, Decl(assignmentCompatWithConstructSignatures5.ts, 43, 11)) b5 = a5; // ok ->b5 : Symbol(b5, Decl(assignmentCompatWithConstructSignatures5.ts, 43, 3)) ->a5 : Symbol(a5, Decl(assignmentCompatWithConstructSignatures5.ts, 11, 3)) +>b5 : Symbol(b5, Decl(assignmentCompatWithConstructSignatures5.ts, 43, 11)) +>a5 : Symbol(a5, Decl(assignmentCompatWithConstructSignatures5.ts, 11, 11)) -var b6: new (x: new (arg: T) => U) => T; ->b6 : Symbol(b6, Decl(assignmentCompatWithConstructSignatures5.ts, 46, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 46, 13)) +declare var b6: new (x: new (arg: T) => U) => T; +>b6 : Symbol(b6, Decl(assignmentCompatWithConstructSignatures5.ts, 46, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 46, 21)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures5.ts, 0, 0)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 46, 28)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 46, 36)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures5.ts, 2, 27)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 46, 48)) ->arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures5.ts, 46, 56)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 46, 13)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 46, 28)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 46, 13)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 46, 56)) +>arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures5.ts, 46, 64)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 46, 21)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 46, 36)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 46, 21)) a6 = b6; // ok ->a6 : Symbol(a6, Decl(assignmentCompatWithConstructSignatures5.ts, 12, 3)) ->b6 : Symbol(b6, Decl(assignmentCompatWithConstructSignatures5.ts, 46, 3)) +>a6 : Symbol(a6, Decl(assignmentCompatWithConstructSignatures5.ts, 12, 11)) +>b6 : Symbol(b6, Decl(assignmentCompatWithConstructSignatures5.ts, 46, 11)) b6 = a6; // ok ->b6 : Symbol(b6, Decl(assignmentCompatWithConstructSignatures5.ts, 46, 3)) ->a6 : Symbol(a6, Decl(assignmentCompatWithConstructSignatures5.ts, 12, 3)) - -var b11: new (x: { foo: T }, y: { foo: U; bar: U }) => Base; ->b11 : Symbol(b11, Decl(assignmentCompatWithConstructSignatures5.ts, 49, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 49, 14)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 49, 16)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 49, 20)) ->foo : Symbol(foo, Decl(assignmentCompatWithConstructSignatures5.ts, 49, 24)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 49, 14)) ->y : Symbol(y, Decl(assignmentCompatWithConstructSignatures5.ts, 49, 34)) ->foo : Symbol(foo, Decl(assignmentCompatWithConstructSignatures5.ts, 49, 39)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 49, 16)) ->bar : Symbol(bar, Decl(assignmentCompatWithConstructSignatures5.ts, 49, 47)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 49, 16)) +>b6 : Symbol(b6, Decl(assignmentCompatWithConstructSignatures5.ts, 46, 11)) +>a6 : Symbol(a6, Decl(assignmentCompatWithConstructSignatures5.ts, 12, 11)) + +declare var b11: new (x: { foo: T }, y: { foo: U; bar: U }) => Base; +>b11 : Symbol(b11, Decl(assignmentCompatWithConstructSignatures5.ts, 49, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 49, 22)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 49, 24)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 49, 28)) +>foo : Symbol(foo, Decl(assignmentCompatWithConstructSignatures5.ts, 49, 32)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 49, 22)) +>y : Symbol(y, Decl(assignmentCompatWithConstructSignatures5.ts, 49, 42)) +>foo : Symbol(foo, Decl(assignmentCompatWithConstructSignatures5.ts, 49, 47)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 49, 24)) +>bar : Symbol(bar, Decl(assignmentCompatWithConstructSignatures5.ts, 49, 55)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 49, 24)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures5.ts, 0, 0)) a11 = b11; // ok ->a11 : Symbol(a11, Decl(assignmentCompatWithConstructSignatures5.ts, 13, 3)) ->b11 : Symbol(b11, Decl(assignmentCompatWithConstructSignatures5.ts, 49, 3)) +>a11 : Symbol(a11, Decl(assignmentCompatWithConstructSignatures5.ts, 13, 11)) +>b11 : Symbol(b11, Decl(assignmentCompatWithConstructSignatures5.ts, 49, 11)) b11 = a11; // ok ->b11 : Symbol(b11, Decl(assignmentCompatWithConstructSignatures5.ts, 49, 3)) ->a11 : Symbol(a11, Decl(assignmentCompatWithConstructSignatures5.ts, 13, 3)) - -var b15: new (x: { a: U; b: V; }) => U[]; ->b15 : Symbol(b15, Decl(assignmentCompatWithConstructSignatures5.ts, 52, 3)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 52, 14)) ->V : Symbol(V, Decl(assignmentCompatWithConstructSignatures5.ts, 52, 16)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 52, 20)) ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures5.ts, 52, 24)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 52, 14)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignatures5.ts, 52, 30)) ->V : Symbol(V, Decl(assignmentCompatWithConstructSignatures5.ts, 52, 16)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 52, 14)) +>b11 : Symbol(b11, Decl(assignmentCompatWithConstructSignatures5.ts, 49, 11)) +>a11 : Symbol(a11, Decl(assignmentCompatWithConstructSignatures5.ts, 13, 11)) + +declare var b15: new (x: { a: U; b: V; }) => U[]; +>b15 : Symbol(b15, Decl(assignmentCompatWithConstructSignatures5.ts, 52, 11)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 52, 22)) +>V : Symbol(V, Decl(assignmentCompatWithConstructSignatures5.ts, 52, 24)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 52, 28)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures5.ts, 52, 32)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 52, 22)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignatures5.ts, 52, 38)) +>V : Symbol(V, Decl(assignmentCompatWithConstructSignatures5.ts, 52, 24)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures5.ts, 52, 22)) a15 = b15; // ok ->a15 : Symbol(a15, Decl(assignmentCompatWithConstructSignatures5.ts, 14, 3)) ->b15 : Symbol(b15, Decl(assignmentCompatWithConstructSignatures5.ts, 52, 3)) +>a15 : Symbol(a15, Decl(assignmentCompatWithConstructSignatures5.ts, 14, 11)) +>b15 : Symbol(b15, Decl(assignmentCompatWithConstructSignatures5.ts, 52, 11)) b15 = a15; // ok ->b15 : Symbol(b15, Decl(assignmentCompatWithConstructSignatures5.ts, 52, 3)) ->a15 : Symbol(a15, Decl(assignmentCompatWithConstructSignatures5.ts, 14, 3)) - -var b16: new (x: { a: T; b: T }) => T[]; ->b16 : Symbol(b16, Decl(assignmentCompatWithConstructSignatures5.ts, 55, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 55, 14)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 55, 17)) ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures5.ts, 55, 21)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 55, 14)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignatures5.ts, 55, 27)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 55, 14)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 55, 14)) +>b15 : Symbol(b15, Decl(assignmentCompatWithConstructSignatures5.ts, 52, 11)) +>a15 : Symbol(a15, Decl(assignmentCompatWithConstructSignatures5.ts, 14, 11)) + +declare var b16: new (x: { a: T; b: T }) => T[]; +>b16 : Symbol(b16, Decl(assignmentCompatWithConstructSignatures5.ts, 55, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 55, 22)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 55, 25)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures5.ts, 55, 29)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 55, 22)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignatures5.ts, 55, 35)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 55, 22)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 55, 22)) a15 = b16; // ok ->a15 : Symbol(a15, Decl(assignmentCompatWithConstructSignatures5.ts, 14, 3)) ->b16 : Symbol(b16, Decl(assignmentCompatWithConstructSignatures5.ts, 55, 3)) +>a15 : Symbol(a15, Decl(assignmentCompatWithConstructSignatures5.ts, 14, 11)) +>b16 : Symbol(b16, Decl(assignmentCompatWithConstructSignatures5.ts, 55, 11)) b15 = a16; // ok ->b15 : Symbol(b15, Decl(assignmentCompatWithConstructSignatures5.ts, 52, 3)) ->a16 : Symbol(a16, Decl(assignmentCompatWithConstructSignatures5.ts, 15, 3)) - -var b17: new (x: new (a: T) => T) => T[]; ->b17 : Symbol(b17, Decl(assignmentCompatWithConstructSignatures5.ts, 58, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 58, 14)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 58, 17)) ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures5.ts, 58, 25)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 58, 14)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 58, 14)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 58, 14)) +>b15 : Symbol(b15, Decl(assignmentCompatWithConstructSignatures5.ts, 52, 11)) +>a16 : Symbol(a16, Decl(assignmentCompatWithConstructSignatures5.ts, 15, 11)) + +declare var b17: new (x: new (a: T) => T) => T[]; +>b17 : Symbol(b17, Decl(assignmentCompatWithConstructSignatures5.ts, 58, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 58, 22)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 58, 25)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures5.ts, 58, 33)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 58, 22)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 58, 22)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 58, 22)) a17 = b17; // ok ->a17 : Symbol(a17, Decl(assignmentCompatWithConstructSignatures5.ts, 16, 3)) ->b17 : Symbol(b17, Decl(assignmentCompatWithConstructSignatures5.ts, 58, 3)) +>a17 : Symbol(a17, Decl(assignmentCompatWithConstructSignatures5.ts, 16, 11)) +>b17 : Symbol(b17, Decl(assignmentCompatWithConstructSignatures5.ts, 58, 11)) b17 = a17; // ok ->b17 : Symbol(b17, Decl(assignmentCompatWithConstructSignatures5.ts, 58, 3)) ->a17 : Symbol(a17, Decl(assignmentCompatWithConstructSignatures5.ts, 16, 3)) +>b17 : Symbol(b17, Decl(assignmentCompatWithConstructSignatures5.ts, 58, 11)) +>a17 : Symbol(a17, Decl(assignmentCompatWithConstructSignatures5.ts, 16, 11)) -var b18: new (x: new (a: T) => T) => any[]; ->b18 : Symbol(b18, Decl(assignmentCompatWithConstructSignatures5.ts, 61, 3)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 61, 14)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 61, 22)) ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures5.ts, 61, 25)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 61, 22)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 61, 22)) +declare var b18: new (x: new (a: T) => T) => any[]; +>b18 : Symbol(b18, Decl(assignmentCompatWithConstructSignatures5.ts, 61, 11)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures5.ts, 61, 22)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 61, 30)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures5.ts, 61, 33)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 61, 30)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures5.ts, 61, 30)) a18 = b18; // ok ->a18 : Symbol(a18, Decl(assignmentCompatWithConstructSignatures5.ts, 20, 3)) ->b18 : Symbol(b18, Decl(assignmentCompatWithConstructSignatures5.ts, 61, 3)) +>a18 : Symbol(a18, Decl(assignmentCompatWithConstructSignatures5.ts, 20, 11)) +>b18 : Symbol(b18, Decl(assignmentCompatWithConstructSignatures5.ts, 61, 11)) b18 = a18; // ok ->b18 : Symbol(b18, Decl(assignmentCompatWithConstructSignatures5.ts, 61, 3)) ->a18 : Symbol(a18, Decl(assignmentCompatWithConstructSignatures5.ts, 20, 3)) +>b18 : Symbol(b18, Decl(assignmentCompatWithConstructSignatures5.ts, 61, 11)) +>a18 : Symbol(a18, Decl(assignmentCompatWithConstructSignatures5.ts, 20, 11)) diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.types b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.types index 9d799dad6853c..2b0ddea033e96 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.types +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.types @@ -33,25 +33,25 @@ class OtherDerived extends Base { bing: string; } >bing : string > : ^^^^^^ -var a: new (x: T) => T[]; +declare var a: new (x: T) => T[]; >a : new (x: T) => T[] > : ^^^^^ ^^ ^^ ^^^^^ >x : T > : ^ -var a2: new (x: T) => string[]; +declare var a2: new (x: T) => string[]; >a2 : new (x: T) => string[] > : ^^^^^ ^^ ^^ ^^^^^ >x : T > : ^ -var a3: new (x: T) => void; +declare var a3: new (x: T) => void; >a3 : new (x: T) => void > : ^^^^^ ^^ ^^ ^^^^^ >x : T > : ^ -var a4: new (x: T, y: U) => string; +declare var a4: new (x: T, y: U) => string; >a4 : new (x: T, y: U) => string > : ^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >x : T @@ -59,7 +59,7 @@ var a4: new (x: T, y: U) => string; >y : U > : ^ -var a5: new (x: new (arg: T) => U) => T; +declare var a5: new (x: new (arg: T) => U) => T; >a5 : new (x: new (arg: T) => U) => T > : ^^^^^ ^^ ^^ ^^ ^^^^^ >x : new (arg: T) => U @@ -67,7 +67,7 @@ var a5: new (x: new (arg: T) => U) => T; >arg : T > : ^ -var a6: new (x: new (arg: T) => Derived) => T; +declare var a6: new (x: new (arg: T) => Derived) => T; >a6 : new (x: new (arg: T) => Derived) => T > : ^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^ >x : new (arg: T) => Derived @@ -75,7 +75,7 @@ var a6: new (x: new (arg: T) => Derived) => T; >arg : T > : ^ -var a11: new (x: { foo: T }, y: { foo: T; bar: T }) => Base; +declare var a11: new (x: { foo: T }, y: { foo: T; bar: T }) => Base; >a11 : new (x: { foo: T; }, y: { foo: T; bar: T; }) => Base > : ^^^^^ ^^ ^^ ^^ ^^ ^^^^^ >x : { foo: T; } @@ -89,7 +89,7 @@ var a11: new (x: { foo: T }, y: { foo: T; bar: T }) => Base; >bar : T > : ^ -var a15: new (x: { a: T; b: T }) => T[]; +declare var a15: new (x: { a: T; b: T }) => T[]; >a15 : new (x: { a: T; b: T; }) => T[] > : ^^^^^ ^^ ^^ ^^^^^ >x : { a: T; b: T; } @@ -99,7 +99,7 @@ var a15: new (x: { a: T; b: T }) => T[]; >b : T > : ^ -var a16: new (x: { a: T; b: T }) => T[]; +declare var a16: new (x: { a: T; b: T }) => T[]; >a16 : new (x: { a: T; b: T; }) => T[] > : ^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^ >x : { a: T; b: T; } @@ -109,7 +109,7 @@ var a16: new (x: { a: T; b: T }) => T[]; >b : T > : ^ -var a17: { +declare var a17: { >a17 : { new (x: new (a: T) => T): T[]; new (x: new (a: T) => T): T[]; } > : ^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^ ^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^ ^^^ @@ -126,7 +126,7 @@ var a17: { > : ^ }; -var a18: { +declare var a18: { >a18 : { new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; } > : ^^^^^^^ ^^ ^^^ ^^^^^^^ ^^ ^^^ ^^^ @@ -158,7 +158,7 @@ var a18: { }): any[]; }; -var b: new (x: T) => T[]; +declare var b: new (x: T) => T[]; >b : new (x: T) => T[] > : ^^^^^ ^^ ^^ ^^^^^ >x : T @@ -180,7 +180,7 @@ b = a; // ok >a : new (x: T) => T[] > : ^^^^^ ^^ ^^ ^^^^^ -var b2: new (x: T) => string[]; +declare var b2: new (x: T) => string[]; >b2 : new (x: T) => string[] > : ^^^^^ ^^ ^^ ^^^^^ >x : T @@ -202,7 +202,7 @@ b2 = a2; // ok >a2 : new (x: T) => string[] > : ^^^^^ ^^ ^^ ^^^^^ -var b3: new (x: T) => T; +declare var b3: new (x: T) => T; >b3 : new (x: T) => T > : ^^^^^ ^^ ^^ ^^^^^ >x : T @@ -224,7 +224,7 @@ b3 = a3; // ok >a3 : new (x: T) => void > : ^^^^^ ^^ ^^ ^^^^^ -var b4: new (x: T, y: U) => string; +declare var b4: new (x: T, y: U) => string; >b4 : new (x: T, y: U) => string > : ^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >x : T @@ -248,7 +248,7 @@ b4 = a4; // ok >a4 : new (x: T, y: U) => string > : ^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ -var b5: new (x: new (arg: T) => U) => T; +declare var b5: new (x: new (arg: T) => U) => T; >b5 : new (x: new (arg: T) => U) => T > : ^^^^^ ^^ ^^ ^^ ^^^^^ >x : new (arg: T) => U @@ -272,7 +272,7 @@ b5 = a5; // ok >a5 : new (x: new (arg: T) => U) => T > : ^^^^^ ^^ ^^ ^^ ^^^^^ -var b6: new (x: new (arg: T) => U) => T; +declare var b6: new (x: new (arg: T) => U) => T; >b6 : new (x: new (arg: T) => U) => T > : ^^^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^ >x : new (arg: T) => U @@ -296,7 +296,7 @@ b6 = a6; // ok >a6 : new (x: new (arg: T) => Derived) => T > : ^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^ -var b11: new (x: { foo: T }, y: { foo: U; bar: U }) => Base; +declare var b11: new (x: { foo: T }, y: { foo: U; bar: U }) => Base; >b11 : new (x: { foo: T; }, y: { foo: U; bar: U; }) => Base > : ^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >x : { foo: T; } @@ -326,7 +326,7 @@ b11 = a11; // ok >a11 : new (x: { foo: T; }, y: { foo: T; bar: T; }) => Base > : ^^^^^ ^^ ^^ ^^ ^^ ^^^^^ -var b15: new (x: { a: U; b: V; }) => U[]; +declare var b15: new (x: { a: U; b: V; }) => U[]; >b15 : new (x: { a: U; b: V; }) => U[] > : ^^^^^ ^^ ^^ ^^ ^^^^^ >x : { a: U; b: V; } @@ -352,7 +352,7 @@ b15 = a15; // ok >a15 : new (x: { a: T; b: T; }) => T[] > : ^^^^^ ^^ ^^ ^^^^^ -var b16: new (x: { a: T; b: T }) => T[]; +declare var b16: new (x: { a: T; b: T }) => T[]; >b16 : new (x: { a: T; b: T; }) => T[] > : ^^^^^ ^^ ^^ ^^^^^ >x : { a: T; b: T; } @@ -378,7 +378,7 @@ b15 = a16; // ok >a16 : new (x: { a: T; b: T; }) => T[] > : ^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^ -var b17: new (x: new (a: T) => T) => T[]; +declare var b17: new (x: new (a: T) => T) => T[]; >b17 : new (x: new (a: T) => T) => T[] > : ^^^^^ ^^ ^^ ^^^^^ >x : new (a: T) => T @@ -402,7 +402,7 @@ b17 = a17; // ok >a17 : { new (x: new (a: T) => T): T[]; new (x: new (a: T) => T): T[]; } > : ^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^ ^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^ ^^^ -var b18: new (x: new (a: T) => T) => any[]; +declare var b18: new (x: new (a: T) => T) => any[]; >b18 : new (x: new (a: T) => T) => any[] > : ^^^^^ ^^ ^^^^^ >x : new (a: T) => T diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.errors.txt index 59034ca10b03f..15c7c64f04863 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.errors.txt @@ -34,28 +34,28 @@ assignmentCompatWithConstructSignatures6.ts(42,1): error TS2322: Type 'new (x: { a: T; b: T }) => T[]; } - var x: A; + declare var x: A; - var b: new (x: T) => T[]; + declare var b: new (x: T) => T[]; x.a = b; b = x.a; - var b2: new (x: T) => string[]; + declare var b2: new (x: T) => string[]; x.a2 = b2; b2 = x.a2; - var b3: new (x: T) => T; + declare var b3: new (x: T) => T; x.a3 = b3; b3 = x.a3; ~~ !!! error TS2322: Type 'new (x: T) => void' is not assignable to type 'new (x: T) => T'. !!! error TS2322: Type 'void' is not assignable to type 'T'. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'void'. - var b4: new (x: T, y: U) => string; + declare var b4: new (x: T, y: U) => string; x.a4 = b4; b4 = x.a4; - var b5: new (x: (arg: T) => U) => T; + declare var b5: new (x: (arg: T) => U) => T; x.a5 = b5; b5 = x.a5; - var b11: new (x: { foo: T }, y: { foo: U; bar: U }) => Base; + declare var b11: new (x: { foo: T }, y: { foo: U; bar: U }) => Base; x.a11 = b11; b11 = x.a11; ~~~ @@ -65,8 +65,8 @@ assignmentCompatWithConstructSignatures6.ts(42,1): error TS2322: Type 'new (x: { a: T; b: T }) => T[]; +!!! related TS2208 assignmentCompatWithConstructSignatures6.ts:37:26: This type parameter might need an `extends T` constraint. + declare var b16: new (x: { a: T; b: T }) => T[]; x.a16 = b16; b16 = x.a16; ~~~ @@ -75,4 +75,4 @@ assignmentCompatWithConstructSignatures6.ts(42,1): error TS2322: Type 'new (x: { a: T; b: T }) => T[]; } -var x: A; +declare var x: A; -var b: new (x: T) => T[]; +declare var b: new (x: T) => T[]; x.a = b; b = x.a; -var b2: new (x: T) => string[]; +declare var b2: new (x: T) => string[]; x.a2 = b2; b2 = x.a2; -var b3: new (x: T) => T; +declare var b3: new (x: T) => T; x.a3 = b3; b3 = x.a3; -var b4: new (x: T, y: U) => string; +declare var b4: new (x: T, y: U) => string; x.a4 = b4; b4 = x.a4; -var b5: new (x: (arg: T) => U) => T; +declare var b5: new (x: (arg: T) => U) => T; x.a5 = b5; b5 = x.a5; -var b11: new (x: { foo: T }, y: { foo: U; bar: U }) => Base; +declare var b11: new (x: { foo: T }, y: { foo: U; bar: U }) => Base; x.a11 = b11; b11 = x.a11; -var b16: new (x: { a: T; b: T }) => T[]; +declare var b16: new (x: { a: T; b: T }) => T[]; x.a16 = b16; b16 = x.a16; @@ -87,25 +87,17 @@ var OtherDerived = /** @class */ (function (_super) { } return OtherDerived; }(Base)); -var x; -var b; x.a = b; b = x.a; -var b2; x.a2 = b2; b2 = x.a2; -var b3; x.a3 = b3; b3 = x.a3; -var b4; x.a4 = b4; b4 = x.a4; -var b5; x.a5 = b5; b5 = x.a5; -var b11; x.a11 = b11; b11 = x.a11; -var b16; x.a16 = b16; b16 = x.a16; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.symbols b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.symbols index eaac9f33e7099..2a46dc531de2a 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.symbols +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.symbols @@ -108,154 +108,154 @@ interface A { >T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 16, 14)) } -var x: A; ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 3)) +declare var x: A; +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 11)) >A : Symbol(A, Decl(assignmentCompatWithConstructSignatures6.ts, 5, 49)) -var b: new (x: T) => T[]; ->b : Symbol(b, Decl(assignmentCompatWithConstructSignatures6.ts, 21, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 21, 12)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 21, 15)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 21, 12)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 21, 12)) +declare var b: new (x: T) => T[]; +>b : Symbol(b, Decl(assignmentCompatWithConstructSignatures6.ts, 21, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 21, 20)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 21, 23)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 21, 20)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 21, 20)) x.a = b; >x.a : Symbol(A.a, Decl(assignmentCompatWithConstructSignatures6.ts, 7, 13)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 3)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 11)) >a : Symbol(A.a, Decl(assignmentCompatWithConstructSignatures6.ts, 7, 13)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignatures6.ts, 21, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignatures6.ts, 21, 11)) b = x.a; ->b : Symbol(b, Decl(assignmentCompatWithConstructSignatures6.ts, 21, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignatures6.ts, 21, 11)) >x.a : Symbol(A.a, Decl(assignmentCompatWithConstructSignatures6.ts, 7, 13)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 3)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 11)) >a : Symbol(A.a, Decl(assignmentCompatWithConstructSignatures6.ts, 7, 13)) -var b2: new (x: T) => string[]; ->b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures6.ts, 24, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 24, 13)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 24, 16)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 24, 13)) +declare var b2: new (x: T) => string[]; +>b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures6.ts, 24, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 24, 21)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 24, 24)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 24, 21)) x.a2 = b2; >x.a2 : Symbol(A.a2, Decl(assignmentCompatWithConstructSignatures6.ts, 8, 28)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 3)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 11)) >a2 : Symbol(A.a2, Decl(assignmentCompatWithConstructSignatures6.ts, 8, 28)) ->b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures6.ts, 24, 3)) +>b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures6.ts, 24, 11)) b2 = x.a2; ->b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures6.ts, 24, 3)) +>b2 : Symbol(b2, Decl(assignmentCompatWithConstructSignatures6.ts, 24, 11)) >x.a2 : Symbol(A.a2, Decl(assignmentCompatWithConstructSignatures6.ts, 8, 28)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 3)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 11)) >a2 : Symbol(A.a2, Decl(assignmentCompatWithConstructSignatures6.ts, 8, 28)) -var b3: new (x: T) => T; ->b3 : Symbol(b3, Decl(assignmentCompatWithConstructSignatures6.ts, 27, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 27, 13)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 27, 16)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 27, 13)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 27, 13)) +declare var b3: new (x: T) => T; +>b3 : Symbol(b3, Decl(assignmentCompatWithConstructSignatures6.ts, 27, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 27, 21)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 27, 24)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 27, 21)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 27, 21)) x.a3 = b3; >x.a3 : Symbol(A.a3, Decl(assignmentCompatWithConstructSignatures6.ts, 9, 34)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 3)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 11)) >a3 : Symbol(A.a3, Decl(assignmentCompatWithConstructSignatures6.ts, 9, 34)) ->b3 : Symbol(b3, Decl(assignmentCompatWithConstructSignatures6.ts, 27, 3)) +>b3 : Symbol(b3, Decl(assignmentCompatWithConstructSignatures6.ts, 27, 11)) b3 = x.a3; ->b3 : Symbol(b3, Decl(assignmentCompatWithConstructSignatures6.ts, 27, 3)) +>b3 : Symbol(b3, Decl(assignmentCompatWithConstructSignatures6.ts, 27, 11)) >x.a3 : Symbol(A.a3, Decl(assignmentCompatWithConstructSignatures6.ts, 9, 34)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 3)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 11)) >a3 : Symbol(A.a3, Decl(assignmentCompatWithConstructSignatures6.ts, 9, 34)) -var b4: new (x: T, y: U) => string; ->b4 : Symbol(b4, Decl(assignmentCompatWithConstructSignatures6.ts, 30, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 30, 13)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures6.ts, 30, 15)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 30, 19)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 30, 13)) ->y : Symbol(y, Decl(assignmentCompatWithConstructSignatures6.ts, 30, 24)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures6.ts, 30, 15)) +declare var b4: new (x: T, y: U) => string; +>b4 : Symbol(b4, Decl(assignmentCompatWithConstructSignatures6.ts, 30, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 30, 21)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures6.ts, 30, 23)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 30, 27)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 30, 21)) +>y : Symbol(y, Decl(assignmentCompatWithConstructSignatures6.ts, 30, 32)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures6.ts, 30, 23)) x.a4 = b4; >x.a4 : Symbol(A.a4, Decl(assignmentCompatWithConstructSignatures6.ts, 10, 30)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 3)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 11)) >a4 : Symbol(A.a4, Decl(assignmentCompatWithConstructSignatures6.ts, 10, 30)) ->b4 : Symbol(b4, Decl(assignmentCompatWithConstructSignatures6.ts, 30, 3)) +>b4 : Symbol(b4, Decl(assignmentCompatWithConstructSignatures6.ts, 30, 11)) b4 = x.a4; ->b4 : Symbol(b4, Decl(assignmentCompatWithConstructSignatures6.ts, 30, 3)) +>b4 : Symbol(b4, Decl(assignmentCompatWithConstructSignatures6.ts, 30, 11)) >x.a4 : Symbol(A.a4, Decl(assignmentCompatWithConstructSignatures6.ts, 10, 30)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 3)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 11)) >a4 : Symbol(A.a4, Decl(assignmentCompatWithConstructSignatures6.ts, 10, 30)) -var b5: new (x: (arg: T) => U) => T; ->b5 : Symbol(b5, Decl(assignmentCompatWithConstructSignatures6.ts, 33, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 33, 13)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures6.ts, 33, 15)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 33, 19)) ->arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures6.ts, 33, 23)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 33, 13)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures6.ts, 33, 15)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 33, 13)) +declare var b5: new (x: (arg: T) => U) => T; +>b5 : Symbol(b5, Decl(assignmentCompatWithConstructSignatures6.ts, 33, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 33, 21)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures6.ts, 33, 23)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 33, 27)) +>arg : Symbol(arg, Decl(assignmentCompatWithConstructSignatures6.ts, 33, 31)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 33, 21)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures6.ts, 33, 23)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 33, 21)) x.a5 = b5; >x.a5 : Symbol(A.a5, Decl(assignmentCompatWithConstructSignatures6.ts, 11, 41)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 3)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 11)) >a5 : Symbol(A.a5, Decl(assignmentCompatWithConstructSignatures6.ts, 11, 41)) ->b5 : Symbol(b5, Decl(assignmentCompatWithConstructSignatures6.ts, 33, 3)) +>b5 : Symbol(b5, Decl(assignmentCompatWithConstructSignatures6.ts, 33, 11)) b5 = x.a5; ->b5 : Symbol(b5, Decl(assignmentCompatWithConstructSignatures6.ts, 33, 3)) +>b5 : Symbol(b5, Decl(assignmentCompatWithConstructSignatures6.ts, 33, 11)) >x.a5 : Symbol(A.a5, Decl(assignmentCompatWithConstructSignatures6.ts, 11, 41)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 3)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 11)) >a5 : Symbol(A.a5, Decl(assignmentCompatWithConstructSignatures6.ts, 11, 41)) -var b11: new (x: { foo: T }, y: { foo: U; bar: U }) => Base; ->b11 : Symbol(b11, Decl(assignmentCompatWithConstructSignatures6.ts, 36, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 36, 14)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures6.ts, 36, 16)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 36, 20)) ->foo : Symbol(foo, Decl(assignmentCompatWithConstructSignatures6.ts, 36, 24)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 36, 14)) ->y : Symbol(y, Decl(assignmentCompatWithConstructSignatures6.ts, 36, 34)) ->foo : Symbol(foo, Decl(assignmentCompatWithConstructSignatures6.ts, 36, 39)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures6.ts, 36, 16)) ->bar : Symbol(bar, Decl(assignmentCompatWithConstructSignatures6.ts, 36, 47)) ->U : Symbol(U, Decl(assignmentCompatWithConstructSignatures6.ts, 36, 16)) +declare var b11: new (x: { foo: T }, y: { foo: U; bar: U }) => Base; +>b11 : Symbol(b11, Decl(assignmentCompatWithConstructSignatures6.ts, 36, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 36, 22)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures6.ts, 36, 24)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 36, 28)) +>foo : Symbol(foo, Decl(assignmentCompatWithConstructSignatures6.ts, 36, 32)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 36, 22)) +>y : Symbol(y, Decl(assignmentCompatWithConstructSignatures6.ts, 36, 42)) +>foo : Symbol(foo, Decl(assignmentCompatWithConstructSignatures6.ts, 36, 47)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures6.ts, 36, 24)) +>bar : Symbol(bar, Decl(assignmentCompatWithConstructSignatures6.ts, 36, 55)) +>U : Symbol(U, Decl(assignmentCompatWithConstructSignatures6.ts, 36, 24)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures6.ts, 0, 0)) x.a11 = b11; >x.a11 : Symbol(A.a11, Decl(assignmentCompatWithConstructSignatures6.ts, 13, 58)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 3)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 11)) >a11 : Symbol(A.a11, Decl(assignmentCompatWithConstructSignatures6.ts, 13, 58)) ->b11 : Symbol(b11, Decl(assignmentCompatWithConstructSignatures6.ts, 36, 3)) +>b11 : Symbol(b11, Decl(assignmentCompatWithConstructSignatures6.ts, 36, 11)) b11 = x.a11; ->b11 : Symbol(b11, Decl(assignmentCompatWithConstructSignatures6.ts, 36, 3)) +>b11 : Symbol(b11, Decl(assignmentCompatWithConstructSignatures6.ts, 36, 11)) >x.a11 : Symbol(A.a11, Decl(assignmentCompatWithConstructSignatures6.ts, 13, 58)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 3)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 11)) >a11 : Symbol(A.a11, Decl(assignmentCompatWithConstructSignatures6.ts, 13, 58)) -var b16: new (x: { a: T; b: T }) => T[]; ->b16 : Symbol(b16, Decl(assignmentCompatWithConstructSignatures6.ts, 39, 3)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 39, 14)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 39, 17)) ->a : Symbol(a, Decl(assignmentCompatWithConstructSignatures6.ts, 39, 21)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 39, 14)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignatures6.ts, 39, 27)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 39, 14)) ->T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 39, 14)) +declare var b16: new (x: { a: T; b: T }) => T[]; +>b16 : Symbol(b16, Decl(assignmentCompatWithConstructSignatures6.ts, 39, 11)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 39, 22)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 39, 25)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures6.ts, 39, 29)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 39, 22)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignatures6.ts, 39, 35)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 39, 22)) +>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures6.ts, 39, 22)) x.a16 = b16; >x.a16 : Symbol(A.a16, Decl(assignmentCompatWithConstructSignatures6.ts, 15, 43)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 3)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 11)) >a16 : Symbol(A.a16, Decl(assignmentCompatWithConstructSignatures6.ts, 15, 43)) ->b16 : Symbol(b16, Decl(assignmentCompatWithConstructSignatures6.ts, 39, 3)) +>b16 : Symbol(b16, Decl(assignmentCompatWithConstructSignatures6.ts, 39, 11)) b16 = x.a16; ->b16 : Symbol(b16, Decl(assignmentCompatWithConstructSignatures6.ts, 39, 3)) +>b16 : Symbol(b16, Decl(assignmentCompatWithConstructSignatures6.ts, 39, 11)) >x.a16 : Symbol(A.a16, Decl(assignmentCompatWithConstructSignatures6.ts, 15, 43)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 3)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures6.ts, 19, 11)) >a16 : Symbol(A.a16, Decl(assignmentCompatWithConstructSignatures6.ts, 15, 43)) diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.types b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.types index 49e305196573a..67473dac8dcd0 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.types +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.types @@ -111,11 +111,11 @@ interface A { > : ^ } -var x: A; +declare var x: A; >x : A > : ^ -var b: new (x: T) => T[]; +declare var b: new (x: T) => T[]; >b : new (x: T) => T[] > : ^^^^^ ^^ ^^ ^^^^^ >x : T @@ -145,7 +145,7 @@ b = x.a; >a : new (x: T) => T[] > : ^^^^^ ^^ ^^ ^^^^^ -var b2: new (x: T) => string[]; +declare var b2: new (x: T) => string[]; >b2 : new (x: T) => string[] > : ^^^^^ ^^ ^^ ^^^^^ >x : T @@ -175,7 +175,7 @@ b2 = x.a2; >a2 : new (x: T) => string[] > : ^^^^^ ^^ ^^ ^^^^^ -var b3: new (x: T) => T; +declare var b3: new (x: T) => T; >b3 : new (x: T) => T > : ^^^^^ ^^ ^^ ^^^^^ >x : T @@ -205,7 +205,7 @@ b3 = x.a3; >a3 : new (x: T) => void > : ^^^^^ ^^ ^^ ^^^^^ -var b4: new (x: T, y: U) => string; +declare var b4: new (x: T, y: U) => string; >b4 : new (x: T, y: U) => string > : ^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >x : T @@ -237,7 +237,7 @@ b4 = x.a4; >a4 : new (x: T, y: U) => string > : ^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ -var b5: new (x: (arg: T) => U) => T; +declare var b5: new (x: (arg: T) => U) => T; >b5 : new (x: (arg: T) => U) => T > : ^^^^^ ^^ ^^ ^^ ^^^^^ >x : (arg: T) => U @@ -269,7 +269,7 @@ b5 = x.a5; >a5 : new (x: (arg: T) => U) => T > : ^^^^^ ^^ ^^ ^^ ^^^^^ -var b11: new (x: { foo: T }, y: { foo: U; bar: U }) => Base; +declare var b11: new (x: { foo: T }, y: { foo: U; bar: U }) => Base; >b11 : new (x: { foo: T; }, y: { foo: U; bar: U; }) => Base > : ^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >x : { foo: T; } @@ -307,7 +307,7 @@ b11 = x.a11; >a11 : new (x: { foo: T; }, y: { foo: T; bar: T; }) => Base > : ^^^^^ ^^ ^^ ^^ ^^ ^^^^^ -var b16: new (x: { a: T; b: T }) => T[]; +declare var b16: new (x: { a: T; b: T }) => T[]; >b16 : new (x: { a: T; b: T; }) => T[] > : ^^^^^ ^^ ^^ ^^^^^ >x : { a: T; b: T; } diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.errors.txt index 61495aa38b9f2..1ce4f49f737b9 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.errors.txt @@ -21,9 +21,9 @@ assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(35,5): error TS a5: new (x?: number, y?: number) => number; a6: new (x: number, y: number) => number; } - var b: Base; + declare var b: Base; - var a: new () => number; + declare var a: new () => number; a = b.a; // ok a = b.a2; // ok a = b.a3; // error @@ -40,7 +40,7 @@ assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(35,5): error TS !!! error TS2322: Type 'new (x: number, y: number) => number' is not assignable to type 'new () => number'. !!! error TS2322: Target signature provides too few arguments. Expected 2 or more, but got 0. - var a2: new (x?: number) => number; + declare var a2: new (x?: number) => number; a2 = b.a; // ok a2 = b.a2; // ok a2 = b.a3; // ok @@ -51,7 +51,7 @@ assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(35,5): error TS !!! error TS2322: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x?: number) => number'. !!! error TS2322: Target signature provides too few arguments. Expected 2 or more, but got 1. - var a3: new (x: number) => number; + declare var a3: new (x: number) => number; a3 = b.a; // ok a3 = b.a2; // ok a3 = b.a3; // ok @@ -62,7 +62,7 @@ assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(35,5): error TS !!! error TS2322: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x: number) => number'. !!! error TS2322: Target signature provides too few arguments. Expected 2 or more, but got 1. - var a4: new (x: number, y?: number) => number; + declare var a4: new (x: number, y?: number) => number; a4 = b.a; // ok a4 = b.a2; // ok a4 = b.a3; // ok @@ -70,7 +70,7 @@ assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(35,5): error TS a4 = b.a5; // ok a4 = b.a6; // ok - var a5: new (x?: number, y?: number) => number; + declare var a5: new (x?: number, y?: number) => number; a5 = b.a; // ok a5 = b.a2; // ok a5 = b.a3; // ok diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.js b/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.js index 11b24bc4902be..c5c90eb13e1f4 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.js @@ -11,9 +11,9 @@ interface Base { a5: new (x?: number, y?: number) => number; a6: new (x: number, y: number) => number; } -var b: Base; +declare var b: Base; -var a: new () => number; +declare var a: new () => number; a = b.a; // ok a = b.a2; // ok a = b.a3; // error @@ -21,7 +21,7 @@ var a: new () => number; a = b.a5; // ok a = b.a6; // error -var a2: new (x?: number) => number; +declare var a2: new (x?: number) => number; a2 = b.a; // ok a2 = b.a2; // ok a2 = b.a3; // ok @@ -29,7 +29,7 @@ var a2: new (x?: number) => number; a2 = b.a5; // ok a2 = b.a6; // error -var a3: new (x: number) => number; +declare var a3: new (x: number) => number; a3 = b.a; // ok a3 = b.a2; // ok a3 = b.a3; // ok @@ -37,7 +37,7 @@ var a3: new (x: number) => number; a3 = b.a5; // ok a3 = b.a6; // error -var a4: new (x: number, y?: number) => number; +declare var a4: new (x: number, y?: number) => number; a4 = b.a; // ok a4 = b.a2; // ok a4 = b.a3; // ok @@ -45,7 +45,7 @@ var a4: new (x: number, y?: number) => number; a4 = b.a5; // ok a4 = b.a6; // ok -var a5: new (x?: number, y?: number) => number; +declare var a5: new (x?: number, y?: number) => number; a5 = b.a; // ok a5 = b.a2; // ok a5 = b.a3; // ok @@ -56,36 +56,30 @@ var a5: new (x?: number, y?: number) => number; //// [assignmentCompatWithConstructSignaturesWithOptionalParameters.js] // call signatures in derived types must have the same or fewer optional parameters as the base type -var b; -var a; a = b.a; // ok a = b.a2; // ok a = b.a3; // error a = b.a4; // error a = b.a5; // ok a = b.a6; // error -var a2; a2 = b.a; // ok a2 = b.a2; // ok a2 = b.a3; // ok a2 = b.a4; // ok a2 = b.a5; // ok a2 = b.a6; // error -var a3; a3 = b.a; // ok a3 = b.a2; // ok a3 = b.a3; // ok a3 = b.a4; // ok a3 = b.a5; // ok a3 = b.a6; // error -var a4; a4 = b.a; // ok a4 = b.a2; // ok a4 = b.a3; // ok a4 = b.a4; // ok a4 = b.a5; // ok a4 = b.a6; // ok -var a5; a5 = b.a; // ok a5 = b.a2; // ok a5 = b.a3; // ok diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.symbols b/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.symbols index f560ccf052345..9b8508d870414 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.symbols +++ b/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.symbols @@ -32,208 +32,208 @@ interface Base { >x : Symbol(x, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 8, 13)) >y : Symbol(y, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 8, 23)) } -var b: Base; ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +declare var b: Base; +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 0, 0)) -var a: new () => number; ->a : Symbol(a, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 12, 3)) +declare var a: new () => number; +>a : Symbol(a, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 12, 11)) a = b.a; // ok ->a : Symbol(a, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 12, 3)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 12, 11)) >b.a : Symbol(Base.a, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 2, 16)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a : Symbol(Base.a, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 2, 16)) a = b.a2; // ok ->a : Symbol(a, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 12, 3)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 12, 11)) >b.a2 : Symbol(Base.a2, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 3, 24)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a2 : Symbol(Base.a2, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 3, 24)) a = b.a3; // error ->a : Symbol(a, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 12, 3)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 12, 11)) >b.a3 : Symbol(Base.a3, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 4, 35)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a3 : Symbol(Base.a3, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 4, 35)) a = b.a4; // error ->a : Symbol(a, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 12, 3)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 12, 11)) >b.a4 : Symbol(Base.a4, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 5, 34)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a4 : Symbol(Base.a4, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 5, 34)) a = b.a5; // ok ->a : Symbol(a, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 12, 3)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 12, 11)) >b.a5 : Symbol(Base.a5, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 6, 46)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a5 : Symbol(Base.a5, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 6, 46)) a = b.a6; // error ->a : Symbol(a, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 12, 3)) +>a : Symbol(a, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 12, 11)) >b.a6 : Symbol(Base.a6, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 7, 47)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a6 : Symbol(Base.a6, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 7, 47)) -var a2: new (x?: number) => number; ->a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 20, 3)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 20, 13)) +declare var a2: new (x?: number) => number; +>a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 20, 11)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 20, 21)) a2 = b.a; // ok ->a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 20, 3)) +>a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 20, 11)) >b.a : Symbol(Base.a, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 2, 16)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a : Symbol(Base.a, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 2, 16)) a2 = b.a2; // ok ->a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 20, 3)) +>a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 20, 11)) >b.a2 : Symbol(Base.a2, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 3, 24)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a2 : Symbol(Base.a2, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 3, 24)) a2 = b.a3; // ok ->a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 20, 3)) +>a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 20, 11)) >b.a3 : Symbol(Base.a3, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 4, 35)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a3 : Symbol(Base.a3, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 4, 35)) a2 = b.a4; // ok ->a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 20, 3)) +>a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 20, 11)) >b.a4 : Symbol(Base.a4, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 5, 34)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a4 : Symbol(Base.a4, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 5, 34)) a2 = b.a5; // ok ->a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 20, 3)) +>a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 20, 11)) >b.a5 : Symbol(Base.a5, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 6, 46)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a5 : Symbol(Base.a5, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 6, 46)) a2 = b.a6; // error ->a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 20, 3)) +>a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 20, 11)) >b.a6 : Symbol(Base.a6, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 7, 47)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a6 : Symbol(Base.a6, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 7, 47)) -var a3: new (x: number) => number; ->a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 28, 3)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 28, 13)) +declare var a3: new (x: number) => number; +>a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 28, 11)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 28, 21)) a3 = b.a; // ok ->a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 28, 3)) +>a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 28, 11)) >b.a : Symbol(Base.a, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 2, 16)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a : Symbol(Base.a, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 2, 16)) a3 = b.a2; // ok ->a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 28, 3)) +>a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 28, 11)) >b.a2 : Symbol(Base.a2, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 3, 24)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a2 : Symbol(Base.a2, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 3, 24)) a3 = b.a3; // ok ->a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 28, 3)) +>a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 28, 11)) >b.a3 : Symbol(Base.a3, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 4, 35)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a3 : Symbol(Base.a3, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 4, 35)) a3 = b.a4; // ok ->a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 28, 3)) +>a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 28, 11)) >b.a4 : Symbol(Base.a4, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 5, 34)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a4 : Symbol(Base.a4, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 5, 34)) a3 = b.a5; // ok ->a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 28, 3)) +>a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 28, 11)) >b.a5 : Symbol(Base.a5, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 6, 46)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a5 : Symbol(Base.a5, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 6, 46)) a3 = b.a6; // error ->a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 28, 3)) +>a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 28, 11)) >b.a6 : Symbol(Base.a6, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 7, 47)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a6 : Symbol(Base.a6, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 7, 47)) -var a4: new (x: number, y?: number) => number; ->a4 : Symbol(a4, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 36, 3)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 36, 13)) ->y : Symbol(y, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 36, 23)) +declare var a4: new (x: number, y?: number) => number; +>a4 : Symbol(a4, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 36, 11)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 36, 21)) +>y : Symbol(y, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 36, 31)) a4 = b.a; // ok ->a4 : Symbol(a4, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 36, 3)) +>a4 : Symbol(a4, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 36, 11)) >b.a : Symbol(Base.a, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 2, 16)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a : Symbol(Base.a, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 2, 16)) a4 = b.a2; // ok ->a4 : Symbol(a4, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 36, 3)) +>a4 : Symbol(a4, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 36, 11)) >b.a2 : Symbol(Base.a2, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 3, 24)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a2 : Symbol(Base.a2, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 3, 24)) a4 = b.a3; // ok ->a4 : Symbol(a4, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 36, 3)) +>a4 : Symbol(a4, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 36, 11)) >b.a3 : Symbol(Base.a3, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 4, 35)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a3 : Symbol(Base.a3, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 4, 35)) a4 = b.a4; // ok ->a4 : Symbol(a4, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 36, 3)) +>a4 : Symbol(a4, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 36, 11)) >b.a4 : Symbol(Base.a4, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 5, 34)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a4 : Symbol(Base.a4, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 5, 34)) a4 = b.a5; // ok ->a4 : Symbol(a4, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 36, 3)) +>a4 : Symbol(a4, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 36, 11)) >b.a5 : Symbol(Base.a5, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 6, 46)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a5 : Symbol(Base.a5, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 6, 46)) a4 = b.a6; // ok ->a4 : Symbol(a4, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 36, 3)) +>a4 : Symbol(a4, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 36, 11)) >b.a6 : Symbol(Base.a6, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 7, 47)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a6 : Symbol(Base.a6, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 7, 47)) -var a5: new (x?: number, y?: number) => number; ->a5 : Symbol(a5, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 44, 3)) ->x : Symbol(x, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 44, 13)) ->y : Symbol(y, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 44, 24)) +declare var a5: new (x?: number, y?: number) => number; +>a5 : Symbol(a5, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 44, 11)) +>x : Symbol(x, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 44, 21)) +>y : Symbol(y, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 44, 32)) a5 = b.a; // ok ->a5 : Symbol(a5, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 44, 3)) +>a5 : Symbol(a5, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 44, 11)) >b.a : Symbol(Base.a, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 2, 16)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a : Symbol(Base.a, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 2, 16)) a5 = b.a2; // ok ->a5 : Symbol(a5, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 44, 3)) +>a5 : Symbol(a5, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 44, 11)) >b.a2 : Symbol(Base.a2, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 3, 24)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a2 : Symbol(Base.a2, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 3, 24)) a5 = b.a3; // ok ->a5 : Symbol(a5, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 44, 3)) +>a5 : Symbol(a5, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 44, 11)) >b.a3 : Symbol(Base.a3, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 4, 35)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a3 : Symbol(Base.a3, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 4, 35)) a5 = b.a4; // ok ->a5 : Symbol(a5, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 44, 3)) +>a5 : Symbol(a5, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 44, 11)) >b.a4 : Symbol(Base.a4, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 5, 34)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a4 : Symbol(Base.a4, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 5, 34)) a5 = b.a5; // ok ->a5 : Symbol(a5, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 44, 3)) +>a5 : Symbol(a5, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 44, 11)) >b.a5 : Symbol(Base.a5, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 6, 46)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a5 : Symbol(Base.a5, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 6, 46)) a5 = b.a6; // ok ->a5 : Symbol(a5, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 44, 3)) +>a5 : Symbol(a5, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 44, 11)) >b.a6 : Symbol(Base.a6, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 7, 47)) ->b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 10, 11)) >a6 : Symbol(Base.a6, Decl(assignmentCompatWithConstructSignaturesWithOptionalParameters.ts, 7, 47)) diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.types b/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.types index aa239f7b8fc06..3db3af3d51d63 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.types +++ b/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.types @@ -44,11 +44,11 @@ interface Base { >y : number > : ^^^^^^ } -var b: Base; +declare var b: Base; >b : Base > : ^^^^ -var a: new () => number; +declare var a: new () => number; >a : new () => number > : ^^^^^^^^^^ @@ -124,7 +124,7 @@ var a: new () => number; >a6 : new (x: number, y: number) => number > : ^^^^^ ^^ ^^ ^^ ^^^^^ -var a2: new (x?: number) => number; +declare var a2: new (x?: number) => number; >a2 : new (x?: number) => number > : ^^^^^ ^^^ ^^^^^ >x : number @@ -202,7 +202,7 @@ var a2: new (x?: number) => number; >a6 : new (x: number, y: number) => number > : ^^^^^ ^^ ^^ ^^ ^^^^^ -var a3: new (x: number) => number; +declare var a3: new (x: number) => number; >a3 : new (x: number) => number > : ^^^^^ ^^ ^^^^^ >x : number @@ -280,7 +280,7 @@ var a3: new (x: number) => number; >a6 : new (x: number, y: number) => number > : ^^^^^ ^^ ^^ ^^ ^^^^^ -var a4: new (x: number, y?: number) => number; +declare var a4: new (x: number, y?: number) => number; >a4 : new (x: number, y?: number) => number > : ^^^^^ ^^ ^^ ^^^ ^^^^^ >x : number @@ -360,7 +360,7 @@ var a4: new (x: number, y?: number) => number; >a6 : new (x: number, y: number) => number > : ^^^^^ ^^ ^^ ^^ ^^^^^ -var a5: new (x?: number, y?: number) => number; +declare var a5: new (x?: number, y?: number) => number; >a5 : new (x?: number, y?: number) => number > : ^^^^^ ^^^ ^^ ^^^ ^^^^^ >x : number diff --git a/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.errors.txt b/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.errors.txt index 91f79a95e46a5..d843b963b6239 100644 --- a/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.errors.txt @@ -131,7 +131,7 @@ assignmentCompatWithDiscriminatedUnion.ts(82,5): error TS2322: Type 'S' is not a } const a: Style2 = { type: "A", data: "whatevs" }; - let b: Style1; + declare let b: Style1; a.type; // "A" | "B" b.type; // "A" | "B" b = a; // should be assignable diff --git a/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.js b/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.js index 97fb4a9d2b1a6..5d9d2a9f8bea9 100644 --- a/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.js +++ b/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.js @@ -101,7 +101,7 @@ namespace GH14865 { } const a: Style2 = { type: "A", data: "whatevs" }; - let b: Style1; + declare let b: Style1; a.type; // "A" | "B" b.type; // "A" | "B" b = a; // should be assignable @@ -270,7 +270,6 @@ var Example5; var GH14865; (function (GH14865) { var a = { type: "A", data: "whatevs" }; - var b; a.type; // "A" | "B" b.type; // "A" | "B" b = a; // should be assignable diff --git a/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.symbols b/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.symbols index e52ea8f834394..721bba67afc5d 100644 --- a/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.symbols +++ b/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.symbols @@ -287,8 +287,8 @@ namespace GH14865 { >type : Symbol(type, Decl(assignmentCompatWithDiscriminatedUnion.ts, 99, 23)) >data : Symbol(data, Decl(assignmentCompatWithDiscriminatedUnion.ts, 99, 34)) - let b: Style1; ->b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 100, 7)) + declare let b: Style1; +>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 100, 15)) >Style1 : Symbol(Style1, Decl(assignmentCompatWithDiscriminatedUnion.ts, 85, 19)) a.type; // "A" | "B" @@ -298,11 +298,11 @@ namespace GH14865 { b.type; // "A" | "B" >b.type : Symbol(type, Decl(assignmentCompatWithDiscriminatedUnion.ts, 86, 19), Decl(assignmentCompatWithDiscriminatedUnion.ts, 89, 9)) ->b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 100, 7)) +>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 100, 15)) >type : Symbol(type, Decl(assignmentCompatWithDiscriminatedUnion.ts, 86, 19), Decl(assignmentCompatWithDiscriminatedUnion.ts, 89, 9)) b = a; // should be assignable ->b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 100, 7)) +>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 100, 15)) >a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 99, 9)) } diff --git a/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.types b/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.types index be6617683be64..4ae1e1ae3287b 100644 --- a/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.types +++ b/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.types @@ -384,7 +384,7 @@ namespace GH14865 { >"whatevs" : "whatevs" > : ^^^^^^^^^ - let b: Style1; + declare let b: Style1; >b : Style1 > : ^^^^^^ diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.errors.txt b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.errors.txt index d58f698ce0cf5..3ae018672d280 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.errors.txt @@ -18,8 +18,8 @@ assignmentCompatWithGenericCallSignatures2.ts(16,1): error TS2322: Type 'A' is n (x: S, ...y: S[]): void } - var a: A; - var b: B; + declare var a: A; + declare var b: B; // Both errors a = b; diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.js b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.js index e93ea4401c5e3..d4481339ebd19 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.js +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.js @@ -11,8 +11,8 @@ interface B { (x: S, ...y: S[]): void } -var a: A; -var b: B; +declare var a: A; +declare var b: B; // Both errors a = b; @@ -21,8 +21,6 @@ b = a; //// [assignmentCompatWithGenericCallSignatures2.js] // some complex cases of assignment compat of generic signatures. No contextual signature instantiation -var a; -var b; // Both errors a = b; b = a; diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.symbols b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.symbols index 16fb5a70238c7..e67aebb493dbf 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.symbols +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.symbols @@ -25,20 +25,20 @@ interface B { >S : Symbol(S, Decl(assignmentCompatWithGenericCallSignatures2.ts, 7, 5)) } -var a: A; ->a : Symbol(a, Decl(assignmentCompatWithGenericCallSignatures2.ts, 10, 3)) +declare var a: A; +>a : Symbol(a, Decl(assignmentCompatWithGenericCallSignatures2.ts, 10, 11)) >A : Symbol(A, Decl(assignmentCompatWithGenericCallSignatures2.ts, 0, 0)) -var b: B; ->b : Symbol(b, Decl(assignmentCompatWithGenericCallSignatures2.ts, 11, 3)) +declare var b: B; +>b : Symbol(b, Decl(assignmentCompatWithGenericCallSignatures2.ts, 11, 11)) >B : Symbol(B, Decl(assignmentCompatWithGenericCallSignatures2.ts, 4, 1)) // Both errors a = b; ->a : Symbol(a, Decl(assignmentCompatWithGenericCallSignatures2.ts, 10, 3)) ->b : Symbol(b, Decl(assignmentCompatWithGenericCallSignatures2.ts, 11, 3)) +>a : Symbol(a, Decl(assignmentCompatWithGenericCallSignatures2.ts, 10, 11)) +>b : Symbol(b, Decl(assignmentCompatWithGenericCallSignatures2.ts, 11, 11)) b = a; ->b : Symbol(b, Decl(assignmentCompatWithGenericCallSignatures2.ts, 11, 3)) ->a : Symbol(a, Decl(assignmentCompatWithGenericCallSignatures2.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithGenericCallSignatures2.ts, 11, 11)) +>a : Symbol(a, Decl(assignmentCompatWithGenericCallSignatures2.ts, 10, 11)) diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.types b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.types index 798a261b13b87..a98a3e25b6d17 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.types +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.types @@ -19,11 +19,11 @@ interface B { > : ^^^ } -var a: A; +declare var a: A; >a : A > : ^ -var b: B; +declare var b: B; >b : B > : ^ diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.errors.txt b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.errors.txt index 2e17b5682e4ed..a7b9f446381f9 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.errors.txt @@ -13,8 +13,8 @@ assignmentCompatWithGenericCallSignatures4.ts(12,1): error TS2322: Type '>(z: T) => void - var y: >>(z: T) => void + declare var x: >(z: T) => void; + declare var y: >>(z: T) => void; // These both do not make sense as we would eventually be comparing I2 to I2>, and they are self referencing anyway x = y diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.js b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.js index 1e73ebd4aee51..f93dbf528e3fe 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.js @@ -7,8 +7,8 @@ interface I2 { p: T } -var x: >(z: T) => void -var y: >>(z: T) => void +declare var x: >(z: T) => void; +declare var y: >>(z: T) => void; // These both do not make sense as we would eventually be comparing I2 to I2>, and they are self referencing anyway x = y @@ -17,8 +17,6 @@ y = x //// [assignmentCompatWithGenericCallSignatures4.js] // some complex cases of assignment compat of generic signatures. -var x; -var y; // These both do not make sense as we would eventually be comparing I2 to I2>, and they are self referencing anyway x = y; y = x; diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.symbols b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.symbols index 73364359efb0c..18fc14a5b38b9 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.symbols +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.symbols @@ -12,29 +12,29 @@ interface I2 { >T : Symbol(T, Decl(assignmentCompatWithGenericCallSignatures4.ts, 2, 13)) } -var x: >(z: T) => void ->x : Symbol(x, Decl(assignmentCompatWithGenericCallSignatures4.ts, 6, 3)) ->T : Symbol(T, Decl(assignmentCompatWithGenericCallSignatures4.ts, 6, 8)) +declare var x: >(z: T) => void; +>x : Symbol(x, Decl(assignmentCompatWithGenericCallSignatures4.ts, 6, 11)) +>T : Symbol(T, Decl(assignmentCompatWithGenericCallSignatures4.ts, 6, 16)) >I2 : Symbol(I2, Decl(assignmentCompatWithGenericCallSignatures4.ts, 0, 0)) ->T : Symbol(T, Decl(assignmentCompatWithGenericCallSignatures4.ts, 6, 8)) ->z : Symbol(z, Decl(assignmentCompatWithGenericCallSignatures4.ts, 6, 25)) ->T : Symbol(T, Decl(assignmentCompatWithGenericCallSignatures4.ts, 6, 8)) +>T : Symbol(T, Decl(assignmentCompatWithGenericCallSignatures4.ts, 6, 16)) +>z : Symbol(z, Decl(assignmentCompatWithGenericCallSignatures4.ts, 6, 33)) +>T : Symbol(T, Decl(assignmentCompatWithGenericCallSignatures4.ts, 6, 16)) -var y: >>(z: T) => void ->y : Symbol(y, Decl(assignmentCompatWithGenericCallSignatures4.ts, 7, 3)) ->T : Symbol(T, Decl(assignmentCompatWithGenericCallSignatures4.ts, 7, 8)) +declare var y: >>(z: T) => void; +>y : Symbol(y, Decl(assignmentCompatWithGenericCallSignatures4.ts, 7, 11)) +>T : Symbol(T, Decl(assignmentCompatWithGenericCallSignatures4.ts, 7, 16)) >I2 : Symbol(I2, Decl(assignmentCompatWithGenericCallSignatures4.ts, 0, 0)) >I2 : Symbol(I2, Decl(assignmentCompatWithGenericCallSignatures4.ts, 0, 0)) ->T : Symbol(T, Decl(assignmentCompatWithGenericCallSignatures4.ts, 7, 8)) ->z : Symbol(z, Decl(assignmentCompatWithGenericCallSignatures4.ts, 7, 29)) ->T : Symbol(T, Decl(assignmentCompatWithGenericCallSignatures4.ts, 7, 8)) +>T : Symbol(T, Decl(assignmentCompatWithGenericCallSignatures4.ts, 7, 16)) +>z : Symbol(z, Decl(assignmentCompatWithGenericCallSignatures4.ts, 7, 37)) +>T : Symbol(T, Decl(assignmentCompatWithGenericCallSignatures4.ts, 7, 16)) // These both do not make sense as we would eventually be comparing I2 to I2>, and they are self referencing anyway x = y ->x : Symbol(x, Decl(assignmentCompatWithGenericCallSignatures4.ts, 6, 3)) ->y : Symbol(y, Decl(assignmentCompatWithGenericCallSignatures4.ts, 7, 3)) +>x : Symbol(x, Decl(assignmentCompatWithGenericCallSignatures4.ts, 6, 11)) +>y : Symbol(y, Decl(assignmentCompatWithGenericCallSignatures4.ts, 7, 11)) y = x ->y : Symbol(y, Decl(assignmentCompatWithGenericCallSignatures4.ts, 7, 3)) ->x : Symbol(x, Decl(assignmentCompatWithGenericCallSignatures4.ts, 6, 3)) +>y : Symbol(y, Decl(assignmentCompatWithGenericCallSignatures4.ts, 7, 11)) +>x : Symbol(x, Decl(assignmentCompatWithGenericCallSignatures4.ts, 6, 11)) diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.types b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.types index c80be1723f5eb..098f6d8bca7e0 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.types +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.types @@ -9,13 +9,13 @@ interface I2 { > : ^ } -var x: >(z: T) => void +declare var x: >(z: T) => void; >x : >(z: T) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >z : T > : ^ -var y: >>(z: T) => void +declare var y: >>(z: T) => void; >y : >>(z: T) => void > : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ >z : T diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.errors.txt b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.errors.txt index 33405e4f8f04b..9e04f20621824 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.errors.txt @@ -162,8 +162,8 @@ assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(116,13): erro function foo() { - var b: Base2; - var t: Target; + var b!: Base2; + var t!: Target; // all errors b.a = t.a; diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.js b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.js index 8155cc5cd1029..722711c2c93ab 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.js +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.js @@ -59,8 +59,8 @@ namespace GenericSignaturesInvalid { function foo() { - var b: Base2; - var t: Target; + var b!: Base2; + var t!: Target; // all errors b.a = t.a; diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.symbols b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.symbols index b1f7109cf3f3b..5aa099dfbd1f7 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.symbols +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.symbols @@ -261,11 +261,11 @@ namespace GenericSignaturesInvalid { >foo : Symbol(foo, Decl(assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts, 54, 5)) >T : Symbol(T, Decl(assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts, 57, 17)) - var b: Base2; + var b!: Base2; >b : Symbol(b, Decl(assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts, 58, 11)) >Base2 : Symbol(Base2, Decl(assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts, 38, 36)) - var t: Target; + var t!: Target; >t : Symbol(t, Decl(assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts, 59, 11)) >Target : Symbol(Target, Decl(assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts, 46, 5)) >T : Symbol(T, Decl(assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts, 57, 17)) diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.types b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.types index ae8eec81c34a2..c786606f43846 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.types +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.types @@ -388,11 +388,11 @@ namespace GenericSignaturesInvalid { >foo : () => void > : ^ ^^^^^^^^^^^ - var b: Base2; + var b!: Base2; >b : Base2 > : ^^^^^ - var t: Target; + var t!: Target; >t : Target > : ^^^^^^^^^ diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer.errors.txt b/tests/baselines/reference/assignmentCompatWithNumericIndexer.errors.txt index 16dba66897213..a046f258519f6 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer.errors.txt @@ -33,8 +33,8 @@ assignmentCompatWithNumericIndexer.ts(37,9): error TS2322: Type 'A' is not as [x: number]: Base; } - var a: A; - var b: { [x: number]: Derived; } + declare var a: A; + declare var b: { [x: number]: Derived; } a = b; b = a; // error ~ @@ -43,7 +43,7 @@ assignmentCompatWithNumericIndexer.ts(37,9): error TS2322: Type 'A' is not as !!! error TS2322: Property 'bar' is missing in type 'Base' but required in type 'Derived'. !!! related TS2728 assignmentCompatWithNumericIndexer.ts:4:34: 'bar' is declared here. - var b2: { [x: number]: Derived2; } + declare var b2: { [x: number]: Derived2; } a = b2; b2 = a; // error ~~ @@ -61,8 +61,8 @@ assignmentCompatWithNumericIndexer.ts(37,9): error TS2322: Type 'A' is not as } function foo() { - var a: A; - var b: { [x: number]: Derived; } + var a!: A; + var b!: { [x: number]: Derived; } a = b; // error ~ !!! error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A'. @@ -77,7 +77,7 @@ assignmentCompatWithNumericIndexer.ts(37,9): error TS2322: Type 'A' is not as !!! error TS2322: Property 'bar' is missing in type 'Base' but required in type 'Derived'. !!! related TS2728 assignmentCompatWithNumericIndexer.ts:4:34: 'bar' is declared here. - var b2: { [x: number]: Derived2; } + var b2!: { [x: number]: Derived2; } a = b2; // error ~ !!! error TS2322: Type '{ [x: number]: Derived2; }' is not assignable to type 'A'. @@ -91,7 +91,7 @@ assignmentCompatWithNumericIndexer.ts(37,9): error TS2322: Type 'A' is not as !!! error TS2322: Type 'T' is not assignable to type 'Derived2'. !!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': baz, bar - var b3: { [x: number]: T; } + var b3!: { [x: number]: T; } a = b3; // ok b3 = a; // ok } diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js index fbfe1a8cfa96f..20720cf290a71 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js @@ -11,12 +11,12 @@ class A { [x: number]: Base; } -var a: A; -var b: { [x: number]: Derived; } +declare var a: A; +declare var b: { [x: number]: Derived; } a = b; b = a; // error -var b2: { [x: number]: Derived2; } +declare var b2: { [x: number]: Derived2; } a = b2; b2 = a; // error @@ -30,16 +30,16 @@ namespace Generics { } function foo() { - var a: A; - var b: { [x: number]: Derived; } + var a!: A; + var b!: { [x: number]: Derived; } a = b; // error b = a; // error - var b2: { [x: number]: Derived2; } + var b2!: { [x: number]: Derived2; } a = b2; // error b2 = a; // error - var b3: { [x: number]: T; } + var b3!: { [x: number]: T; } a = b3; // ok b3 = a; // ok } @@ -67,11 +67,8 @@ var A = /** @class */ (function () { } return A; }()); -var a; -var b; a = b; b = a; // error -var b2; a = b2; b2 = a; // error var Generics; diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer.symbols b/tests/baselines/reference/assignmentCompatWithNumericIndexer.symbols index 66b8f21c07db1..1e29b814868de 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer.symbols +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer.symbols @@ -25,35 +25,35 @@ class A { >Base : Symbol(Base, Decl(assignmentCompatWithNumericIndexer.ts, 0, 0)) } -var a: A; ->a : Symbol(a, Decl(assignmentCompatWithNumericIndexer.ts, 10, 3)) +declare var a: A; +>a : Symbol(a, Decl(assignmentCompatWithNumericIndexer.ts, 10, 11)) >A : Symbol(A, Decl(assignmentCompatWithNumericIndexer.ts, 4, 51)) -var b: { [x: number]: Derived; } ->b : Symbol(b, Decl(assignmentCompatWithNumericIndexer.ts, 11, 3)) ->x : Symbol(x, Decl(assignmentCompatWithNumericIndexer.ts, 11, 10)) +declare var b: { [x: number]: Derived; } +>b : Symbol(b, Decl(assignmentCompatWithNumericIndexer.ts, 11, 11)) +>x : Symbol(x, Decl(assignmentCompatWithNumericIndexer.ts, 11, 18)) >Derived : Symbol(Derived, Decl(assignmentCompatWithNumericIndexer.ts, 2, 31)) a = b; ->a : Symbol(a, Decl(assignmentCompatWithNumericIndexer.ts, 10, 3)) ->b : Symbol(b, Decl(assignmentCompatWithNumericIndexer.ts, 11, 3)) +>a : Symbol(a, Decl(assignmentCompatWithNumericIndexer.ts, 10, 11)) +>b : Symbol(b, Decl(assignmentCompatWithNumericIndexer.ts, 11, 11)) b = a; // error ->b : Symbol(b, Decl(assignmentCompatWithNumericIndexer.ts, 11, 3)) ->a : Symbol(a, Decl(assignmentCompatWithNumericIndexer.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithNumericIndexer.ts, 11, 11)) +>a : Symbol(a, Decl(assignmentCompatWithNumericIndexer.ts, 10, 11)) -var b2: { [x: number]: Derived2; } ->b2 : Symbol(b2, Decl(assignmentCompatWithNumericIndexer.ts, 15, 3)) ->x : Symbol(x, Decl(assignmentCompatWithNumericIndexer.ts, 15, 11)) +declare var b2: { [x: number]: Derived2; } +>b2 : Symbol(b2, Decl(assignmentCompatWithNumericIndexer.ts, 15, 11)) +>x : Symbol(x, Decl(assignmentCompatWithNumericIndexer.ts, 15, 19)) >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithNumericIndexer.ts, 3, 47)) a = b2; ->a : Symbol(a, Decl(assignmentCompatWithNumericIndexer.ts, 10, 3)) ->b2 : Symbol(b2, Decl(assignmentCompatWithNumericIndexer.ts, 15, 3)) +>a : Symbol(a, Decl(assignmentCompatWithNumericIndexer.ts, 10, 11)) +>b2 : Symbol(b2, Decl(assignmentCompatWithNumericIndexer.ts, 15, 11)) b2 = a; // error ->b2 : Symbol(b2, Decl(assignmentCompatWithNumericIndexer.ts, 15, 3)) ->a : Symbol(a, Decl(assignmentCompatWithNumericIndexer.ts, 10, 3)) +>b2 : Symbol(b2, Decl(assignmentCompatWithNumericIndexer.ts, 15, 11)) +>a : Symbol(a, Decl(assignmentCompatWithNumericIndexer.ts, 10, 11)) namespace Generics { >Generics : Symbol(Generics, Decl(assignmentCompatWithNumericIndexer.ts, 17, 7)) @@ -83,14 +83,14 @@ namespace Generics { >T : Symbol(T, Decl(assignmentCompatWithNumericIndexer.ts, 28, 17)) >Base : Symbol(Base, Decl(assignmentCompatWithNumericIndexer.ts, 0, 0)) - var a: A; + var a!: A; >a : Symbol(a, Decl(assignmentCompatWithNumericIndexer.ts, 29, 11)) >A : Symbol(A, Decl(assignmentCompatWithNumericIndexer.ts, 19, 20)) >T : Symbol(T, Decl(assignmentCompatWithNumericIndexer.ts, 28, 17)) - var b: { [x: number]: Derived; } + var b!: { [x: number]: Derived; } >b : Symbol(b, Decl(assignmentCompatWithNumericIndexer.ts, 30, 11)) ->x : Symbol(x, Decl(assignmentCompatWithNumericIndexer.ts, 30, 18)) +>x : Symbol(x, Decl(assignmentCompatWithNumericIndexer.ts, 30, 19)) >Derived : Symbol(Derived, Decl(assignmentCompatWithNumericIndexer.ts, 2, 31)) a = b; // error @@ -101,9 +101,9 @@ namespace Generics { >b : Symbol(b, Decl(assignmentCompatWithNumericIndexer.ts, 30, 11)) >a : Symbol(a, Decl(assignmentCompatWithNumericIndexer.ts, 29, 11)) - var b2: { [x: number]: Derived2; } + var b2!: { [x: number]: Derived2; } >b2 : Symbol(b2, Decl(assignmentCompatWithNumericIndexer.ts, 34, 11)) ->x : Symbol(x, Decl(assignmentCompatWithNumericIndexer.ts, 34, 19)) +>x : Symbol(x, Decl(assignmentCompatWithNumericIndexer.ts, 34, 20)) >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithNumericIndexer.ts, 3, 47)) a = b2; // error @@ -114,9 +114,9 @@ namespace Generics { >b2 : Symbol(b2, Decl(assignmentCompatWithNumericIndexer.ts, 34, 11)) >a : Symbol(a, Decl(assignmentCompatWithNumericIndexer.ts, 29, 11)) - var b3: { [x: number]: T; } + var b3!: { [x: number]: T; } >b3 : Symbol(b3, Decl(assignmentCompatWithNumericIndexer.ts, 38, 11)) ->x : Symbol(x, Decl(assignmentCompatWithNumericIndexer.ts, 38, 19)) +>x : Symbol(x, Decl(assignmentCompatWithNumericIndexer.ts, 38, 20)) >T : Symbol(T, Decl(assignmentCompatWithNumericIndexer.ts, 28, 17)) a = b3; // ok diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer.types b/tests/baselines/reference/assignmentCompatWithNumericIndexer.types index 07e1dedab83de..d8aa6f99f02cf 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer.types +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer.types @@ -24,11 +24,11 @@ class A { > : ^^^^^^ } -var a: A; +declare var a: A; >a : A > : ^ -var b: { [x: number]: Derived; } +declare var b: { [x: number]: Derived; } >b : { [x: number]: Derived; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >x : number @@ -50,7 +50,7 @@ b = a; // error >a : A > : ^ -var b2: { [x: number]: Derived2; } +declare var b2: { [x: number]: Derived2; } >b2 : { [x: number]: Derived2; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^ >x : number @@ -100,11 +100,11 @@ namespace Generics { >foo : () => void > : ^ ^^^^^^^^^ ^^^^^^^^^^^ - var a: A; + var a!: A; >a : A > : ^^^^ - var b: { [x: number]: Derived; } + var b!: { [x: number]: Derived; } >b : { [x: number]: Derived; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >x : number @@ -126,7 +126,7 @@ namespace Generics { >a : A > : ^^^^ - var b2: { [x: number]: Derived2; } + var b2!: { [x: number]: Derived2; } >b2 : { [x: number]: Derived2; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^ >x : number @@ -148,7 +148,7 @@ namespace Generics { >a : A > : ^^^^ - var b3: { [x: number]: T; } + var b3!: { [x: number]: T; } >b3 : { [x: number]: T; } > : ^^^^^^^^^^^^^^^^^^^ >x : number diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer2.errors.txt b/tests/baselines/reference/assignmentCompatWithNumericIndexer2.errors.txt index a9535962fb7d6..63ced30e797ce 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer2.errors.txt @@ -33,8 +33,8 @@ assignmentCompatWithNumericIndexer2.ts(37,9): error TS2322: Type 'A' is not a [x: number]: Base; } - var a: A; - var b: { [x: number]: Derived; } + declare var a: A; + declare var b: { [x: number]: Derived; } a = b; b = a; // error ~ @@ -43,7 +43,7 @@ assignmentCompatWithNumericIndexer2.ts(37,9): error TS2322: Type 'A' is not a !!! error TS2322: Property 'bar' is missing in type 'Base' but required in type 'Derived'. !!! related TS2728 assignmentCompatWithNumericIndexer2.ts:4:34: 'bar' is declared here. - var b2: { [x: number]: Derived2; } + declare var b2: { [x: number]: Derived2; } a = b2; b2 = a; // error ~~ @@ -61,8 +61,8 @@ assignmentCompatWithNumericIndexer2.ts(37,9): error TS2322: Type 'A' is not a } function foo() { - var a: A; - var b: { [x: number]: Derived; } + var a!: A; + var b!: { [x: number]: Derived; } a = b; // error ~ !!! error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A'. @@ -77,7 +77,7 @@ assignmentCompatWithNumericIndexer2.ts(37,9): error TS2322: Type 'A' is not a !!! error TS2322: Property 'bar' is missing in type 'Base' but required in type 'Derived'. !!! related TS2728 assignmentCompatWithNumericIndexer2.ts:4:34: 'bar' is declared here. - var b2: { [x: number]: Derived2; } + var b2!: { [x: number]: Derived2; } a = b2; // error ~ !!! error TS2322: Type '{ [x: number]: Derived2; }' is not assignable to type 'A'. @@ -91,7 +91,7 @@ assignmentCompatWithNumericIndexer2.ts(37,9): error TS2322: Type 'A' is not a !!! error TS2322: Type 'T' is not assignable to type 'Derived2'. !!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': baz, bar - var b3: { [x: number]: T; } + var b3!: { [x: number]: T; } a = b3; // ok b3 = a; // ok } diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer2.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer2.js index 57c748ab5bd07..1e15c05187860 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer2.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer2.js @@ -11,12 +11,12 @@ interface A { [x: number]: Base; } -var a: A; -var b: { [x: number]: Derived; } +declare var a: A; +declare var b: { [x: number]: Derived; } a = b; b = a; // error -var b2: { [x: number]: Derived2; } +declare var b2: { [x: number]: Derived2; } a = b2; b2 = a; // error @@ -30,16 +30,16 @@ namespace Generics { } function foo() { - var a: A; - var b: { [x: number]: Derived; } + var a!: A; + var b!: { [x: number]: Derived; } a = b; // error b = a; // error - var b2: { [x: number]: Derived2; } + var b2!: { [x: number]: Derived2; } a = b2; // error b2 = a; // error - var b3: { [x: number]: T; } + var b3!: { [x: number]: T; } a = b3; // ok b3 = a; // ok } @@ -47,11 +47,8 @@ namespace Generics { //// [assignmentCompatWithNumericIndexer2.js] // Derived type indexer must be subtype of base type indexer -var a; -var b; a = b; b = a; // error -var b2; a = b2; b2 = a; // error var Generics; diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer2.symbols b/tests/baselines/reference/assignmentCompatWithNumericIndexer2.symbols index f35591fa2d37b..6d3e048b90b2e 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer2.symbols +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer2.symbols @@ -25,35 +25,35 @@ interface A { >Base : Symbol(Base, Decl(assignmentCompatWithNumericIndexer2.ts, 0, 0)) } -var a: A; ->a : Symbol(a, Decl(assignmentCompatWithNumericIndexer2.ts, 10, 3)) +declare var a: A; +>a : Symbol(a, Decl(assignmentCompatWithNumericIndexer2.ts, 10, 11)) >A : Symbol(A, Decl(assignmentCompatWithNumericIndexer2.ts, 4, 51)) -var b: { [x: number]: Derived; } ->b : Symbol(b, Decl(assignmentCompatWithNumericIndexer2.ts, 11, 3)) ->x : Symbol(x, Decl(assignmentCompatWithNumericIndexer2.ts, 11, 10)) +declare var b: { [x: number]: Derived; } +>b : Symbol(b, Decl(assignmentCompatWithNumericIndexer2.ts, 11, 11)) +>x : Symbol(x, Decl(assignmentCompatWithNumericIndexer2.ts, 11, 18)) >Derived : Symbol(Derived, Decl(assignmentCompatWithNumericIndexer2.ts, 2, 31)) a = b; ->a : Symbol(a, Decl(assignmentCompatWithNumericIndexer2.ts, 10, 3)) ->b : Symbol(b, Decl(assignmentCompatWithNumericIndexer2.ts, 11, 3)) +>a : Symbol(a, Decl(assignmentCompatWithNumericIndexer2.ts, 10, 11)) +>b : Symbol(b, Decl(assignmentCompatWithNumericIndexer2.ts, 11, 11)) b = a; // error ->b : Symbol(b, Decl(assignmentCompatWithNumericIndexer2.ts, 11, 3)) ->a : Symbol(a, Decl(assignmentCompatWithNumericIndexer2.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithNumericIndexer2.ts, 11, 11)) +>a : Symbol(a, Decl(assignmentCompatWithNumericIndexer2.ts, 10, 11)) -var b2: { [x: number]: Derived2; } ->b2 : Symbol(b2, Decl(assignmentCompatWithNumericIndexer2.ts, 15, 3)) ->x : Symbol(x, Decl(assignmentCompatWithNumericIndexer2.ts, 15, 11)) +declare var b2: { [x: number]: Derived2; } +>b2 : Symbol(b2, Decl(assignmentCompatWithNumericIndexer2.ts, 15, 11)) +>x : Symbol(x, Decl(assignmentCompatWithNumericIndexer2.ts, 15, 19)) >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithNumericIndexer2.ts, 3, 47)) a = b2; ->a : Symbol(a, Decl(assignmentCompatWithNumericIndexer2.ts, 10, 3)) ->b2 : Symbol(b2, Decl(assignmentCompatWithNumericIndexer2.ts, 15, 3)) +>a : Symbol(a, Decl(assignmentCompatWithNumericIndexer2.ts, 10, 11)) +>b2 : Symbol(b2, Decl(assignmentCompatWithNumericIndexer2.ts, 15, 11)) b2 = a; // error ->b2 : Symbol(b2, Decl(assignmentCompatWithNumericIndexer2.ts, 15, 3)) ->a : Symbol(a, Decl(assignmentCompatWithNumericIndexer2.ts, 10, 3)) +>b2 : Symbol(b2, Decl(assignmentCompatWithNumericIndexer2.ts, 15, 11)) +>a : Symbol(a, Decl(assignmentCompatWithNumericIndexer2.ts, 10, 11)) namespace Generics { >Generics : Symbol(Generics, Decl(assignmentCompatWithNumericIndexer2.ts, 17, 7)) @@ -83,14 +83,14 @@ namespace Generics { >T : Symbol(T, Decl(assignmentCompatWithNumericIndexer2.ts, 28, 17)) >Base : Symbol(Base, Decl(assignmentCompatWithNumericIndexer2.ts, 0, 0)) - var a: A; + var a!: A; >a : Symbol(a, Decl(assignmentCompatWithNumericIndexer2.ts, 29, 11)) >A : Symbol(A, Decl(assignmentCompatWithNumericIndexer2.ts, 19, 20)) >T : Symbol(T, Decl(assignmentCompatWithNumericIndexer2.ts, 28, 17)) - var b: { [x: number]: Derived; } + var b!: { [x: number]: Derived; } >b : Symbol(b, Decl(assignmentCompatWithNumericIndexer2.ts, 30, 11)) ->x : Symbol(x, Decl(assignmentCompatWithNumericIndexer2.ts, 30, 18)) +>x : Symbol(x, Decl(assignmentCompatWithNumericIndexer2.ts, 30, 19)) >Derived : Symbol(Derived, Decl(assignmentCompatWithNumericIndexer2.ts, 2, 31)) a = b; // error @@ -101,9 +101,9 @@ namespace Generics { >b : Symbol(b, Decl(assignmentCompatWithNumericIndexer2.ts, 30, 11)) >a : Symbol(a, Decl(assignmentCompatWithNumericIndexer2.ts, 29, 11)) - var b2: { [x: number]: Derived2; } + var b2!: { [x: number]: Derived2; } >b2 : Symbol(b2, Decl(assignmentCompatWithNumericIndexer2.ts, 34, 11)) ->x : Symbol(x, Decl(assignmentCompatWithNumericIndexer2.ts, 34, 19)) +>x : Symbol(x, Decl(assignmentCompatWithNumericIndexer2.ts, 34, 20)) >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithNumericIndexer2.ts, 3, 47)) a = b2; // error @@ -114,9 +114,9 @@ namespace Generics { >b2 : Symbol(b2, Decl(assignmentCompatWithNumericIndexer2.ts, 34, 11)) >a : Symbol(a, Decl(assignmentCompatWithNumericIndexer2.ts, 29, 11)) - var b3: { [x: number]: T; } + var b3!: { [x: number]: T; } >b3 : Symbol(b3, Decl(assignmentCompatWithNumericIndexer2.ts, 38, 11)) ->x : Symbol(x, Decl(assignmentCompatWithNumericIndexer2.ts, 38, 19)) +>x : Symbol(x, Decl(assignmentCompatWithNumericIndexer2.ts, 38, 20)) >T : Symbol(T, Decl(assignmentCompatWithNumericIndexer2.ts, 28, 17)) a = b3; // ok diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer2.types b/tests/baselines/reference/assignmentCompatWithNumericIndexer2.types index 0eb45b9f0e9b3..1647a77109baf 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer2.types +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer2.types @@ -21,11 +21,11 @@ interface A { > : ^^^^^^ } -var a: A; +declare var a: A; >a : A > : ^ -var b: { [x: number]: Derived; } +declare var b: { [x: number]: Derived; } >b : { [x: number]: Derived; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >x : number @@ -47,7 +47,7 @@ b = a; // error >a : A > : ^ -var b2: { [x: number]: Derived2; } +declare var b2: { [x: number]: Derived2; } >b2 : { [x: number]: Derived2; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^ >x : number @@ -89,11 +89,11 @@ namespace Generics { >foo : () => void > : ^ ^^^^^^^^^ ^^^^^^^^^^^ - var a: A; + var a!: A; >a : A > : ^^^^ - var b: { [x: number]: Derived; } + var b!: { [x: number]: Derived; } >b : { [x: number]: Derived; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >x : number @@ -115,7 +115,7 @@ namespace Generics { >a : A > : ^^^^ - var b2: { [x: number]: Derived2; } + var b2!: { [x: number]: Derived2; } >b2 : { [x: number]: Derived2; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^ >x : number @@ -137,7 +137,7 @@ namespace Generics { >a : A > : ^^^^ - var b3: { [x: number]: T; } + var b3!: { [x: number]: T; } >b3 : { [x: number]: T; } > : ^^^^^^^^^^^^^^^^^^^ >x : number diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.errors.txt b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.errors.txt index d2a905297d3a2..a3b667944d93f 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.errors.txt @@ -21,8 +21,8 @@ assignmentCompatWithNumericIndexer3.ts(33,9): error TS2322: Type '{ [x: number]: [x: number]: Derived; } - var a: A; - var b: { [x: number]: Base; }; + declare var a: A; + declare var b: { [x: number]: Base; }; a = b; // error ~ @@ -36,7 +36,7 @@ assignmentCompatWithNumericIndexer3.ts(33,9): error TS2322: Type '{ [x: number]: [x: number]: Derived2; // ok } - var b2: { [x: number]: Derived2; }; + declare var b2: { [x: number]: Derived2; }; a = b2; // ok b2 = a; // error ~~ @@ -51,8 +51,8 @@ assignmentCompatWithNumericIndexer3.ts(33,9): error TS2322: Type '{ [x: number]: } function foo() { - var a: A; - var b: { [x: number]: Derived; }; + var a!: A; + var b!: { [x: number]: Derived; }; a = b; // error ~ !!! error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A'. @@ -61,7 +61,7 @@ assignmentCompatWithNumericIndexer3.ts(33,9): error TS2322: Type '{ [x: number]: !!! error TS2322: 'Derived' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Derived'. b = a; // ok - var b2: { [x: number]: T; }; + var b2!: { [x: number]: T; }; a = b2; // ok b2 = a; // ok } diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js index c55ce7233eb31..9329efbbf3264 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js @@ -11,8 +11,8 @@ class A { [x: number]: Derived; } -var a: A; -var b: { [x: number]: Base; }; +declare var a: A; +declare var b: { [x: number]: Base; }; a = b; // error b = a; // ok @@ -21,7 +21,7 @@ class B2 extends A { [x: number]: Derived2; // ok } -var b2: { [x: number]: Derived2; }; +declare var b2: { [x: number]: Derived2; }; a = b2; // ok b2 = a; // error @@ -31,12 +31,12 @@ namespace Generics { } function foo() { - var a: A; - var b: { [x: number]: Derived; }; + var a!: A; + var b!: { [x: number]: Derived; }; a = b; // error b = a; // ok - var b2: { [x: number]: T; }; + var b2!: { [x: number]: T; }; a = b2; // ok b2 = a; // ok } @@ -64,8 +64,6 @@ var A = /** @class */ (function () { } return A; }()); -var a; -var b; a = b; // error b = a; // ok var B2 = /** @class */ (function (_super) { @@ -75,7 +73,6 @@ var B2 = /** @class */ (function (_super) { } return B2; }(A)); -var b2; a = b2; // ok b2 = a; // error var Generics; diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.symbols b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.symbols index 21030b89b37f5..cdff8fe8249f8 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.symbols +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.symbols @@ -25,22 +25,22 @@ class A { >Derived : Symbol(Derived, Decl(assignmentCompatWithNumericIndexer3.ts, 2, 31)) } -var a: A; ->a : Symbol(a, Decl(assignmentCompatWithNumericIndexer3.ts, 10, 3)) +declare var a: A; +>a : Symbol(a, Decl(assignmentCompatWithNumericIndexer3.ts, 10, 11)) >A : Symbol(A, Decl(assignmentCompatWithNumericIndexer3.ts, 4, 51)) -var b: { [x: number]: Base; }; ->b : Symbol(b, Decl(assignmentCompatWithNumericIndexer3.ts, 11, 3)) ->x : Symbol(x, Decl(assignmentCompatWithNumericIndexer3.ts, 11, 10)) +declare var b: { [x: number]: Base; }; +>b : Symbol(b, Decl(assignmentCompatWithNumericIndexer3.ts, 11, 11)) +>x : Symbol(x, Decl(assignmentCompatWithNumericIndexer3.ts, 11, 18)) >Base : Symbol(Base, Decl(assignmentCompatWithNumericIndexer3.ts, 0, 0)) a = b; // error ->a : Symbol(a, Decl(assignmentCompatWithNumericIndexer3.ts, 10, 3)) ->b : Symbol(b, Decl(assignmentCompatWithNumericIndexer3.ts, 11, 3)) +>a : Symbol(a, Decl(assignmentCompatWithNumericIndexer3.ts, 10, 11)) +>b : Symbol(b, Decl(assignmentCompatWithNumericIndexer3.ts, 11, 11)) b = a; // ok ->b : Symbol(b, Decl(assignmentCompatWithNumericIndexer3.ts, 11, 3)) ->a : Symbol(a, Decl(assignmentCompatWithNumericIndexer3.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithNumericIndexer3.ts, 11, 11)) +>a : Symbol(a, Decl(assignmentCompatWithNumericIndexer3.ts, 10, 11)) class B2 extends A { >B2 : Symbol(B2, Decl(assignmentCompatWithNumericIndexer3.ts, 14, 6)) @@ -51,18 +51,18 @@ class B2 extends A { >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithNumericIndexer3.ts, 3, 47)) } -var b2: { [x: number]: Derived2; }; ->b2 : Symbol(b2, Decl(assignmentCompatWithNumericIndexer3.ts, 20, 3)) ->x : Symbol(x, Decl(assignmentCompatWithNumericIndexer3.ts, 20, 11)) +declare var b2: { [x: number]: Derived2; }; +>b2 : Symbol(b2, Decl(assignmentCompatWithNumericIndexer3.ts, 20, 11)) +>x : Symbol(x, Decl(assignmentCompatWithNumericIndexer3.ts, 20, 19)) >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithNumericIndexer3.ts, 3, 47)) a = b2; // ok ->a : Symbol(a, Decl(assignmentCompatWithNumericIndexer3.ts, 10, 3)) ->b2 : Symbol(b2, Decl(assignmentCompatWithNumericIndexer3.ts, 20, 3)) +>a : Symbol(a, Decl(assignmentCompatWithNumericIndexer3.ts, 10, 11)) +>b2 : Symbol(b2, Decl(assignmentCompatWithNumericIndexer3.ts, 20, 11)) b2 = a; // error ->b2 : Symbol(b2, Decl(assignmentCompatWithNumericIndexer3.ts, 20, 3)) ->a : Symbol(a, Decl(assignmentCompatWithNumericIndexer3.ts, 10, 3)) +>b2 : Symbol(b2, Decl(assignmentCompatWithNumericIndexer3.ts, 20, 11)) +>a : Symbol(a, Decl(assignmentCompatWithNumericIndexer3.ts, 10, 11)) namespace Generics { >Generics : Symbol(Generics, Decl(assignmentCompatWithNumericIndexer3.ts, 22, 7)) @@ -82,14 +82,14 @@ namespace Generics { >T : Symbol(T, Decl(assignmentCompatWithNumericIndexer3.ts, 29, 17)) >Derived : Symbol(Derived, Decl(assignmentCompatWithNumericIndexer3.ts, 2, 31)) - var a: A; + var a!: A; >a : Symbol(a, Decl(assignmentCompatWithNumericIndexer3.ts, 30, 11)) >A : Symbol(A, Decl(assignmentCompatWithNumericIndexer3.ts, 24, 20)) >T : Symbol(T, Decl(assignmentCompatWithNumericIndexer3.ts, 29, 17)) - var b: { [x: number]: Derived; }; + var b!: { [x: number]: Derived; }; >b : Symbol(b, Decl(assignmentCompatWithNumericIndexer3.ts, 31, 11)) ->x : Symbol(x, Decl(assignmentCompatWithNumericIndexer3.ts, 31, 18)) +>x : Symbol(x, Decl(assignmentCompatWithNumericIndexer3.ts, 31, 19)) >Derived : Symbol(Derived, Decl(assignmentCompatWithNumericIndexer3.ts, 2, 31)) a = b; // error @@ -100,9 +100,9 @@ namespace Generics { >b : Symbol(b, Decl(assignmentCompatWithNumericIndexer3.ts, 31, 11)) >a : Symbol(a, Decl(assignmentCompatWithNumericIndexer3.ts, 30, 11)) - var b2: { [x: number]: T; }; + var b2!: { [x: number]: T; }; >b2 : Symbol(b2, Decl(assignmentCompatWithNumericIndexer3.ts, 35, 11)) ->x : Symbol(x, Decl(assignmentCompatWithNumericIndexer3.ts, 35, 19)) +>x : Symbol(x, Decl(assignmentCompatWithNumericIndexer3.ts, 35, 20)) >T : Symbol(T, Decl(assignmentCompatWithNumericIndexer3.ts, 29, 17)) a = b2; // ok diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.types b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.types index 52a6ed1915bbf..ba39eb84729c3 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.types +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.types @@ -24,11 +24,11 @@ class A { > : ^^^^^^ } -var a: A; +declare var a: A; >a : A > : ^ -var b: { [x: number]: Base; }; +declare var b: { [x: number]: Base; }; >b : { [x: number]: Base; } > : ^^^^^^^^^^^^^^^^^^^^^^ >x : number @@ -61,7 +61,7 @@ class B2 extends A { > : ^^^^^^ } -var b2: { [x: number]: Derived2; }; +declare var b2: { [x: number]: Derived2; }; >b2 : { [x: number]: Derived2; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^ >x : number @@ -100,11 +100,11 @@ namespace Generics { >foo : () => void > : ^ ^^^^^^^^^ ^^^^^^^^^^^ - var a: A; + var a!: A; >a : A > : ^^^^ - var b: { [x: number]: Derived; }; + var b!: { [x: number]: Derived; }; >b : { [x: number]: Derived; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >x : number @@ -126,7 +126,7 @@ namespace Generics { >a : A > : ^^^^ - var b2: { [x: number]: T; }; + var b2!: { [x: number]: T; }; >b2 : { [x: number]: T; } > : ^^^^^^^^^^^^^^^^^^^ >x : number diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers4.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembers4.errors.txt index 9d879edbec032..7c5dd3709b2e2 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.errors.txt @@ -61,16 +61,16 @@ assignmentCompatWithObjectMembers4.ts(87,5): error TS2322: Type '{ foo: Base; }' class S { foo: Derived; } class T { foo: Derived2; } - var s: S; - var t: T; + declare var s: S; + declare var t: T; interface S2 { foo: Derived; } interface T2 { foo: Derived2; } - var s2: S2; - var t2: T2; + declare var s2: S2; + declare var t2: T2; - var a: { foo: Derived; } - var b: { foo: Derived2; } + declare var a: { foo: Derived; } + declare var b: { foo: Derived2; } var a2 = { foo: new Derived() }; var b2 = { foo: new Derived2() }; @@ -171,16 +171,16 @@ assignmentCompatWithObjectMembers4.ts(87,5): error TS2322: Type '{ foo: Base; }' class S { foo: Base; } class T { foo: Derived2; } - var s: S; - var t: T; + declare var s: S; + declare var t: T; interface S2 { foo: Base; } interface T2 { foo: Derived2; } - var s2: S2; - var t2: T2; + declare var s2: S2; + declare var t2: T2; - var a: { foo: Base; } - var b: { foo: Derived2; } + declare var a: { foo: Base; } + declare var b: { foo: Derived2; } var a2 = { foo: new Base() }; var b2 = { foo: new Derived2() }; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js index 3bd797bfe5df8..93cd47af52552 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js @@ -10,16 +10,16 @@ namespace OnlyDerived { class S { foo: Derived; } class T { foo: Derived2; } - var s: S; - var t: T; + declare var s: S; + declare var t: T; interface S2 { foo: Derived; } interface T2 { foo: Derived2; } - var s2: S2; - var t2: T2; + declare var s2: S2; + declare var t2: T2; - var a: { foo: Derived; } - var b: { foo: Derived2; } + declare var a: { foo: Derived; } + declare var b: { foo: Derived2; } var a2 = { foo: new Derived() }; var b2 = { foo: new Derived2() }; @@ -55,16 +55,16 @@ namespace WithBase { class S { foo: Base; } class T { foo: Derived2; } - var s: S; - var t: T; + declare var s: S; + declare var t: T; interface S2 { foo: Base; } interface T2 { foo: Derived2; } - var s2: S2; - var t2: T2; + declare var s2: S2; + declare var t2: T2; - var a: { foo: Base; } - var b: { foo: Derived2; } + declare var a: { foo: Base; } + declare var b: { foo: Derived2; } var a2 = { foo: new Base() }; var b2 = { foo: new Derived2() }; @@ -141,12 +141,6 @@ var OnlyDerived; } return T; }()); - var s; - var t; - var s2; - var t2; - var a; - var b; var a2 = { foo: new Derived() }; var b2 = { foo: new Derived2() }; s = t; // error @@ -200,12 +194,6 @@ var WithBase; } return T; }()); - var s; - var t; - var s2; - var t2; - var a; - var b; var a2 = { foo: new Base() }; var b2 = { foo: new Derived2() }; s = t; // ok diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers4.symbols b/tests/baselines/reference/assignmentCompatWithObjectMembers4.symbols index 0a3c66222ed2a..8eadf95d0fcc0 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.symbols +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.symbols @@ -30,16 +30,16 @@ namespace OnlyDerived { >foo : Symbol(T.foo, Decl(assignmentCompatWithObjectMembers4.ts, 8, 13)) >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithObjectMembers4.ts, 4, 47)) - var s: S; ->s : Symbol(s, Decl(assignmentCompatWithObjectMembers4.ts, 9, 7)) + declare var s: S; +>s : Symbol(s, Decl(assignmentCompatWithObjectMembers4.ts, 9, 15)) >S : Symbol(S, Decl(assignmentCompatWithObjectMembers4.ts, 5, 48)) - var t: T; ->t : Symbol(t, Decl(assignmentCompatWithObjectMembers4.ts, 10, 7)) + declare var t: T; +>t : Symbol(t, Decl(assignmentCompatWithObjectMembers4.ts, 10, 15)) >T : Symbol(T, Decl(assignmentCompatWithObjectMembers4.ts, 7, 29)) interface S2 { foo: Derived; } ->S2 : Symbol(S2, Decl(assignmentCompatWithObjectMembers4.ts, 10, 13)) +>S2 : Symbol(S2, Decl(assignmentCompatWithObjectMembers4.ts, 10, 21)) >foo : Symbol(S2.foo, Decl(assignmentCompatWithObjectMembers4.ts, 12, 18)) >Derived : Symbol(Derived, Decl(assignmentCompatWithObjectMembers4.ts, 3, 31)) @@ -48,22 +48,22 @@ namespace OnlyDerived { >foo : Symbol(T2.foo, Decl(assignmentCompatWithObjectMembers4.ts, 13, 18)) >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithObjectMembers4.ts, 4, 47)) - var s2: S2; ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 14, 7)) ->S2 : Symbol(S2, Decl(assignmentCompatWithObjectMembers4.ts, 10, 13)) + declare var s2: S2; +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 14, 15)) +>S2 : Symbol(S2, Decl(assignmentCompatWithObjectMembers4.ts, 10, 21)) - var t2: T2; ->t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembers4.ts, 15, 7)) + declare var t2: T2; +>t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembers4.ts, 15, 15)) >T2 : Symbol(T2, Decl(assignmentCompatWithObjectMembers4.ts, 12, 34)) - var a: { foo: Derived; } ->a : Symbol(a, Decl(assignmentCompatWithObjectMembers4.ts, 17, 7)) ->foo : Symbol(foo, Decl(assignmentCompatWithObjectMembers4.ts, 17, 12)) + declare var a: { foo: Derived; } +>a : Symbol(a, Decl(assignmentCompatWithObjectMembers4.ts, 17, 15)) +>foo : Symbol(foo, Decl(assignmentCompatWithObjectMembers4.ts, 17, 20)) >Derived : Symbol(Derived, Decl(assignmentCompatWithObjectMembers4.ts, 3, 31)) - var b: { foo: Derived2; } ->b : Symbol(b, Decl(assignmentCompatWithObjectMembers4.ts, 18, 7)) ->foo : Symbol(foo, Decl(assignmentCompatWithObjectMembers4.ts, 18, 12)) + declare var b: { foo: Derived2; } +>b : Symbol(b, Decl(assignmentCompatWithObjectMembers4.ts, 18, 15)) +>foo : Symbol(foo, Decl(assignmentCompatWithObjectMembers4.ts, 18, 20)) >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithObjectMembers4.ts, 4, 47)) var a2 = { foo: new Derived() }; @@ -77,59 +77,59 @@ namespace OnlyDerived { >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithObjectMembers4.ts, 4, 47)) s = t; // error ->s : Symbol(s, Decl(assignmentCompatWithObjectMembers4.ts, 9, 7)) ->t : Symbol(t, Decl(assignmentCompatWithObjectMembers4.ts, 10, 7)) +>s : Symbol(s, Decl(assignmentCompatWithObjectMembers4.ts, 9, 15)) +>t : Symbol(t, Decl(assignmentCompatWithObjectMembers4.ts, 10, 15)) t = s; // error ->t : Symbol(t, Decl(assignmentCompatWithObjectMembers4.ts, 10, 7)) ->s : Symbol(s, Decl(assignmentCompatWithObjectMembers4.ts, 9, 7)) +>t : Symbol(t, Decl(assignmentCompatWithObjectMembers4.ts, 10, 15)) +>s : Symbol(s, Decl(assignmentCompatWithObjectMembers4.ts, 9, 15)) s = s2; // ok ->s : Symbol(s, Decl(assignmentCompatWithObjectMembers4.ts, 9, 7)) ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 14, 7)) +>s : Symbol(s, Decl(assignmentCompatWithObjectMembers4.ts, 9, 15)) +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 14, 15)) s = a2; // ok ->s : Symbol(s, Decl(assignmentCompatWithObjectMembers4.ts, 9, 7)) +>s : Symbol(s, Decl(assignmentCompatWithObjectMembers4.ts, 9, 15)) >a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembers4.ts, 20, 7)) s2 = t2; // error ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 14, 7)) ->t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembers4.ts, 15, 7)) +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 14, 15)) +>t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembers4.ts, 15, 15)) t2 = s2; // error ->t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembers4.ts, 15, 7)) ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 14, 7)) +>t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembers4.ts, 15, 15)) +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 14, 15)) s2 = t; // error ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 14, 7)) ->t : Symbol(t, Decl(assignmentCompatWithObjectMembers4.ts, 10, 7)) +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 14, 15)) +>t : Symbol(t, Decl(assignmentCompatWithObjectMembers4.ts, 10, 15)) s2 = b; // error ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 14, 7)) ->b : Symbol(b, Decl(assignmentCompatWithObjectMembers4.ts, 18, 7)) +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 14, 15)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembers4.ts, 18, 15)) s2 = a2; // ok ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 14, 7)) +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 14, 15)) >a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembers4.ts, 20, 7)) a = b; // error ->a : Symbol(a, Decl(assignmentCompatWithObjectMembers4.ts, 17, 7)) ->b : Symbol(b, Decl(assignmentCompatWithObjectMembers4.ts, 18, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembers4.ts, 17, 15)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembers4.ts, 18, 15)) b = a; // error ->b : Symbol(b, Decl(assignmentCompatWithObjectMembers4.ts, 18, 7)) ->a : Symbol(a, Decl(assignmentCompatWithObjectMembers4.ts, 17, 7)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembers4.ts, 18, 15)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembers4.ts, 17, 15)) a = s; // ok ->a : Symbol(a, Decl(assignmentCompatWithObjectMembers4.ts, 17, 7)) ->s : Symbol(s, Decl(assignmentCompatWithObjectMembers4.ts, 9, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembers4.ts, 17, 15)) +>s : Symbol(s, Decl(assignmentCompatWithObjectMembers4.ts, 9, 15)) a = s2; // ok ->a : Symbol(a, Decl(assignmentCompatWithObjectMembers4.ts, 17, 7)) ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 14, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembers4.ts, 17, 15)) +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 14, 15)) a = a2; // ok ->a : Symbol(a, Decl(assignmentCompatWithObjectMembers4.ts, 17, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembers4.ts, 17, 15)) >a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembers4.ts, 20, 7)) a2 = b2; // error @@ -142,15 +142,15 @@ namespace OnlyDerived { a2 = b; // error >a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembers4.ts, 20, 7)) ->b : Symbol(b, Decl(assignmentCompatWithObjectMembers4.ts, 18, 7)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembers4.ts, 18, 15)) a2 = t2; // error >a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembers4.ts, 20, 7)) ->t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembers4.ts, 15, 7)) +>t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembers4.ts, 15, 15)) a2 = t; // error >a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembers4.ts, 20, 7)) ->t : Symbol(t, Decl(assignmentCompatWithObjectMembers4.ts, 10, 7)) +>t : Symbol(t, Decl(assignmentCompatWithObjectMembers4.ts, 10, 15)) } namespace WithBase { @@ -180,16 +180,16 @@ namespace WithBase { >foo : Symbol(T.foo, Decl(assignmentCompatWithObjectMembers4.ts, 53, 13)) >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithObjectMembers4.ts, 49, 47)) - var s: S; ->s : Symbol(s, Decl(assignmentCompatWithObjectMembers4.ts, 54, 7)) + declare var s: S; +>s : Symbol(s, Decl(assignmentCompatWithObjectMembers4.ts, 54, 15)) >S : Symbol(S, Decl(assignmentCompatWithObjectMembers4.ts, 50, 48)) - var t: T; ->t : Symbol(t, Decl(assignmentCompatWithObjectMembers4.ts, 55, 7)) + declare var t: T; +>t : Symbol(t, Decl(assignmentCompatWithObjectMembers4.ts, 55, 15)) >T : Symbol(T, Decl(assignmentCompatWithObjectMembers4.ts, 52, 26)) interface S2 { foo: Base; } ->S2 : Symbol(S2, Decl(assignmentCompatWithObjectMembers4.ts, 55, 13)) +>S2 : Symbol(S2, Decl(assignmentCompatWithObjectMembers4.ts, 55, 21)) >foo : Symbol(S2.foo, Decl(assignmentCompatWithObjectMembers4.ts, 57, 18)) >Base : Symbol(Base, Decl(assignmentCompatWithObjectMembers4.ts, 47, 20)) @@ -198,22 +198,22 @@ namespace WithBase { >foo : Symbol(T2.foo, Decl(assignmentCompatWithObjectMembers4.ts, 58, 18)) >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithObjectMembers4.ts, 49, 47)) - var s2: S2; ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 59, 7)) ->S2 : Symbol(S2, Decl(assignmentCompatWithObjectMembers4.ts, 55, 13)) + declare var s2: S2; +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 59, 15)) +>S2 : Symbol(S2, Decl(assignmentCompatWithObjectMembers4.ts, 55, 21)) - var t2: T2; ->t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembers4.ts, 60, 7)) + declare var t2: T2; +>t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembers4.ts, 60, 15)) >T2 : Symbol(T2, Decl(assignmentCompatWithObjectMembers4.ts, 57, 31)) - var a: { foo: Base; } ->a : Symbol(a, Decl(assignmentCompatWithObjectMembers4.ts, 62, 7)) ->foo : Symbol(foo, Decl(assignmentCompatWithObjectMembers4.ts, 62, 12)) + declare var a: { foo: Base; } +>a : Symbol(a, Decl(assignmentCompatWithObjectMembers4.ts, 62, 15)) +>foo : Symbol(foo, Decl(assignmentCompatWithObjectMembers4.ts, 62, 20)) >Base : Symbol(Base, Decl(assignmentCompatWithObjectMembers4.ts, 47, 20)) - var b: { foo: Derived2; } ->b : Symbol(b, Decl(assignmentCompatWithObjectMembers4.ts, 63, 7)) ->foo : Symbol(foo, Decl(assignmentCompatWithObjectMembers4.ts, 63, 12)) + declare var b: { foo: Derived2; } +>b : Symbol(b, Decl(assignmentCompatWithObjectMembers4.ts, 63, 15)) +>foo : Symbol(foo, Decl(assignmentCompatWithObjectMembers4.ts, 63, 20)) >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithObjectMembers4.ts, 49, 47)) var a2 = { foo: new Base() }; @@ -227,59 +227,59 @@ namespace WithBase { >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithObjectMembers4.ts, 49, 47)) s = t; // ok ->s : Symbol(s, Decl(assignmentCompatWithObjectMembers4.ts, 54, 7)) ->t : Symbol(t, Decl(assignmentCompatWithObjectMembers4.ts, 55, 7)) +>s : Symbol(s, Decl(assignmentCompatWithObjectMembers4.ts, 54, 15)) +>t : Symbol(t, Decl(assignmentCompatWithObjectMembers4.ts, 55, 15)) t = s; // error ->t : Symbol(t, Decl(assignmentCompatWithObjectMembers4.ts, 55, 7)) ->s : Symbol(s, Decl(assignmentCompatWithObjectMembers4.ts, 54, 7)) +>t : Symbol(t, Decl(assignmentCompatWithObjectMembers4.ts, 55, 15)) +>s : Symbol(s, Decl(assignmentCompatWithObjectMembers4.ts, 54, 15)) s = s2; // ok ->s : Symbol(s, Decl(assignmentCompatWithObjectMembers4.ts, 54, 7)) ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 59, 7)) +>s : Symbol(s, Decl(assignmentCompatWithObjectMembers4.ts, 54, 15)) +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 59, 15)) s = a2; // ok ->s : Symbol(s, Decl(assignmentCompatWithObjectMembers4.ts, 54, 7)) +>s : Symbol(s, Decl(assignmentCompatWithObjectMembers4.ts, 54, 15)) >a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembers4.ts, 65, 7)) s2 = t2; // ok ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 59, 7)) ->t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembers4.ts, 60, 7)) +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 59, 15)) +>t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembers4.ts, 60, 15)) t2 = s2; // error ->t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembers4.ts, 60, 7)) ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 59, 7)) +>t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembers4.ts, 60, 15)) +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 59, 15)) s2 = t; // ok ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 59, 7)) ->t : Symbol(t, Decl(assignmentCompatWithObjectMembers4.ts, 55, 7)) +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 59, 15)) +>t : Symbol(t, Decl(assignmentCompatWithObjectMembers4.ts, 55, 15)) s2 = b; // ok ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 59, 7)) ->b : Symbol(b, Decl(assignmentCompatWithObjectMembers4.ts, 63, 7)) +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 59, 15)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembers4.ts, 63, 15)) s2 = a2; // ok ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 59, 7)) +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 59, 15)) >a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembers4.ts, 65, 7)) a = b; // ok ->a : Symbol(a, Decl(assignmentCompatWithObjectMembers4.ts, 62, 7)) ->b : Symbol(b, Decl(assignmentCompatWithObjectMembers4.ts, 63, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembers4.ts, 62, 15)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembers4.ts, 63, 15)) b = a; // error ->b : Symbol(b, Decl(assignmentCompatWithObjectMembers4.ts, 63, 7)) ->a : Symbol(a, Decl(assignmentCompatWithObjectMembers4.ts, 62, 7)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembers4.ts, 63, 15)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembers4.ts, 62, 15)) a = s; // ok ->a : Symbol(a, Decl(assignmentCompatWithObjectMembers4.ts, 62, 7)) ->s : Symbol(s, Decl(assignmentCompatWithObjectMembers4.ts, 54, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembers4.ts, 62, 15)) +>s : Symbol(s, Decl(assignmentCompatWithObjectMembers4.ts, 54, 15)) a = s2; // ok ->a : Symbol(a, Decl(assignmentCompatWithObjectMembers4.ts, 62, 7)) ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 59, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembers4.ts, 62, 15)) +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembers4.ts, 59, 15)) a = a2; // ok ->a : Symbol(a, Decl(assignmentCompatWithObjectMembers4.ts, 62, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembers4.ts, 62, 15)) >a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembers4.ts, 65, 7)) a2 = b2; // ok @@ -292,13 +292,13 @@ namespace WithBase { a2 = b; // ok >a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembers4.ts, 65, 7)) ->b : Symbol(b, Decl(assignmentCompatWithObjectMembers4.ts, 63, 7)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembers4.ts, 63, 15)) a2 = t2; // ok >a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembers4.ts, 65, 7)) ->t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembers4.ts, 60, 7)) +>t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembers4.ts, 60, 15)) a2 = t; // ok >a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembers4.ts, 65, 7)) ->t : Symbol(t, Decl(assignmentCompatWithObjectMembers4.ts, 55, 7)) +>t : Symbol(t, Decl(assignmentCompatWithObjectMembers4.ts, 55, 15)) } diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers4.types b/tests/baselines/reference/assignmentCompatWithObjectMembers4.types index 941f3034a5d0e..1bdfcda3b1911 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.types +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.types @@ -41,11 +41,11 @@ namespace OnlyDerived { >foo : Derived2 > : ^^^^^^^^ - var s: S; + declare var s: S; >s : S > : ^ - var t: T; + declare var t: T; >t : T > : ^ @@ -57,21 +57,21 @@ namespace OnlyDerived { >foo : Derived2 > : ^^^^^^^^ - var s2: S2; + declare var s2: S2; >s2 : S2 > : ^^ - var t2: T2; + declare var t2: T2; >t2 : T2 > : ^^ - var a: { foo: Derived; } + declare var a: { foo: Derived; } >a : { foo: Derived; } > : ^^^^^^^ ^^^ >foo : Derived > : ^^^^^^^ - var b: { foo: Derived2; } + declare var b: { foo: Derived2; } >b : { foo: Derived2; } > : ^^^^^^^ ^^^ >foo : Derived2 @@ -292,11 +292,11 @@ namespace WithBase { >foo : Derived2 > : ^^^^^^^^ - var s: S; + declare var s: S; >s : S > : ^ - var t: T; + declare var t: T; >t : T > : ^ @@ -308,21 +308,21 @@ namespace WithBase { >foo : Derived2 > : ^^^^^^^^ - var s2: S2; + declare var s2: S2; >s2 : S2 > : ^^ - var t2: T2; + declare var t2: T2; >t2 : T2 > : ^^ - var a: { foo: Base; } + declare var a: { foo: Base; } >a : { foo: Base; } > : ^^^^^^^ ^^^ >foo : Base > : ^^^^ - var b: { foo: Derived2; } + declare var b: { foo: Derived2; } >b : { foo: Derived2; } > : ^^^^^^^ ^^^ >foo : Derived2 diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers5.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembers5.errors.txt index caf8eb5695bd1..36b014dea5fb7 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers5.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers5.errors.txt @@ -7,13 +7,13 @@ assignmentCompatWithObjectMembers5.ts(14,1): error TS2741: Property 'fooo' is mi foo: string; } - var c: C; + declare var c: C; interface I { fooo: string; } - var i: I; + declare var i: I; c = i; // error ~ diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers5.js b/tests/baselines/reference/assignmentCompatWithObjectMembers5.js index cb8da85d7e859..0da7ab9d13299 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers5.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers5.js @@ -5,13 +5,13 @@ class C { foo: string; } -var c: C; +declare var c: C; interface I { fooo: string; } -var i: I; +declare var i: I; c = i; // error i = c; // error @@ -22,7 +22,5 @@ var C = /** @class */ (function () { } return C; }()); -var c; -var i; c = i; // error i = c; // error diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers5.symbols b/tests/baselines/reference/assignmentCompatWithObjectMembers5.symbols index fdc4e5a828ba6..1e1a597489795 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers5.symbols +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers5.symbols @@ -8,26 +8,26 @@ class C { >foo : Symbol(C.foo, Decl(assignmentCompatWithObjectMembers5.ts, 0, 9)) } -var c: C; ->c : Symbol(c, Decl(assignmentCompatWithObjectMembers5.ts, 4, 3)) +declare var c: C; +>c : Symbol(c, Decl(assignmentCompatWithObjectMembers5.ts, 4, 11)) >C : Symbol(C, Decl(assignmentCompatWithObjectMembers5.ts, 0, 0)) interface I { ->I : Symbol(I, Decl(assignmentCompatWithObjectMembers5.ts, 4, 9)) +>I : Symbol(I, Decl(assignmentCompatWithObjectMembers5.ts, 4, 17)) fooo: string; >fooo : Symbol(I.fooo, Decl(assignmentCompatWithObjectMembers5.ts, 6, 13)) } -var i: I; ->i : Symbol(i, Decl(assignmentCompatWithObjectMembers5.ts, 10, 3)) ->I : Symbol(I, Decl(assignmentCompatWithObjectMembers5.ts, 4, 9)) +declare var i: I; +>i : Symbol(i, Decl(assignmentCompatWithObjectMembers5.ts, 10, 11)) +>I : Symbol(I, Decl(assignmentCompatWithObjectMembers5.ts, 4, 17)) c = i; // error ->c : Symbol(c, Decl(assignmentCompatWithObjectMembers5.ts, 4, 3)) ->i : Symbol(i, Decl(assignmentCompatWithObjectMembers5.ts, 10, 3)) +>c : Symbol(c, Decl(assignmentCompatWithObjectMembers5.ts, 4, 11)) +>i : Symbol(i, Decl(assignmentCompatWithObjectMembers5.ts, 10, 11)) i = c; // error ->i : Symbol(i, Decl(assignmentCompatWithObjectMembers5.ts, 10, 3)) ->c : Symbol(c, Decl(assignmentCompatWithObjectMembers5.ts, 4, 3)) +>i : Symbol(i, Decl(assignmentCompatWithObjectMembers5.ts, 10, 11)) +>c : Symbol(c, Decl(assignmentCompatWithObjectMembers5.ts, 4, 11)) diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers5.types b/tests/baselines/reference/assignmentCompatWithObjectMembers5.types index 93c42f8467da5..6d1a6ccd607c7 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers5.types +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers5.types @@ -10,7 +10,7 @@ class C { > : ^^^^^^ } -var c: C; +declare var c: C; >c : C > : ^ @@ -20,7 +20,7 @@ interface I { > : ^^^^^^ } -var i: I; +declare var i: I; >i : I > : ^ diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.errors.txt index d9603de9fe4b6..931bc9e32919a 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.errors.txt @@ -61,9 +61,9 @@ assignmentCompatWithObjectMembersAccessibility.ts(106,5): error TS2322: Type 'D' foo: string; } - var a: { foo: string; } - var b: Base; - var i: I; + declare var a: { foo: string; }; + declare var b: Base; + declare var i: I; // sources class D { @@ -73,8 +73,8 @@ assignmentCompatWithObjectMembersAccessibility.ts(106,5): error TS2322: Type 'D' class E { private foo: string; } - var d: D; - var e: E; + declare var d: D; + declare var e: E; a = b; a = i; @@ -137,9 +137,9 @@ assignmentCompatWithObjectMembersAccessibility.ts(106,5): error TS2322: Type 'D' interface I extends Base { } - var a: { foo: string; } - var b: Base; - var i: I; + declare var a: { foo: string; }; + declare var b: Base; + declare var i: I; // sources class D { @@ -150,8 +150,8 @@ assignmentCompatWithObjectMembersAccessibility.ts(106,5): error TS2322: Type 'D' private foo: string; } - var d: D; - var e: E; + declare var d: D; + declare var e: E; a = b; // error ~ diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.js b/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.js index b98662a3175aa..5a87f367adfa2 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.js @@ -13,9 +13,9 @@ namespace TargetIsPublic { foo: string; } - var a: { foo: string; } - var b: Base; - var i: I; + declare var a: { foo: string; }; + declare var b: Base; + declare var i: I; // sources class D { @@ -25,8 +25,8 @@ namespace TargetIsPublic { class E { private foo: string; } - var d: D; - var e: E; + declare var d: D; + declare var e: E; a = b; a = i; @@ -65,9 +65,9 @@ namespace TargetIsPublic { interface I extends Base { } - var a: { foo: string; } - var b: Base; - var i: I; + declare var a: { foo: string; }; + declare var b: Base; + declare var i: I; // sources class D { @@ -78,8 +78,8 @@ namespace TargetIsPublic { private foo: string; } - var d: D; - var e: E; + declare var d: D; + declare var e: E; a = b; // error a = i; // error @@ -121,9 +121,6 @@ var TargetIsPublic; } return Base; }()); - var a; - var b; - var i; // sources var D = /** @class */ (function () { function D() { @@ -135,8 +132,6 @@ var TargetIsPublic; } return E; }()); - var d; - var e; a = b; a = i; a = d; @@ -166,9 +161,6 @@ var TargetIsPublic; } return Base; }()); - var a; - var b; - var i; // sources var D = /** @class */ (function () { function D() { @@ -180,8 +172,6 @@ var TargetIsPublic; } return E; }()); - var d; - var e; a = b; // error a = i; // error a = d; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.symbols b/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.symbols index dfa2dec9c5f1c..f2372eea05d11 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.symbols +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.symbols @@ -21,21 +21,21 @@ namespace TargetIsPublic { >foo : Symbol(I.foo, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 8, 17)) } - var a: { foo: string; } ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 12, 7)) ->foo : Symbol(foo, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 12, 12)) + declare var a: { foo: string; }; +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 12, 15)) +>foo : Symbol(foo, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 12, 20)) - var b: Base; ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 13, 7)) + declare var b: Base; +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 13, 15)) >Base : Symbol(Base, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 2, 26)) - var i: I; ->i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 14, 7)) + declare var i: I; +>i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 14, 15)) >I : Symbol(I, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 6, 5)) // sources class D { ->D : Symbol(D, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 14, 13)) +>D : Symbol(D, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 14, 21)) public foo: string; >foo : Symbol(D.foo, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 17, 13)) @@ -47,97 +47,97 @@ namespace TargetIsPublic { private foo: string; >foo : Symbol(E.foo, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 21, 13)) } - var d: D; ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 24, 7)) ->D : Symbol(D, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 14, 13)) + declare var d: D; +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 24, 15)) +>D : Symbol(D, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 14, 21)) - var e: E; ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 25, 7)) + declare var e: E; +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 25, 15)) >E : Symbol(E, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 19, 5)) a = b; ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 12, 7)) ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 13, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 12, 15)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 13, 15)) a = i; ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 12, 7)) ->i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 14, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 12, 15)) +>i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 14, 15)) a = d; ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 12, 7)) ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 24, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 12, 15)) +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 24, 15)) a = e; // error ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 12, 7)) ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 25, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 12, 15)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 25, 15)) b = a; ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 13, 7)) ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 12, 7)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 13, 15)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 12, 15)) b = i; ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 13, 7)) ->i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 14, 7)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 13, 15)) +>i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 14, 15)) b = d; ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 13, 7)) ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 24, 7)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 13, 15)) +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 24, 15)) b = e; // error ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 13, 7)) ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 25, 7)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 13, 15)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 25, 15)) i = a; ->i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 14, 7)) ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 12, 7)) +>i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 14, 15)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 12, 15)) i = b; ->i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 14, 7)) ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 13, 7)) +>i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 14, 15)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 13, 15)) i = d; ->i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 14, 7)) ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 24, 7)) +>i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 14, 15)) +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 24, 15)) i = e; // error ->i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 14, 7)) ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 25, 7)) +>i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 14, 15)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 25, 15)) d = a; ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 24, 7)) ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 12, 7)) +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 24, 15)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 12, 15)) d = b; ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 24, 7)) ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 13, 7)) +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 24, 15)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 13, 15)) d = i; ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 24, 7)) ->i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 14, 7)) +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 24, 15)) +>i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 14, 15)) d = e; // error ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 24, 7)) ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 25, 7)) +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 24, 15)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 25, 15)) e = a; // errror ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 25, 7)) ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 12, 7)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 25, 15)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 12, 15)) e = b; // errror ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 25, 7)) ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 13, 7)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 25, 15)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 13, 15)) e = i; // errror ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 25, 7)) ->i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 14, 7)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 25, 15)) +>i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 14, 15)) e = d; // errror ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 25, 7)) ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 24, 7)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 25, 15)) +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 24, 15)) e = e; ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 25, 7)) ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 25, 7)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 25, 15)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 25, 15)) } @@ -157,21 +157,21 @@ namespace TargetIsPublic { >Base : Symbol(Base, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 55, 26)) } - var a: { foo: string; } ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 64, 7)) ->foo : Symbol(foo, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 64, 12)) + declare var a: { foo: string; }; +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 64, 15)) +>foo : Symbol(foo, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 64, 20)) - var b: Base; ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 65, 7)) + declare var b: Base; +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 65, 15)) >Base : Symbol(Base, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 55, 26)) - var i: I; ->i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 66, 7)) + declare var i: I; +>i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 66, 15)) >I : Symbol(I, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 59, 5)) // sources class D { ->D : Symbol(D, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 66, 13)) +>D : Symbol(D, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 66, 21)) public foo: string; >foo : Symbol(D.foo, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 69, 13)) @@ -184,104 +184,104 @@ namespace TargetIsPublic { >foo : Symbol(E.foo, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 73, 13)) } - var d: D; ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 77, 7)) ->D : Symbol(D, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 66, 13)) + declare var d: D; +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 77, 15)) +>D : Symbol(D, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 66, 21)) - var e: E; ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 78, 7)) + declare var e: E; +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 78, 15)) >E : Symbol(E, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 71, 5)) a = b; // error ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 64, 7)) ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 65, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 64, 15)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 65, 15)) a = i; // error ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 64, 7)) ->i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 66, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 64, 15)) +>i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 66, 15)) a = d; ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 64, 7)) ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 77, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 64, 15)) +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 77, 15)) a = e; // error ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 64, 7)) ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 78, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 64, 15)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 78, 15)) b = a; // error ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 65, 7)) ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 64, 7)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 65, 15)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 64, 15)) b = i; ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 65, 7)) ->i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 66, 7)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 65, 15)) +>i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 66, 15)) b = d; // error ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 65, 7)) ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 77, 7)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 65, 15)) +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 77, 15)) b = e; // error ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 65, 7)) ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 78, 7)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 65, 15)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 78, 15)) b = b; ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 65, 7)) ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 65, 7)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 65, 15)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 65, 15)) i = a; // error ->i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 66, 7)) ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 64, 7)) +>i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 66, 15)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 64, 15)) i = b; ->i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 66, 7)) ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 65, 7)) +>i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 66, 15)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 65, 15)) i = d; // error ->i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 66, 7)) ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 77, 7)) +>i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 66, 15)) +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 77, 15)) i = e; // error ->i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 66, 7)) ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 78, 7)) +>i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 66, 15)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 78, 15)) i = i; ->i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 66, 7)) ->i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 66, 7)) +>i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 66, 15)) +>i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 66, 15)) d = a; ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 77, 7)) ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 64, 7)) +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 77, 15)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 64, 15)) d = b; // error ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 77, 7)) ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 65, 7)) +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 77, 15)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 65, 15)) d = i; // error ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 77, 7)) ->i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 66, 7)) +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 77, 15)) +>i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 66, 15)) d = e; // error ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 77, 7)) ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 78, 7)) +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 77, 15)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 78, 15)) e = a; // errror ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 78, 7)) ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 64, 7)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 78, 15)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 64, 15)) e = b; // errror ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 78, 7)) ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 65, 7)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 78, 15)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 65, 15)) e = i; // errror ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 78, 7)) ->i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 66, 7)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 78, 15)) +>i : Symbol(i, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 66, 15)) e = d; // errror ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 78, 7)) ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 77, 7)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 78, 15)) +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 77, 15)) e = e; ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 78, 7)) ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 78, 7)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 78, 15)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersAccessibility.ts, 78, 15)) } diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.types b/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.types index bb9d29095276c..afd00c67b2dda 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.types +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.types @@ -23,17 +23,17 @@ namespace TargetIsPublic { > : ^^^^^^ } - var a: { foo: string; } + declare var a: { foo: string; }; >a : { foo: string; } > : ^^^^^^^ ^^^ >foo : string > : ^^^^^^ - var b: Base; + declare var b: Base; >b : Base > : ^^^^ - var i: I; + declare var i: I; >i : I > : ^ @@ -55,11 +55,11 @@ namespace TargetIsPublic { >foo : string > : ^^^^^^ } - var d: D; + declare var d: D; >d : D > : ^ - var e: E; + declare var e: E; >e : E > : ^ @@ -250,17 +250,17 @@ namespace TargetIsPublic { interface I extends Base { } - var a: { foo: string; } + declare var a: { foo: string; }; >a : { foo: string; } > : ^^^^^^^ ^^^ >foo : string > : ^^^^^^ - var b: Base; + declare var b: Base; >b : Base > : ^^^^ - var i: I; + declare var i: I; >i : I > : ^ @@ -283,11 +283,11 @@ namespace TargetIsPublic { > : ^^^^^^ } - var d: D; + declare var d: D; >d : D > : ^ - var e: E; + declare var e: E; >e : E > : ^ diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.errors.txt index 30f75f0b2d1e8..48356967652b5 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.errors.txt @@ -24,9 +24,9 @@ assignmentCompatWithObjectMembersOptionality.ts(84,5): error TS2322: Type 'E' is interface C { opt?: Base } - var c: C; + declare var c: C; - var a: { opt?: Base; } + declare var a: { opt?: Base; }; var b: typeof a = { opt: new Base() } // sources @@ -39,9 +39,9 @@ assignmentCompatWithObjectMembersOptionality.ts(84,5): error TS2322: Type 'E' is interface F { opt?: Derived; } - var d: D; - var e: E; - var f: F; + declare var d: D; + declare var e: E; + declare var f: F; // all ok c = d; @@ -66,9 +66,9 @@ assignmentCompatWithObjectMembersOptionality.ts(84,5): error TS2322: Type 'E' is interface C { opt: Base } - var c: C; + declare var c: C; - var a: { opt: Base; } + declare var a: { opt: Base; }; var b = { opt: new Base() } // sources @@ -81,9 +81,9 @@ assignmentCompatWithObjectMembersOptionality.ts(84,5): error TS2322: Type 'E' is interface F { opt: Derived; } - var d: D; - var e: E; - var f: F; + declare var d: D; + declare var e: E; + declare var f: F; c = d; // error ~ diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js index 2c76b037ad1a6..afd0d3f76c549 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js @@ -12,9 +12,9 @@ namespace TargetHasOptional { interface C { opt?: Base } - var c: C; + declare var c: C; - var a: { opt?: Base; } + declare var a: { opt?: Base; }; var b: typeof a = { opt: new Base() } // sources @@ -27,9 +27,9 @@ namespace TargetHasOptional { interface F { opt?: Derived; } - var d: D; - var e: E; - var f: F; + declare var d: D; + declare var e: E; + declare var f: F; // all ok c = d; @@ -54,9 +54,9 @@ namespace SourceHasOptional { interface C { opt: Base } - var c: C; + declare var c: C; - var a: { opt: Base; } + declare var a: { opt: Base; }; var b = { opt: new Base() } // sources @@ -69,9 +69,9 @@ namespace SourceHasOptional { interface F { opt: Derived; } - var d: D; - var e: E; - var f: F; + declare var d: D; + declare var e: E; + declare var f: F; c = d; // error c = e; // error @@ -128,12 +128,7 @@ var Derived2 = /** @class */ (function (_super) { }(Derived)); var TargetHasOptional; (function (TargetHasOptional) { - var c; - var a; var b = { opt: new Base() }; - var d; - var e; - var f; // all ok c = d; c = e; @@ -151,12 +146,7 @@ var TargetHasOptional; })(TargetHasOptional || (TargetHasOptional = {})); var SourceHasOptional; (function (SourceHasOptional) { - var c; - var a; var b = { opt: new Base() }; - var d; - var e; - var f; c = d; // error c = e; // error c = f; // ok diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.symbols b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.symbols index 5972a0e8014ef..c9c1162e40232 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.symbols +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.symbols @@ -28,18 +28,18 @@ namespace TargetHasOptional { >opt : Symbol(C.opt, Decl(assignmentCompatWithObjectMembersOptionality.ts, 8, 17)) >Base : Symbol(Base, Decl(assignmentCompatWithObjectMembersOptionality.ts, 0, 0)) } - var c: C; ->c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality.ts, 11, 7)) + declare var c: C; +>c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality.ts, 11, 15)) >C : Symbol(C, Decl(assignmentCompatWithObjectMembersOptionality.ts, 6, 29)) - var a: { opt?: Base; } ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 13, 7)) ->opt : Symbol(opt, Decl(assignmentCompatWithObjectMembersOptionality.ts, 13, 12)) + declare var a: { opt?: Base; }; +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 13, 15)) +>opt : Symbol(opt, Decl(assignmentCompatWithObjectMembersOptionality.ts, 13, 20)) >Base : Symbol(Base, Decl(assignmentCompatWithObjectMembersOptionality.ts, 0, 0)) var b: typeof a = { opt: new Base() } >b : Symbol(b, Decl(assignmentCompatWithObjectMembersOptionality.ts, 14, 7)) ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 13, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 13, 15)) >opt : Symbol(opt, Decl(assignmentCompatWithObjectMembersOptionality.ts, 14, 23)) >Base : Symbol(Base, Decl(assignmentCompatWithObjectMembersOptionality.ts, 0, 0)) @@ -65,70 +65,70 @@ namespace TargetHasOptional { >opt : Symbol(F.opt, Decl(assignmentCompatWithObjectMembersOptionality.ts, 23, 17)) >Derived : Symbol(Derived, Decl(assignmentCompatWithObjectMembersOptionality.ts, 2, 27)) } - var d: D; ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality.ts, 26, 7)) + declare var d: D; +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality.ts, 26, 15)) >D : Symbol(D, Decl(assignmentCompatWithObjectMembersOptionality.ts, 14, 41)) - var e: E; ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality.ts, 27, 7)) + declare var e: E; +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality.ts, 27, 15)) >E : Symbol(E, Decl(assignmentCompatWithObjectMembersOptionality.ts, 19, 5)) - var f: F; ->f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality.ts, 28, 7)) + declare var f: F; +>f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality.ts, 28, 15)) >F : Symbol(F, Decl(assignmentCompatWithObjectMembersOptionality.ts, 22, 5)) // all ok c = d; ->c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality.ts, 11, 7)) ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality.ts, 26, 7)) +>c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality.ts, 11, 15)) +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality.ts, 26, 15)) c = e; ->c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality.ts, 11, 7)) ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality.ts, 27, 7)) +>c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality.ts, 11, 15)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality.ts, 27, 15)) c = f; ->c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality.ts, 11, 7)) ->f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality.ts, 28, 7)) +>c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality.ts, 11, 15)) +>f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality.ts, 28, 15)) c = a; ->c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality.ts, 11, 7)) ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 13, 7)) +>c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality.ts, 11, 15)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 13, 15)) a = d; ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 13, 7)) ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality.ts, 26, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 13, 15)) +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality.ts, 26, 15)) a = e; ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 13, 7)) ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality.ts, 27, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 13, 15)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality.ts, 27, 15)) a = f; ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 13, 7)) ->f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality.ts, 28, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 13, 15)) +>f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality.ts, 28, 15)) a = c; ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 13, 7)) ->c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality.ts, 11, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 13, 15)) +>c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality.ts, 11, 15)) b = d; >b : Symbol(b, Decl(assignmentCompatWithObjectMembersOptionality.ts, 14, 7)) ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality.ts, 26, 7)) +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality.ts, 26, 15)) b = e; >b : Symbol(b, Decl(assignmentCompatWithObjectMembersOptionality.ts, 14, 7)) ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality.ts, 27, 7)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality.ts, 27, 15)) b = f; >b : Symbol(b, Decl(assignmentCompatWithObjectMembersOptionality.ts, 14, 7)) ->f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality.ts, 28, 7)) +>f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality.ts, 28, 15)) b = a; >b : Symbol(b, Decl(assignmentCompatWithObjectMembersOptionality.ts, 14, 7)) ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 13, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 13, 15)) b = c; >b : Symbol(b, Decl(assignmentCompatWithObjectMembersOptionality.ts, 14, 7)) ->c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality.ts, 11, 7)) +>c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality.ts, 11, 15)) } namespace SourceHasOptional { @@ -142,13 +142,13 @@ namespace SourceHasOptional { >opt : Symbol(C.opt, Decl(assignmentCompatWithObjectMembersOptionality.ts, 50, 17)) >Base : Symbol(Base, Decl(assignmentCompatWithObjectMembersOptionality.ts, 0, 0)) } - var c: C; ->c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality.ts, 53, 7)) + declare var c: C; +>c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality.ts, 53, 15)) >C : Symbol(C, Decl(assignmentCompatWithObjectMembersOptionality.ts, 48, 29)) - var a: { opt: Base; } ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 55, 7)) ->opt : Symbol(opt, Decl(assignmentCompatWithObjectMembersOptionality.ts, 55, 12)) + declare var a: { opt: Base; }; +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 55, 15)) +>opt : Symbol(opt, Decl(assignmentCompatWithObjectMembersOptionality.ts, 55, 20)) >Base : Symbol(Base, Decl(assignmentCompatWithObjectMembersOptionality.ts, 0, 0)) var b = { opt: new Base() } @@ -178,67 +178,67 @@ namespace SourceHasOptional { >opt : Symbol(F.opt, Decl(assignmentCompatWithObjectMembersOptionality.ts, 65, 17)) >Derived : Symbol(Derived, Decl(assignmentCompatWithObjectMembersOptionality.ts, 2, 27)) } - var d: D; ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality.ts, 68, 7)) + declare var d: D; +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality.ts, 68, 15)) >D : Symbol(D, Decl(assignmentCompatWithObjectMembersOptionality.ts, 56, 31)) - var e: E; ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality.ts, 69, 7)) + declare var e: E; +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality.ts, 69, 15)) >E : Symbol(E, Decl(assignmentCompatWithObjectMembersOptionality.ts, 61, 5)) - var f: F; ->f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality.ts, 70, 7)) + declare var f: F; +>f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality.ts, 70, 15)) >F : Symbol(F, Decl(assignmentCompatWithObjectMembersOptionality.ts, 64, 5)) c = d; // error ->c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality.ts, 53, 7)) ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality.ts, 68, 7)) +>c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality.ts, 53, 15)) +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality.ts, 68, 15)) c = e; // error ->c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality.ts, 53, 7)) ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality.ts, 69, 7)) +>c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality.ts, 53, 15)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality.ts, 69, 15)) c = f; // ok ->c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality.ts, 53, 7)) ->f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality.ts, 70, 7)) +>c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality.ts, 53, 15)) +>f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality.ts, 70, 15)) c = a; // ok ->c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality.ts, 53, 7)) ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 55, 7)) +>c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality.ts, 53, 15)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 55, 15)) a = d; // error ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 55, 7)) ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality.ts, 68, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 55, 15)) +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality.ts, 68, 15)) a = e; // error ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 55, 7)) ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality.ts, 69, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 55, 15)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality.ts, 69, 15)) a = f; // ok ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 55, 7)) ->f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality.ts, 70, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 55, 15)) +>f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality.ts, 70, 15)) a = c; // ok ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 55, 7)) ->c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality.ts, 53, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 55, 15)) +>c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality.ts, 53, 15)) b = d; // error >b : Symbol(b, Decl(assignmentCompatWithObjectMembersOptionality.ts, 56, 7)) ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality.ts, 68, 7)) +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality.ts, 68, 15)) b = e; // error >b : Symbol(b, Decl(assignmentCompatWithObjectMembersOptionality.ts, 56, 7)) ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality.ts, 69, 7)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality.ts, 69, 15)) b = f; // ok >b : Symbol(b, Decl(assignmentCompatWithObjectMembersOptionality.ts, 56, 7)) ->f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality.ts, 70, 7)) +>f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality.ts, 70, 15)) b = a; // ok >b : Symbol(b, Decl(assignmentCompatWithObjectMembersOptionality.ts, 56, 7)) ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 55, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality.ts, 55, 15)) b = c; // ok >b : Symbol(b, Decl(assignmentCompatWithObjectMembersOptionality.ts, 56, 7)) ->c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality.ts, 53, 7)) +>c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality.ts, 53, 15)) } diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.types b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.types index 513ba72180fd2..77454790263b3 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.types +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.types @@ -35,11 +35,11 @@ namespace TargetHasOptional { >opt : Base > : ^^^^ } - var c: C; + declare var c: C; >c : C > : ^ - var a: { opt?: Base; } + declare var a: { opt?: Base; }; >a : { opt?: Base; } > : ^^^^^^^^ ^^^ >opt : Base @@ -75,15 +75,15 @@ namespace TargetHasOptional { >opt : Derived > : ^^^^^^^ } - var d: D; + declare var d: D; >d : D > : ^ - var e: E; + declare var e: E; >e : E > : ^ - var f: F; + declare var f: F; >f : F > : ^ @@ -203,11 +203,11 @@ namespace SourceHasOptional { >opt : Base > : ^^^^ } - var c: C; + declare var c: C; >c : C > : ^ - var a: { opt: Base; } + declare var a: { opt: Base; }; >a : { opt: Base; } > : ^^^^^^^ ^^^ >opt : Base @@ -241,15 +241,15 @@ namespace SourceHasOptional { >opt : Derived > : ^^^^^^^ } - var d: D; + declare var d: D; >d : D > : ^ - var e: E; + declare var e: E; >e : E > : ^ - var f: F; + declare var f: F; >f : F > : ^ diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt index 73efbfd5551f7..98eaea88168af 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt @@ -31,9 +31,9 @@ assignmentCompatWithObjectMembersOptionality2.ts(86,5): error TS2741: Property ' interface C { opt?: Base } - var c: C; + declare var c: C; - var a: { opt?: Base; } + declare var a: { opt?: Base; }; var b: typeof a = { opt: new Base() } // sources @@ -46,9 +46,9 @@ assignmentCompatWithObjectMembersOptionality2.ts(86,5): error TS2741: Property ' interface F { other?: Derived; } - var d: D; - var e: E; - var f: F; + declare var d: D; + declare var e: E; + declare var f: F; // disallowed by weak type checking c = d; @@ -91,9 +91,9 @@ assignmentCompatWithObjectMembersOptionality2.ts(86,5): error TS2741: Property ' interface C { opt: Base } - var c: C; + declare var c: C; - var a: { opt: Base; } + declare var a: { opt: Base; }; var b = { opt: new Base() } // sources @@ -106,9 +106,9 @@ assignmentCompatWithObjectMembersOptionality2.ts(86,5): error TS2741: Property ' interface F { other: Derived; } - var d: D; - var e: E; - var f: F; + declare var d: D; + declare var e: E; + declare var f: F; c = d; // error ~ @@ -127,15 +127,15 @@ assignmentCompatWithObjectMembersOptionality2.ts(86,5): error TS2741: Property ' a = d; // error ~ !!! error TS2741: Property 'opt' is missing in type 'D' but required in type '{ opt: Base; }'. -!!! related TS2728 assignmentCompatWithObjectMembersOptionality2.ts:57:14: 'opt' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersOptionality2.ts:57:22: 'opt' is declared here. a = e; // error ~ !!! error TS2741: Property 'opt' is missing in type 'E' but required in type '{ opt: Base; }'. -!!! related TS2728 assignmentCompatWithObjectMembersOptionality2.ts:57:14: 'opt' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersOptionality2.ts:57:22: 'opt' is declared here. a = f; // error ~ !!! error TS2741: Property 'opt' is missing in type 'F' but required in type '{ opt: Base; }'. -!!! related TS2728 assignmentCompatWithObjectMembersOptionality2.ts:57:14: 'opt' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersOptionality2.ts:57:22: 'opt' is declared here. a = c; // ok b = d; // error diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js index 27948a4b8d238..a77437c73b151 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js @@ -13,9 +13,9 @@ namespace TargetHasOptional { interface C { opt?: Base } - var c: C; + declare var c: C; - var a: { opt?: Base; } + declare var a: { opt?: Base; }; var b: typeof a = { opt: new Base() } // sources @@ -28,9 +28,9 @@ namespace TargetHasOptional { interface F { other?: Derived; } - var d: D; - var e: E; - var f: F; + declare var d: D; + declare var e: E; + declare var f: F; // disallowed by weak type checking c = d; @@ -55,9 +55,9 @@ namespace SourceHasOptional { interface C { opt: Base } - var c: C; + declare var c: C; - var a: { opt: Base; } + declare var a: { opt: Base; }; var b = { opt: new Base() } // sources @@ -70,9 +70,9 @@ namespace SourceHasOptional { interface F { other: Derived; } - var d: D; - var e: E; - var f: F; + declare var d: D; + declare var e: E; + declare var f: F; c = d; // error c = e; // error @@ -131,12 +131,7 @@ var Derived2 = /** @class */ (function (_super) { }(Derived)); var TargetHasOptional; (function (TargetHasOptional) { - var c; - var a; var b = { opt: new Base() }; - var d; - var e; - var f; // disallowed by weak type checking c = d; c = e; @@ -155,12 +150,7 @@ var TargetHasOptional; })(TargetHasOptional || (TargetHasOptional = {})); var SourceHasOptional; (function (SourceHasOptional) { - var c; - var a; var b = { opt: new Base() }; - var d; - var e; - var f; c = d; // error c = e; // error c = f; // error diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.symbols b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.symbols index 6346a4031e476..6cef7e0de6f15 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.symbols +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.symbols @@ -29,18 +29,18 @@ namespace TargetHasOptional { >opt : Symbol(C.opt, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 9, 17)) >Base : Symbol(Base, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 0, 0)) } - var c: C; ->c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 12, 7)) + declare var c: C; +>c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 12, 15)) >C : Symbol(C, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 7, 29)) - var a: { opt?: Base; } ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 14, 7)) ->opt : Symbol(opt, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 14, 12)) + declare var a: { opt?: Base; }; +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 14, 15)) +>opt : Symbol(opt, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 14, 20)) >Base : Symbol(Base, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 0, 0)) var b: typeof a = { opt: new Base() } >b : Symbol(b, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 15, 7)) ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 14, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 14, 15)) >opt : Symbol(opt, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 15, 23)) >Base : Symbol(Base, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 0, 0)) @@ -66,71 +66,71 @@ namespace TargetHasOptional { >other : Symbol(F.other, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 24, 17)) >Derived : Symbol(Derived, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 3, 27)) } - var d: D; ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 27, 7)) + declare var d: D; +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 27, 15)) >D : Symbol(D, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 15, 41)) - var e: E; ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 28, 7)) + declare var e: E; +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 28, 15)) >E : Symbol(E, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 20, 5)) - var f: F; ->f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 29, 7)) + declare var f: F; +>f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 29, 15)) >F : Symbol(F, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 23, 5)) // disallowed by weak type checking c = d; ->c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 12, 7)) ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 27, 7)) +>c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 12, 15)) +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 27, 15)) c = e; ->c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 12, 7)) ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 28, 7)) +>c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 12, 15)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 28, 15)) c = f; ->c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 12, 7)) ->f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 29, 7)) +>c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 12, 15)) +>f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 29, 15)) a = d; ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 14, 7)) ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 27, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 14, 15)) +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 27, 15)) a = e; ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 14, 7)) ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 28, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 14, 15)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 28, 15)) a = f; ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 14, 7)) ->f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 29, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 14, 15)) +>f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 29, 15)) b = d; >b : Symbol(b, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 15, 7)) ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 27, 7)) +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 27, 15)) b = e; >b : Symbol(b, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 15, 7)) ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 28, 7)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 28, 15)) b = f; >b : Symbol(b, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 15, 7)) ->f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 29, 7)) +>f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 29, 15)) // ok c = a; ->c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 12, 7)) ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 14, 7)) +>c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 12, 15)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 14, 15)) a = c; ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 14, 7)) ->c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 12, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 14, 15)) +>c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 12, 15)) b = a; >b : Symbol(b, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 15, 7)) ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 14, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 14, 15)) b = c; >b : Symbol(b, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 15, 7)) ->c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 12, 7)) +>c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 12, 15)) } namespace SourceHasOptional { @@ -144,13 +144,13 @@ namespace SourceHasOptional { >opt : Symbol(C.opt, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 51, 17)) >Base : Symbol(Base, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 0, 0)) } - var c: C; ->c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 54, 7)) + declare var c: C; +>c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 54, 15)) >C : Symbol(C, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 49, 29)) - var a: { opt: Base; } ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 56, 7)) ->opt : Symbol(opt, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 56, 12)) + declare var a: { opt: Base; }; +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 56, 15)) +>opt : Symbol(opt, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 56, 20)) >Base : Symbol(Base, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 0, 0)) var b = { opt: new Base() } @@ -180,68 +180,68 @@ namespace SourceHasOptional { >other : Symbol(F.other, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 66, 17)) >Derived : Symbol(Derived, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 3, 27)) } - var d: D; ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 69, 7)) + declare var d: D; +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 69, 15)) >D : Symbol(D, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 57, 31)) - var e: E; ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 70, 7)) + declare var e: E; +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 70, 15)) >E : Symbol(E, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 62, 5)) - var f: F; ->f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 71, 7)) + declare var f: F; +>f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 71, 15)) >F : Symbol(F, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 65, 5)) c = d; // error ->c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 54, 7)) ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 69, 7)) +>c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 54, 15)) +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 69, 15)) c = e; // error ->c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 54, 7)) ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 70, 7)) +>c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 54, 15)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 70, 15)) c = f; // error ->c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 54, 7)) ->f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 71, 7)) +>c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 54, 15)) +>f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 71, 15)) c = a; // ok ->c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 54, 7)) ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 56, 7)) +>c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 54, 15)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 56, 15)) a = d; // error ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 56, 7)) ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 69, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 56, 15)) +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 69, 15)) a = e; // error ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 56, 7)) ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 70, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 56, 15)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 70, 15)) a = f; // error ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 56, 7)) ->f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 71, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 56, 15)) +>f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 71, 15)) a = c; // ok ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 56, 7)) ->c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 54, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 56, 15)) +>c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 54, 15)) b = d; // error >b : Symbol(b, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 57, 7)) ->d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 69, 7)) +>d : Symbol(d, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 69, 15)) b = e; // error >b : Symbol(b, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 57, 7)) ->e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 70, 7)) +>e : Symbol(e, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 70, 15)) b = f; // error >b : Symbol(b, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 57, 7)) ->f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 71, 7)) +>f : Symbol(f, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 71, 15)) b = a; // ok >b : Symbol(b, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 57, 7)) ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 56, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 56, 15)) b = c; // ok >b : Symbol(b, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 57, 7)) ->c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 54, 7)) +>c : Symbol(c, Decl(assignmentCompatWithObjectMembersOptionality2.ts, 54, 15)) } diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.types b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.types index c637a7641c231..8b6e04d708d87 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.types +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.types @@ -36,11 +36,11 @@ namespace TargetHasOptional { >opt : Base > : ^^^^ } - var c: C; + declare var c: C; >c : C > : ^ - var a: { opt?: Base; } + declare var a: { opt?: Base; }; >a : { opt?: Base; } > : ^^^^^^^^ ^^^ >opt : Base @@ -76,15 +76,15 @@ namespace TargetHasOptional { >other : Derived > : ^^^^^^^ } - var d: D; + declare var d: D; >d : D > : ^ - var e: E; + declare var e: E; >e : E > : ^ - var f: F; + declare var f: F; >f : F > : ^ @@ -205,11 +205,11 @@ namespace SourceHasOptional { >opt : Base > : ^^^^ } - var c: C; + declare var c: C; >c : C > : ^ - var a: { opt: Base; } + declare var a: { opt: Base; }; >a : { opt: Base; } > : ^^^^^^^ ^^^ >opt : Base @@ -243,15 +243,15 @@ namespace SourceHasOptional { >other : Derived > : ^^^^^^^ } - var d: D; + declare var d: D; >d : D > : ^ - var e: E; + declare var e: E; >e : E > : ^ - var f: F; + declare var f: F; >f : F > : ^ diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt index 2c395ded5c6de..e48d9172b8958 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt @@ -36,16 +36,16 @@ assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Prop namespace JustStrings { class S { '1': string; } class T { '1.': string; } - var s: S; - var t: T; + declare var s: S; + declare var t: T; interface S2 { '1': string; bar?: string } interface T2 { '1.0': string; baz?: string } - var s2: S2; - var t2: T2; + declare var s2: S2; + declare var t2: T2; - var a: { '1.': string; bar?: string } - var b: { '1.0': string; baz?: string } + declare var a: { '1.': string; bar?: string }; + declare var b: { '1.0': string; baz?: string }; var a2 = { '1.0': '' }; var b2 = { '1': '' }; @@ -88,23 +88,23 @@ assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Prop a = b; ~ !!! error TS2741: Property ''1.'' is missing in type '{ '1.0': string; baz?: string; }' but required in type '{ '1.': string; bar?: string; }'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: ''1.'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:15:22: ''1.'' is declared here. b = a; ~ !!! error TS2741: Property ''1.0'' is missing in type '{ '1.': string; bar?: string; }' but required in type '{ '1.0': string; baz?: string; }'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:16:14: ''1.0'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:16:22: ''1.0'' is declared here. a = s; ~ !!! error TS2741: Property ''1.'' is missing in type 'S' but required in type '{ '1.': string; bar?: string; }'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: ''1.'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:15:22: ''1.'' is declared here. a = s2; ~ !!! error TS2741: Property ''1.'' is missing in type 'S2' but required in type '{ '1.': string; bar?: string; }'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: ''1.'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:15:22: ''1.'' is declared here. a = a2; ~ !!! error TS2741: Property ''1.'' is missing in type '{ '1.0': string; }' but required in type '{ '1.': string; bar?: string; }'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: ''1.'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:15:22: ''1.'' is declared here. a2 = b2; ~~ @@ -125,16 +125,16 @@ assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Prop namespace NumbersAndStrings { class S { '1': string; } class T { 1: string; } - var s: S; - var t: T; + declare var s: S; + declare var t: T; interface S2 { '1': string; bar?: string } interface T2 { 1.0: string; baz?: string } - var s2: S2; - var t2: T2; + declare var s2: S2; + declare var t2: T2; - var a: { '1.': string; bar?: string } - var b: { 1.0: string; baz?: string } + declare var a: { '1.': string; bar?: string }; + declare var b: { 1.0: string; baz?: string }; var a2 = { '1.0': '' }; var b2 = { 1.: '' }; @@ -159,27 +159,27 @@ assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Prop a = b; // error ~ !!! error TS2741: Property ''1.'' is missing in type '{ 1: string; baz?: string; }' but required in type '{ '1.': string; bar?: string; }'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:22: ''1.'' is declared here. b = a; // error ~ !!! error TS2741: Property '1.0' is missing in type '{ '1.': string; bar?: string; }' but required in type '{ 1: string; baz?: string; }'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:57:14: '1.0' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:57:22: '1.0' is declared here. a = s; // error ~ !!! error TS2741: Property ''1.'' is missing in type 'S' but required in type '{ '1.': string; bar?: string; }'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:22: ''1.'' is declared here. a = s2; // error ~ !!! error TS2741: Property ''1.'' is missing in type 'S2' but required in type '{ '1.': string; bar?: string; }'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:22: ''1.'' is declared here. a = a2; // error ~ !!! error TS2741: Property ''1.'' is missing in type '{ '1.0': string; }' but required in type '{ '1.': string; bar?: string; }'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:22: ''1.'' is declared here. a = b2; // error ~ !!! error TS2741: Property ''1.'' is missing in type '{ 1: string; }' but required in type '{ '1.': string; bar?: string; }'. -!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:22: ''1.'' is declared here. a2 = b2; // error ~~ diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.js b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.js index 4d0aa624d2caa..a9fea11c20cfb 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.js @@ -7,16 +7,16 @@ namespace JustStrings { class S { '1': string; } class T { '1.': string; } - var s: S; - var t: T; + declare var s: S; + declare var t: T; interface S2 { '1': string; bar?: string } interface T2 { '1.0': string; baz?: string } - var s2: S2; - var t2: T2; + declare var s2: S2; + declare var t2: T2; - var a: { '1.': string; bar?: string } - var b: { '1.0': string; baz?: string } + declare var a: { '1.': string; bar?: string }; + declare var b: { '1.0': string; baz?: string }; var a2 = { '1.0': '' }; var b2 = { '1': '' }; @@ -48,16 +48,16 @@ namespace JustStrings { namespace NumbersAndStrings { class S { '1': string; } class T { 1: string; } - var s: S; - var t: T; + declare var s: S; + declare var t: T; interface S2 { '1': string; bar?: string } interface T2 { 1.0: string; baz?: string } - var s2: S2; - var t2: T2; + declare var s2: S2; + declare var t2: T2; - var a: { '1.': string; bar?: string } - var b: { 1.0: string; baz?: string } + declare var a: { '1.': string; bar?: string }; + declare var b: { 1.0: string; baz?: string }; var a2 = { '1.0': '' }; var b2 = { 1.: '' }; @@ -102,12 +102,6 @@ var JustStrings; } return T; }()); - var s; - var t; - var s2; - var t2; - var a; - var b; var a2 = { '1.0': '' }; var b2 = { '1': '' }; s = t; @@ -142,12 +136,6 @@ var NumbersAndStrings; } return T; }()); - var s; - var t; - var s2; - var t2; - var a; - var b; var a2 = { '1.0': '' }; var b2 = { 1.: '' }; s = t; // ok diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.symbols b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.symbols index 646e20437a410..ac70c58bcb488 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.symbols +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.symbols @@ -15,16 +15,16 @@ namespace JustStrings { >T : Symbol(T, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 4, 28)) >'1.' : Symbol(T['1.'], Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 5, 13)) - var s: S; ->s : Symbol(s, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 6, 7)) + declare var s: S; +>s : Symbol(s, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 6, 15)) >S : Symbol(S, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 3, 23)) - var t: T; ->t : Symbol(t, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 7, 7)) + declare var t: T; +>t : Symbol(t, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 7, 15)) >T : Symbol(T, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 4, 28)) interface S2 { '1': string; bar?: string } ->S2 : Symbol(S2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 7, 13)) +>S2 : Symbol(S2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 7, 21)) >'1' : Symbol(S2['1'], Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 9, 18)) >bar : Symbol(S2.bar, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 9, 31)) @@ -33,23 +33,23 @@ namespace JustStrings { >'1.0' : Symbol(T2['1.0'], Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 10, 18)) >baz : Symbol(T2.baz, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 10, 33)) - var s2: S2; ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 11, 7)) ->S2 : Symbol(S2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 7, 13)) + declare var s2: S2; +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 11, 15)) +>S2 : Symbol(S2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 7, 21)) - var t2: T2; ->t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 12, 7)) + declare var t2: T2; +>t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 12, 15)) >T2 : Symbol(T2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 9, 46)) - var a: { '1.': string; bar?: string } ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 14, 7)) ->'1.' : Symbol('1.', Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 14, 12)) ->bar : Symbol(bar, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 14, 26)) + declare var a: { '1.': string; bar?: string }; +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 14, 15)) +>'1.' : Symbol('1.', Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 14, 20)) +>bar : Symbol(bar, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 14, 34)) - var b: { '1.0': string; baz?: string } ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 15, 7)) ->'1.0' : Symbol('1.0', Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 15, 12)) ->baz : Symbol(baz, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 15, 27)) + declare var b: { '1.0': string; baz?: string }; +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 15, 15)) +>'1.0' : Symbol('1.0', Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 15, 20)) +>baz : Symbol(baz, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 15, 35)) var a2 = { '1.0': '' }; >a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 17, 7)) @@ -60,59 +60,59 @@ namespace JustStrings { >'1' : Symbol('1', Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 18, 14)) s = t; ->s : Symbol(s, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 6, 7)) ->t : Symbol(t, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 7, 7)) +>s : Symbol(s, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 6, 15)) +>t : Symbol(t, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 7, 15)) t = s; ->t : Symbol(t, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 7, 7)) ->s : Symbol(s, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 6, 7)) +>t : Symbol(t, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 7, 15)) +>s : Symbol(s, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 6, 15)) s = s2; // ok ->s : Symbol(s, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 6, 7)) ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 11, 7)) +>s : Symbol(s, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 6, 15)) +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 11, 15)) s = a2; ->s : Symbol(s, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 6, 7)) +>s : Symbol(s, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 6, 15)) >a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 17, 7)) s2 = t2; ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 11, 7)) ->t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 12, 7)) +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 11, 15)) +>t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 12, 15)) t2 = s2; ->t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 12, 7)) ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 11, 7)) +>t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 12, 15)) +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 11, 15)) s2 = t; ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 11, 7)) ->t : Symbol(t, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 7, 7)) +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 11, 15)) +>t : Symbol(t, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 7, 15)) s2 = b; ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 11, 7)) ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 15, 7)) +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 11, 15)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 15, 15)) s2 = a2; ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 11, 7)) +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 11, 15)) >a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 17, 7)) a = b; ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 14, 7)) ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 15, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 14, 15)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 15, 15)) b = a; ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 15, 7)) ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 14, 7)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 15, 15)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 14, 15)) a = s; ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 14, 7)) ->s : Symbol(s, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 6, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 14, 15)) +>s : Symbol(s, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 6, 15)) a = s2; ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 14, 7)) ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 11, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 14, 15)) +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 11, 15)) a = a2; ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 14, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 14, 15)) >a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 17, 7)) a2 = b2; @@ -125,15 +125,15 @@ namespace JustStrings { a2 = b; // ok >a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 17, 7)) ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 15, 7)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 15, 15)) a2 = t2; // ok >a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 17, 7)) ->t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 12, 7)) +>t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 12, 15)) a2 = t; >a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 17, 7)) ->t : Symbol(t, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 7, 7)) +>t : Symbol(t, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 7, 15)) } namespace NumbersAndStrings { @@ -147,16 +147,16 @@ namespace NumbersAndStrings { >T : Symbol(T, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 45, 28)) >1 : Symbol(T[1], Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 46, 13)) - var s: S; ->s : Symbol(s, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 47, 7)) + declare var s: S; +>s : Symbol(s, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 47, 15)) >S : Symbol(S, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 44, 29)) - var t: T; ->t : Symbol(t, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 48, 7)) + declare var t: T; +>t : Symbol(t, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 48, 15)) >T : Symbol(T, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 45, 28)) interface S2 { '1': string; bar?: string } ->S2 : Symbol(S2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 48, 13)) +>S2 : Symbol(S2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 48, 21)) >'1' : Symbol(S2['1'], Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 50, 18)) >bar : Symbol(S2.bar, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 50, 31)) @@ -165,23 +165,23 @@ namespace NumbersAndStrings { >1.0 : Symbol(T2[1.0], Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 51, 18)) >baz : Symbol(T2.baz, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 51, 31)) - var s2: S2; ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 52, 7)) ->S2 : Symbol(S2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 48, 13)) + declare var s2: S2; +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 52, 15)) +>S2 : Symbol(S2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 48, 21)) - var t2: T2; ->t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 53, 7)) + declare var t2: T2; +>t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 53, 15)) >T2 : Symbol(T2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 50, 46)) - var a: { '1.': string; bar?: string } ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 55, 7)) ->'1.' : Symbol('1.', Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 55, 12)) ->bar : Symbol(bar, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 55, 26)) + declare var a: { '1.': string; bar?: string }; +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 55, 15)) +>'1.' : Symbol('1.', Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 55, 20)) +>bar : Symbol(bar, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 55, 34)) - var b: { 1.0: string; baz?: string } ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 56, 7)) ->1.0 : Symbol(1.0, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 56, 12)) ->baz : Symbol(baz, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 56, 25)) + declare var b: { 1.0: string; baz?: string }; +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 56, 15)) +>1.0 : Symbol(1.0, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 56, 20)) +>baz : Symbol(baz, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 56, 33)) var a2 = { '1.0': '' }; >a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 58, 7)) @@ -192,63 +192,63 @@ namespace NumbersAndStrings { >1. : Symbol(1., Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 59, 14)) s = t; // ok ->s : Symbol(s, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 47, 7)) ->t : Symbol(t, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 48, 7)) +>s : Symbol(s, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 47, 15)) +>t : Symbol(t, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 48, 15)) t = s; // ok ->t : Symbol(t, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 48, 7)) ->s : Symbol(s, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 47, 7)) +>t : Symbol(t, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 48, 15)) +>s : Symbol(s, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 47, 15)) s = s2; // ok ->s : Symbol(s, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 47, 7)) ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 52, 7)) +>s : Symbol(s, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 47, 15)) +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 52, 15)) s = a2; // error ->s : Symbol(s, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 47, 7)) +>s : Symbol(s, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 47, 15)) >a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 58, 7)) s2 = t2; // ok ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 52, 7)) ->t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 53, 7)) +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 52, 15)) +>t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 53, 15)) t2 = s2; // ok ->t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 53, 7)) ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 52, 7)) +>t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 53, 15)) +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 52, 15)) s2 = t; // ok ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 52, 7)) ->t : Symbol(t, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 48, 7)) +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 52, 15)) +>t : Symbol(t, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 48, 15)) s2 = b; // ok ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 52, 7)) ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 56, 7)) +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 52, 15)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 56, 15)) s2 = a2; // error ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 52, 7)) +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 52, 15)) >a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 58, 7)) a = b; // error ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 55, 7)) ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 56, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 55, 15)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 56, 15)) b = a; // error ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 56, 7)) ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 55, 7)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 56, 15)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 55, 15)) a = s; // error ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 55, 7)) ->s : Symbol(s, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 47, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 55, 15)) +>s : Symbol(s, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 47, 15)) a = s2; // error ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 55, 7)) ->s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 52, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 55, 15)) +>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 52, 15)) a = a2; // error ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 55, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 55, 15)) >a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 58, 7)) a = b2; // error ->a : Symbol(a, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 55, 7)) +>a : Symbol(a, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 55, 15)) >b2 : Symbol(b2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 59, 7)) a2 = b2; // error @@ -261,13 +261,13 @@ namespace NumbersAndStrings { a2 = b; // error >a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 58, 7)) ->b : Symbol(b, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 56, 7)) +>b : Symbol(b, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 56, 15)) a2 = t2; // error >a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 58, 7)) ->t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 53, 7)) +>t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 53, 15)) a2 = t; // error >a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 58, 7)) ->t : Symbol(t, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 48, 7)) +>t : Symbol(t, Decl(assignmentCompatWithObjectMembersStringNumericNames.ts, 48, 15)) } diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.types b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.types index f20ca2bebc6d2..2016d35d6fa9c 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.types +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.types @@ -20,11 +20,11 @@ namespace JustStrings { >'1.' : string > : ^^^^^^ - var s: S; + declare var s: S; >s : S > : ^ - var t: T; + declare var t: T; >t : T > : ^ @@ -40,15 +40,15 @@ namespace JustStrings { >baz : string > : ^^^^^^ - var s2: S2; + declare var s2: S2; >s2 : S2 > : ^^ - var t2: T2; + declare var t2: T2; >t2 : T2 > : ^^ - var a: { '1.': string; bar?: string } + declare var a: { '1.': string; bar?: string }; >a : { '1.': string; bar?: string; } > : ^^^^^^^^ ^^^^^^^^ ^^^ >'1.' : string @@ -56,7 +56,7 @@ namespace JustStrings { >bar : string > : ^^^^^^ - var b: { '1.0': string; baz?: string } + declare var b: { '1.0': string; baz?: string }; >b : { '1.0': string; baz?: string; } > : ^^^^^^^^^ ^^^^^^^^ ^^^ >'1.0' : string @@ -253,11 +253,11 @@ namespace NumbersAndStrings { >1 : string > : ^^^^^^ - var s: S; + declare var s: S; >s : S > : ^ - var t: T; + declare var t: T; >t : T > : ^ @@ -273,15 +273,15 @@ namespace NumbersAndStrings { >baz : string > : ^^^^^^ - var s2: S2; + declare var s2: S2; >s2 : S2 > : ^^ - var t2: T2; + declare var t2: T2; >t2 : T2 > : ^^ - var a: { '1.': string; bar?: string } + declare var a: { '1.': string; bar?: string }; >a : { '1.': string; bar?: string; } > : ^^^^^^^^ ^^^^^^^^ ^^^ >'1.' : string @@ -289,7 +289,7 @@ namespace NumbersAndStrings { >bar : string > : ^^^^^^ - var b: { 1.0: string; baz?: string } + declare var b: { 1.0: string; baz?: string }; >b : { 1: string; baz?: string; } > : ^^^^^ ^^^^^^^^ ^^^ >1.0 : string diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer.errors.txt b/tests/baselines/reference/assignmentCompatWithStringIndexer.errors.txt index 33184907db2a8..fa5e764d17b2d 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer.errors.txt @@ -39,9 +39,9 @@ assignmentCompatWithStringIndexer.ts(51,9): error TS2322: Type 'A' is not ass [x: string]: Base; } - var a: A; + declare var a: A; - var b: { [x: string]: Derived; } + declare var b: { [x: string]: Derived; }; a = b; // ok b = a; // error ~ @@ -50,7 +50,7 @@ assignmentCompatWithStringIndexer.ts(51,9): error TS2322: Type 'A' is not ass !!! error TS2322: Property 'bar' is missing in type 'Base' but required in type 'Derived'. !!! related TS2728 assignmentCompatWithStringIndexer.ts:4:34: 'bar' is declared here. - var b2: { [x: string]: Derived2; } + declare var b2: { [x: string]: Derived2; }; a = b2; // ok b2 = a; // error ~~ @@ -67,8 +67,8 @@ assignmentCompatWithStringIndexer.ts(51,9): error TS2322: Type 'A' is not ass [x: string]: Derived; // ok } - var b1: { [x: string]: Derived; }; - var a1: A; + declare var b1: { [x: string]: Derived; }; + declare var a1: A; a1 = b1; // ok b1 = a1; // error ~~ @@ -81,7 +81,7 @@ assignmentCompatWithStringIndexer.ts(51,9): error TS2322: Type 'A' is not ass [x: string]: Derived2; // ok } - var b2: { [x: string]: Derived2; }; + declare var b2: { [x: string]: Derived2; }; a1 = b2; // ok b2 = a1; // error ~~ @@ -120,4 +120,5 @@ assignmentCompatWithStringIndexer.ts(51,9): error TS2322: Type 'A' is not ass !!! error TS2322: Type 'T' is not assignable to type 'Derived2'. !!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': baz, bar } - } \ No newline at end of file + } + \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer.js b/tests/baselines/reference/assignmentCompatWithStringIndexer.js index 37045f4439b33..ec0713fcc280a 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer.js @@ -11,13 +11,13 @@ class A { [x: string]: Base; } -var a: A; +declare var a: A; -var b: { [x: string]: Derived; } +declare var b: { [x: string]: Derived; }; a = b; // ok b = a; // error -var b2: { [x: string]: Derived2; } +declare var b2: { [x: string]: Derived2; }; a = b2; // ok b2 = a; // error @@ -30,8 +30,8 @@ namespace Generics { [x: string]: Derived; // ok } - var b1: { [x: string]: Derived; }; - var a1: A; + declare var b1: { [x: string]: Derived; }; + declare var a1: A; a1 = b1; // ok b1 = a1; // error @@ -39,7 +39,7 @@ namespace Generics { [x: string]: Derived2; // ok } - var b2: { [x: string]: Derived2; }; + declare var b2: { [x: string]: Derived2; }; a1 = b2; // ok b2 = a1; // error @@ -53,7 +53,8 @@ namespace Generics { a3 = b4; // error b4 = a3; // error } -} +} + //// [assignmentCompatWithStringIndexer.js] // index signatures must be compatible in assignments @@ -77,11 +78,8 @@ var A = /** @class */ (function () { } return A; }()); -var a; -var b; a = b; // ok b = a; // error -var b2; a = b2; // ok b2 = a; // error var Generics; @@ -98,8 +96,6 @@ var Generics; } return B; }(A)); - var b1; - var a1; a1 = b1; // ok b1 = a1; // error var B2 = /** @class */ (function (_super) { @@ -109,7 +105,6 @@ var Generics; } return B2; }(A)); - var b2; a1 = b2; // ok b2 = a1; // error function foo() { diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer.symbols b/tests/baselines/reference/assignmentCompatWithStringIndexer.symbols index 473f4a7ae67e5..838cbc3452e85 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer.symbols +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer.symbols @@ -25,35 +25,35 @@ class A { >Base : Symbol(Base, Decl(assignmentCompatWithStringIndexer.ts, 0, 0)) } -var a: A; ->a : Symbol(a, Decl(assignmentCompatWithStringIndexer.ts, 10, 3)) +declare var a: A; +>a : Symbol(a, Decl(assignmentCompatWithStringIndexer.ts, 10, 11)) >A : Symbol(A, Decl(assignmentCompatWithStringIndexer.ts, 4, 51)) -var b: { [x: string]: Derived; } ->b : Symbol(b, Decl(assignmentCompatWithStringIndexer.ts, 12, 3)) ->x : Symbol(x, Decl(assignmentCompatWithStringIndexer.ts, 12, 10)) +declare var b: { [x: string]: Derived; }; +>b : Symbol(b, Decl(assignmentCompatWithStringIndexer.ts, 12, 11)) +>x : Symbol(x, Decl(assignmentCompatWithStringIndexer.ts, 12, 18)) >Derived : Symbol(Derived, Decl(assignmentCompatWithStringIndexer.ts, 2, 31)) a = b; // ok ->a : Symbol(a, Decl(assignmentCompatWithStringIndexer.ts, 10, 3)) ->b : Symbol(b, Decl(assignmentCompatWithStringIndexer.ts, 12, 3)) +>a : Symbol(a, Decl(assignmentCompatWithStringIndexer.ts, 10, 11)) +>b : Symbol(b, Decl(assignmentCompatWithStringIndexer.ts, 12, 11)) b = a; // error ->b : Symbol(b, Decl(assignmentCompatWithStringIndexer.ts, 12, 3)) ->a : Symbol(a, Decl(assignmentCompatWithStringIndexer.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithStringIndexer.ts, 12, 11)) +>a : Symbol(a, Decl(assignmentCompatWithStringIndexer.ts, 10, 11)) -var b2: { [x: string]: Derived2; } ->b2 : Symbol(b2, Decl(assignmentCompatWithStringIndexer.ts, 16, 3)) ->x : Symbol(x, Decl(assignmentCompatWithStringIndexer.ts, 16, 11)) +declare var b2: { [x: string]: Derived2; }; +>b2 : Symbol(b2, Decl(assignmentCompatWithStringIndexer.ts, 16, 11)) +>x : Symbol(x, Decl(assignmentCompatWithStringIndexer.ts, 16, 19)) >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithStringIndexer.ts, 3, 47)) a = b2; // ok ->a : Symbol(a, Decl(assignmentCompatWithStringIndexer.ts, 10, 3)) ->b2 : Symbol(b2, Decl(assignmentCompatWithStringIndexer.ts, 16, 3)) +>a : Symbol(a, Decl(assignmentCompatWithStringIndexer.ts, 10, 11)) +>b2 : Symbol(b2, Decl(assignmentCompatWithStringIndexer.ts, 16, 11)) b2 = a; // error ->b2 : Symbol(b2, Decl(assignmentCompatWithStringIndexer.ts, 16, 3)) ->a : Symbol(a, Decl(assignmentCompatWithStringIndexer.ts, 10, 3)) +>b2 : Symbol(b2, Decl(assignmentCompatWithStringIndexer.ts, 16, 11)) +>a : Symbol(a, Decl(assignmentCompatWithStringIndexer.ts, 10, 11)) namespace Generics { >Generics : Symbol(Generics, Decl(assignmentCompatWithStringIndexer.ts, 18, 7)) @@ -78,23 +78,23 @@ namespace Generics { >Derived : Symbol(Derived, Decl(assignmentCompatWithStringIndexer.ts, 2, 31)) } - var b1: { [x: string]: Derived; }; ->b1 : Symbol(b1, Decl(assignmentCompatWithStringIndexer.ts, 29, 7)) ->x : Symbol(x, Decl(assignmentCompatWithStringIndexer.ts, 29, 15)) + declare var b1: { [x: string]: Derived; }; +>b1 : Symbol(b1, Decl(assignmentCompatWithStringIndexer.ts, 29, 15)) +>x : Symbol(x, Decl(assignmentCompatWithStringIndexer.ts, 29, 23)) >Derived : Symbol(Derived, Decl(assignmentCompatWithStringIndexer.ts, 2, 31)) - var a1: A; ->a1 : Symbol(a1, Decl(assignmentCompatWithStringIndexer.ts, 30, 7)) + declare var a1: A; +>a1 : Symbol(a1, Decl(assignmentCompatWithStringIndexer.ts, 30, 15)) >A : Symbol(A, Decl(assignmentCompatWithStringIndexer.ts, 20, 20)) >Base : Symbol(Base, Decl(assignmentCompatWithStringIndexer.ts, 0, 0)) a1 = b1; // ok ->a1 : Symbol(a1, Decl(assignmentCompatWithStringIndexer.ts, 30, 7)) ->b1 : Symbol(b1, Decl(assignmentCompatWithStringIndexer.ts, 29, 7)) +>a1 : Symbol(a1, Decl(assignmentCompatWithStringIndexer.ts, 30, 15)) +>b1 : Symbol(b1, Decl(assignmentCompatWithStringIndexer.ts, 29, 15)) b1 = a1; // error ->b1 : Symbol(b1, Decl(assignmentCompatWithStringIndexer.ts, 29, 7)) ->a1 : Symbol(a1, Decl(assignmentCompatWithStringIndexer.ts, 30, 7)) +>b1 : Symbol(b1, Decl(assignmentCompatWithStringIndexer.ts, 29, 15)) +>a1 : Symbol(a1, Decl(assignmentCompatWithStringIndexer.ts, 30, 15)) class B2 extends A { >B2 : Symbol(B2, Decl(assignmentCompatWithStringIndexer.ts, 32, 12)) @@ -106,18 +106,18 @@ namespace Generics { >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithStringIndexer.ts, 3, 47)) } - var b2: { [x: string]: Derived2; }; ->b2 : Symbol(b2, Decl(assignmentCompatWithStringIndexer.ts, 38, 7)) ->x : Symbol(x, Decl(assignmentCompatWithStringIndexer.ts, 38, 15)) + declare var b2: { [x: string]: Derived2; }; +>b2 : Symbol(b2, Decl(assignmentCompatWithStringIndexer.ts, 38, 15)) +>x : Symbol(x, Decl(assignmentCompatWithStringIndexer.ts, 38, 23)) >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithStringIndexer.ts, 3, 47)) a1 = b2; // ok ->a1 : Symbol(a1, Decl(assignmentCompatWithStringIndexer.ts, 30, 7)) ->b2 : Symbol(b2, Decl(assignmentCompatWithStringIndexer.ts, 38, 7)) +>a1 : Symbol(a1, Decl(assignmentCompatWithStringIndexer.ts, 30, 15)) +>b2 : Symbol(b2, Decl(assignmentCompatWithStringIndexer.ts, 38, 15)) b2 = a1; // error ->b2 : Symbol(b2, Decl(assignmentCompatWithStringIndexer.ts, 38, 7)) ->a1 : Symbol(a1, Decl(assignmentCompatWithStringIndexer.ts, 30, 7)) +>b2 : Symbol(b2, Decl(assignmentCompatWithStringIndexer.ts, 38, 15)) +>a1 : Symbol(a1, Decl(assignmentCompatWithStringIndexer.ts, 30, 15)) function foo() { >foo : Symbol(foo, Decl(assignmentCompatWithStringIndexer.ts, 40, 12)) @@ -156,3 +156,4 @@ namespace Generics { >a3 : Symbol(a3, Decl(assignmentCompatWithStringIndexer.ts, 44, 11)) } } + diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer.types b/tests/baselines/reference/assignmentCompatWithStringIndexer.types index 73d9544240f0a..596b193a9f9d6 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer.types +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer.types @@ -24,11 +24,11 @@ class A { > : ^^^^^^ } -var a: A; +declare var a: A; >a : A > : ^ -var b: { [x: string]: Derived; } +declare var b: { [x: string]: Derived; }; >b : { [x: string]: Derived; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >x : string @@ -50,7 +50,7 @@ b = a; // error >a : A > : ^ -var b2: { [x: string]: Derived2; } +declare var b2: { [x: string]: Derived2; }; >b2 : { [x: string]: Derived2; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^ >x : string @@ -96,13 +96,13 @@ namespace Generics { > : ^^^^^^ } - var b1: { [x: string]: Derived; }; + declare var b1: { [x: string]: Derived; }; >b1 : { [x: string]: Derived; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >x : string > : ^^^^^^ - var a1: A; + declare var a1: A; >a1 : A > : ^^^^^^^ @@ -133,7 +133,7 @@ namespace Generics { > : ^^^^^^ } - var b2: { [x: string]: Derived2; }; + declare var b2: { [x: string]: Derived2; }; >b2 : { [x: string]: Derived2; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^ >x : string @@ -208,3 +208,4 @@ namespace Generics { > : ^^^^ } } + diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer2.errors.txt b/tests/baselines/reference/assignmentCompatWithStringIndexer2.errors.txt index c2a99920604c6..6816898284894 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer2.errors.txt @@ -39,9 +39,9 @@ assignmentCompatWithStringIndexer2.ts(51,9): error TS2322: Type 'A' is not as [x: string]: Base; } - var a: A; + declare var a: A; - var b: { [x: string]: Derived; } + declare var b: { [x: string]: Derived; }; a = b; // ok b = a; // error ~ @@ -50,7 +50,7 @@ assignmentCompatWithStringIndexer2.ts(51,9): error TS2322: Type 'A' is not as !!! error TS2322: Property 'bar' is missing in type 'Base' but required in type 'Derived'. !!! related TS2728 assignmentCompatWithStringIndexer2.ts:4:34: 'bar' is declared here. - var b2: { [x: string]: Derived2; } + declare var b2: { [x: string]: Derived2; }; a = b2; // ok b2 = a; // error ~~ @@ -67,8 +67,8 @@ assignmentCompatWithStringIndexer2.ts(51,9): error TS2322: Type 'A' is not as [x: string]: Derived; // ok } - var b1: { [x: string]: Derived; }; - var a1: A; + declare var b1: { [x: string]: Derived; }; + declare var a1: A; a1 = b1; // ok b1 = a1; // error ~~ @@ -81,7 +81,7 @@ assignmentCompatWithStringIndexer2.ts(51,9): error TS2322: Type 'A' is not as [x: string]: Derived2; // ok } - var b2: { [x: string]: Derived2; }; + declare var b2: { [x: string]: Derived2; }; a1 = b2; // ok b2 = a1; // error ~~ @@ -90,8 +90,8 @@ assignmentCompatWithStringIndexer2.ts(51,9): error TS2322: Type 'A' is not as !!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': baz, bar function foo() { - var b3: { [x: string]: Derived; }; - var a3: A; + var b3!: { [x: string]: Derived; }; + var a3!: A; a3 = b3; // error ~~ !!! error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A'. @@ -106,7 +106,7 @@ assignmentCompatWithStringIndexer2.ts(51,9): error TS2322: Type 'A' is not as !!! error TS2322: Property 'bar' is missing in type 'Base' but required in type 'Derived'. !!! related TS2728 assignmentCompatWithStringIndexer2.ts:4:34: 'bar' is declared here. - var b4: { [x: string]: Derived2; }; + var b4!: { [x: string]: Derived2; }; a3 = b4; // error ~~ !!! error TS2322: Type '{ [x: string]: Derived2; }' is not assignable to type 'A'. diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer2.js b/tests/baselines/reference/assignmentCompatWithStringIndexer2.js index 38bf435af0526..7f734d1629d65 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer2.js +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer2.js @@ -11,13 +11,13 @@ interface A { [x: string]: Base; } -var a: A; +declare var a: A; -var b: { [x: string]: Derived; } +declare var b: { [x: string]: Derived; }; a = b; // ok b = a; // error -var b2: { [x: string]: Derived2; } +declare var b2: { [x: string]: Derived2; }; a = b2; // ok b2 = a; // error @@ -30,8 +30,8 @@ namespace Generics { [x: string]: Derived; // ok } - var b1: { [x: string]: Derived; }; - var a1: A; + declare var b1: { [x: string]: Derived; }; + declare var a1: A; a1 = b1; // ok b1 = a1; // error @@ -39,17 +39,17 @@ namespace Generics { [x: string]: Derived2; // ok } - var b2: { [x: string]: Derived2; }; + declare var b2: { [x: string]: Derived2; }; a1 = b2; // ok b2 = a1; // error function foo() { - var b3: { [x: string]: Derived; }; - var a3: A; + var b3!: { [x: string]: Derived; }; + var a3!: A; a3 = b3; // error b3 = a3; // error - var b4: { [x: string]: Derived2; }; + var b4!: { [x: string]: Derived2; }; a3 = b4; // error b4 = a3; // error } @@ -57,20 +57,14 @@ namespace Generics { //// [assignmentCompatWithStringIndexer2.js] // index signatures must be compatible in assignments -var a; -var b; a = b; // ok b = a; // error -var b2; a = b2; // ok b2 = a; // error var Generics; (function (Generics) { - var b1; - var a1; a1 = b1; // ok b1 = a1; // error - var b2; a1 = b2; // ok b2 = a1; // error function foo() { diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer2.symbols b/tests/baselines/reference/assignmentCompatWithStringIndexer2.symbols index 6814fdcf21590..558d74b014607 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer2.symbols +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer2.symbols @@ -25,35 +25,35 @@ interface A { >Base : Symbol(Base, Decl(assignmentCompatWithStringIndexer2.ts, 0, 0)) } -var a: A; ->a : Symbol(a, Decl(assignmentCompatWithStringIndexer2.ts, 10, 3)) +declare var a: A; +>a : Symbol(a, Decl(assignmentCompatWithStringIndexer2.ts, 10, 11)) >A : Symbol(A, Decl(assignmentCompatWithStringIndexer2.ts, 4, 51)) -var b: { [x: string]: Derived; } ->b : Symbol(b, Decl(assignmentCompatWithStringIndexer2.ts, 12, 3)) ->x : Symbol(x, Decl(assignmentCompatWithStringIndexer2.ts, 12, 10)) +declare var b: { [x: string]: Derived; }; +>b : Symbol(b, Decl(assignmentCompatWithStringIndexer2.ts, 12, 11)) +>x : Symbol(x, Decl(assignmentCompatWithStringIndexer2.ts, 12, 18)) >Derived : Symbol(Derived, Decl(assignmentCompatWithStringIndexer2.ts, 2, 31)) a = b; // ok ->a : Symbol(a, Decl(assignmentCompatWithStringIndexer2.ts, 10, 3)) ->b : Symbol(b, Decl(assignmentCompatWithStringIndexer2.ts, 12, 3)) +>a : Symbol(a, Decl(assignmentCompatWithStringIndexer2.ts, 10, 11)) +>b : Symbol(b, Decl(assignmentCompatWithStringIndexer2.ts, 12, 11)) b = a; // error ->b : Symbol(b, Decl(assignmentCompatWithStringIndexer2.ts, 12, 3)) ->a : Symbol(a, Decl(assignmentCompatWithStringIndexer2.ts, 10, 3)) +>b : Symbol(b, Decl(assignmentCompatWithStringIndexer2.ts, 12, 11)) +>a : Symbol(a, Decl(assignmentCompatWithStringIndexer2.ts, 10, 11)) -var b2: { [x: string]: Derived2; } ->b2 : Symbol(b2, Decl(assignmentCompatWithStringIndexer2.ts, 16, 3)) ->x : Symbol(x, Decl(assignmentCompatWithStringIndexer2.ts, 16, 11)) +declare var b2: { [x: string]: Derived2; }; +>b2 : Symbol(b2, Decl(assignmentCompatWithStringIndexer2.ts, 16, 11)) +>x : Symbol(x, Decl(assignmentCompatWithStringIndexer2.ts, 16, 19)) >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithStringIndexer2.ts, 3, 47)) a = b2; // ok ->a : Symbol(a, Decl(assignmentCompatWithStringIndexer2.ts, 10, 3)) ->b2 : Symbol(b2, Decl(assignmentCompatWithStringIndexer2.ts, 16, 3)) +>a : Symbol(a, Decl(assignmentCompatWithStringIndexer2.ts, 10, 11)) +>b2 : Symbol(b2, Decl(assignmentCompatWithStringIndexer2.ts, 16, 11)) b2 = a; // error ->b2 : Symbol(b2, Decl(assignmentCompatWithStringIndexer2.ts, 16, 3)) ->a : Symbol(a, Decl(assignmentCompatWithStringIndexer2.ts, 10, 3)) +>b2 : Symbol(b2, Decl(assignmentCompatWithStringIndexer2.ts, 16, 11)) +>a : Symbol(a, Decl(assignmentCompatWithStringIndexer2.ts, 10, 11)) namespace Generics { >Generics : Symbol(Generics, Decl(assignmentCompatWithStringIndexer2.ts, 18, 7)) @@ -78,23 +78,23 @@ namespace Generics { >Derived : Symbol(Derived, Decl(assignmentCompatWithStringIndexer2.ts, 2, 31)) } - var b1: { [x: string]: Derived; }; ->b1 : Symbol(b1, Decl(assignmentCompatWithStringIndexer2.ts, 29, 7)) ->x : Symbol(x, Decl(assignmentCompatWithStringIndexer2.ts, 29, 15)) + declare var b1: { [x: string]: Derived; }; +>b1 : Symbol(b1, Decl(assignmentCompatWithStringIndexer2.ts, 29, 15)) +>x : Symbol(x, Decl(assignmentCompatWithStringIndexer2.ts, 29, 23)) >Derived : Symbol(Derived, Decl(assignmentCompatWithStringIndexer2.ts, 2, 31)) - var a1: A; ->a1 : Symbol(a1, Decl(assignmentCompatWithStringIndexer2.ts, 30, 7)) + declare var a1: A; +>a1 : Symbol(a1, Decl(assignmentCompatWithStringIndexer2.ts, 30, 15)) >A : Symbol(A, Decl(assignmentCompatWithStringIndexer2.ts, 20, 20)) >Base : Symbol(Base, Decl(assignmentCompatWithStringIndexer2.ts, 0, 0)) a1 = b1; // ok ->a1 : Symbol(a1, Decl(assignmentCompatWithStringIndexer2.ts, 30, 7)) ->b1 : Symbol(b1, Decl(assignmentCompatWithStringIndexer2.ts, 29, 7)) +>a1 : Symbol(a1, Decl(assignmentCompatWithStringIndexer2.ts, 30, 15)) +>b1 : Symbol(b1, Decl(assignmentCompatWithStringIndexer2.ts, 29, 15)) b1 = a1; // error ->b1 : Symbol(b1, Decl(assignmentCompatWithStringIndexer2.ts, 29, 7)) ->a1 : Symbol(a1, Decl(assignmentCompatWithStringIndexer2.ts, 30, 7)) +>b1 : Symbol(b1, Decl(assignmentCompatWithStringIndexer2.ts, 29, 15)) +>a1 : Symbol(a1, Decl(assignmentCompatWithStringIndexer2.ts, 30, 15)) interface B2 extends A { >B2 : Symbol(B2, Decl(assignmentCompatWithStringIndexer2.ts, 32, 12)) @@ -106,30 +106,30 @@ namespace Generics { >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithStringIndexer2.ts, 3, 47)) } - var b2: { [x: string]: Derived2; }; ->b2 : Symbol(b2, Decl(assignmentCompatWithStringIndexer2.ts, 38, 7)) ->x : Symbol(x, Decl(assignmentCompatWithStringIndexer2.ts, 38, 15)) + declare var b2: { [x: string]: Derived2; }; +>b2 : Symbol(b2, Decl(assignmentCompatWithStringIndexer2.ts, 38, 15)) +>x : Symbol(x, Decl(assignmentCompatWithStringIndexer2.ts, 38, 23)) >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithStringIndexer2.ts, 3, 47)) a1 = b2; // ok ->a1 : Symbol(a1, Decl(assignmentCompatWithStringIndexer2.ts, 30, 7)) ->b2 : Symbol(b2, Decl(assignmentCompatWithStringIndexer2.ts, 38, 7)) +>a1 : Symbol(a1, Decl(assignmentCompatWithStringIndexer2.ts, 30, 15)) +>b2 : Symbol(b2, Decl(assignmentCompatWithStringIndexer2.ts, 38, 15)) b2 = a1; // error ->b2 : Symbol(b2, Decl(assignmentCompatWithStringIndexer2.ts, 38, 7)) ->a1 : Symbol(a1, Decl(assignmentCompatWithStringIndexer2.ts, 30, 7)) +>b2 : Symbol(b2, Decl(assignmentCompatWithStringIndexer2.ts, 38, 15)) +>a1 : Symbol(a1, Decl(assignmentCompatWithStringIndexer2.ts, 30, 15)) function foo() { >foo : Symbol(foo, Decl(assignmentCompatWithStringIndexer2.ts, 40, 12)) >T : Symbol(T, Decl(assignmentCompatWithStringIndexer2.ts, 42, 17)) >Base : Symbol(Base, Decl(assignmentCompatWithStringIndexer2.ts, 0, 0)) - var b3: { [x: string]: Derived; }; + var b3!: { [x: string]: Derived; }; >b3 : Symbol(b3, Decl(assignmentCompatWithStringIndexer2.ts, 43, 11)) ->x : Symbol(x, Decl(assignmentCompatWithStringIndexer2.ts, 43, 19)) +>x : Symbol(x, Decl(assignmentCompatWithStringIndexer2.ts, 43, 20)) >Derived : Symbol(Derived, Decl(assignmentCompatWithStringIndexer2.ts, 2, 31)) - var a3: A; + var a3!: A; >a3 : Symbol(a3, Decl(assignmentCompatWithStringIndexer2.ts, 44, 11)) >A : Symbol(A, Decl(assignmentCompatWithStringIndexer2.ts, 20, 20)) >T : Symbol(T, Decl(assignmentCompatWithStringIndexer2.ts, 42, 17)) @@ -142,9 +142,9 @@ namespace Generics { >b3 : Symbol(b3, Decl(assignmentCompatWithStringIndexer2.ts, 43, 11)) >a3 : Symbol(a3, Decl(assignmentCompatWithStringIndexer2.ts, 44, 11)) - var b4: { [x: string]: Derived2; }; + var b4!: { [x: string]: Derived2; }; >b4 : Symbol(b4, Decl(assignmentCompatWithStringIndexer2.ts, 48, 11)) ->x : Symbol(x, Decl(assignmentCompatWithStringIndexer2.ts, 48, 19)) +>x : Symbol(x, Decl(assignmentCompatWithStringIndexer2.ts, 48, 20)) >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithStringIndexer2.ts, 3, 47)) a3 = b4; // error diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer2.types b/tests/baselines/reference/assignmentCompatWithStringIndexer2.types index 1d2fd6a0c1156..f387bb1d43353 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer2.types +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer2.types @@ -21,11 +21,11 @@ interface A { > : ^^^^^^ } -var a: A; +declare var a: A; >a : A > : ^ -var b: { [x: string]: Derived; } +declare var b: { [x: string]: Derived; }; >b : { [x: string]: Derived; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >x : string @@ -47,7 +47,7 @@ b = a; // error >a : A > : ^ -var b2: { [x: string]: Derived2; } +declare var b2: { [x: string]: Derived2; }; >b2 : { [x: string]: Derived2; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^ >x : string @@ -85,13 +85,13 @@ namespace Generics { > : ^^^^^^ } - var b1: { [x: string]: Derived; }; + declare var b1: { [x: string]: Derived; }; >b1 : { [x: string]: Derived; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >x : string > : ^^^^^^ - var a1: A; + declare var a1: A; >a1 : A > : ^^^^^^^ @@ -117,7 +117,7 @@ namespace Generics { > : ^^^^^^ } - var b2: { [x: string]: Derived2; }; + declare var b2: { [x: string]: Derived2; }; >b2 : { [x: string]: Derived2; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^ >x : string @@ -143,13 +143,13 @@ namespace Generics { >foo : () => void > : ^ ^^^^^^^^^ ^^^^^^^^^^^ - var b3: { [x: string]: Derived; }; + var b3!: { [x: string]: Derived; }; >b3 : { [x: string]: Derived; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >x : string > : ^^^^^^ - var a3: A; + var a3!: A; >a3 : A > : ^^^^ @@ -169,7 +169,7 @@ namespace Generics { >a3 : A > : ^^^^ - var b4: { [x: string]: Derived2; }; + var b4!: { [x: string]: Derived2; }; >b4 : { [x: string]: Derived2; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^ >x : string diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer3.errors.txt b/tests/baselines/reference/assignmentCompatWithStringIndexer3.errors.txt index 205371c6c6522..7f9e1f45f1bed 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer3.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer3.errors.txt @@ -1,4 +1,4 @@ -assignmentCompatWithStringIndexer3.ts(7,8): error TS2304: Cannot find name 'A'. +assignmentCompatWithStringIndexer3.ts(7,16): error TS2304: Cannot find name 'A'. assignmentCompatWithStringIndexer3.ts(20,9): error TS2322: Type '{ [x: string]: string; }' is not assignable to type 'A'. 'string' index signatures are incompatible. Type 'string' is not assignable to type 'T'. @@ -16,10 +16,10 @@ assignmentCompatWithStringIndexer3.ts(21,9): error TS2322: Type 'A' is not as interface Derived extends Base { bar: string; } interface Derived2 extends Derived { baz: string; } - var a: A; - ~ + declare var a: A; + ~ !!! error TS2304: Cannot find name 'A'. - var b1: { [x: string]: string; } + declare var b1: { [x: string]: string; }; a = b1; // error b1 = a; // error @@ -29,8 +29,8 @@ assignmentCompatWithStringIndexer3.ts(21,9): error TS2322: Type 'A' is not as } function foo() { - var a: A; - var b: { [x: string]: string; } + var a!: A; + var b!: { [x: string]: string; }; a = b; // error ~ !!! error TS2322: Type '{ [x: string]: string; }' is not assignable to type 'A'. diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer3.js b/tests/baselines/reference/assignmentCompatWithStringIndexer3.js index 0b08cbfd7d066..0abdb96a66f69 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer3.js +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer3.js @@ -7,8 +7,8 @@ interface Base { foo: string; } interface Derived extends Base { bar: string; } interface Derived2 extends Derived { baz: string; } -var a: A; -var b1: { [x: string]: string; } +declare var a: A; +declare var b1: { [x: string]: string; }; a = b1; // error b1 = a; // error @@ -18,8 +18,8 @@ namespace Generics { } function foo() { - var a: A; - var b: { [x: string]: string; } + var a!: A; + var b!: { [x: string]: string; }; a = b; // error b = a; // error } @@ -27,8 +27,6 @@ namespace Generics { //// [assignmentCompatWithStringIndexer3.js] // Derived type indexer must be subtype of base type indexer -var a; -var b1; a = b1; // error b1 = a; // error var Generics; diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer3.symbols b/tests/baselines/reference/assignmentCompatWithStringIndexer3.symbols index 074ccde38fc07..814583209a627 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer3.symbols +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer3.symbols @@ -17,21 +17,21 @@ interface Derived2 extends Derived { baz: string; } >Derived : Symbol(Derived, Decl(assignmentCompatWithStringIndexer3.ts, 2, 31)) >baz : Symbol(Derived2.baz, Decl(assignmentCompatWithStringIndexer3.ts, 4, 36)) -var a: A; ->a : Symbol(a, Decl(assignmentCompatWithStringIndexer3.ts, 6, 3)) +declare var a: A; +>a : Symbol(a, Decl(assignmentCompatWithStringIndexer3.ts, 6, 11)) >A : Symbol(A) -var b1: { [x: string]: string; } ->b1 : Symbol(b1, Decl(assignmentCompatWithStringIndexer3.ts, 7, 3)) ->x : Symbol(x, Decl(assignmentCompatWithStringIndexer3.ts, 7, 11)) +declare var b1: { [x: string]: string; }; +>b1 : Symbol(b1, Decl(assignmentCompatWithStringIndexer3.ts, 7, 11)) +>x : Symbol(x, Decl(assignmentCompatWithStringIndexer3.ts, 7, 19)) a = b1; // error ->a : Symbol(a, Decl(assignmentCompatWithStringIndexer3.ts, 6, 3)) ->b1 : Symbol(b1, Decl(assignmentCompatWithStringIndexer3.ts, 7, 3)) +>a : Symbol(a, Decl(assignmentCompatWithStringIndexer3.ts, 6, 11)) +>b1 : Symbol(b1, Decl(assignmentCompatWithStringIndexer3.ts, 7, 11)) b1 = a; // error ->b1 : Symbol(b1, Decl(assignmentCompatWithStringIndexer3.ts, 7, 3)) ->a : Symbol(a, Decl(assignmentCompatWithStringIndexer3.ts, 6, 3)) +>b1 : Symbol(b1, Decl(assignmentCompatWithStringIndexer3.ts, 7, 11)) +>a : Symbol(a, Decl(assignmentCompatWithStringIndexer3.ts, 6, 11)) namespace Generics { >Generics : Symbol(Generics, Decl(assignmentCompatWithStringIndexer3.ts, 9, 7)) @@ -51,14 +51,14 @@ namespace Generics { >T : Symbol(T, Decl(assignmentCompatWithStringIndexer3.ts, 16, 17)) >Derived : Symbol(Derived, Decl(assignmentCompatWithStringIndexer3.ts, 2, 31)) - var a: A; + var a!: A; >a : Symbol(a, Decl(assignmentCompatWithStringIndexer3.ts, 17, 11)) >A : Symbol(A, Decl(assignmentCompatWithStringIndexer3.ts, 11, 20)) >T : Symbol(T, Decl(assignmentCompatWithStringIndexer3.ts, 16, 17)) - var b: { [x: string]: string; } + var b!: { [x: string]: string; }; >b : Symbol(b, Decl(assignmentCompatWithStringIndexer3.ts, 18, 11)) ->x : Symbol(x, Decl(assignmentCompatWithStringIndexer3.ts, 18, 18)) +>x : Symbol(x, Decl(assignmentCompatWithStringIndexer3.ts, 18, 19)) a = b; // error >a : Symbol(a, Decl(assignmentCompatWithStringIndexer3.ts, 17, 11)) diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer3.types b/tests/baselines/reference/assignmentCompatWithStringIndexer3.types index ae77b10806e32..81fbe3fb33034 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer3.types +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer3.types @@ -15,11 +15,11 @@ interface Derived2 extends Derived { baz: string; } >baz : string > : ^^^^^^ -var a: A; +declare var a: A; >a : A > : ^ -var b1: { [x: string]: string; } +declare var b1: { [x: string]: string; }; >b1 : { [x: string]: string; } > : ^^^^^^^^^^^^^^^^^^^^^^^^ >x : string @@ -58,11 +58,11 @@ namespace Generics { >foo : () => void > : ^ ^^^^^^^^^ ^^^^^^^^^^^ - var a: A; + var a!: A; >a : A > : ^^^^ - var b: { [x: string]: string; } + var b!: { [x: string]: string; }; >b : { [x: string]: string; } > : ^^^^^^^^^^^^^^^^^^^^^^^^ >x : string diff --git a/tests/baselines/reference/assignmentCompatability25.errors.txt b/tests/baselines/reference/assignmentCompatability25.errors.txt index 1365d72dbe80b..23ee1d973b762 100644 --- a/tests/baselines/reference/assignmentCompatability25.errors.txt +++ b/tests/baselines/reference/assignmentCompatability25.errors.txt @@ -9,7 +9,7 @@ assignmentCompatability25.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt export var __val__obj4 = obj4; } namespace __test2__ { - export var aa:{two:number;};; + export declare var aa:{two:number;};; export var __val__aa = aa; } __test2__.__val__aa = __test1__.__val__obj4 diff --git a/tests/baselines/reference/assignmentCompatability25.js b/tests/baselines/reference/assignmentCompatability25.js index ddecd417f5555..bfbd06830c24d 100644 --- a/tests/baselines/reference/assignmentCompatability25.js +++ b/tests/baselines/reference/assignmentCompatability25.js @@ -6,7 +6,7 @@ namespace __test1__ { export var __val__obj4 = obj4; } namespace __test2__ { - export var aa:{two:number;};; + export declare var aa:{two:number;};; export var __val__aa = aa; } __test2__.__val__aa = __test1__.__val__obj4 diff --git a/tests/baselines/reference/assignmentCompatability25.symbols b/tests/baselines/reference/assignmentCompatability25.symbols index 3d602bb194eae..2e276e66ff6c9 100644 --- a/tests/baselines/reference/assignmentCompatability25.symbols +++ b/tests/baselines/reference/assignmentCompatability25.symbols @@ -23,13 +23,13 @@ namespace __test1__ { namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability25.ts, 3, 1)) - export var aa:{two:number;};; ->aa : Symbol(aa, Decl(assignmentCompatability25.ts, 5, 14)) ->two : Symbol(two, Decl(assignmentCompatability25.ts, 5, 19)) + export declare var aa:{two:number;};; +>aa : Symbol(aa, Decl(assignmentCompatability25.ts, 5, 22)) +>two : Symbol(two, Decl(assignmentCompatability25.ts, 5, 27)) export var __val__aa = aa; >__val__aa : Symbol(__val__aa, Decl(assignmentCompatability25.ts, 6, 14)) ->aa : Symbol(aa, Decl(assignmentCompatability25.ts, 5, 14)) +>aa : Symbol(aa, Decl(assignmentCompatability25.ts, 5, 22)) } __test2__.__val__aa = __test1__.__val__obj4 >__test2__.__val__aa : Symbol(__test2__.__val__aa, Decl(assignmentCompatability25.ts, 6, 14)) diff --git a/tests/baselines/reference/assignmentCompatability25.types b/tests/baselines/reference/assignmentCompatability25.types index 1738f1953ac6b..540528ba2aada 100644 --- a/tests/baselines/reference/assignmentCompatability25.types +++ b/tests/baselines/reference/assignmentCompatability25.types @@ -29,7 +29,7 @@ namespace __test2__ { >__test2__ : typeof __test2__ > : ^^^^^^^^^^^^^^^^ - export var aa:{two:number;};; + export declare var aa:{two:number;};; >aa : { two: number; } > : ^^^^^^^ ^^^ >two : number diff --git a/tests/baselines/reference/assignmentCompatability26.errors.txt b/tests/baselines/reference/assignmentCompatability26.errors.txt index 09f22ae33cfaa..501a4d404c994 100644 --- a/tests/baselines/reference/assignmentCompatability26.errors.txt +++ b/tests/baselines/reference/assignmentCompatability26.errors.txt @@ -9,7 +9,7 @@ assignmentCompatability26.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt export var __val__obj4 = obj4; } namespace __test2__ { - export var aa:{one:string;};; + export declare var aa:{one:string;};; export var __val__aa = aa; } __test2__.__val__aa = __test1__.__val__obj4 diff --git a/tests/baselines/reference/assignmentCompatability26.js b/tests/baselines/reference/assignmentCompatability26.js index c279c20af49e7..5dbee18d2ab8b 100644 --- a/tests/baselines/reference/assignmentCompatability26.js +++ b/tests/baselines/reference/assignmentCompatability26.js @@ -6,7 +6,7 @@ namespace __test1__ { export var __val__obj4 = obj4; } namespace __test2__ { - export var aa:{one:string;};; + export declare var aa:{one:string;};; export var __val__aa = aa; } __test2__.__val__aa = __test1__.__val__obj4 diff --git a/tests/baselines/reference/assignmentCompatability26.symbols b/tests/baselines/reference/assignmentCompatability26.symbols index a4f22faa888bb..95114592fa7a7 100644 --- a/tests/baselines/reference/assignmentCompatability26.symbols +++ b/tests/baselines/reference/assignmentCompatability26.symbols @@ -23,13 +23,13 @@ namespace __test1__ { namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability26.ts, 3, 1)) - export var aa:{one:string;};; ->aa : Symbol(aa, Decl(assignmentCompatability26.ts, 5, 14)) ->one : Symbol(one, Decl(assignmentCompatability26.ts, 5, 19)) + export declare var aa:{one:string;};; +>aa : Symbol(aa, Decl(assignmentCompatability26.ts, 5, 22)) +>one : Symbol(one, Decl(assignmentCompatability26.ts, 5, 27)) export var __val__aa = aa; >__val__aa : Symbol(__val__aa, Decl(assignmentCompatability26.ts, 6, 14)) ->aa : Symbol(aa, Decl(assignmentCompatability26.ts, 5, 14)) +>aa : Symbol(aa, Decl(assignmentCompatability26.ts, 5, 22)) } __test2__.__val__aa = __test1__.__val__obj4 >__test2__.__val__aa : Symbol(__test2__.__val__aa, Decl(assignmentCompatability26.ts, 6, 14)) diff --git a/tests/baselines/reference/assignmentCompatability26.types b/tests/baselines/reference/assignmentCompatability26.types index 0c0d7f1858a24..5cc45834ada84 100644 --- a/tests/baselines/reference/assignmentCompatability26.types +++ b/tests/baselines/reference/assignmentCompatability26.types @@ -29,7 +29,7 @@ namespace __test2__ { >__test2__ : typeof __test2__ > : ^^^^^^^^^^^^^^^^ - export var aa:{one:string;};; + export declare var aa:{one:string;};; >aa : { one: string; } > : ^^^^^^^ ^^^ >one : string diff --git a/tests/baselines/reference/assignmentCompatability27.errors.txt b/tests/baselines/reference/assignmentCompatability27.errors.txt index ec9952475f512..2d8ca9431480a 100644 --- a/tests/baselines/reference/assignmentCompatability27.errors.txt +++ b/tests/baselines/reference/assignmentCompatability27.errors.txt @@ -8,7 +8,7 @@ assignmentCompatability27.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt export var __val__obj4 = obj4; } namespace __test2__ { - export var aa:{two:string;};; + export declare var aa:{two:string;};; export var __val__aa = aa; } __test2__.__val__aa = __test1__.__val__obj4 diff --git a/tests/baselines/reference/assignmentCompatability27.js b/tests/baselines/reference/assignmentCompatability27.js index 13e4ee3a25dc3..45dfd39266bb4 100644 --- a/tests/baselines/reference/assignmentCompatability27.js +++ b/tests/baselines/reference/assignmentCompatability27.js @@ -6,7 +6,7 @@ namespace __test1__ { export var __val__obj4 = obj4; } namespace __test2__ { - export var aa:{two:string;};; + export declare var aa:{two:string;};; export var __val__aa = aa; } __test2__.__val__aa = __test1__.__val__obj4 diff --git a/tests/baselines/reference/assignmentCompatability27.symbols b/tests/baselines/reference/assignmentCompatability27.symbols index 3747307bc5bf4..1ba0e4ab5df0f 100644 --- a/tests/baselines/reference/assignmentCompatability27.symbols +++ b/tests/baselines/reference/assignmentCompatability27.symbols @@ -23,13 +23,13 @@ namespace __test1__ { namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability27.ts, 3, 1)) - export var aa:{two:string;};; ->aa : Symbol(aa, Decl(assignmentCompatability27.ts, 5, 14)) ->two : Symbol(two, Decl(assignmentCompatability27.ts, 5, 19)) + export declare var aa:{two:string;};; +>aa : Symbol(aa, Decl(assignmentCompatability27.ts, 5, 22)) +>two : Symbol(two, Decl(assignmentCompatability27.ts, 5, 27)) export var __val__aa = aa; >__val__aa : Symbol(__val__aa, Decl(assignmentCompatability27.ts, 6, 14)) ->aa : Symbol(aa, Decl(assignmentCompatability27.ts, 5, 14)) +>aa : Symbol(aa, Decl(assignmentCompatability27.ts, 5, 22)) } __test2__.__val__aa = __test1__.__val__obj4 >__test2__.__val__aa : Symbol(__test2__.__val__aa, Decl(assignmentCompatability27.ts, 6, 14)) diff --git a/tests/baselines/reference/assignmentCompatability27.types b/tests/baselines/reference/assignmentCompatability27.types index fdc998a5a475a..d44f18c5dd679 100644 --- a/tests/baselines/reference/assignmentCompatability27.types +++ b/tests/baselines/reference/assignmentCompatability27.types @@ -29,7 +29,7 @@ namespace __test2__ { >__test2__ : typeof __test2__ > : ^^^^^^^^^^^^^^^^ - export var aa:{two:string;};; + export declare var aa:{two:string;};; >aa : { two: string; } > : ^^^^^^^ ^^^ >two : string diff --git a/tests/baselines/reference/assignmentCompatability28.errors.txt b/tests/baselines/reference/assignmentCompatability28.errors.txt index 91d0fe893a0d4..15973186ba499 100644 --- a/tests/baselines/reference/assignmentCompatability28.errors.txt +++ b/tests/baselines/reference/assignmentCompatability28.errors.txt @@ -9,7 +9,7 @@ assignmentCompatability28.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt export var __val__obj4 = obj4; } namespace __test2__ { - export var aa:{one:boolean;};; + export declare var aa:{one:boolean;};; export var __val__aa = aa; } __test2__.__val__aa = __test1__.__val__obj4 diff --git a/tests/baselines/reference/assignmentCompatability28.js b/tests/baselines/reference/assignmentCompatability28.js index a01d47869093d..1f6d520ef9697 100644 --- a/tests/baselines/reference/assignmentCompatability28.js +++ b/tests/baselines/reference/assignmentCompatability28.js @@ -6,7 +6,7 @@ namespace __test1__ { export var __val__obj4 = obj4; } namespace __test2__ { - export var aa:{one:boolean;};; + export declare var aa:{one:boolean;};; export var __val__aa = aa; } __test2__.__val__aa = __test1__.__val__obj4 diff --git a/tests/baselines/reference/assignmentCompatability28.symbols b/tests/baselines/reference/assignmentCompatability28.symbols index 0fff0f4be1e56..d249c04652357 100644 --- a/tests/baselines/reference/assignmentCompatability28.symbols +++ b/tests/baselines/reference/assignmentCompatability28.symbols @@ -23,13 +23,13 @@ namespace __test1__ { namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability28.ts, 3, 1)) - export var aa:{one:boolean;};; ->aa : Symbol(aa, Decl(assignmentCompatability28.ts, 5, 14)) ->one : Symbol(one, Decl(assignmentCompatability28.ts, 5, 19)) + export declare var aa:{one:boolean;};; +>aa : Symbol(aa, Decl(assignmentCompatability28.ts, 5, 22)) +>one : Symbol(one, Decl(assignmentCompatability28.ts, 5, 27)) export var __val__aa = aa; >__val__aa : Symbol(__val__aa, Decl(assignmentCompatability28.ts, 6, 14)) ->aa : Symbol(aa, Decl(assignmentCompatability28.ts, 5, 14)) +>aa : Symbol(aa, Decl(assignmentCompatability28.ts, 5, 22)) } __test2__.__val__aa = __test1__.__val__obj4 >__test2__.__val__aa : Symbol(__test2__.__val__aa, Decl(assignmentCompatability28.ts, 6, 14)) diff --git a/tests/baselines/reference/assignmentCompatability28.types b/tests/baselines/reference/assignmentCompatability28.types index 796c44c03fb37..2bceac4487fa9 100644 --- a/tests/baselines/reference/assignmentCompatability28.types +++ b/tests/baselines/reference/assignmentCompatability28.types @@ -29,7 +29,7 @@ namespace __test2__ { >__test2__ : typeof __test2__ > : ^^^^^^^^^^^^^^^^ - export var aa:{one:boolean;};; + export declare var aa:{one:boolean;};; >aa : { one: boolean; } > : ^^^^^^^ ^^^ >one : boolean diff --git a/tests/baselines/reference/assignmentCompatability29.errors.txt b/tests/baselines/reference/assignmentCompatability29.errors.txt index 43bd27f8d4309..f837d015b6c98 100644 --- a/tests/baselines/reference/assignmentCompatability29.errors.txt +++ b/tests/baselines/reference/assignmentCompatability29.errors.txt @@ -9,7 +9,7 @@ assignmentCompatability29.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt export var __val__obj4 = obj4; } namespace __test2__ { - export var aa:{one:any[];};; + export declare var aa:{one:any[];};; export var __val__aa = aa; } __test2__.__val__aa = __test1__.__val__obj4 diff --git a/tests/baselines/reference/assignmentCompatability29.js b/tests/baselines/reference/assignmentCompatability29.js index c8e322becedf9..1bf4358ba85c4 100644 --- a/tests/baselines/reference/assignmentCompatability29.js +++ b/tests/baselines/reference/assignmentCompatability29.js @@ -6,7 +6,7 @@ namespace __test1__ { export var __val__obj4 = obj4; } namespace __test2__ { - export var aa:{one:any[];};; + export declare var aa:{one:any[];};; export var __val__aa = aa; } __test2__.__val__aa = __test1__.__val__obj4 diff --git a/tests/baselines/reference/assignmentCompatability29.symbols b/tests/baselines/reference/assignmentCompatability29.symbols index 9c17c7e4ce411..b0289e5f22eae 100644 --- a/tests/baselines/reference/assignmentCompatability29.symbols +++ b/tests/baselines/reference/assignmentCompatability29.symbols @@ -23,13 +23,13 @@ namespace __test1__ { namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability29.ts, 3, 1)) - export var aa:{one:any[];};; ->aa : Symbol(aa, Decl(assignmentCompatability29.ts, 5, 14)) ->one : Symbol(one, Decl(assignmentCompatability29.ts, 5, 19)) + export declare var aa:{one:any[];};; +>aa : Symbol(aa, Decl(assignmentCompatability29.ts, 5, 22)) +>one : Symbol(one, Decl(assignmentCompatability29.ts, 5, 27)) export var __val__aa = aa; >__val__aa : Symbol(__val__aa, Decl(assignmentCompatability29.ts, 6, 14)) ->aa : Symbol(aa, Decl(assignmentCompatability29.ts, 5, 14)) +>aa : Symbol(aa, Decl(assignmentCompatability29.ts, 5, 22)) } __test2__.__val__aa = __test1__.__val__obj4 >__test2__.__val__aa : Symbol(__test2__.__val__aa, Decl(assignmentCompatability29.ts, 6, 14)) diff --git a/tests/baselines/reference/assignmentCompatability29.types b/tests/baselines/reference/assignmentCompatability29.types index d63d6f454d6d1..5bb36b7ba33b2 100644 --- a/tests/baselines/reference/assignmentCompatability29.types +++ b/tests/baselines/reference/assignmentCompatability29.types @@ -29,7 +29,7 @@ namespace __test2__ { >__test2__ : typeof __test2__ > : ^^^^^^^^^^^^^^^^ - export var aa:{one:any[];};; + export declare var aa:{one:any[];};; >aa : { one: any[]; } > : ^^^^^^^ ^^^ >one : any[] diff --git a/tests/baselines/reference/assignmentCompatability30.errors.txt b/tests/baselines/reference/assignmentCompatability30.errors.txt index f6923c3f98015..7dbcaaac1c2ce 100644 --- a/tests/baselines/reference/assignmentCompatability30.errors.txt +++ b/tests/baselines/reference/assignmentCompatability30.errors.txt @@ -9,7 +9,7 @@ assignmentCompatability30.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt export var __val__obj4 = obj4; } namespace __test2__ { - export var aa:{one:number[];};; + export declare var aa:{one:number[];};; export var __val__aa = aa; } __test2__.__val__aa = __test1__.__val__obj4 diff --git a/tests/baselines/reference/assignmentCompatability30.js b/tests/baselines/reference/assignmentCompatability30.js index 98b626d4192c5..a1d4fe8bf8298 100644 --- a/tests/baselines/reference/assignmentCompatability30.js +++ b/tests/baselines/reference/assignmentCompatability30.js @@ -6,7 +6,7 @@ namespace __test1__ { export var __val__obj4 = obj4; } namespace __test2__ { - export var aa:{one:number[];};; + export declare var aa:{one:number[];};; export var __val__aa = aa; } __test2__.__val__aa = __test1__.__val__obj4 diff --git a/tests/baselines/reference/assignmentCompatability30.symbols b/tests/baselines/reference/assignmentCompatability30.symbols index 7a1bc266947b1..91e1ee80d4c5e 100644 --- a/tests/baselines/reference/assignmentCompatability30.symbols +++ b/tests/baselines/reference/assignmentCompatability30.symbols @@ -23,13 +23,13 @@ namespace __test1__ { namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability30.ts, 3, 1)) - export var aa:{one:number[];};; ->aa : Symbol(aa, Decl(assignmentCompatability30.ts, 5, 14)) ->one : Symbol(one, Decl(assignmentCompatability30.ts, 5, 19)) + export declare var aa:{one:number[];};; +>aa : Symbol(aa, Decl(assignmentCompatability30.ts, 5, 22)) +>one : Symbol(one, Decl(assignmentCompatability30.ts, 5, 27)) export var __val__aa = aa; >__val__aa : Symbol(__val__aa, Decl(assignmentCompatability30.ts, 6, 14)) ->aa : Symbol(aa, Decl(assignmentCompatability30.ts, 5, 14)) +>aa : Symbol(aa, Decl(assignmentCompatability30.ts, 5, 22)) } __test2__.__val__aa = __test1__.__val__obj4 >__test2__.__val__aa : Symbol(__test2__.__val__aa, Decl(assignmentCompatability30.ts, 6, 14)) diff --git a/tests/baselines/reference/assignmentCompatability30.types b/tests/baselines/reference/assignmentCompatability30.types index 764c8bf3ed1c4..6433a3e5bbf6e 100644 --- a/tests/baselines/reference/assignmentCompatability30.types +++ b/tests/baselines/reference/assignmentCompatability30.types @@ -29,7 +29,7 @@ namespace __test2__ { >__test2__ : typeof __test2__ > : ^^^^^^^^^^^^^^^^ - export var aa:{one:number[];};; + export declare var aa:{one:number[];};; >aa : { one: number[]; } > : ^^^^^^^ ^^^ >one : number[] diff --git a/tests/baselines/reference/assignmentCompatability31.errors.txt b/tests/baselines/reference/assignmentCompatability31.errors.txt index 695fbe45c99c4..a19c49b72573d 100644 --- a/tests/baselines/reference/assignmentCompatability31.errors.txt +++ b/tests/baselines/reference/assignmentCompatability31.errors.txt @@ -9,7 +9,7 @@ assignmentCompatability31.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt export var __val__obj4 = obj4; } namespace __test2__ { - export var aa:{one:string[];};; + export declare var aa:{one:string[];};; export var __val__aa = aa; } __test2__.__val__aa = __test1__.__val__obj4 diff --git a/tests/baselines/reference/assignmentCompatability31.js b/tests/baselines/reference/assignmentCompatability31.js index 50670044f8957..b51435a5f2df6 100644 --- a/tests/baselines/reference/assignmentCompatability31.js +++ b/tests/baselines/reference/assignmentCompatability31.js @@ -6,7 +6,7 @@ namespace __test1__ { export var __val__obj4 = obj4; } namespace __test2__ { - export var aa:{one:string[];};; + export declare var aa:{one:string[];};; export var __val__aa = aa; } __test2__.__val__aa = __test1__.__val__obj4 diff --git a/tests/baselines/reference/assignmentCompatability31.symbols b/tests/baselines/reference/assignmentCompatability31.symbols index 8c6afa9836c2e..18903e7ae4d7e 100644 --- a/tests/baselines/reference/assignmentCompatability31.symbols +++ b/tests/baselines/reference/assignmentCompatability31.symbols @@ -23,13 +23,13 @@ namespace __test1__ { namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability31.ts, 3, 1)) - export var aa:{one:string[];};; ->aa : Symbol(aa, Decl(assignmentCompatability31.ts, 5, 14)) ->one : Symbol(one, Decl(assignmentCompatability31.ts, 5, 19)) + export declare var aa:{one:string[];};; +>aa : Symbol(aa, Decl(assignmentCompatability31.ts, 5, 22)) +>one : Symbol(one, Decl(assignmentCompatability31.ts, 5, 27)) export var __val__aa = aa; >__val__aa : Symbol(__val__aa, Decl(assignmentCompatability31.ts, 6, 14)) ->aa : Symbol(aa, Decl(assignmentCompatability31.ts, 5, 14)) +>aa : Symbol(aa, Decl(assignmentCompatability31.ts, 5, 22)) } __test2__.__val__aa = __test1__.__val__obj4 >__test2__.__val__aa : Symbol(__test2__.__val__aa, Decl(assignmentCompatability31.ts, 6, 14)) diff --git a/tests/baselines/reference/assignmentCompatability31.types b/tests/baselines/reference/assignmentCompatability31.types index b3930e1f337d0..6feb28f0786e7 100644 --- a/tests/baselines/reference/assignmentCompatability31.types +++ b/tests/baselines/reference/assignmentCompatability31.types @@ -29,7 +29,7 @@ namespace __test2__ { >__test2__ : typeof __test2__ > : ^^^^^^^^^^^^^^^^ - export var aa:{one:string[];};; + export declare var aa:{one:string[];};; >aa : { one: string[]; } > : ^^^^^^^ ^^^ >one : string[] diff --git a/tests/baselines/reference/assignmentCompatability32.errors.txt b/tests/baselines/reference/assignmentCompatability32.errors.txt index 3173634905e57..0400af370d7e1 100644 --- a/tests/baselines/reference/assignmentCompatability32.errors.txt +++ b/tests/baselines/reference/assignmentCompatability32.errors.txt @@ -9,7 +9,7 @@ assignmentCompatability32.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt export var __val__obj4 = obj4; } namespace __test2__ { - export var aa:{one:boolean[];};; + export declare var aa:{one:boolean[];};; export var __val__aa = aa; } __test2__.__val__aa = __test1__.__val__obj4 diff --git a/tests/baselines/reference/assignmentCompatability32.js b/tests/baselines/reference/assignmentCompatability32.js index 1e83ba4954947..54f556ec8504f 100644 --- a/tests/baselines/reference/assignmentCompatability32.js +++ b/tests/baselines/reference/assignmentCompatability32.js @@ -6,7 +6,7 @@ namespace __test1__ { export var __val__obj4 = obj4; } namespace __test2__ { - export var aa:{one:boolean[];};; + export declare var aa:{one:boolean[];};; export var __val__aa = aa; } __test2__.__val__aa = __test1__.__val__obj4 diff --git a/tests/baselines/reference/assignmentCompatability32.symbols b/tests/baselines/reference/assignmentCompatability32.symbols index 7198e43ed53ca..1adeaf98bc4bc 100644 --- a/tests/baselines/reference/assignmentCompatability32.symbols +++ b/tests/baselines/reference/assignmentCompatability32.symbols @@ -23,13 +23,13 @@ namespace __test1__ { namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability32.ts, 3, 1)) - export var aa:{one:boolean[];};; ->aa : Symbol(aa, Decl(assignmentCompatability32.ts, 5, 14)) ->one : Symbol(one, Decl(assignmentCompatability32.ts, 5, 19)) + export declare var aa:{one:boolean[];};; +>aa : Symbol(aa, Decl(assignmentCompatability32.ts, 5, 22)) +>one : Symbol(one, Decl(assignmentCompatability32.ts, 5, 27)) export var __val__aa = aa; >__val__aa : Symbol(__val__aa, Decl(assignmentCompatability32.ts, 6, 14)) ->aa : Symbol(aa, Decl(assignmentCompatability32.ts, 5, 14)) +>aa : Symbol(aa, Decl(assignmentCompatability32.ts, 5, 22)) } __test2__.__val__aa = __test1__.__val__obj4 >__test2__.__val__aa : Symbol(__test2__.__val__aa, Decl(assignmentCompatability32.ts, 6, 14)) diff --git a/tests/baselines/reference/assignmentCompatability32.types b/tests/baselines/reference/assignmentCompatability32.types index fb0c23f3f15ed..7701d2dee3511 100644 --- a/tests/baselines/reference/assignmentCompatability32.types +++ b/tests/baselines/reference/assignmentCompatability32.types @@ -29,7 +29,7 @@ namespace __test2__ { >__test2__ : typeof __test2__ > : ^^^^^^^^^^^^^^^^ - export var aa:{one:boolean[];};; + export declare var aa:{one:boolean[];};; >aa : { one: boolean[]; } > : ^^^^^^^ ^^^ >one : boolean[] diff --git a/tests/baselines/reference/assignmentCompatability33.errors.txt b/tests/baselines/reference/assignmentCompatability33.errors.txt index ddc864025e987..0e68cf6cca45a 100644 --- a/tests/baselines/reference/assignmentCompatability33.errors.txt +++ b/tests/baselines/reference/assignmentCompatability33.errors.txt @@ -8,7 +8,7 @@ assignmentCompatability33.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt export var __val__obj4 = obj4; } namespace __test2__ { - export var obj: { (a: Tstring): Tstring; }; + export declare var obj: { (a: Tstring): Tstring; }; export var __val__obj = obj; } __test2__.__val__obj = __test1__.__val__obj4 diff --git a/tests/baselines/reference/assignmentCompatability33.js b/tests/baselines/reference/assignmentCompatability33.js index d54efee1ce8ac..16212b2cf9bb5 100644 --- a/tests/baselines/reference/assignmentCompatability33.js +++ b/tests/baselines/reference/assignmentCompatability33.js @@ -6,7 +6,7 @@ namespace __test1__ { export var __val__obj4 = obj4; } namespace __test2__ { - export var obj: { (a: Tstring): Tstring; }; + export declare var obj: { (a: Tstring): Tstring; }; export var __val__obj = obj; } __test2__.__val__obj = __test1__.__val__obj4 diff --git a/tests/baselines/reference/assignmentCompatability33.symbols b/tests/baselines/reference/assignmentCompatability33.symbols index 00ebf18b0c3f8..8ec1688cc2143 100644 --- a/tests/baselines/reference/assignmentCompatability33.symbols +++ b/tests/baselines/reference/assignmentCompatability33.symbols @@ -23,16 +23,16 @@ namespace __test1__ { namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability33.ts, 3, 1)) - export var obj: { (a: Tstring): Tstring; }; ->obj : Symbol(obj, Decl(assignmentCompatability33.ts, 5, 14)) ->Tstring : Symbol(Tstring, Decl(assignmentCompatability33.ts, 5, 23)) ->a : Symbol(a, Decl(assignmentCompatability33.ts, 5, 32)) ->Tstring : Symbol(Tstring, Decl(assignmentCompatability33.ts, 5, 23)) ->Tstring : Symbol(Tstring, Decl(assignmentCompatability33.ts, 5, 23)) + export declare var obj: { (a: Tstring): Tstring; }; +>obj : Symbol(obj, Decl(assignmentCompatability33.ts, 5, 22)) +>Tstring : Symbol(Tstring, Decl(assignmentCompatability33.ts, 5, 31)) +>a : Symbol(a, Decl(assignmentCompatability33.ts, 5, 40)) +>Tstring : Symbol(Tstring, Decl(assignmentCompatability33.ts, 5, 31)) +>Tstring : Symbol(Tstring, Decl(assignmentCompatability33.ts, 5, 31)) export var __val__obj = obj; >__val__obj : Symbol(__val__obj, Decl(assignmentCompatability33.ts, 6, 14)) ->obj : Symbol(obj, Decl(assignmentCompatability33.ts, 5, 14)) +>obj : Symbol(obj, Decl(assignmentCompatability33.ts, 5, 22)) } __test2__.__val__obj = __test1__.__val__obj4 >__test2__.__val__obj : Symbol(__test2__.__val__obj, Decl(assignmentCompatability33.ts, 6, 14)) diff --git a/tests/baselines/reference/assignmentCompatability33.types b/tests/baselines/reference/assignmentCompatability33.types index 9ce33b0cae3fd..db71c0aa18923 100644 --- a/tests/baselines/reference/assignmentCompatability33.types +++ b/tests/baselines/reference/assignmentCompatability33.types @@ -29,7 +29,7 @@ namespace __test2__ { >__test2__ : typeof __test2__ > : ^^^^^^^^^^^^^^^^ - export var obj: { (a: Tstring): Tstring; }; + export declare var obj: { (a: Tstring): Tstring; }; >obj : (a: Tstring) => Tstring > : ^ ^^ ^^ ^^^^^ >a : Tstring diff --git a/tests/baselines/reference/assignmentCompatability34.errors.txt b/tests/baselines/reference/assignmentCompatability34.errors.txt index f04d2df6e92fd..6f4adfc867d30 100644 --- a/tests/baselines/reference/assignmentCompatability34.errors.txt +++ b/tests/baselines/reference/assignmentCompatability34.errors.txt @@ -8,7 +8,7 @@ assignmentCompatability34.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt export var __val__obj4 = obj4; } namespace __test2__ { - export var obj: { (a:Tnumber):Tnumber;}; + export declare var obj: { (a:Tnumber):Tnumber;}; export var __val__obj = obj; } __test2__.__val__obj = __test1__.__val__obj4 diff --git a/tests/baselines/reference/assignmentCompatability34.js b/tests/baselines/reference/assignmentCompatability34.js index a754c725badb9..00a0e3254c3e6 100644 --- a/tests/baselines/reference/assignmentCompatability34.js +++ b/tests/baselines/reference/assignmentCompatability34.js @@ -6,7 +6,7 @@ namespace __test1__ { export var __val__obj4 = obj4; } namespace __test2__ { - export var obj: { (a:Tnumber):Tnumber;}; + export declare var obj: { (a:Tnumber):Tnumber;}; export var __val__obj = obj; } __test2__.__val__obj = __test1__.__val__obj4 diff --git a/tests/baselines/reference/assignmentCompatability34.symbols b/tests/baselines/reference/assignmentCompatability34.symbols index f458b6a3fec14..5c810073e99fe 100644 --- a/tests/baselines/reference/assignmentCompatability34.symbols +++ b/tests/baselines/reference/assignmentCompatability34.symbols @@ -23,16 +23,16 @@ namespace __test1__ { namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability34.ts, 3, 1)) - export var obj: { (a:Tnumber):Tnumber;}; ->obj : Symbol(obj, Decl(assignmentCompatability34.ts, 5, 14)) ->Tnumber : Symbol(Tnumber, Decl(assignmentCompatability34.ts, 5, 23)) ->a : Symbol(a, Decl(assignmentCompatability34.ts, 5, 32)) ->Tnumber : Symbol(Tnumber, Decl(assignmentCompatability34.ts, 5, 23)) ->Tnumber : Symbol(Tnumber, Decl(assignmentCompatability34.ts, 5, 23)) + export declare var obj: { (a:Tnumber):Tnumber;}; +>obj : Symbol(obj, Decl(assignmentCompatability34.ts, 5, 22)) +>Tnumber : Symbol(Tnumber, Decl(assignmentCompatability34.ts, 5, 31)) +>a : Symbol(a, Decl(assignmentCompatability34.ts, 5, 40)) +>Tnumber : Symbol(Tnumber, Decl(assignmentCompatability34.ts, 5, 31)) +>Tnumber : Symbol(Tnumber, Decl(assignmentCompatability34.ts, 5, 31)) export var __val__obj = obj; >__val__obj : Symbol(__val__obj, Decl(assignmentCompatability34.ts, 6, 14)) ->obj : Symbol(obj, Decl(assignmentCompatability34.ts, 5, 14)) +>obj : Symbol(obj, Decl(assignmentCompatability34.ts, 5, 22)) } __test2__.__val__obj = __test1__.__val__obj4 >__test2__.__val__obj : Symbol(__test2__.__val__obj, Decl(assignmentCompatability34.ts, 6, 14)) diff --git a/tests/baselines/reference/assignmentCompatability34.types b/tests/baselines/reference/assignmentCompatability34.types index 279673048a5f2..423b3fc0a2958 100644 --- a/tests/baselines/reference/assignmentCompatability34.types +++ b/tests/baselines/reference/assignmentCompatability34.types @@ -29,7 +29,7 @@ namespace __test2__ { >__test2__ : typeof __test2__ > : ^^^^^^^^^^^^^^^^ - export var obj: { (a:Tnumber):Tnumber;}; + export declare var obj: { (a:Tnumber):Tnumber;}; >obj : (a: Tnumber) => Tnumber > : ^ ^^ ^^ ^^^^^ >a : Tnumber diff --git a/tests/baselines/reference/assignmentCompatability35.errors.txt b/tests/baselines/reference/assignmentCompatability35.errors.txt index 3c6be3e35a2bf..539505540545e 100644 --- a/tests/baselines/reference/assignmentCompatability35.errors.txt +++ b/tests/baselines/reference/assignmentCompatability35.errors.txt @@ -8,7 +8,7 @@ assignmentCompatability35.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt export var __val__obj4 = obj4; } namespace __test2__ { - export var aa:{[index:number]:number;};; + export declare var aa:{[index:number]:number;};; export var __val__aa = aa; } __test2__.__val__aa = __test1__.__val__obj4 diff --git a/tests/baselines/reference/assignmentCompatability35.js b/tests/baselines/reference/assignmentCompatability35.js index 6a6110fda9bb6..043b98933ed8e 100644 --- a/tests/baselines/reference/assignmentCompatability35.js +++ b/tests/baselines/reference/assignmentCompatability35.js @@ -6,7 +6,7 @@ namespace __test1__ { export var __val__obj4 = obj4; } namespace __test2__ { - export var aa:{[index:number]:number;};; + export declare var aa:{[index:number]:number;};; export var __val__aa = aa; } __test2__.__val__aa = __test1__.__val__obj4 diff --git a/tests/baselines/reference/assignmentCompatability35.symbols b/tests/baselines/reference/assignmentCompatability35.symbols index bc35b795a17a4..901212a591f4a 100644 --- a/tests/baselines/reference/assignmentCompatability35.symbols +++ b/tests/baselines/reference/assignmentCompatability35.symbols @@ -23,13 +23,13 @@ namespace __test1__ { namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability35.ts, 3, 1)) - export var aa:{[index:number]:number;};; ->aa : Symbol(aa, Decl(assignmentCompatability35.ts, 5, 14)) ->index : Symbol(index, Decl(assignmentCompatability35.ts, 5, 20)) + export declare var aa:{[index:number]:number;};; +>aa : Symbol(aa, Decl(assignmentCompatability35.ts, 5, 22)) +>index : Symbol(index, Decl(assignmentCompatability35.ts, 5, 28)) export var __val__aa = aa; >__val__aa : Symbol(__val__aa, Decl(assignmentCompatability35.ts, 6, 14)) ->aa : Symbol(aa, Decl(assignmentCompatability35.ts, 5, 14)) +>aa : Symbol(aa, Decl(assignmentCompatability35.ts, 5, 22)) } __test2__.__val__aa = __test1__.__val__obj4 >__test2__.__val__aa : Symbol(__test2__.__val__aa, Decl(assignmentCompatability35.ts, 6, 14)) diff --git a/tests/baselines/reference/assignmentCompatability35.types b/tests/baselines/reference/assignmentCompatability35.types index 5920d2bf1b369..dce1e8ebc614c 100644 --- a/tests/baselines/reference/assignmentCompatability35.types +++ b/tests/baselines/reference/assignmentCompatability35.types @@ -29,7 +29,7 @@ namespace __test2__ { >__test2__ : typeof __test2__ > : ^^^^^^^^^^^^^^^^ - export var aa:{[index:number]:number;};; + export declare var aa:{[index:number]:number;};; >aa : { [index: number]: number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >index : number diff --git a/tests/baselines/reference/assignmentCompatability37.errors.txt b/tests/baselines/reference/assignmentCompatability37.errors.txt index 2bac1c7c344bb..2dd17b6f3fd7f 100644 --- a/tests/baselines/reference/assignmentCompatability37.errors.txt +++ b/tests/baselines/reference/assignmentCompatability37.errors.txt @@ -8,7 +8,7 @@ assignmentCompatability37.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt export var __val__obj4 = obj4; } namespace __test2__ { - export var aa:{ new (param: Tnumber); };; + export declare var aa:{ new (param: Tnumber); };; export var __val__aa = aa; } __test2__.__val__aa = __test1__.__val__obj4 diff --git a/tests/baselines/reference/assignmentCompatability37.js b/tests/baselines/reference/assignmentCompatability37.js index 533f70bda2cb2..2b639372376b4 100644 --- a/tests/baselines/reference/assignmentCompatability37.js +++ b/tests/baselines/reference/assignmentCompatability37.js @@ -6,7 +6,7 @@ namespace __test1__ { export var __val__obj4 = obj4; } namespace __test2__ { - export var aa:{ new (param: Tnumber); };; + export declare var aa:{ new (param: Tnumber); };; export var __val__aa = aa; } __test2__.__val__aa = __test1__.__val__obj4 diff --git a/tests/baselines/reference/assignmentCompatability37.symbols b/tests/baselines/reference/assignmentCompatability37.symbols index b933a59cae465..7ea6732ebf45a 100644 --- a/tests/baselines/reference/assignmentCompatability37.symbols +++ b/tests/baselines/reference/assignmentCompatability37.symbols @@ -23,15 +23,15 @@ namespace __test1__ { namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability37.ts, 3, 1)) - export var aa:{ new (param: Tnumber); };; ->aa : Symbol(aa, Decl(assignmentCompatability37.ts, 5, 14)) ->Tnumber : Symbol(Tnumber, Decl(assignmentCompatability37.ts, 5, 25)) ->param : Symbol(param, Decl(assignmentCompatability37.ts, 5, 34)) ->Tnumber : Symbol(Tnumber, Decl(assignmentCompatability37.ts, 5, 25)) + export declare var aa:{ new (param: Tnumber); };; +>aa : Symbol(aa, Decl(assignmentCompatability37.ts, 5, 22)) +>Tnumber : Symbol(Tnumber, Decl(assignmentCompatability37.ts, 5, 33)) +>param : Symbol(param, Decl(assignmentCompatability37.ts, 5, 42)) +>Tnumber : Symbol(Tnumber, Decl(assignmentCompatability37.ts, 5, 33)) export var __val__aa = aa; >__val__aa : Symbol(__val__aa, Decl(assignmentCompatability37.ts, 6, 14)) ->aa : Symbol(aa, Decl(assignmentCompatability37.ts, 5, 14)) +>aa : Symbol(aa, Decl(assignmentCompatability37.ts, 5, 22)) } __test2__.__val__aa = __test1__.__val__obj4 >__test2__.__val__aa : Symbol(__test2__.__val__aa, Decl(assignmentCompatability37.ts, 6, 14)) diff --git a/tests/baselines/reference/assignmentCompatability37.types b/tests/baselines/reference/assignmentCompatability37.types index 5649e14786c46..b2306e34ad03d 100644 --- a/tests/baselines/reference/assignmentCompatability37.types +++ b/tests/baselines/reference/assignmentCompatability37.types @@ -29,7 +29,7 @@ namespace __test2__ { >__test2__ : typeof __test2__ > : ^^^^^^^^^^^^^^^^ - export var aa:{ new (param: Tnumber); };; + export declare var aa:{ new (param: Tnumber); };; >aa : new (param: Tnumber) => any > : ^^^^^ ^^ ^^ ^^^^^^^^ >param : Tnumber diff --git a/tests/baselines/reference/assignmentCompatability38.errors.txt b/tests/baselines/reference/assignmentCompatability38.errors.txt index 2e6538c0e9870..04471c39ec204 100644 --- a/tests/baselines/reference/assignmentCompatability38.errors.txt +++ b/tests/baselines/reference/assignmentCompatability38.errors.txt @@ -8,7 +8,7 @@ assignmentCompatability38.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt export var __val__obj4 = obj4; } namespace __test2__ { - export var aa:{ new (param: Tstring); };; + export declare var aa:{ new (param: Tstring); };; export var __val__aa = aa; } __test2__.__val__aa = __test1__.__val__obj4 diff --git a/tests/baselines/reference/assignmentCompatability38.js b/tests/baselines/reference/assignmentCompatability38.js index 2d1a23dfa0ffe..66c46eaeeec0f 100644 --- a/tests/baselines/reference/assignmentCompatability38.js +++ b/tests/baselines/reference/assignmentCompatability38.js @@ -6,7 +6,7 @@ namespace __test1__ { export var __val__obj4 = obj4; } namespace __test2__ { - export var aa:{ new (param: Tstring); };; + export declare var aa:{ new (param: Tstring); };; export var __val__aa = aa; } __test2__.__val__aa = __test1__.__val__obj4 diff --git a/tests/baselines/reference/assignmentCompatability38.symbols b/tests/baselines/reference/assignmentCompatability38.symbols index 7d95a42b504e3..628d61e865b93 100644 --- a/tests/baselines/reference/assignmentCompatability38.symbols +++ b/tests/baselines/reference/assignmentCompatability38.symbols @@ -23,15 +23,15 @@ namespace __test1__ { namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability38.ts, 3, 1)) - export var aa:{ new (param: Tstring); };; ->aa : Symbol(aa, Decl(assignmentCompatability38.ts, 5, 14)) ->Tstring : Symbol(Tstring, Decl(assignmentCompatability38.ts, 5, 25)) ->param : Symbol(param, Decl(assignmentCompatability38.ts, 5, 34)) ->Tstring : Symbol(Tstring, Decl(assignmentCompatability38.ts, 5, 25)) + export declare var aa:{ new (param: Tstring); };; +>aa : Symbol(aa, Decl(assignmentCompatability38.ts, 5, 22)) +>Tstring : Symbol(Tstring, Decl(assignmentCompatability38.ts, 5, 33)) +>param : Symbol(param, Decl(assignmentCompatability38.ts, 5, 42)) +>Tstring : Symbol(Tstring, Decl(assignmentCompatability38.ts, 5, 33)) export var __val__aa = aa; >__val__aa : Symbol(__val__aa, Decl(assignmentCompatability38.ts, 6, 14)) ->aa : Symbol(aa, Decl(assignmentCompatability38.ts, 5, 14)) +>aa : Symbol(aa, Decl(assignmentCompatability38.ts, 5, 22)) } __test2__.__val__aa = __test1__.__val__obj4 >__test2__.__val__aa : Symbol(__test2__.__val__aa, Decl(assignmentCompatability38.ts, 6, 14)) diff --git a/tests/baselines/reference/assignmentCompatability38.types b/tests/baselines/reference/assignmentCompatability38.types index daf41632e8f1f..49f1d43cdf48a 100644 --- a/tests/baselines/reference/assignmentCompatability38.types +++ b/tests/baselines/reference/assignmentCompatability38.types @@ -29,7 +29,7 @@ namespace __test2__ { >__test2__ : typeof __test2__ > : ^^^^^^^^^^^^^^^^ - export var aa:{ new (param: Tstring); };; + export declare var aa:{ new (param: Tstring); };; >aa : new (param: Tstring) => any > : ^^^^^ ^^ ^^ ^^^^^^^^ >param : Tstring diff --git a/tests/baselines/reference/bestCommonTypeOfTuple2.errors.txt b/tests/baselines/reference/bestCommonTypeOfTuple2.errors.txt index 2029d92d11f2f..c7615aea73486 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple2.errors.txt +++ b/tests/baselines/reference/bestCommonTypeOfTuple2.errors.txt @@ -16,11 +16,11 @@ bestCommonTypeOfTuple2.ts(21,14): error TS2493: Tuple type '[C1, F]' of length ' class C1 implements base1 { i = "foo"; c } class D1 extends C1 { i = "bar"; d } - var t1: [C, base]; - var t2: [C, D]; - var t3: [C1, D1]; - var t4: [base1, C1]; - var t5: [C1, F] + declare var t1: [C, base]; + declare var t2: [C, D]; + declare var t3: [C1, D1]; + declare var t4: [base1, C1]; + declare var t5: [C1, F] var e11 = t1[4]; // base ~ diff --git a/tests/baselines/reference/bestCommonTypeOfTuple2.js b/tests/baselines/reference/bestCommonTypeOfTuple2.js index 5d440c14c46f8..2c4fa73218404 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple2.js +++ b/tests/baselines/reference/bestCommonTypeOfTuple2.js @@ -11,11 +11,11 @@ class F extends C { f } class C1 implements base1 { i = "foo"; c } class D1 extends C1 { i = "bar"; d } -var t1: [C, base]; -var t2: [C, D]; -var t3: [C1, D1]; -var t4: [base1, C1]; -var t5: [C1, F] +declare var t1: [C, base]; +declare var t2: [C, D]; +declare var t3: [C1, D1]; +declare var t4: [base1, C1]; +declare var t5: [C1, F] var e11 = t1[4]; // base var e21 = t2[4]; // {} @@ -77,11 +77,6 @@ var D1 = /** @class */ (function (_super) { } return D1; }(C1)); -var t1; -var t2; -var t3; -var t4; -var t5; var e11 = t1[4]; // base var e21 = t2[4]; // {} var e31 = t3[4]; // C1 diff --git a/tests/baselines/reference/bestCommonTypeOfTuple2.symbols b/tests/baselines/reference/bestCommonTypeOfTuple2.symbols index a9ee96ecc1a61..87a5145200723 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple2.symbols +++ b/tests/baselines/reference/bestCommonTypeOfTuple2.symbols @@ -40,48 +40,48 @@ class D1 extends C1 { i = "bar"; d } >i : Symbol(D1.i, Decl(bestCommonTypeOfTuple2.ts, 8, 21)) >d : Symbol(D1.d, Decl(bestCommonTypeOfTuple2.ts, 8, 32)) -var t1: [C, base]; ->t1 : Symbol(t1, Decl(bestCommonTypeOfTuple2.ts, 10, 3)) +declare var t1: [C, base]; +>t1 : Symbol(t1, Decl(bestCommonTypeOfTuple2.ts, 10, 11)) >C : Symbol(C, Decl(bestCommonTypeOfTuple2.ts, 1, 21)) >base : Symbol(base, Decl(bestCommonTypeOfTuple2.ts, 0, 0)) -var t2: [C, D]; ->t2 : Symbol(t2, Decl(bestCommonTypeOfTuple2.ts, 11, 3)) +declare var t2: [C, D]; +>t2 : Symbol(t2, Decl(bestCommonTypeOfTuple2.ts, 11, 11)) >C : Symbol(C, Decl(bestCommonTypeOfTuple2.ts, 1, 21)) >D : Symbol(D, Decl(bestCommonTypeOfTuple2.ts, 2, 29)) -var t3: [C1, D1]; ->t3 : Symbol(t3, Decl(bestCommonTypeOfTuple2.ts, 12, 3)) +declare var t3: [C1, D1]; +>t3 : Symbol(t3, Decl(bestCommonTypeOfTuple2.ts, 12, 11)) >C1 : Symbol(C1, Decl(bestCommonTypeOfTuple2.ts, 5, 23)) >D1 : Symbol(D1, Decl(bestCommonTypeOfTuple2.ts, 7, 42)) -var t4: [base1, C1]; ->t4 : Symbol(t4, Decl(bestCommonTypeOfTuple2.ts, 13, 3)) +declare var t4: [base1, C1]; +>t4 : Symbol(t4, Decl(bestCommonTypeOfTuple2.ts, 13, 11)) >base1 : Symbol(base1, Decl(bestCommonTypeOfTuple2.ts, 0, 18)) >C1 : Symbol(C1, Decl(bestCommonTypeOfTuple2.ts, 5, 23)) -var t5: [C1, F] ->t5 : Symbol(t5, Decl(bestCommonTypeOfTuple2.ts, 14, 3)) +declare var t5: [C1, F] +>t5 : Symbol(t5, Decl(bestCommonTypeOfTuple2.ts, 14, 11)) >C1 : Symbol(C1, Decl(bestCommonTypeOfTuple2.ts, 5, 23)) >F : Symbol(F, Decl(bestCommonTypeOfTuple2.ts, 4, 29)) var e11 = t1[4]; // base >e11 : Symbol(e11, Decl(bestCommonTypeOfTuple2.ts, 16, 3)) ->t1 : Symbol(t1, Decl(bestCommonTypeOfTuple2.ts, 10, 3)) +>t1 : Symbol(t1, Decl(bestCommonTypeOfTuple2.ts, 10, 11)) var e21 = t2[4]; // {} >e21 : Symbol(e21, Decl(bestCommonTypeOfTuple2.ts, 17, 3)) ->t2 : Symbol(t2, Decl(bestCommonTypeOfTuple2.ts, 11, 3)) +>t2 : Symbol(t2, Decl(bestCommonTypeOfTuple2.ts, 11, 11)) var e31 = t3[4]; // C1 >e31 : Symbol(e31, Decl(bestCommonTypeOfTuple2.ts, 18, 3)) ->t3 : Symbol(t3, Decl(bestCommonTypeOfTuple2.ts, 12, 3)) +>t3 : Symbol(t3, Decl(bestCommonTypeOfTuple2.ts, 12, 11)) var e41 = t4[2]; // base1 >e41 : Symbol(e41, Decl(bestCommonTypeOfTuple2.ts, 19, 3)) ->t4 : Symbol(t4, Decl(bestCommonTypeOfTuple2.ts, 13, 3)) +>t4 : Symbol(t4, Decl(bestCommonTypeOfTuple2.ts, 13, 11)) var e51 = t5[2]; // {} >e51 : Symbol(e51, Decl(bestCommonTypeOfTuple2.ts, 20, 3)) ->t5 : Symbol(t5, Decl(bestCommonTypeOfTuple2.ts, 14, 3)) +>t5 : Symbol(t5, Decl(bestCommonTypeOfTuple2.ts, 14, 11)) diff --git a/tests/baselines/reference/bestCommonTypeOfTuple2.types b/tests/baselines/reference/bestCommonTypeOfTuple2.types index 55cf85d67a748..091f3c621cb40 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple2.types +++ b/tests/baselines/reference/bestCommonTypeOfTuple2.types @@ -54,23 +54,23 @@ class D1 extends C1 { i = "bar"; d } >d : any > : ^^^ -var t1: [C, base]; +declare var t1: [C, base]; >t1 : [C, base] > : ^^^^^^^^^ -var t2: [C, D]; +declare var t2: [C, D]; >t2 : [C, D] > : ^^^^^^ -var t3: [C1, D1]; +declare var t3: [C1, D1]; >t3 : [C1, D1] > : ^^^^^^^^ -var t4: [base1, C1]; +declare var t4: [base1, C1]; >t4 : [base1, C1] > : ^^^^^^^^^^^ -var t5: [C1, F] +declare var t5: [C1, F] >t5 : [C1, F] > : ^^^^^^^ diff --git a/tests/baselines/reference/bestCommonTypeWithContextualTyping.errors.txt b/tests/baselines/reference/bestCommonTypeWithContextualTyping.errors.txt index 2aafdf2154b9a..92c77bc2dfa3d 100644 --- a/tests/baselines/reference/bestCommonTypeWithContextualTyping.errors.txt +++ b/tests/baselines/reference/bestCommonTypeWithContextualTyping.errors.txt @@ -12,7 +12,7 @@ bestCommonTypeWithContextualTyping.ts(19,31): error TS2873: This kind of express p: any; } - var e: Ellement; + declare var e: Ellement; // All of these should pass. Neither type is a supertype of the other, but the RHS should // always use Ellement in these examples (not Contextual). Because Ellement is assignable diff --git a/tests/baselines/reference/bestCommonTypeWithContextualTyping.js b/tests/baselines/reference/bestCommonTypeWithContextualTyping.js index 9374f8b1505b3..4ce6071619817 100644 --- a/tests/baselines/reference/bestCommonTypeWithContextualTyping.js +++ b/tests/baselines/reference/bestCommonTypeWithContextualTyping.js @@ -11,7 +11,7 @@ interface Ellement { p: any; } -var e: Ellement; +declare var e: Ellement; // All of these should pass. Neither type is a supertype of the other, but the RHS should // always use Ellement in these examples (not Contextual). Because Ellement is assignable @@ -23,7 +23,6 @@ var conditional: Contextual = null ? e : e; // Ellement var contextualOr: Contextual = e || e; // Ellement //// [bestCommonTypeWithContextualTyping.js] -var e; // All of these should pass. Neither type is a supertype of the other, but the RHS should // always use Ellement in these examples (not Contextual). Because Ellement is assignable // to Contextual, no errors. diff --git a/tests/baselines/reference/bestCommonTypeWithContextualTyping.symbols b/tests/baselines/reference/bestCommonTypeWithContextualTyping.symbols index 38a0a2cd903f2..cd2055da1f232 100644 --- a/tests/baselines/reference/bestCommonTypeWithContextualTyping.symbols +++ b/tests/baselines/reference/bestCommonTypeWithContextualTyping.symbols @@ -21,8 +21,8 @@ interface Ellement { >p : Symbol(Ellement.p, Decl(bestCommonTypeWithContextualTyping.ts, 6, 10)) } -var e: Ellement; ->e : Symbol(e, Decl(bestCommonTypeWithContextualTyping.ts, 10, 3)) +declare var e: Ellement; +>e : Symbol(e, Decl(bestCommonTypeWithContextualTyping.ts, 10, 11)) >Ellement : Symbol(Ellement, Decl(bestCommonTypeWithContextualTyping.ts, 3, 1)) // All of these should pass. Neither type is a supertype of the other, but the RHS should @@ -31,24 +31,24 @@ var e: Ellement; var arr: Contextual[] = [e]; // Ellement[] >arr : Symbol(arr, Decl(bestCommonTypeWithContextualTyping.ts, 15, 3)) >Contextual : Symbol(Contextual, Decl(bestCommonTypeWithContextualTyping.ts, 0, 0)) ->e : Symbol(e, Decl(bestCommonTypeWithContextualTyping.ts, 10, 3)) +>e : Symbol(e, Decl(bestCommonTypeWithContextualTyping.ts, 10, 11)) var obj: { [s: string]: Contextual } = { s: e }; // { s: Ellement; [s: string]: Ellement } >obj : Symbol(obj, Decl(bestCommonTypeWithContextualTyping.ts, 16, 3)) >s : Symbol(s, Decl(bestCommonTypeWithContextualTyping.ts, 16, 12)) >Contextual : Symbol(Contextual, Decl(bestCommonTypeWithContextualTyping.ts, 0, 0)) >s : Symbol(s, Decl(bestCommonTypeWithContextualTyping.ts, 16, 40)) ->e : Symbol(e, Decl(bestCommonTypeWithContextualTyping.ts, 10, 3)) +>e : Symbol(e, Decl(bestCommonTypeWithContextualTyping.ts, 10, 11)) var conditional: Contextual = null ? e : e; // Ellement >conditional : Symbol(conditional, Decl(bestCommonTypeWithContextualTyping.ts, 18, 3)) >Contextual : Symbol(Contextual, Decl(bestCommonTypeWithContextualTyping.ts, 0, 0)) ->e : Symbol(e, Decl(bestCommonTypeWithContextualTyping.ts, 10, 3)) ->e : Symbol(e, Decl(bestCommonTypeWithContextualTyping.ts, 10, 3)) +>e : Symbol(e, Decl(bestCommonTypeWithContextualTyping.ts, 10, 11)) +>e : Symbol(e, Decl(bestCommonTypeWithContextualTyping.ts, 10, 11)) var contextualOr: Contextual = e || e; // Ellement >contextualOr : Symbol(contextualOr, Decl(bestCommonTypeWithContextualTyping.ts, 19, 3)) >Contextual : Symbol(Contextual, Decl(bestCommonTypeWithContextualTyping.ts, 0, 0)) ->e : Symbol(e, Decl(bestCommonTypeWithContextualTyping.ts, 10, 3)) ->e : Symbol(e, Decl(bestCommonTypeWithContextualTyping.ts, 10, 3)) +>e : Symbol(e, Decl(bestCommonTypeWithContextualTyping.ts, 10, 11)) +>e : Symbol(e, Decl(bestCommonTypeWithContextualTyping.ts, 10, 11)) diff --git a/tests/baselines/reference/bestCommonTypeWithContextualTyping.types b/tests/baselines/reference/bestCommonTypeWithContextualTyping.types index 735202dcd63e1..e60e4114561e8 100644 --- a/tests/baselines/reference/bestCommonTypeWithContextualTyping.types +++ b/tests/baselines/reference/bestCommonTypeWithContextualTyping.types @@ -21,7 +21,7 @@ interface Ellement { > : ^^^ } -var e: Ellement; +declare var e: Ellement; >e : Ellement > : ^^^^^^^^ diff --git a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.errors.txt b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.errors.txt index ce16af3eaec6e..14ac389071d4b 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.errors.txt +++ b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.errors.txt @@ -8,11 +8,11 @@ bitwiseNotOperatorWithAnyOtherType.ts(48,26): error TS2365: Operator '+' cannot ==== bitwiseNotOperatorWithAnyOtherType.ts (5 errors) ==== // ~ operator on any type - var ANY: any; - var ANY1; - var ANY2: any[] = ["", ""]; - var obj: () => {} - var obj1 = { x:"", y: () => { }}; + declare var ANY: any; + declare var ANY1; + declare var ANY2: any[]; + declare var obj: () => {}; + declare var obj1: { x:"", y: () => { }}; function foo(): any { var a; @@ -26,9 +26,9 @@ bitwiseNotOperatorWithAnyOtherType.ts(48,26): error TS2365: Operator '+' cannot } } namespace M { - export var n: any; + export declare var n: any; } - var objA = new A(); + declare var objA: A; // any other type var var ResultIsNumber = ~ANY1; diff --git a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.js b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.js index fa1dbad9899b4..eb97d7dfa838a 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.js +++ b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.js @@ -3,11 +3,11 @@ //// [bitwiseNotOperatorWithAnyOtherType.ts] // ~ operator on any type -var ANY: any; -var ANY1; -var ANY2: any[] = ["", ""]; -var obj: () => {} -var obj1 = { x:"", y: () => { }}; +declare var ANY: any; +declare var ANY1; +declare var ANY2: any[]; +declare var obj: () => {}; +declare var obj1: { x:"", y: () => { }}; function foo(): any { var a; @@ -21,9 +21,9 @@ class A { } } namespace M { - export var n: any; + export declare var n: any; } -var objA = new A(); +declare var objA: A; // any other type var var ResultIsNumber = ~ANY1; @@ -66,11 +66,6 @@ var ResultIsNumber20 = ~~~(ANY + ANY1); //// [bitwiseNotOperatorWithAnyOtherType.js] // ~ operator on any type -var ANY; -var ANY1; -var ANY2 = ["", ""]; -var obj; -var obj1 = { x: "", y: function () { } }; function foo() { var a; return a; @@ -87,7 +82,6 @@ var A = /** @class */ (function () { var M; (function (M) { })(M || (M = {})); -var objA = new A(); // any other type var var ResultIsNumber = ~ANY1; var ResultIsNumber1 = ~ANY2; diff --git a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.symbols b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.symbols index 1f4aae51acce2..d89bfcc9b3af7 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.symbols +++ b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.symbols @@ -3,25 +3,25 @@ === bitwiseNotOperatorWithAnyOtherType.ts === // ~ operator on any type -var ANY: any; ->ANY : Symbol(ANY, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 2, 3)) +declare var ANY: any; +>ANY : Symbol(ANY, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 2, 11)) -var ANY1; ->ANY1 : Symbol(ANY1, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 3, 3)) +declare var ANY1; +>ANY1 : Symbol(ANY1, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 3, 11)) -var ANY2: any[] = ["", ""]; ->ANY2 : Symbol(ANY2, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 4, 3)) +declare var ANY2: any[]; +>ANY2 : Symbol(ANY2, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 4, 11)) -var obj: () => {} ->obj : Symbol(obj, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 5, 3)) +declare var obj: () => {}; +>obj : Symbol(obj, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 5, 11)) -var obj1 = { x:"", y: () => { }}; ->obj1 : Symbol(obj1, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 3)) ->x : Symbol(x, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 12)) ->y : Symbol(y, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 18)) +declare var obj1: { x:"", y: () => { }}; +>obj1 : Symbol(obj1, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 11)) +>x : Symbol(x, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 19)) +>y : Symbol(y, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 25)) function foo(): any { ->foo : Symbol(foo, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 33)) +>foo : Symbol(foo, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 40)) var a; >a : Symbol(a, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 9, 7)) @@ -48,21 +48,21 @@ class A { namespace M { >M : Symbol(M, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 18, 1)) - export var n: any; ->n : Symbol(n, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 20, 14)) + export declare var n: any; +>n : Symbol(n, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 20, 22)) } -var objA = new A(); ->objA : Symbol(objA, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 22, 3)) +declare var objA: A; +>objA : Symbol(objA, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 22, 11)) >A : Symbol(A, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 11, 1)) // any other type var var ResultIsNumber = ~ANY1; >ResultIsNumber : Symbol(ResultIsNumber, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 25, 3)) ->ANY1 : Symbol(ANY1, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 3, 3)) +>ANY1 : Symbol(ANY1, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 3, 11)) var ResultIsNumber1 = ~ANY2; >ResultIsNumber1 : Symbol(ResultIsNumber1, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 26, 3)) ->ANY2 : Symbol(ANY2, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 4, 3)) +>ANY2 : Symbol(ANY2, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 4, 11)) var ResultIsNumber2 = ~A; >ResultIsNumber2 : Symbol(ResultIsNumber2, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 27, 3)) @@ -74,11 +74,11 @@ var ResultIsNumber3 = ~M; var ResultIsNumber4 = ~obj; >ResultIsNumber4 : Symbol(ResultIsNumber4, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 29, 3)) ->obj : Symbol(obj, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 5, 3)) +>obj : Symbol(obj, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 5, 11)) var ResultIsNumber5 = ~obj1; >ResultIsNumber5 : Symbol(ResultIsNumber5, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 30, 3)) ->obj1 : Symbol(obj1, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 3)) +>obj1 : Symbol(obj1, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 11)) // any type literal var ResultIsNumber6 = ~undefined; @@ -91,35 +91,35 @@ var ResultIsNumber7 = ~null; // any type expressions var ResultIsNumber8 = ~ANY2[0] >ResultIsNumber8 : Symbol(ResultIsNumber8, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 37, 3)) ->ANY2 : Symbol(ANY2, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 4, 3)) +>ANY2 : Symbol(ANY2, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 4, 11)) var ResultIsNumber9 = ~obj1.x; >ResultIsNumber9 : Symbol(ResultIsNumber9, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 38, 3)) ->obj1.x : Symbol(x, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 12)) ->obj1 : Symbol(obj1, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 3)) ->x : Symbol(x, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 12)) +>obj1.x : Symbol(x, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 19)) +>obj1 : Symbol(obj1, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 11)) +>x : Symbol(x, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 19)) var ResultIsNumber10 = ~obj1.y; >ResultIsNumber10 : Symbol(ResultIsNumber10, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 39, 3)) ->obj1.y : Symbol(y, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 18)) ->obj1 : Symbol(obj1, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 3)) ->y : Symbol(y, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 18)) +>obj1.y : Symbol(y, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 25)) +>obj1 : Symbol(obj1, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 11)) +>y : Symbol(y, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 25)) var ResultIsNumber11 = ~objA.a; >ResultIsNumber11 : Symbol(ResultIsNumber11, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 40, 3)) >objA.a : Symbol(A.a, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 12, 9)) ->objA : Symbol(objA, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 22, 3)) +>objA : Symbol(objA, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 22, 11)) >a : Symbol(A.a, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 12, 9)) var ResultIsNumber12 = ~M.n; >ResultIsNumber12 : Symbol(ResultIsNumber12, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 41, 3)) ->M.n : Symbol(M.n, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 20, 14)) +>M.n : Symbol(M.n, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 20, 22)) >M : Symbol(M, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 18, 1)) ->n : Symbol(M.n, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 20, 14)) +>n : Symbol(M.n, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 20, 22)) var ResultIsNumber13 = ~foo(); >ResultIsNumber13 : Symbol(ResultIsNumber13, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 42, 3)) ->foo : Symbol(foo, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 33)) +>foo : Symbol(foo, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 40)) var ResultIsNumber14 = ~A.foo(); >ResultIsNumber14 : Symbol(ResultIsNumber14, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 43, 3)) @@ -129,8 +129,8 @@ var ResultIsNumber14 = ~A.foo(); var ResultIsNumber15 = ~(ANY + ANY1); >ResultIsNumber15 : Symbol(ResultIsNumber15, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 44, 3)) ->ANY : Symbol(ANY, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 2, 3)) ->ANY1 : Symbol(ANY1, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 3, 3)) +>ANY : Symbol(ANY, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 2, 11)) +>ANY1 : Symbol(ANY1, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 3, 11)) var ResultIsNumber16 = ~(null + undefined); >ResultIsNumber16 : Symbol(ResultIsNumber16, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 45, 3)) @@ -147,44 +147,44 @@ var ResultIsNumber18 = ~(undefined + undefined); // multiple ~ operators var ResultIsNumber19 = ~~ANY; >ResultIsNumber19 : Symbol(ResultIsNumber19, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 50, 3)) ->ANY : Symbol(ANY, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 2, 3)) +>ANY : Symbol(ANY, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 2, 11)) var ResultIsNumber20 = ~~~(ANY + ANY1); >ResultIsNumber20 : Symbol(ResultIsNumber20, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 51, 3)) ->ANY : Symbol(ANY, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 2, 3)) ->ANY1 : Symbol(ANY1, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 3, 3)) +>ANY : Symbol(ANY, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 2, 11)) +>ANY1 : Symbol(ANY1, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 3, 11)) //miss assignment operators ~ANY; ->ANY : Symbol(ANY, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 2, 3)) +>ANY : Symbol(ANY, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 2, 11)) ~ANY1; ->ANY1 : Symbol(ANY1, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 3, 3)) +>ANY1 : Symbol(ANY1, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 3, 11)) ~ANY2[0]; ->ANY2 : Symbol(ANY2, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 4, 3)) +>ANY2 : Symbol(ANY2, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 4, 11)) ~ANY, ANY1; ->ANY : Symbol(ANY, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 2, 3)) ->ANY1 : Symbol(ANY1, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 3, 3)) +>ANY : Symbol(ANY, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 2, 11)) +>ANY1 : Symbol(ANY1, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 3, 11)) ~obj1.y; ->obj1.y : Symbol(y, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 18)) ->obj1 : Symbol(obj1, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 3)) ->y : Symbol(y, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 18)) +>obj1.y : Symbol(y, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 25)) +>obj1 : Symbol(obj1, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 11)) +>y : Symbol(y, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 25)) ~objA.a; >objA.a : Symbol(A.a, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 12, 9)) ->objA : Symbol(objA, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 22, 3)) +>objA : Symbol(objA, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 22, 11)) >a : Symbol(A.a, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 12, 9)) ~M.n; ->M.n : Symbol(M.n, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 20, 14)) +>M.n : Symbol(M.n, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 20, 22)) >M : Symbol(M, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 18, 1)) ->n : Symbol(M.n, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 20, 14)) +>n : Symbol(M.n, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 20, 22)) ~~obj1.x; ->obj1.x : Symbol(x, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 12)) ->obj1 : Symbol(obj1, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 3)) ->x : Symbol(x, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 12)) +>obj1.x : Symbol(x, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 19)) +>obj1 : Symbol(obj1, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 11)) +>x : Symbol(x, Decl(bitwiseNotOperatorWithAnyOtherType.ts, 6, 19)) diff --git a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.types b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.types index 969a31311a5cd..79a8565022332 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.types +++ b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.types @@ -3,41 +3,29 @@ === bitwiseNotOperatorWithAnyOtherType.ts === // ~ operator on any type -var ANY: any; +declare var ANY: any; >ANY : any > : ^^^ -var ANY1; +declare var ANY1; >ANY1 : any > : ^^^ -var ANY2: any[] = ["", ""]; +declare var ANY2: any[]; >ANY2 : any[] > : ^^^^^ ->["", ""] : string[] -> : ^^^^^^^^ ->"" : "" -> : ^^ ->"" : "" -> : ^^ - -var obj: () => {} + +declare var obj: () => {}; >obj : () => {} > : ^^^^^^ -var obj1 = { x:"", y: () => { }}; ->obj1 : { x: string; y: () => void; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ x:"", y: () => { }} : { x: string; y: () => void; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->x : string -> : ^^^^^^ ->"" : "" -> : ^^ ->y : () => void -> : ^^^^^^^^^^ ->() => { } : () => void -> : ^^^^^^^^^^ +declare var obj1: { x:"", y: () => { }}; +>obj1 : { x: ""; y: () => {}; } +> : ^^^^^ ^^^^^ ^^^ +>x : "" +> : ^^ +>y : () => {} +> : ^^^^^^ function foo(): any { >foo : () => any @@ -76,17 +64,13 @@ namespace M { >M : typeof M > : ^^^^^^^^ - export var n: any; + export declare var n: any; >n : any > : ^^^ } -var objA = new A(); +declare var objA: A; >objA : A > : ^ ->new A() : A -> : ^ ->A : typeof A -> : ^^^^^^^^ // any other type var var ResultIsNumber = ~ANY1; @@ -134,8 +118,8 @@ var ResultIsNumber5 = ~obj1; > : ^^^^^^ >~obj1 : number > : ^^^^^^ ->obj1 : { x: string; y: () => void; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>obj1 : { x: ""; y: () => {}; } +> : ^^^^^ ^^^^^ ^^^ // any type literal var ResultIsNumber6 = ~undefined; @@ -170,24 +154,24 @@ var ResultIsNumber9 = ~obj1.x; > : ^^^^^^ >~obj1.x : number > : ^^^^^^ ->obj1.x : string -> : ^^^^^^ ->obj1 : { x: string; y: () => void; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->x : string -> : ^^^^^^ +>obj1.x : "" +> : ^^ +>obj1 : { x: ""; y: () => {}; } +> : ^^^^^ ^^^^^ ^^^ +>x : "" +> : ^^ var ResultIsNumber10 = ~obj1.y; >ResultIsNumber10 : number > : ^^^^^^ >~obj1.y : number > : ^^^^^^ ->obj1.y : () => void -> : ^^^^^^^^^^ ->obj1 : { x: string; y: () => void; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->y : () => void -> : ^^^^^^^^^^ +>obj1.y : () => {} +> : ^^^^^^ +>obj1 : { x: ""; y: () => {}; } +> : ^^^^^ ^^^^^ ^^^ +>y : () => {} +> : ^^^^^^ var ResultIsNumber11 = ~objA.a; >ResultIsNumber11 : number @@ -352,12 +336,12 @@ var ResultIsNumber20 = ~~~(ANY + ANY1); ~obj1.y; >~obj1.y : number > : ^^^^^^ ->obj1.y : () => void -> : ^^^^^^^^^^ ->obj1 : { x: string; y: () => void; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->y : () => void -> : ^^^^^^^^^^ +>obj1.y : () => {} +> : ^^^^^^ +>obj1 : { x: ""; y: () => {}; } +> : ^^^^^ ^^^^^ ^^^ +>y : () => {} +> : ^^^^^^ ~objA.a; >~objA.a : number @@ -384,10 +368,10 @@ var ResultIsNumber20 = ~~~(ANY + ANY1); > : ^^^^^^ >~obj1.x : number > : ^^^^^^ ->obj1.x : string -> : ^^^^^^ ->obj1 : { x: string; y: () => void; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->x : string -> : ^^^^^^ +>obj1.x : "" +> : ^^ +>obj1 : { x: ""; y: () => {}; } +> : ^^^^^ ^^^^^ ^^^ +>x : "" +> : ^^ diff --git a/tests/baselines/reference/blockScopedClassDeclarationAcrossFiles.errors.txt b/tests/baselines/reference/blockScopedClassDeclarationAcrossFiles.errors.txt new file mode 100644 index 0000000000000..b6330212c6cb4 --- /dev/null +++ b/tests/baselines/reference/blockScopedClassDeclarationAcrossFiles.errors.txt @@ -0,0 +1,9 @@ +error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== c.ts (0 errors) ==== + let foo: typeof C; +==== b.ts (0 errors) ==== + class C { } + \ No newline at end of file diff --git a/tests/baselines/reference/blockScopedNamespaceDifferentFile.errors.txt b/tests/baselines/reference/blockScopedNamespaceDifferentFile.errors.txt index fa5f3d7a5cc72..dc3f899b5a225 100644 --- a/tests/baselines/reference/blockScopedNamespaceDifferentFile.errors.txt +++ b/tests/baselines/reference/blockScopedNamespaceDifferentFile.errors.txt @@ -1,6 +1,8 @@ +error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +!!! error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. !!! error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== test.ts (0 errors) ==== namespace C { diff --git a/tests/baselines/reference/bluebirdStaticThis.errors.txt b/tests/baselines/reference/bluebirdStaticThis.errors.txt index e63c4c3e3deba..316b0a02ab804 100644 --- a/tests/baselines/reference/bluebirdStaticThis.errors.txt +++ b/tests/baselines/reference/bluebirdStaticThis.errors.txt @@ -146,10 +146,10 @@ bluebirdStaticThis.ts(60,73): error TS2694: Namespace '"bluebirdStaticThis".Prom a: number; b: string; } - var x: any; - var arr: any[]; - var foo: Foo; - var fooProm: Promise; + declare var x: any; + declare var arr: any[]; + declare var foo: Foo; + declare var fooProm: Promise; fooProm = Promise.try(Promise, () => { return foo; diff --git a/tests/baselines/reference/bluebirdStaticThis.js b/tests/baselines/reference/bluebirdStaticThis.js index 56abde4064fac..4424200e47596 100644 --- a/tests/baselines/reference/bluebirdStaticThis.js +++ b/tests/baselines/reference/bluebirdStaticThis.js @@ -125,10 +125,10 @@ interface Foo { a: number; b: string; } -var x: any; -var arr: any[]; -var foo: Foo; -var fooProm: Promise; +declare var x: any; +declare var arr: any[]; +declare var foo: Foo; +declare var fooProm: Promise; fooProm = Promise.try(Promise, () => { return foo; @@ -143,10 +143,6 @@ fooProm = Promise.try(Promise, () => { //// [bluebirdStaticThis.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var x; -var arr; -var foo; -var fooProm; fooProm = Promise.try(Promise, function () { return foo; }); diff --git a/tests/baselines/reference/bluebirdStaticThis.symbols b/tests/baselines/reference/bluebirdStaticThis.symbols index 267b935f2942d..0ef48d836f475 100644 --- a/tests/baselines/reference/bluebirdStaticThis.symbols +++ b/tests/baselines/reference/bluebirdStaticThis.symbols @@ -1122,56 +1122,56 @@ interface Foo { b: string; >b : Symbol(Foo.b, Decl(bluebirdStaticThis.ts, 121, 14)) } -var x: any; ->x : Symbol(x, Decl(bluebirdStaticThis.ts, 124, 3)) +declare var x: any; +>x : Symbol(x, Decl(bluebirdStaticThis.ts, 124, 11)) -var arr: any[]; ->arr : Symbol(arr, Decl(bluebirdStaticThis.ts, 125, 3)) +declare var arr: any[]; +>arr : Symbol(arr, Decl(bluebirdStaticThis.ts, 125, 11)) -var foo: Foo; ->foo : Symbol(foo, Decl(bluebirdStaticThis.ts, 126, 3)) +declare var foo: Foo; +>foo : Symbol(foo, Decl(bluebirdStaticThis.ts, 126, 11)) >Foo : Symbol(Foo, Decl(bluebirdStaticThis.ts, 118, 1)) -var fooProm: Promise; ->fooProm : Symbol(fooProm, Decl(bluebirdStaticThis.ts, 127, 3)) +declare var fooProm: Promise; +>fooProm : Symbol(fooProm, Decl(bluebirdStaticThis.ts, 127, 11)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >Foo : Symbol(Foo, Decl(bluebirdStaticThis.ts, 118, 1)) fooProm = Promise.try(Promise, () => { ->fooProm : Symbol(fooProm, Decl(bluebirdStaticThis.ts, 127, 3)) +>fooProm : Symbol(fooProm, Decl(bluebirdStaticThis.ts, 127, 11)) >Promise.try : Symbol(Promise.try, Decl(bluebirdStaticThis.ts, 5, 125), Decl(bluebirdStaticThis.ts, 6, 107)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >try : Symbol(Promise.try, Decl(bluebirdStaticThis.ts, 5, 125), Decl(bluebirdStaticThis.ts, 6, 107)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) return foo; ->foo : Symbol(foo, Decl(bluebirdStaticThis.ts, 126, 3)) +>foo : Symbol(foo, Decl(bluebirdStaticThis.ts, 126, 11)) }); fooProm = Promise.try(Promise, () => { ->fooProm : Symbol(fooProm, Decl(bluebirdStaticThis.ts, 127, 3)) +>fooProm : Symbol(fooProm, Decl(bluebirdStaticThis.ts, 127, 11)) >Promise.try : Symbol(Promise.try, Decl(bluebirdStaticThis.ts, 5, 125), Decl(bluebirdStaticThis.ts, 6, 107)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >try : Symbol(Promise.try, Decl(bluebirdStaticThis.ts, 5, 125), Decl(bluebirdStaticThis.ts, 6, 107)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) return foo; ->foo : Symbol(foo, Decl(bluebirdStaticThis.ts, 126, 3)) +>foo : Symbol(foo, Decl(bluebirdStaticThis.ts, 126, 11)) }, arr); ->arr : Symbol(arr, Decl(bluebirdStaticThis.ts, 125, 3)) +>arr : Symbol(arr, Decl(bluebirdStaticThis.ts, 125, 11)) fooProm = Promise.try(Promise, () => { ->fooProm : Symbol(fooProm, Decl(bluebirdStaticThis.ts, 127, 3)) +>fooProm : Symbol(fooProm, Decl(bluebirdStaticThis.ts, 127, 11)) >Promise.try : Symbol(Promise.try, Decl(bluebirdStaticThis.ts, 5, 125), Decl(bluebirdStaticThis.ts, 6, 107)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >try : Symbol(Promise.try, Decl(bluebirdStaticThis.ts, 5, 125), Decl(bluebirdStaticThis.ts, 6, 107)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) return foo; ->foo : Symbol(foo, Decl(bluebirdStaticThis.ts, 126, 3)) +>foo : Symbol(foo, Decl(bluebirdStaticThis.ts, 126, 11)) }, arr, x); ->arr : Symbol(arr, Decl(bluebirdStaticThis.ts, 125, 3)) ->x : Symbol(x, Decl(bluebirdStaticThis.ts, 124, 3)) +>arr : Symbol(arr, Decl(bluebirdStaticThis.ts, 125, 11)) +>x : Symbol(x, Decl(bluebirdStaticThis.ts, 124, 11)) diff --git a/tests/baselines/reference/bluebirdStaticThis.types b/tests/baselines/reference/bluebirdStaticThis.types index d544d41396a90..5611a3a4086e7 100644 --- a/tests/baselines/reference/bluebirdStaticThis.types +++ b/tests/baselines/reference/bluebirdStaticThis.types @@ -1202,19 +1202,19 @@ interface Foo { >b : string > : ^^^^^^ } -var x: any; +declare var x: any; >x : any > : ^^^ -var arr: any[]; +declare var arr: any[]; >arr : any[] > : ^^^^^ -var foo: Foo; +declare var foo: Foo; >foo : Foo > : ^^^ -var fooProm: Promise; +declare var fooProm: Promise; >fooProm : Promise > : ^^^^^^^^^^^^ diff --git a/tests/baselines/reference/booleanAssignment.errors.txt b/tests/baselines/reference/booleanAssignment.errors.txt index a24110e7364ea..9d870eb33d857 100644 --- a/tests/baselines/reference/booleanAssignment.errors.txt +++ b/tests/baselines/reference/booleanAssignment.errors.txt @@ -24,5 +24,5 @@ booleanAssignment.ts(4,1): error TS2322: Type '{}' is not assignable to type 'Bo b = true; // OK - var b2:boolean; + declare var b2:boolean; b = b2; // OK \ No newline at end of file diff --git a/tests/baselines/reference/booleanAssignment.js b/tests/baselines/reference/booleanAssignment.js index 4f2b0917b0777..727823c4375ce 100644 --- a/tests/baselines/reference/booleanAssignment.js +++ b/tests/baselines/reference/booleanAssignment.js @@ -11,7 +11,7 @@ o = b; // OK b = true; // OK -var b2:boolean; +declare var b2:boolean; b = b2; // OK //// [booleanAssignment.js] @@ -22,5 +22,4 @@ b = {}; // Error var o = {}; o = b; // OK b = true; // OK -var b2; b = b2; // OK diff --git a/tests/baselines/reference/booleanAssignment.symbols b/tests/baselines/reference/booleanAssignment.symbols index 4dbdc3df0fbd4..ae0c80eef8f7c 100644 --- a/tests/baselines/reference/booleanAssignment.symbols +++ b/tests/baselines/reference/booleanAssignment.symbols @@ -24,10 +24,10 @@ o = b; // OK b = true; // OK >b : Symbol(b, Decl(booleanAssignment.ts, 0, 3)) -var b2:boolean; ->b2 : Symbol(b2, Decl(booleanAssignment.ts, 10, 3)) +declare var b2:boolean; +>b2 : Symbol(b2, Decl(booleanAssignment.ts, 10, 11)) b = b2; // OK >b : Symbol(b, Decl(booleanAssignment.ts, 0, 3)) ->b2 : Symbol(b2, Decl(booleanAssignment.ts, 10, 3)) +>b2 : Symbol(b2, Decl(booleanAssignment.ts, 10, 11)) diff --git a/tests/baselines/reference/booleanAssignment.types b/tests/baselines/reference/booleanAssignment.types index b5bbc571bf2df..f438aa2073f56 100644 --- a/tests/baselines/reference/booleanAssignment.types +++ b/tests/baselines/reference/booleanAssignment.types @@ -55,7 +55,7 @@ b = true; // OK >true : true > : ^^^^ -var b2:boolean; +declare var b2:boolean; >b2 : boolean > : ^^^^^^^ diff --git a/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.js b/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.js index 45a77912690ed..36f1719bd640d 100644 --- a/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.js +++ b/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.js @@ -1,6 +1,7 @@ //// [tests/cases/compiler/booleanLiteralsContextuallyTypedFromUnion.tsx] //// //// [booleanLiteralsContextuallyTypedFromUnion.tsx] +/// interface A { isIt: true; text: string; } interface B { isIt: false; value: number; } type C = A | B; @@ -28,6 +29,7 @@ let Success = () => //// [booleanLiteralsContextuallyTypedFromUnion.jsx] "use strict"; +/// var isIt = Math.random() > 0.5; var c = isIt ? { isIt: isIt, text: 'hey' } : { isIt: isIt, value: 123 }; var cc = isIt ? { isIt: isIt, text: 'hey' } : { isIt: isIt, value: 123 }; diff --git a/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.symbols b/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.symbols index 950cefddab7cf..af1ec93e9fced 100644 --- a/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.symbols +++ b/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.symbols @@ -1,99 +1,100 @@ //// [tests/cases/compiler/booleanLiteralsContextuallyTypedFromUnion.tsx] //// === booleanLiteralsContextuallyTypedFromUnion.tsx === +/// interface A { isIt: true; text: string; } >A : Symbol(A, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 0, 0)) ->isIt : Symbol(A.isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 0, 13)) ->text : Symbol(A.text, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 0, 25)) +>isIt : Symbol(A.isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 1, 13)) +>text : Symbol(A.text, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 1, 25)) interface B { isIt: false; value: number; } ->B : Symbol(B, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 0, 41)) ->isIt : Symbol(B.isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 1, 13)) ->value : Symbol(B.value, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 1, 26)) +>B : Symbol(B, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 1, 41)) +>isIt : Symbol(B.isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 2, 13)) +>value : Symbol(B.value, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 2, 26)) type C = A | B; ->C : Symbol(C, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 1, 43)) +>C : Symbol(C, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 2, 43)) >A : Symbol(A, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 0, 0)) ->B : Symbol(B, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 0, 41)) +>B : Symbol(B, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 1, 41)) const isIt = Math.random() > 0.5; ->isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 3, 5)) +>isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 4, 5)) >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) >Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) const c: C = isIt ? { isIt, text: 'hey' } : { isIt, value: 123 }; ->c : Symbol(c, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 4, 5)) ->C : Symbol(C, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 1, 43)) ->isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 3, 5)) ->isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 4, 21)) ->text : Symbol(text, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 4, 27)) ->isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 4, 45)) ->value : Symbol(value, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 4, 51)) +>c : Symbol(c, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 5, 5)) +>C : Symbol(C, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 2, 43)) +>isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 4, 5)) +>isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 5, 21)) +>text : Symbol(text, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 5, 27)) +>isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 5, 45)) +>value : Symbol(value, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 5, 51)) const cc: C = isIt ? { isIt: isIt, text: 'hey' } : { isIt: isIt, value: 123 }; ->cc : Symbol(cc, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 5, 5)) ->C : Symbol(C, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 1, 43)) ->isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 3, 5)) ->isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 5, 22)) ->isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 3, 5)) ->text : Symbol(text, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 5, 34)) ->isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 5, 52)) ->isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 3, 5)) ->value : Symbol(value, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 5, 64)) +>cc : Symbol(cc, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 6, 5)) +>C : Symbol(C, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 2, 43)) +>isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 4, 5)) +>isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 6, 22)) +>isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 4, 5)) +>text : Symbol(text, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 6, 34)) +>isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 6, 52)) +>isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 4, 5)) +>value : Symbol(value, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 6, 64)) type ComponentProps = ->ComponentProps : Symbol(ComponentProps, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 5, 78)) +>ComponentProps : Symbol(ComponentProps, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 6, 78)) | { optionalBool: true; ->optionalBool : Symbol(optionalBool, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 8, 7)) +>optionalBool : Symbol(optionalBool, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 9, 7)) mandatoryFn: () => void; ->mandatoryFn : Symbol(mandatoryFn, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 9, 27)) +>mandatoryFn : Symbol(mandatoryFn, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 10, 27)) } | { optionalBool: false; ->optionalBool : Symbol(optionalBool, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 12, 7)) +>optionalBool : Symbol(optionalBool, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 13, 7)) }; let Funk = (_props: ComponentProps) =>
Hello
; ->Funk : Symbol(Funk, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 16, 3)) ->_props : Symbol(_props, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 16, 12)) ->ComponentProps : Symbol(ComponentProps, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 5, 78)) +>Funk : Symbol(Funk, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 17, 3)) +>_props : Symbol(_props, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 17, 12)) +>ComponentProps : Symbol(ComponentProps, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 6, 78)) >div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45)) >div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45)) let Fail1 = () => { }} optionalBool={true} /> ->Fail1 : Symbol(Fail1, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 18, 3)) ->Funk : Symbol(Funk, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 16, 3)) ->mandatoryFn : Symbol(mandatoryFn, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 18, 23)) ->optionalBool : Symbol(optionalBool, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 18, 47)) - -let Fail2 = () => { }} optionalBool={true as true} /> ->Fail2 : Symbol(Fail2, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 19, 3)) ->Funk : Symbol(Funk, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 16, 3)) +>Fail1 : Symbol(Fail1, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 19, 3)) +>Funk : Symbol(Funk, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 17, 3)) >mandatoryFn : Symbol(mandatoryFn, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 19, 23)) >optionalBool : Symbol(optionalBool, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 19, 47)) +let Fail2 = () => { }} optionalBool={true as true} /> +>Fail2 : Symbol(Fail2, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 20, 3)) +>Funk : Symbol(Funk, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 17, 3)) +>mandatoryFn : Symbol(mandatoryFn, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 20, 23)) +>optionalBool : Symbol(optionalBool, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 20, 47)) + let True = true as true; ->True : Symbol(True, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 20, 3)) +>True : Symbol(True, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 21, 3)) let Fail3 = () => { }} optionalBool={True} /> ->Fail3 : Symbol(Fail3, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 21, 3)) ->Funk : Symbol(Funk, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 16, 3)) ->mandatoryFn : Symbol(mandatoryFn, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 21, 23)) ->optionalBool : Symbol(optionalBool, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 21, 47)) ->True : Symbol(True, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 20, 3)) +>Fail3 : Symbol(Fail3, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 22, 3)) +>Funk : Symbol(Funk, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 17, 3)) +>mandatoryFn : Symbol(mandatoryFn, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 22, 23)) +>optionalBool : Symbol(optionalBool, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 22, 47)) +>True : Symbol(True, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 21, 3)) let attrs2 = { optionalBool: true as true, mandatoryFn: () => { } } ->attrs2 : Symbol(attrs2, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 22, 3)) ->optionalBool : Symbol(optionalBool, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 22, 14)) ->mandatoryFn : Symbol(mandatoryFn, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 22, 42)) +>attrs2 : Symbol(attrs2, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 23, 3)) +>optionalBool : Symbol(optionalBool, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 23, 14)) +>mandatoryFn : Symbol(mandatoryFn, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 23, 42)) let Success = () => ->Success : Symbol(Success, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 23, 3)) ->Funk : Symbol(Funk, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 16, 3)) ->attrs2 : Symbol(attrs2, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 22, 3)) +>Success : Symbol(Success, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 24, 3)) +>Funk : Symbol(Funk, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 17, 3)) +>attrs2 : Symbol(attrs2, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 23, 3)) diff --git a/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.types b/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.types index 087cc757c2f27..9d2cae17a0c11 100644 --- a/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.types +++ b/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.types @@ -1,6 +1,7 @@ //// [tests/cases/compiler/booleanLiteralsContextuallyTypedFromUnion.tsx] //// === booleanLiteralsContextuallyTypedFromUnion.tsx === +/// interface A { isIt: true; text: string; } >isIt : true > : ^^^^ diff --git a/tests/baselines/reference/bundledDtsLateExportRenaming.errors.txt b/tests/baselines/reference/bundledDtsLateExportRenaming.errors.txt new file mode 100644 index 0000000000000..8c444742255a6 --- /dev/null +++ b/tests/baselines/reference/bundledDtsLateExportRenaming.errors.txt @@ -0,0 +1,30 @@ +error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== index.ts (0 errors) ==== + export * from "./nested"; + +==== nested/base.ts (0 errors) ==== + import { B } from "./shared"; + + export function f() { + return new B(); + } + +==== nested/derived.ts (0 errors) ==== + import { f } from "./base"; + + export function g() { + return f(); + } + +==== nested/index.ts (0 errors) ==== + export * from "./base"; + + export * from "./derived"; + export * from "./shared"; + +==== nested/shared.ts (0 errors) ==== + export class B {} + \ No newline at end of file diff --git a/tests/baselines/reference/bundledDtsLateExportRenaming.js b/tests/baselines/reference/bundledDtsLateExportRenaming.js index 4e7483a20d845..52b642b655e1f 100644 --- a/tests/baselines/reference/bundledDtsLateExportRenaming.js +++ b/tests/baselines/reference/bundledDtsLateExportRenaming.js @@ -49,34 +49,3 @@ declare module "nested/index" { declare module "index" { export * from "nested/index"; } - - -//// [DtsFileErrors] - - -dist/out.d.ts(10,33): error TS2307: Cannot find module 'nested' or its corresponding type declarations. - - -==== dist/out.d.ts (1 errors) ==== - declare module "nested/shared" { - export class B { - } - } - declare module "nested/base" { - import { B } from "nested/shared"; - export function f(): B; - } - declare module "nested/derived" { - export function g(): import("nested").B; - ~~~~~~~~ -!!! error TS2307: Cannot find module 'nested' or its corresponding type declarations. - } - declare module "nested/index" { - export * from "nested/base"; - export * from "nested/derived"; - export * from "nested/shared"; - } - declare module "index" { - export * from "nested/index"; - } - \ No newline at end of file diff --git a/tests/baselines/reference/callConstructAssignment.errors.txt b/tests/baselines/reference/callConstructAssignment.errors.txt index b978e24c258ca..0f6742f6ace7f 100644 --- a/tests/baselines/reference/callConstructAssignment.errors.txt +++ b/tests/baselines/reference/callConstructAssignment.errors.txt @@ -5,9 +5,9 @@ callConstructAssignment.ts(6,1): error TS2322: Type '() => void' is not assignab ==== callConstructAssignment.ts (2 errors) ==== - var foo:{ ( ):void; } + declare var foo:{ ( ):void; } - var bar:{ new ( ):any; } + declare var bar:{ new ( ):any; } foo = bar; // error ~~~ diff --git a/tests/baselines/reference/callConstructAssignment.js b/tests/baselines/reference/callConstructAssignment.js index 1ecd7e794f085..2ecc4ef183923 100644 --- a/tests/baselines/reference/callConstructAssignment.js +++ b/tests/baselines/reference/callConstructAssignment.js @@ -1,15 +1,13 @@ //// [tests/cases/compiler/callConstructAssignment.ts] //// //// [callConstructAssignment.ts] -var foo:{ ( ):void; } +declare var foo:{ ( ):void; } -var bar:{ new ( ):any; } +declare var bar:{ new ( ):any; } foo = bar; // error bar = foo; // error //// [callConstructAssignment.js] -var foo; -var bar; foo = bar; // error bar = foo; // error diff --git a/tests/baselines/reference/callConstructAssignment.symbols b/tests/baselines/reference/callConstructAssignment.symbols index 8a851cde75d1c..6020819f4058f 100644 --- a/tests/baselines/reference/callConstructAssignment.symbols +++ b/tests/baselines/reference/callConstructAssignment.symbols @@ -1,17 +1,17 @@ //// [tests/cases/compiler/callConstructAssignment.ts] //// === callConstructAssignment.ts === -var foo:{ ( ):void; } ->foo : Symbol(foo, Decl(callConstructAssignment.ts, 0, 3)) +declare var foo:{ ( ):void; } +>foo : Symbol(foo, Decl(callConstructAssignment.ts, 0, 11)) -var bar:{ new ( ):any; } ->bar : Symbol(bar, Decl(callConstructAssignment.ts, 2, 3)) +declare var bar:{ new ( ):any; } +>bar : Symbol(bar, Decl(callConstructAssignment.ts, 2, 11)) foo = bar; // error ->foo : Symbol(foo, Decl(callConstructAssignment.ts, 0, 3)) ->bar : Symbol(bar, Decl(callConstructAssignment.ts, 2, 3)) +>foo : Symbol(foo, Decl(callConstructAssignment.ts, 0, 11)) +>bar : Symbol(bar, Decl(callConstructAssignment.ts, 2, 11)) bar = foo; // error ->bar : Symbol(bar, Decl(callConstructAssignment.ts, 2, 3)) ->foo : Symbol(foo, Decl(callConstructAssignment.ts, 0, 3)) +>bar : Symbol(bar, Decl(callConstructAssignment.ts, 2, 11)) +>foo : Symbol(foo, Decl(callConstructAssignment.ts, 0, 11)) diff --git a/tests/baselines/reference/callConstructAssignment.types b/tests/baselines/reference/callConstructAssignment.types index f6c70e5598efa..25e78d77ff5ea 100644 --- a/tests/baselines/reference/callConstructAssignment.types +++ b/tests/baselines/reference/callConstructAssignment.types @@ -1,11 +1,11 @@ //// [tests/cases/compiler/callConstructAssignment.ts] //// === callConstructAssignment.ts === -var foo:{ ( ):void; } +declare var foo:{ ( ):void; } >foo : () => void > : ^^^^^^ -var bar:{ new ( ):any; } +declare var bar:{ new ( ):any; } >bar : new () => any > : ^^^^^^^^^^ diff --git a/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.errors.txt b/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.errors.txt index 19ef7aa63ac19..14d0e666de94e 100644 --- a/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.errors.txt +++ b/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.errors.txt @@ -34,7 +34,7 @@ callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(44,16): error TS2558: E ~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2558: Expected 2 type arguments, but got 3. - var f3: { (x: T, y: U): T; } + declare var f3: { (x: T, y: U): T; }; var r3 = f3(1, ''); ~~~~~~ !!! error TS2558: Expected 2 type arguments, but got 1. @@ -57,7 +57,7 @@ callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(44,16): error TS2558: E interface I { f(x: T, y: U): T; } - var i: I; + declare var i: I; var r5 = i.f(1, ''); ~~~~~~ !!! error TS2558: Expected 2 type arguments, but got 1. @@ -80,7 +80,7 @@ callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(44,16): error TS2558: E interface I2 { f(x: T, y: U): T; } - var i2: I2; + declare var i2: I2; var r7 = i2.f(1, ''); ~~~~~~ !!! error TS2558: Expected 0 type arguments, but got 1. diff --git a/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.js b/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.js index 686a578a9298e..956611581c8d2 100644 --- a/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.js +++ b/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.js @@ -12,7 +12,7 @@ var f2 = (x: T, y: U): T => { return null; } var r2 = f2(1, ''); var r2b = f2(1, ''); -var f3: { (x: T, y: U): T; } +declare var f3: { (x: T, y: U): T; }; var r3 = f3(1, ''); var r3b = f3(1, ''); @@ -27,7 +27,7 @@ var r4b = (new C()).f(1, ''); interface I { f(x: T, y: U): T; } -var i: I; +declare var i: I; var r5 = i.f(1, ''); var r5b = i.f(1, ''); @@ -42,7 +42,7 @@ var r6b = (new C2()).f(1, ''); interface I2 { f(x: T, y: U): T; } -var i2: I2; +declare var i2: I2; var r7 = i2.f(1, ''); var r7b = i2.f(1, ''); @@ -55,7 +55,6 @@ var r1b = f(1, ''); var f2 = function (x, y) { return null; }; var r2 = f2(1, ''); var r2b = f2(1, ''); -var f3; var r3 = f3(1, ''); var r3b = f3(1, ''); var C = /** @class */ (function () { @@ -68,7 +67,6 @@ var C = /** @class */ (function () { }()); var r4 = (new C()).f(1, ''); var r4b = (new C()).f(1, ''); -var i; var r5 = i.f(1, ''); var r5b = i.f(1, ''); var C2 = /** @class */ (function () { @@ -81,6 +79,5 @@ var C2 = /** @class */ (function () { }()); var r6 = (new C2()).f(1, ''); var r6b = (new C2()).f(1, ''); -var i2; var r7 = i2.f(1, ''); var r7b = i2.f(1, ''); diff --git a/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.symbols b/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.symbols index 7eec1bcb37164..9a0c83e7fd467 100644 --- a/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.symbols +++ b/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.symbols @@ -40,23 +40,23 @@ var r2b = f2(1, ''); >r2b : Symbol(r2b, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 9, 3)) >f2 : Symbol(f2, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 7, 3)) -var f3: { (x: T, y: U): T; } ->f3 : Symbol(f3, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 11, 3)) ->T : Symbol(T, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 11, 11)) ->U : Symbol(U, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 11, 13)) ->x : Symbol(x, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 11, 17)) ->T : Symbol(T, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 11, 11)) ->y : Symbol(y, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 11, 22)) ->U : Symbol(U, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 11, 13)) ->T : Symbol(T, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 11, 11)) +declare var f3: { (x: T, y: U): T; }; +>f3 : Symbol(f3, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 11, 11)) +>T : Symbol(T, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 11, 19)) +>U : Symbol(U, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 11, 21)) +>x : Symbol(x, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 11, 25)) +>T : Symbol(T, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 11, 19)) +>y : Symbol(y, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 11, 30)) +>U : Symbol(U, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 11, 21)) +>T : Symbol(T, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 11, 19)) var r3 = f3(1, ''); >r3 : Symbol(r3, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 12, 3)) ->f3 : Symbol(f3, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 11, 3)) +>f3 : Symbol(f3, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 11, 11)) var r3b = f3(1, ''); >r3b : Symbol(r3b, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 13, 3)) ->f3 : Symbol(f3, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 11, 3)) +>f3 : Symbol(f3, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 11, 11)) class C { >C : Symbol(C, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 13, 44)) @@ -99,20 +99,20 @@ interface I { >U : Symbol(U, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 24, 8)) >T : Symbol(T, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 24, 6)) } -var i: I; ->i : Symbol(i, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 26, 3)) +declare var i: I; +>i : Symbol(i, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 26, 11)) >I : Symbol(I, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 21, 53)) var r5 = i.f(1, ''); >r5 : Symbol(r5, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 27, 3)) >i.f : Symbol(I.f, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 23, 13)) ->i : Symbol(i, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 26, 3)) +>i : Symbol(i, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 26, 11)) >f : Symbol(I.f, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 23, 13)) var r5b = i.f(1, ''); >r5b : Symbol(r5b, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 28, 3)) >i.f : Symbol(I.f, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 23, 13)) ->i : Symbol(i, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 26, 3)) +>i : Symbol(i, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 26, 11)) >f : Symbol(I.f, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 23, 13)) class C2 { @@ -156,19 +156,19 @@ interface I2 { >U : Symbol(U, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 38, 15)) >T : Symbol(T, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 38, 13)) } -var i2: I2; ->i2 : Symbol(i2, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 41, 3)) +declare var i2: I2; +>i2 : Symbol(i2, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 41, 11)) >I2 : Symbol(I2, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 36, 54)) var r7 = i2.f(1, ''); >r7 : Symbol(r7, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 42, 3)) >i2.f : Symbol(I2.f, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 38, 20)) ->i2 : Symbol(i2, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 41, 3)) +>i2 : Symbol(i2, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 41, 11)) >f : Symbol(I2.f, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 38, 20)) var r7b = i2.f(1, ''); >r7b : Symbol(r7b, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 43, 3)) >i2.f : Symbol(I2.f, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 38, 20)) ->i2 : Symbol(i2, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 41, 3)) +>i2 : Symbol(i2, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 41, 11)) >f : Symbol(I2.f, Decl(callGenericFunctionWithIncorrectNumberOfTypeArguments.ts, 38, 20)) diff --git a/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.types b/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.types index d142977e5f21c..5fcca149b8cc1 100644 --- a/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.types +++ b/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.types @@ -70,7 +70,7 @@ var r2b = f2(1, ''); >'' : "" > : ^^ -var f3: { (x: T, y: U): T; } +declare var f3: { (x: T, y: U): T; }; >f3 : (x: T, y: U) => T > : ^ ^^ ^^ ^^ ^^ ^^ ^^^^^ >x : T @@ -166,7 +166,7 @@ interface I { >y : U > : ^ } -var i: I; +declare var i: I; >i : I > : ^ @@ -266,7 +266,7 @@ interface I2 { >y : U > : ^ } -var i2: I2; +declare var i2: I2; >i2 : I2 > : ^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.errors.txt b/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.errors.txt index 478826f64c788..e4792a3a8e28d 100644 --- a/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.errors.txt +++ b/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.errors.txt @@ -23,7 +23,7 @@ callNonGenericFunctionWithTypeArguments.ts(43,10): error TS2347: Untyped functio ~~~~~~ !!! error TS2558: Expected 0 type arguments, but got 1. - var f3: { (x: number): any; } + declare var f3: { (x: number): any; } var r3 = f3(1); ~~~~~~ !!! error TS2558: Expected 0 type arguments, but got 1. @@ -40,7 +40,7 @@ callNonGenericFunctionWithTypeArguments.ts(43,10): error TS2347: Untyped functio interface I { f(x: number): any; } - var i: I; + declare var i: I; var r5 = i.f(1); ~~~~~~ !!! error TS2558: Expected 0 type arguments, but got 1. @@ -57,17 +57,17 @@ callNonGenericFunctionWithTypeArguments.ts(43,10): error TS2347: Untyped functio interface I2 { f(x: number); } - var i2: I2; + declare var i2: I2; var r7 = i2.f(1); ~~~~~~ !!! error TS2558: Expected 0 type arguments, but got 1. - var a; + declare var a; var r8 = a(); ~~~~~~~~~~~ !!! error TS2347: Untyped function calls may not accept type arguments. - var a2: any; + declare var a2: any; var r8 = a2(); ~~~~~~~~~~~~ !!! error TS2347: Untyped function calls may not accept type arguments. \ No newline at end of file diff --git a/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.js b/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.js index 8bd2c373030cb..3ed8d92d72537 100644 --- a/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.js +++ b/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.js @@ -10,7 +10,7 @@ var r = f(1); var f2 = (x: number) => { return null; } var r2 = f2(1); -var f3: { (x: number): any; } +declare var f3: { (x: number): any; } var r3 = f3(1); class C { @@ -23,7 +23,7 @@ var r4 = (new C()).f(1); interface I { f(x: number): any; } -var i: I; +declare var i: I; var r5 = i.f(1); class C2 { @@ -36,13 +36,13 @@ var r6 = (new C2()).f(1); interface I2 { f(x: number); } -var i2: I2; +declare var i2: I2; var r7 = i2.f(1); -var a; +declare var a; var r8 = a(); -var a2: any; +declare var a2: any; var r8 = a2(); //// [callNonGenericFunctionWithTypeArguments.js] @@ -52,7 +52,6 @@ function f(x) { return null; } var r = f(1); var f2 = function (x) { return null; }; var r2 = f2(1); -var f3; var r3 = f3(1); var C = /** @class */ (function () { function C() { @@ -63,7 +62,6 @@ var C = /** @class */ (function () { return C; }()); var r4 = (new C()).f(1); -var i; var r5 = i.f(1); var C2 = /** @class */ (function () { function C2() { @@ -74,9 +72,6 @@ var C2 = /** @class */ (function () { return C2; }()); var r6 = (new C2()).f(1); -var i2; var r7 = i2.f(1); -var a; var r8 = a(); -var a2; var r8 = a2(); diff --git a/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.symbols b/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.symbols index 41d2d82216945..c22ba99044b35 100644 --- a/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.symbols +++ b/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.symbols @@ -20,13 +20,13 @@ var r2 = f2(1); >r2 : Symbol(r2, Decl(callNonGenericFunctionWithTypeArguments.ts, 7, 3)) >f2 : Symbol(f2, Decl(callNonGenericFunctionWithTypeArguments.ts, 6, 3)) -var f3: { (x: number): any; } ->f3 : Symbol(f3, Decl(callNonGenericFunctionWithTypeArguments.ts, 9, 3)) ->x : Symbol(x, Decl(callNonGenericFunctionWithTypeArguments.ts, 9, 11)) +declare var f3: { (x: number): any; } +>f3 : Symbol(f3, Decl(callNonGenericFunctionWithTypeArguments.ts, 9, 11)) +>x : Symbol(x, Decl(callNonGenericFunctionWithTypeArguments.ts, 9, 19)) var r3 = f3(1); >r3 : Symbol(r3, Decl(callNonGenericFunctionWithTypeArguments.ts, 10, 3)) ->f3 : Symbol(f3, Decl(callNonGenericFunctionWithTypeArguments.ts, 9, 3)) +>f3 : Symbol(f3, Decl(callNonGenericFunctionWithTypeArguments.ts, 9, 11)) class C { >C : Symbol(C, Decl(callNonGenericFunctionWithTypeArguments.ts, 10, 23)) @@ -51,14 +51,14 @@ interface I { >f : Symbol(I.f, Decl(callNonGenericFunctionWithTypeArguments.ts, 19, 13)) >x : Symbol(x, Decl(callNonGenericFunctionWithTypeArguments.ts, 20, 6)) } -var i: I; ->i : Symbol(i, Decl(callNonGenericFunctionWithTypeArguments.ts, 22, 3)) +declare var i: I; +>i : Symbol(i, Decl(callNonGenericFunctionWithTypeArguments.ts, 22, 11)) >I : Symbol(I, Decl(callNonGenericFunctionWithTypeArguments.ts, 17, 32)) var r5 = i.f(1); >r5 : Symbol(r5, Decl(callNonGenericFunctionWithTypeArguments.ts, 23, 3)) >i.f : Symbol(I.f, Decl(callNonGenericFunctionWithTypeArguments.ts, 19, 13)) ->i : Symbol(i, Decl(callNonGenericFunctionWithTypeArguments.ts, 22, 3)) +>i : Symbol(i, Decl(callNonGenericFunctionWithTypeArguments.ts, 22, 11)) >f : Symbol(I.f, Decl(callNonGenericFunctionWithTypeArguments.ts, 19, 13)) class C2 { @@ -84,27 +84,27 @@ interface I2 { >f : Symbol(I2.f, Decl(callNonGenericFunctionWithTypeArguments.ts, 32, 14)) >x : Symbol(x, Decl(callNonGenericFunctionWithTypeArguments.ts, 33, 6)) } -var i2: I2; ->i2 : Symbol(i2, Decl(callNonGenericFunctionWithTypeArguments.ts, 35, 3)) +declare var i2: I2; +>i2 : Symbol(i2, Decl(callNonGenericFunctionWithTypeArguments.ts, 35, 11)) >I2 : Symbol(I2, Decl(callNonGenericFunctionWithTypeArguments.ts, 30, 33)) var r7 = i2.f(1); >r7 : Symbol(r7, Decl(callNonGenericFunctionWithTypeArguments.ts, 36, 3)) >i2.f : Symbol(I2.f, Decl(callNonGenericFunctionWithTypeArguments.ts, 32, 14)) ->i2 : Symbol(i2, Decl(callNonGenericFunctionWithTypeArguments.ts, 35, 3)) +>i2 : Symbol(i2, Decl(callNonGenericFunctionWithTypeArguments.ts, 35, 11)) >f : Symbol(I2.f, Decl(callNonGenericFunctionWithTypeArguments.ts, 32, 14)) -var a; ->a : Symbol(a, Decl(callNonGenericFunctionWithTypeArguments.ts, 38, 3)) +declare var a; +>a : Symbol(a, Decl(callNonGenericFunctionWithTypeArguments.ts, 38, 11)) var r8 = a(); >r8 : Symbol(r8, Decl(callNonGenericFunctionWithTypeArguments.ts, 39, 3), Decl(callNonGenericFunctionWithTypeArguments.ts, 42, 3)) ->a : Symbol(a, Decl(callNonGenericFunctionWithTypeArguments.ts, 38, 3)) +>a : Symbol(a, Decl(callNonGenericFunctionWithTypeArguments.ts, 38, 11)) -var a2: any; ->a2 : Symbol(a2, Decl(callNonGenericFunctionWithTypeArguments.ts, 41, 3)) +declare var a2: any; +>a2 : Symbol(a2, Decl(callNonGenericFunctionWithTypeArguments.ts, 41, 11)) var r8 = a2(); >r8 : Symbol(r8, Decl(callNonGenericFunctionWithTypeArguments.ts, 39, 3), Decl(callNonGenericFunctionWithTypeArguments.ts, 42, 3)) ->a2 : Symbol(a2, Decl(callNonGenericFunctionWithTypeArguments.ts, 41, 3)) +>a2 : Symbol(a2, Decl(callNonGenericFunctionWithTypeArguments.ts, 41, 11)) diff --git a/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.types b/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.types index b5bfc3d90ccee..85e56fbe6a212 100644 --- a/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.types +++ b/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.types @@ -38,7 +38,7 @@ var r2 = f2(1); >1 : 1 > : ^ -var f3: { (x: number): any; } +declare var f3: { (x: number): any; } >f3 : (x: number) => any > : ^ ^^ ^^^^^ >x : number @@ -92,7 +92,7 @@ interface I { >x : number > : ^^^^^^ } -var i: I; +declare var i: I; >i : I > : ^ @@ -148,7 +148,7 @@ interface I2 { >x : number > : ^^^^^^ } -var i2: I2; +declare var i2: I2; >i2 : I2 > : ^^ @@ -166,7 +166,7 @@ var r7 = i2.f(1); >1 : 1 > : ^ -var a; +declare var a; >a : any > : ^^^ @@ -178,7 +178,7 @@ var r8 = a(); >a : any > : ^^^ -var a2: any; +declare var a2: any; >a2 : any > : ^^^ diff --git a/tests/baselines/reference/callOverload.errors.txt b/tests/baselines/reference/callOverload.errors.txt index e10608b023b7d..2dbf56fc3daba 100644 --- a/tests/baselines/reference/callOverload.errors.txt +++ b/tests/baselines/reference/callOverload.errors.txt @@ -8,7 +8,7 @@ callOverload.ts(11,10): error TS2556: A spread argument must either have a tuple declare function fn(x: any): void; declare function takeTwo(x: any, y: any): void; declare function withRest(a: any, ...args: Array): void; - var n: number[]; + declare var n: number[]; fn(1) // no error fn(1, 2, 3, 4) diff --git a/tests/baselines/reference/callOverload.js b/tests/baselines/reference/callOverload.js index a5cb85289d81b..e1e4377119ca8 100644 --- a/tests/baselines/reference/callOverload.js +++ b/tests/baselines/reference/callOverload.js @@ -4,7 +4,7 @@ declare function fn(x: any): void; declare function takeTwo(x: any, y: any): void; declare function withRest(a: any, ...args: Array): void; -var n: number[]; +declare var n: number[]; fn(1) // no error fn(1, 2, 3, 4) @@ -23,7 +23,6 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { } return to.concat(ar || Array.prototype.slice.call(from)); }; -var n; fn(1); // no error fn(1, 2, 3, 4); takeTwo(1, 2, 3, 4); diff --git a/tests/baselines/reference/callOverload.symbols b/tests/baselines/reference/callOverload.symbols index 0dade2079092c..f29ef818a2325 100644 --- a/tests/baselines/reference/callOverload.symbols +++ b/tests/baselines/reference/callOverload.symbols @@ -16,8 +16,8 @@ declare function withRest(a: any, ...args: Array): void; >args : Symbol(args, Decl(callOverload.ts, 2, 33)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) -var n: number[]; ->n : Symbol(n, Decl(callOverload.ts, 3, 3)) +declare var n: number[]; +>n : Symbol(n, Decl(callOverload.ts, 3, 11)) fn(1) // no error >fn : Symbol(fn, Decl(callOverload.ts, 0, 0)) @@ -30,12 +30,12 @@ takeTwo(1, 2, 3, 4) withRest('a', ...n); // no error >withRest : Symbol(withRest, Decl(callOverload.ts, 1, 47)) ->n : Symbol(n, Decl(callOverload.ts, 3, 3)) +>n : Symbol(n, Decl(callOverload.ts, 3, 11)) withRest(); >withRest : Symbol(withRest, Decl(callOverload.ts, 1, 47)) withRest(...n); >withRest : Symbol(withRest, Decl(callOverload.ts, 1, 47)) ->n : Symbol(n, Decl(callOverload.ts, 3, 3)) +>n : Symbol(n, Decl(callOverload.ts, 3, 11)) diff --git a/tests/baselines/reference/callOverload.types b/tests/baselines/reference/callOverload.types index 3cfc7e27afd1d..c7434310c9316 100644 --- a/tests/baselines/reference/callOverload.types +++ b/tests/baselines/reference/callOverload.types @@ -23,7 +23,7 @@ declare function withRest(a: any, ...args: Array): void; >args : any[] > : ^^^^^ -var n: number[]; +declare var n: number[]; >n : number[] > : ^^^^^^^^ diff --git a/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.errors.txt b/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.errors.txt index 8b318bfd1d482..21ef72bcac439 100644 --- a/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.errors.txt +++ b/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.errors.txt @@ -42,7 +42,7 @@ callSignatureWithOptionalParameterAndInitializer.ts(46,9): error TS1015: Paramet !!! error TS1015: Parameter cannot have question mark and initializer. } - var c: C; + declare var c: C; c.foo(); c.foo(1); @@ -59,13 +59,13 @@ callSignatureWithOptionalParameterAndInitializer.ts(46,9): error TS1015: Paramet !!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. } - var i: I; + declare var i: I; i(); i(1); i.foo(1); i.foo(1, 2); - var a: { + declare var a: { (x?: number = 1); ~ !!! error TS1015: Parameter cannot have question mark and initializer. diff --git a/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.js b/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.js index 25cd2f5f1460c..e64df78dfad5f 100644 --- a/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.js +++ b/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.js @@ -18,7 +18,7 @@ class C { foo(x?: number = 1) { } } -var c: C; +declare var c: C; c.foo(); c.foo(1); @@ -27,13 +27,13 @@ interface I { foo(x: number, y?: number = 1); } -var i: I; +declare var i: I; i(); i(1); i.foo(1); i.foo(1, 2); -var a: { +declare var a: { (x?: number = 1); foo(x? = 1); } @@ -82,15 +82,12 @@ var C = /** @class */ (function () { }; return C; }()); -var c; c.foo(); c.foo(1); -var i; i(); i(1); i.foo(1); i.foo(1, 2); -var a; a(); a(1); a.foo(); diff --git a/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.symbols b/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.symbols index eb1cbf79525a0..b4e2a839fd560 100644 --- a/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.symbols +++ b/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.symbols @@ -43,18 +43,18 @@ class C { >x : Symbol(x, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 14, 8)) } -var c: C; ->c : Symbol(c, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 17, 3)) +declare var c: C; +>c : Symbol(c, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 17, 11)) >C : Symbol(C, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 11, 9)) c.foo(); >c.foo : Symbol(C.foo, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 13, 9)) ->c : Symbol(c, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 17, 3)) +>c : Symbol(c, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 17, 11)) >foo : Symbol(C.foo, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 13, 9)) c.foo(1); >c.foo : Symbol(C.foo, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 13, 9)) ->c : Symbol(c, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 17, 3)) +>c : Symbol(c, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 17, 11)) >foo : Symbol(C.foo, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 13, 9)) interface I { @@ -69,28 +69,28 @@ interface I { >y : Symbol(y, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 23, 18)) } -var i: I; ->i : Symbol(i, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 26, 3)) +declare var i: I; +>i : Symbol(i, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 26, 11)) >I : Symbol(I, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 19, 9)) i(); ->i : Symbol(i, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 26, 3)) +>i : Symbol(i, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 26, 11)) i(1); ->i : Symbol(i, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 26, 3)) +>i : Symbol(i, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 26, 11)) i.foo(1); >i.foo : Symbol(I.foo, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 22, 13)) ->i : Symbol(i, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 26, 3)) +>i : Symbol(i, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 26, 11)) >foo : Symbol(I.foo, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 22, 13)) i.foo(1, 2); >i.foo : Symbol(I.foo, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 22, 13)) ->i : Symbol(i, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 26, 3)) +>i : Symbol(i, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 26, 11)) >foo : Symbol(I.foo, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 22, 13)) -var a: { ->a : Symbol(a, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 32, 3)) +declare var a: { +>a : Symbol(a, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 32, 11)) (x?: number = 1); >x : Symbol(x, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 33, 5)) @@ -101,19 +101,19 @@ var a: { } a(); ->a : Symbol(a, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 32, 3)) +>a : Symbol(a, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 32, 11)) a(1); ->a : Symbol(a, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 32, 3)) +>a : Symbol(a, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 32, 11)) a.foo(); >a.foo : Symbol(foo, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 33, 21)) ->a : Symbol(a, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 32, 3)) +>a : Symbol(a, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 32, 11)) >foo : Symbol(foo, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 33, 21)) a.foo(1); >a.foo : Symbol(foo, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 33, 21)) ->a : Symbol(a, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 32, 3)) +>a : Symbol(a, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 32, 11)) >foo : Symbol(foo, Decl(callSignatureWithOptionalParameterAndInitializer.ts, 33, 21)) var b = { diff --git a/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.types b/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.types index ccb78e2afb728..c936953039838 100644 --- a/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.types +++ b/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.types @@ -94,7 +94,7 @@ class C { > : ^ } -var c: C; +declare var c: C; >c : C > : ^ @@ -138,7 +138,7 @@ interface I { > : ^ } -var i: I; +declare var i: I; >i : I > : ^ @@ -182,7 +182,7 @@ i.foo(1, 2); >2 : 2 > : ^ -var a: { +declare var a: { >a : { (x?: number): any; foo(x?: number): any; } > : ^^^ ^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.errors.txt b/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.errors.txt index f4ecb661941a8..4ff3d589b4292 100644 --- a/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.errors.txt +++ b/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.errors.txt @@ -8,7 +8,7 @@ callSignaturesShouldBeResolvedBeforeSpecialization.ts(9,10): error TS2345: Argum } function foo() { - var test: I1; + var test!: I1; test("expects boolean instead of string"); // should not error - "test" should not expect a boolean test(true); // should error - string expected ~~~~ diff --git a/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.js b/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.js index 8171e03e1d044..fa6b73519fe50 100644 --- a/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.js +++ b/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.js @@ -7,7 +7,7 @@ interface I1 { } function foo() { - var test: I1; + var test!: I1; test("expects boolean instead of string"); // should not error - "test" should not expect a boolean test(true); // should error - string expected } diff --git a/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.symbols b/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.symbols index 197ab73a63171..dbf93044fb7ef 100644 --- a/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.symbols +++ b/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.symbols @@ -17,7 +17,7 @@ interface I1 { function foo() { >foo : Symbol(foo, Decl(callSignaturesShouldBeResolvedBeforeSpecialization.ts, 3, 1)) - var test: I1; + var test!: I1; >test : Symbol(test, Decl(callSignaturesShouldBeResolvedBeforeSpecialization.ts, 6, 7)) >I1 : Symbol(I1, Decl(callSignaturesShouldBeResolvedBeforeSpecialization.ts, 0, 0)) diff --git a/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.types b/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.types index 383eb966f6b7b..f0a4acf4768dc 100644 --- a/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.types +++ b/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.types @@ -15,7 +15,7 @@ function foo() { >foo : () => void > : ^^^^^^^^^^ - var test: I1; + var test!: I1; >test : I1 > : ^^^^^^^^^^ diff --git a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.errors.txt b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.errors.txt index 9031c99a4af12..01b2d24b55191 100644 --- a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.errors.txt +++ b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.errors.txt @@ -16,7 +16,7 @@ callSignaturesThatDifferOnlyByReturnType2.ts(13,16): error TS2345: Argument of t !!! error TS2320: Interface 'A' cannot simultaneously extend types 'I' and 'I'. !!! error TS2320: Named property 'foo' of types 'I' and 'I' are not identical. - var x: A; + declare var x: A; // BUG 822524 var r = x.foo(1); // no error var r2 = x.foo(''); // error diff --git a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.js b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.js index 28a60d2e658fb..13da70445befb 100644 --- a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.js +++ b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.js @@ -10,7 +10,7 @@ interface I { interface A extends I, I { } -var x: A; +declare var x: A; // BUG 822524 var r = x.foo(1); // no error var r2 = x.foo(''); // error @@ -19,7 +19,6 @@ var r2 = x.foo(''); // error //// [callSignaturesThatDifferOnlyByReturnType2.js] // Normally it is an error to have multiple overloads which differ only by return type in a single type declaration. // Here the multiple overloads come from multiple bases. -var x; // BUG 822524 var r = x.foo(1); // no error var r2 = x.foo(''); // error diff --git a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.symbols b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.symbols index 7d838fd71bb83..356aaa7830827 100644 --- a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.symbols +++ b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.symbols @@ -19,20 +19,20 @@ interface A extends I, I { } >I : Symbol(I, Decl(callSignaturesThatDifferOnlyByReturnType2.ts, 0, 0)) >I : Symbol(I, Decl(callSignaturesThatDifferOnlyByReturnType2.ts, 0, 0)) -var x: A; ->x : Symbol(x, Decl(callSignaturesThatDifferOnlyByReturnType2.ts, 9, 3)) +declare var x: A; +>x : Symbol(x, Decl(callSignaturesThatDifferOnlyByReturnType2.ts, 9, 11)) >A : Symbol(A, Decl(callSignaturesThatDifferOnlyByReturnType2.ts, 5, 1)) // BUG 822524 var r = x.foo(1); // no error >r : Symbol(r, Decl(callSignaturesThatDifferOnlyByReturnType2.ts, 11, 3)) >x.foo : Symbol(I.foo, Decl(callSignaturesThatDifferOnlyByReturnType2.ts, 3, 16)) ->x : Symbol(x, Decl(callSignaturesThatDifferOnlyByReturnType2.ts, 9, 3)) +>x : Symbol(x, Decl(callSignaturesThatDifferOnlyByReturnType2.ts, 9, 11)) >foo : Symbol(I.foo, Decl(callSignaturesThatDifferOnlyByReturnType2.ts, 3, 16)) var r2 = x.foo(''); // error >r2 : Symbol(r2, Decl(callSignaturesThatDifferOnlyByReturnType2.ts, 12, 3)) >x.foo : Symbol(I.foo, Decl(callSignaturesThatDifferOnlyByReturnType2.ts, 3, 16)) ->x : Symbol(x, Decl(callSignaturesThatDifferOnlyByReturnType2.ts, 9, 3)) +>x : Symbol(x, Decl(callSignaturesThatDifferOnlyByReturnType2.ts, 9, 11)) >foo : Symbol(I.foo, Decl(callSignaturesThatDifferOnlyByReturnType2.ts, 3, 16)) diff --git a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.types b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.types index 3dc65a28feda9..6014ab0a82eea 100644 --- a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.types +++ b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.types @@ -14,7 +14,7 @@ interface I { interface A extends I, I { } -var x: A; +declare var x: A; >x : A > : ^ diff --git a/tests/baselines/reference/callSignaturesWithParameterInitializers.errors.txt b/tests/baselines/reference/callSignaturesWithParameterInitializers.errors.txt index a14b0cf78e4a7..0538df9970e48 100644 --- a/tests/baselines/reference/callSignaturesWithParameterInitializers.errors.txt +++ b/tests/baselines/reference/callSignaturesWithParameterInitializers.errors.txt @@ -22,7 +22,7 @@ callSignaturesWithParameterInitializers.ts(37,9): error TS2371: A parameter init foo(x = 1) { } } - var c: C; + declare var c: C; c.foo(); c.foo(1); @@ -36,14 +36,14 @@ callSignaturesWithParameterInitializers.ts(37,9): error TS2371: A parameter init !!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. } - var i: I; + declare var i: I; i(); i(1); i.foo(1); i.foo(1, 2); // these are errors - var a: { + declare var a: { (x = 1); ~~~~~ !!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. diff --git a/tests/baselines/reference/callSignaturesWithParameterInitializers.js b/tests/baselines/reference/callSignaturesWithParameterInitializers.js index cfc9337ee7b5b..faf3182173d53 100644 --- a/tests/baselines/reference/callSignaturesWithParameterInitializers.js +++ b/tests/baselines/reference/callSignaturesWithParameterInitializers.js @@ -18,7 +18,7 @@ class C { foo(x = 1) { } } -var c: C; +declare var c: C; c.foo(); c.foo(1); @@ -28,14 +28,14 @@ interface I { foo(x: number, y = 1); } -var i: I; +declare var i: I; i(); i(1); i.foo(1); i.foo(1, 2); // these are errors -var a: { +declare var a: { (x = 1); foo(x = 1); } @@ -84,16 +84,12 @@ var C = /** @class */ (function () { }; return C; }()); -var c; c.foo(); c.foo(1); -var i; i(); i(1); i.foo(1); i.foo(1, 2); -// these are errors -var a; a(); a(1); a.foo(); diff --git a/tests/baselines/reference/callSignaturesWithParameterInitializers.symbols b/tests/baselines/reference/callSignaturesWithParameterInitializers.symbols index c806062aac81d..8bfb184c7fd9f 100644 --- a/tests/baselines/reference/callSignaturesWithParameterInitializers.symbols +++ b/tests/baselines/reference/callSignaturesWithParameterInitializers.symbols @@ -43,18 +43,18 @@ class C { >x : Symbol(x, Decl(callSignaturesWithParameterInitializers.ts, 14, 8)) } -var c: C; ->c : Symbol(c, Decl(callSignaturesWithParameterInitializers.ts, 17, 3)) +declare var c: C; +>c : Symbol(c, Decl(callSignaturesWithParameterInitializers.ts, 17, 11)) >C : Symbol(C, Decl(callSignaturesWithParameterInitializers.ts, 11, 9)) c.foo(); >c.foo : Symbol(C.foo, Decl(callSignaturesWithParameterInitializers.ts, 13, 9)) ->c : Symbol(c, Decl(callSignaturesWithParameterInitializers.ts, 17, 3)) +>c : Symbol(c, Decl(callSignaturesWithParameterInitializers.ts, 17, 11)) >foo : Symbol(C.foo, Decl(callSignaturesWithParameterInitializers.ts, 13, 9)) c.foo(1); >c.foo : Symbol(C.foo, Decl(callSignaturesWithParameterInitializers.ts, 13, 9)) ->c : Symbol(c, Decl(callSignaturesWithParameterInitializers.ts, 17, 3)) +>c : Symbol(c, Decl(callSignaturesWithParameterInitializers.ts, 17, 11)) >foo : Symbol(C.foo, Decl(callSignaturesWithParameterInitializers.ts, 13, 9)) // these are errors @@ -70,29 +70,29 @@ interface I { >y : Symbol(y, Decl(callSignaturesWithParameterInitializers.ts, 24, 18)) } -var i: I; ->i : Symbol(i, Decl(callSignaturesWithParameterInitializers.ts, 27, 3)) +declare var i: I; +>i : Symbol(i, Decl(callSignaturesWithParameterInitializers.ts, 27, 11)) >I : Symbol(I, Decl(callSignaturesWithParameterInitializers.ts, 19, 9)) i(); ->i : Symbol(i, Decl(callSignaturesWithParameterInitializers.ts, 27, 3)) +>i : Symbol(i, Decl(callSignaturesWithParameterInitializers.ts, 27, 11)) i(1); ->i : Symbol(i, Decl(callSignaturesWithParameterInitializers.ts, 27, 3)) +>i : Symbol(i, Decl(callSignaturesWithParameterInitializers.ts, 27, 11)) i.foo(1); >i.foo : Symbol(I.foo, Decl(callSignaturesWithParameterInitializers.ts, 23, 12)) ->i : Symbol(i, Decl(callSignaturesWithParameterInitializers.ts, 27, 3)) +>i : Symbol(i, Decl(callSignaturesWithParameterInitializers.ts, 27, 11)) >foo : Symbol(I.foo, Decl(callSignaturesWithParameterInitializers.ts, 23, 12)) i.foo(1, 2); >i.foo : Symbol(I.foo, Decl(callSignaturesWithParameterInitializers.ts, 23, 12)) ->i : Symbol(i, Decl(callSignaturesWithParameterInitializers.ts, 27, 3)) +>i : Symbol(i, Decl(callSignaturesWithParameterInitializers.ts, 27, 11)) >foo : Symbol(I.foo, Decl(callSignaturesWithParameterInitializers.ts, 23, 12)) // these are errors -var a: { ->a : Symbol(a, Decl(callSignaturesWithParameterInitializers.ts, 34, 3)) +declare var a: { +>a : Symbol(a, Decl(callSignaturesWithParameterInitializers.ts, 34, 11)) (x = 1); >x : Symbol(x, Decl(callSignaturesWithParameterInitializers.ts, 35, 5)) @@ -103,19 +103,19 @@ var a: { } a(); ->a : Symbol(a, Decl(callSignaturesWithParameterInitializers.ts, 34, 3)) +>a : Symbol(a, Decl(callSignaturesWithParameterInitializers.ts, 34, 11)) a(1); ->a : Symbol(a, Decl(callSignaturesWithParameterInitializers.ts, 34, 3)) +>a : Symbol(a, Decl(callSignaturesWithParameterInitializers.ts, 34, 11)) a.foo(); >a.foo : Symbol(foo, Decl(callSignaturesWithParameterInitializers.ts, 35, 12)) ->a : Symbol(a, Decl(callSignaturesWithParameterInitializers.ts, 34, 3)) +>a : Symbol(a, Decl(callSignaturesWithParameterInitializers.ts, 34, 11)) >foo : Symbol(foo, Decl(callSignaturesWithParameterInitializers.ts, 35, 12)) a.foo(1); >a.foo : Symbol(foo, Decl(callSignaturesWithParameterInitializers.ts, 35, 12)) ->a : Symbol(a, Decl(callSignaturesWithParameterInitializers.ts, 34, 3)) +>a : Symbol(a, Decl(callSignaturesWithParameterInitializers.ts, 34, 11)) >foo : Symbol(foo, Decl(callSignaturesWithParameterInitializers.ts, 35, 12)) var b = { diff --git a/tests/baselines/reference/callSignaturesWithParameterInitializers.types b/tests/baselines/reference/callSignaturesWithParameterInitializers.types index 2c5664d42aa10..add87f041420b 100644 --- a/tests/baselines/reference/callSignaturesWithParameterInitializers.types +++ b/tests/baselines/reference/callSignaturesWithParameterInitializers.types @@ -94,7 +94,7 @@ class C { > : ^ } -var c: C; +declare var c: C; >c : C > : ^ @@ -139,7 +139,7 @@ interface I { > : ^ } -var i: I; +declare var i: I; >i : I > : ^ @@ -184,7 +184,7 @@ i.foo(1, 2); > : ^ // these are errors -var a: { +declare var a: { >a : { (x?: number): any; foo(x?: number): any; } > : ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/callSignaturesWithParameterInitializers2.errors.txt b/tests/baselines/reference/callSignaturesWithParameterInitializers2.errors.txt index 445717bf478c4..26bb1a183e1dc 100644 --- a/tests/baselines/reference/callSignaturesWithParameterInitializers2.errors.txt +++ b/tests/baselines/reference/callSignaturesWithParameterInitializers2.errors.txt @@ -23,7 +23,7 @@ callSignaturesWithParameterInitializers2.ts(20,15): error TS1005: '{' expected. foo(x = 1) { } } - var c: C; + declare var c: C; c.foo(); c.foo(1); diff --git a/tests/baselines/reference/callSignaturesWithParameterInitializers2.js b/tests/baselines/reference/callSignaturesWithParameterInitializers2.js index b792b96dec634..0818e4b97e0e0 100644 --- a/tests/baselines/reference/callSignaturesWithParameterInitializers2.js +++ b/tests/baselines/reference/callSignaturesWithParameterInitializers2.js @@ -15,7 +15,7 @@ class C { foo(x = 1) { } } -var c: C; +declare var c: C; c.foo(); c.foo(1); @@ -43,7 +43,6 @@ var C = /** @class */ (function () { }; return C; }()); -var c; c.foo(); c.foo(1); var b = { diff --git a/tests/baselines/reference/callSignaturesWithParameterInitializers2.symbols b/tests/baselines/reference/callSignaturesWithParameterInitializers2.symbols index 019382c597f42..4d50155c0331f 100644 --- a/tests/baselines/reference/callSignaturesWithParameterInitializers2.symbols +++ b/tests/baselines/reference/callSignaturesWithParameterInitializers2.symbols @@ -30,18 +30,18 @@ class C { >x : Symbol(x, Decl(callSignaturesWithParameterInitializers2.ts, 11, 8)) } -var c: C; ->c : Symbol(c, Decl(callSignaturesWithParameterInitializers2.ts, 14, 3)) +declare var c: C; +>c : Symbol(c, Decl(callSignaturesWithParameterInitializers2.ts, 14, 11)) >C : Symbol(C, Decl(callSignaturesWithParameterInitializers2.ts, 7, 6)) c.foo(); >c.foo : Symbol(C.foo, Decl(callSignaturesWithParameterInitializers2.ts, 9, 9), Decl(callSignaturesWithParameterInitializers2.ts, 10, 15)) ->c : Symbol(c, Decl(callSignaturesWithParameterInitializers2.ts, 14, 3)) +>c : Symbol(c, Decl(callSignaturesWithParameterInitializers2.ts, 14, 11)) >foo : Symbol(C.foo, Decl(callSignaturesWithParameterInitializers2.ts, 9, 9), Decl(callSignaturesWithParameterInitializers2.ts, 10, 15)) c.foo(1); >c.foo : Symbol(C.foo, Decl(callSignaturesWithParameterInitializers2.ts, 9, 9), Decl(callSignaturesWithParameterInitializers2.ts, 10, 15)) ->c : Symbol(c, Decl(callSignaturesWithParameterInitializers2.ts, 14, 3)) +>c : Symbol(c, Decl(callSignaturesWithParameterInitializers2.ts, 14, 11)) >foo : Symbol(C.foo, Decl(callSignaturesWithParameterInitializers2.ts, 9, 9), Decl(callSignaturesWithParameterInitializers2.ts, 10, 15)) var b = { diff --git a/tests/baselines/reference/callSignaturesWithParameterInitializers2.types b/tests/baselines/reference/callSignaturesWithParameterInitializers2.types index ae95c38495dc4..29f0b384891ee 100644 --- a/tests/baselines/reference/callSignaturesWithParameterInitializers2.types +++ b/tests/baselines/reference/callSignaturesWithParameterInitializers2.types @@ -55,7 +55,7 @@ class C { > : ^ } -var c: C; +declare var c: C; >c : C > : ^ diff --git a/tests/baselines/reference/callsOnComplexSignatures.js b/tests/baselines/reference/callsOnComplexSignatures.js index 4c40a8bfcccb5..25feef129359c 100644 --- a/tests/baselines/reference/callsOnComplexSignatures.js +++ b/tests/baselines/reference/callsOnComplexSignatures.js @@ -112,7 +112,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -/// +/// var react_1 = __importDefault(require("react")); // Simple calls from real usecases function test1() { diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt index 321b5a897632b..8fa5634454561 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt @@ -11,8 +11,8 @@ chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(37,9): error TS class Chain { constructor(public value: T) { } then(cb: (x: T) => S): Chain { - var t: T; - var s: S; + var t!: T; + var s!: S; // Ok to go down the chain, but error to climb up the chain (new Chain(t)).then(tt => s).then(ss => t); ~ @@ -44,9 +44,9 @@ chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(37,9): error TS class Chain2 { constructor(public value: T) { } then(cb: (x: T) => S): Chain2 { - var i: I; - var t: T; - var s: S; + var i!: I; + var t!: T; + var s!: S; // Ok to go down the chain, check the constraint at the end. // Should get an error that we are assigning a string to a number (new Chain2(i)).then(ii => t).then(tt => s).value.x = ""; diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.js b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.js index a4019d31a3754..ba4ad714336d8 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.js +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.js @@ -4,8 +4,8 @@ class Chain { constructor(public value: T) { } then(cb: (x: T) => S): Chain { - var t: T; - var s: S; + var t!: T; + var s!: S; // Ok to go down the chain, but error to climb up the chain (new Chain(t)).then(tt => s).then(ss => t); @@ -27,9 +27,9 @@ interface I { class Chain2 { constructor(public value: T) { } then(cb: (x: T) => S): Chain2 { - var i: I; - var t: T; - var s: S; + var i!: I; + var t!: T; + var s!: S; // Ok to go down the chain, check the constraint at the end. // Should get an error that we are assigning a string to a number (new Chain2(i)).then(ii => t).then(tt => s).value.x = ""; diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.symbols b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.symbols index 471634c5f6fe5..694f5b1d6e6ca 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.symbols +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.symbols @@ -20,11 +20,11 @@ class Chain { >Chain : Symbol(Chain, Decl(chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts, 0, 0)) >S : Symbol(S, Decl(chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts, 2, 9)) - var t: T; + var t!: T; >t : Symbol(t, Decl(chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts, 3, 11)) >T : Symbol(T, Decl(chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts, 0, 12)) - var s: S; + var s!: S; >s : Symbol(s, Decl(chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts, 4, 11)) >S : Symbol(S, Decl(chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts, 2, 9)) @@ -114,15 +114,15 @@ class Chain2 { >Chain2 : Symbol(Chain2, Decl(chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts, 22, 1)) >S : Symbol(S, Decl(chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts, 25, 9)) - var i: I; + var i!: I; >i : Symbol(i, Decl(chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts, 26, 11)) >I : Symbol(I, Decl(chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts, 17, 1)) - var t: T; + var t!: T; >t : Symbol(t, Decl(chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts, 27, 11)) >T : Symbol(T, Decl(chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts, 23, 13)) - var s: S; + var s!: S; >s : Symbol(s, Decl(chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts, 28, 11)) >S : Symbol(S, Decl(chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts, 25, 9)) diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.types b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.types index 3408e1ee7be5e..44b969aaed74a 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.types +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.types @@ -17,11 +17,11 @@ class Chain { >x : T > : ^ - var t: T; + var t!: T; >t : T > : ^ - var s: S; + var s!: S; >s : S > : ^ @@ -202,15 +202,15 @@ class Chain2 { >x : T > : ^ - var i: I; + var i!: I; >i : I > : ^ - var t: T; + var t!: T; >t : T > : ^ - var s: S; + var s!: S; >s : S > : ^ diff --git a/tests/baselines/reference/checkIndexConstraintOfJavascriptClassExpression.errors.txt b/tests/baselines/reference/checkIndexConstraintOfJavascriptClassExpression.errors.txt index fa22beceb33e2..462e4957a6427 100644 --- a/tests/baselines/reference/checkIndexConstraintOfJavascriptClassExpression.errors.txt +++ b/tests/baselines/reference/checkIndexConstraintOfJavascriptClassExpression.errors.txt @@ -1,8 +1,10 @@ +error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. weird.js(1,1): error TS2552: Cannot find name 'someFunction'. Did you mean 'Function'? weird.js(1,23): error TS7006: Parameter 'BaseClass' implicitly has an 'any' type. weird.js(9,17): error TS7006: Parameter 'error' implicitly has an 'any' type. +!!! error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== weird.js (3 errors) ==== someFunction(function(BaseClass) { ~~~~~~~~~~~~ diff --git a/tests/baselines/reference/checkJsdocOnEndOfFile.errors.txt b/tests/baselines/reference/checkJsdocOnEndOfFile.errors.txt index 19e950b028c0a..c02276f9a5bba 100644 --- a/tests/baselines/reference/checkJsdocOnEndOfFile.errors.txt +++ b/tests/baselines/reference/checkJsdocOnEndOfFile.errors.txt @@ -1,6 +1,8 @@ +error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. eof.js(2,20): error TS2304: Cannot find name 'bad'. +!!! error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== eof.js (1 errors) ==== /** * @typedef {Array} Should have error here diff --git a/tests/baselines/reference/checkJsdocReturnTag1.errors.txt b/tests/baselines/reference/checkJsdocReturnTag1.errors.txt index 47f1a3209dede..978047ca196a9 100644 --- a/tests/baselines/reference/checkJsdocReturnTag1.errors.txt +++ b/tests/baselines/reference/checkJsdocReturnTag1.errors.txt @@ -1,6 +1,8 @@ +error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. returns.js(20,12): error TS2872: This kind of expression is always truthy. +!!! error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== returns.js (1 errors) ==== // @ts-check /** diff --git a/tests/baselines/reference/checkJsdocReturnTag2.errors.txt b/tests/baselines/reference/checkJsdocReturnTag2.errors.txt index c5ab204ed8438..f1a0fab470ea6 100644 --- a/tests/baselines/reference/checkJsdocReturnTag2.errors.txt +++ b/tests/baselines/reference/checkJsdocReturnTag2.errors.txt @@ -1,9 +1,11 @@ +error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. returns.js(6,5): error TS2322: Type 'number' is not assignable to type 'string'. returns.js(13,5): error TS2322: Type 'number | boolean' is not assignable to type 'string | number'. Type 'boolean' is not assignable to type 'string | number'. returns.js(13,12): error TS2872: This kind of expression is always truthy. +!!! error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== returns.js (3 errors) ==== // @ts-check /** diff --git a/tests/baselines/reference/checkJsxChildrenCanBeTupleType.js b/tests/baselines/reference/checkJsxChildrenCanBeTupleType.js index e39ef89f279b1..1294b6c45080f 100644 --- a/tests/baselines/reference/checkJsxChildrenCanBeTupleType.js +++ b/tests/baselines/reference/checkJsxChildrenCanBeTupleType.js @@ -25,7 +25,7 @@ const testErr = //// [checkJsxChildrenCanBeTupleType.js] "use strict"; -/// +/// var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || diff --git a/tests/baselines/reference/checkJsxChildrenProperty1.js b/tests/baselines/reference/checkJsxChildrenProperty1.js index 90e72ea120cf6..ff4d1a8084bc1 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty1.js +++ b/tests/baselines/reference/checkJsxChildrenProperty1.js @@ -1,6 +1,8 @@ //// [tests/cases/conformance/jsx/checkJsxChildrenProperty1.tsx] //// //// [file.tsx] +/// + import React = require('react'); interface Prop { @@ -26,6 +28,7 @@ let k2 = //// [file.jsx] "use strict"; +/// Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); function Comp(p) { diff --git a/tests/baselines/reference/checkJsxChildrenProperty1.symbols b/tests/baselines/reference/checkJsxChildrenProperty1.symbols index 03f6c72ee088f..fc860bb9ea9cd 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty1.symbols +++ b/tests/baselines/reference/checkJsxChildrenProperty1.symbols @@ -1,69 +1,71 @@ //// [tests/cases/conformance/jsx/checkJsxChildrenProperty1.tsx] //// === file.tsx === +/// + import React = require('react'); >React : Symbol(React, Decl(file.tsx, 0, 0)) interface Prop { ->Prop : Symbol(Prop, Decl(file.tsx, 0, 32)) +>Prop : Symbol(Prop, Decl(file.tsx, 2, 32)) a: number, ->a : Symbol(Prop.a, Decl(file.tsx, 2, 16)) +>a : Symbol(Prop.a, Decl(file.tsx, 4, 16)) b: string, ->b : Symbol(Prop.b, Decl(file.tsx, 3, 14)) +>b : Symbol(Prop.b, Decl(file.tsx, 5, 14)) children: string | JSX.Element ->children : Symbol(Prop.children, Decl(file.tsx, 4, 14)) +>children : Symbol(Prop.children, Decl(file.tsx, 6, 14)) >JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1)) >Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27)) } function Comp(p: Prop) { ->Comp : Symbol(Comp, Decl(file.tsx, 6, 1)) ->p : Symbol(p, Decl(file.tsx, 8, 14)) ->Prop : Symbol(Prop, Decl(file.tsx, 0, 32)) +>Comp : Symbol(Comp, Decl(file.tsx, 8, 1)) +>p : Symbol(p, Decl(file.tsx, 10, 14)) +>Prop : Symbol(Prop, Decl(file.tsx, 2, 32)) return
{p.b}
; >div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45)) ->p.b : Symbol(Prop.b, Decl(file.tsx, 3, 14)) ->p : Symbol(p, Decl(file.tsx, 8, 14)) ->b : Symbol(Prop.b, Decl(file.tsx, 3, 14)) +>p.b : Symbol(Prop.b, Decl(file.tsx, 5, 14)) +>p : Symbol(p, Decl(file.tsx, 10, 14)) +>b : Symbol(Prop.b, Decl(file.tsx, 5, 14)) >div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45)) } // OK let k = ; ->k : Symbol(k, Decl(file.tsx, 13, 3)) ->Comp : Symbol(Comp, Decl(file.tsx, 6, 1)) ->a : Symbol(a, Decl(file.tsx, 13, 13)) ->b : Symbol(b, Decl(file.tsx, 13, 20)) ->children : Symbol(children, Decl(file.tsx, 13, 27)) +>k : Symbol(k, Decl(file.tsx, 15, 3)) +>Comp : Symbol(Comp, Decl(file.tsx, 8, 1)) +>a : Symbol(a, Decl(file.tsx, 15, 13)) +>b : Symbol(b, Decl(file.tsx, 15, 20)) +>children : Symbol(children, Decl(file.tsx, 15, 27)) let k1 = ->k1 : Symbol(k1, Decl(file.tsx, 14, 3)) +>k1 : Symbol(k1, Decl(file.tsx, 16, 3)) ->Comp : Symbol(Comp, Decl(file.tsx, 6, 1)) ->a : Symbol(a, Decl(file.tsx, 15, 9)) ->b : Symbol(b, Decl(file.tsx, 15, 16)) +>Comp : Symbol(Comp, Decl(file.tsx, 8, 1)) +>a : Symbol(a, Decl(file.tsx, 17, 9)) +>b : Symbol(b, Decl(file.tsx, 17, 16)) hi hi hi! ; ->Comp : Symbol(Comp, Decl(file.tsx, 6, 1)) +>Comp : Symbol(Comp, Decl(file.tsx, 8, 1)) let k2 = ->k2 : Symbol(k2, Decl(file.tsx, 18, 3)) +>k2 : Symbol(k2, Decl(file.tsx, 20, 3)) ->Comp : Symbol(Comp, Decl(file.tsx, 6, 1)) ->a : Symbol(a, Decl(file.tsx, 19, 9)) ->b : Symbol(b, Decl(file.tsx, 19, 16)) +>Comp : Symbol(Comp, Decl(file.tsx, 8, 1)) +>a : Symbol(a, Decl(file.tsx, 21, 9)) +>b : Symbol(b, Decl(file.tsx, 21, 16))
hi hi hi!
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45)) >div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
; ->Comp : Symbol(Comp, Decl(file.tsx, 6, 1)) +>Comp : Symbol(Comp, Decl(file.tsx, 8, 1)) diff --git a/tests/baselines/reference/checkJsxChildrenProperty1.types b/tests/baselines/reference/checkJsxChildrenProperty1.types index 42eef8075c495..2db988928b72c 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty1.types +++ b/tests/baselines/reference/checkJsxChildrenProperty1.types @@ -1,6 +1,8 @@ //// [tests/cases/conformance/jsx/checkJsxChildrenProperty1.tsx] //// === file.tsx === +/// + import React = require('react'); >React : typeof React > : ^^^^^^^^^^^^ diff --git a/tests/baselines/reference/checkJsxChildrenProperty12.js b/tests/baselines/reference/checkJsxChildrenProperty12.js index 5288eddbe8b90..eb3bfc8c63eef 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty12.js +++ b/tests/baselines/reference/checkJsxChildrenProperty12.js @@ -1,6 +1,8 @@ //// [tests/cases/conformance/jsx/checkJsxChildrenProperty12.tsx] //// //// [file.tsx] +/// + import React = require('react'); interface ButtonProp { @@ -36,6 +38,7 @@ class InnerButton extends React.Component { //// [file.jsx] "use strict"; +/// var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || diff --git a/tests/baselines/reference/checkJsxChildrenProperty12.symbols b/tests/baselines/reference/checkJsxChildrenProperty12.symbols index 6d3f833fe7024..1128c1817872a 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty12.symbols +++ b/tests/baselines/reference/checkJsxChildrenProperty12.symbols @@ -1,50 +1,52 @@ //// [tests/cases/conformance/jsx/checkJsxChildrenProperty12.tsx] //// === file.tsx === +/// + import React = require('react'); >React : Symbol(React, Decl(file.tsx, 0, 0)) interface ButtonProp { ->ButtonProp : Symbol(ButtonProp, Decl(file.tsx, 0, 32)) +>ButtonProp : Symbol(ButtonProp, Decl(file.tsx, 2, 32)) a: number, ->a : Symbol(ButtonProp.a, Decl(file.tsx, 2, 22)) +>a : Symbol(ButtonProp.a, Decl(file.tsx, 4, 22)) b: string, ->b : Symbol(ButtonProp.b, Decl(file.tsx, 3, 14)) +>b : Symbol(ButtonProp.b, Decl(file.tsx, 5, 14)) children: Button; ->children : Symbol(ButtonProp.children, Decl(file.tsx, 4, 14)) ->Button : Symbol(Button, Decl(file.tsx, 6, 1)) +>children : Symbol(ButtonProp.children, Decl(file.tsx, 6, 14)) +>Button : Symbol(Button, Decl(file.tsx, 8, 1)) } class Button extends React.Component { ->Button : Symbol(Button, Decl(file.tsx, 6, 1)) +>Button : Symbol(Button, Decl(file.tsx, 8, 1)) >React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66)) >React : Symbol(React, Decl(file.tsx, 0, 0)) >Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66)) ->ButtonProp : Symbol(ButtonProp, Decl(file.tsx, 0, 32)) +>ButtonProp : Symbol(ButtonProp, Decl(file.tsx, 2, 32)) render() { ->render : Symbol(Button.render, Decl(file.tsx, 8, 55)) +>render : Symbol(Button.render, Decl(file.tsx, 10, 55)) let condition: boolean; ->condition : Symbol(condition, Decl(file.tsx, 10, 5)) +>condition : Symbol(condition, Decl(file.tsx, 12, 5)) if (condition) { ->condition : Symbol(condition, Decl(file.tsx, 10, 5)) +>condition : Symbol(condition, Decl(file.tsx, 12, 5)) return ->InnerButton : Symbol(InnerButton, Decl(file.tsx, 24, 1)) +>InnerButton : Symbol(InnerButton, Decl(file.tsx, 26, 1)) >this.props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37)) ->this : Symbol(Button, Decl(file.tsx, 6, 1)) +>this : Symbol(Button, Decl(file.tsx, 8, 1)) >props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37)) } else { return ( ->InnerButton : Symbol(InnerButton, Decl(file.tsx, 24, 1)) +>InnerButton : Symbol(InnerButton, Decl(file.tsx, 26, 1)) >this.props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37)) ->this : Symbol(Button, Decl(file.tsx, 6, 1)) +>this : Symbol(Button, Decl(file.tsx, 8, 1)) >props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
Hello World
@@ -52,27 +54,27 @@ class Button extends React.Component { >div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
); ->InnerButton : Symbol(InnerButton, Decl(file.tsx, 24, 1)) +>InnerButton : Symbol(InnerButton, Decl(file.tsx, 26, 1)) } } } interface InnerButtonProp { ->InnerButtonProp : Symbol(InnerButtonProp, Decl(file.tsx, 20, 1)) +>InnerButtonProp : Symbol(InnerButtonProp, Decl(file.tsx, 22, 1)) a: number ->a : Symbol(InnerButtonProp.a, Decl(file.tsx, 22, 27)) +>a : Symbol(InnerButtonProp.a, Decl(file.tsx, 24, 27)) } class InnerButton extends React.Component { ->InnerButton : Symbol(InnerButton, Decl(file.tsx, 24, 1)) +>InnerButton : Symbol(InnerButton, Decl(file.tsx, 26, 1)) >React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66)) >React : Symbol(React, Decl(file.tsx, 0, 0)) >Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66)) ->InnerButtonProp : Symbol(InnerButtonProp, Decl(file.tsx, 20, 1)) +>InnerButtonProp : Symbol(InnerButtonProp, Decl(file.tsx, 22, 1)) render() { ->render : Symbol(InnerButton.render, Decl(file.tsx, 26, 65)) +>render : Symbol(InnerButton.render, Decl(file.tsx, 28, 65)) return (); >button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43)) diff --git a/tests/baselines/reference/checkJsxChildrenProperty12.types b/tests/baselines/reference/checkJsxChildrenProperty12.types index 82e70de465e81..08810e4f2782a 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty12.types +++ b/tests/baselines/reference/checkJsxChildrenProperty12.types @@ -1,6 +1,8 @@ //// [tests/cases/conformance/jsx/checkJsxChildrenProperty12.tsx] //// === file.tsx === +/// + import React = require('react'); >React : typeof React > : ^^^^^^^^^^^^ diff --git a/tests/baselines/reference/checkJsxChildrenProperty13.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty13.errors.txt index 3f1b4539a58d9..98121746a734e 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty13.errors.txt +++ b/tests/baselines/reference/checkJsxChildrenProperty13.errors.txt @@ -1,7 +1,9 @@ -file.tsx(12,30): error TS2710: 'children' are specified twice. The attribute named 'children' will be overwritten. +file.tsx(14,30): error TS2710: 'children' are specified twice. The attribute named 'children' will be overwritten. ==== file.tsx (1 errors) ==== + /// + import React = require('react'); interface ButtonProp { diff --git a/tests/baselines/reference/checkJsxChildrenProperty13.js b/tests/baselines/reference/checkJsxChildrenProperty13.js index 304266b096d0c..477461b0a55ac 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty13.js +++ b/tests/baselines/reference/checkJsxChildrenProperty13.js @@ -1,6 +1,8 @@ //// [tests/cases/conformance/jsx/checkJsxChildrenProperty13.tsx] //// //// [file.tsx] +/// + import React = require('react'); interface ButtonProp { @@ -31,6 +33,7 @@ class InnerButton extends React.Component { //// [file.jsx] "use strict"; +/// var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || diff --git a/tests/baselines/reference/checkJsxChildrenProperty13.symbols b/tests/baselines/reference/checkJsxChildrenProperty13.symbols index d79d9df5d7ccc..c073534e9d47f 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty13.symbols +++ b/tests/baselines/reference/checkJsxChildrenProperty13.symbols @@ -1,66 +1,68 @@ //// [tests/cases/conformance/jsx/checkJsxChildrenProperty13.tsx] //// === file.tsx === +/// + import React = require('react'); >React : Symbol(React, Decl(file.tsx, 0, 0)) interface ButtonProp { ->ButtonProp : Symbol(ButtonProp, Decl(file.tsx, 0, 32)) +>ButtonProp : Symbol(ButtonProp, Decl(file.tsx, 2, 32)) a: number, ->a : Symbol(ButtonProp.a, Decl(file.tsx, 2, 22)) +>a : Symbol(ButtonProp.a, Decl(file.tsx, 4, 22)) b: string, ->b : Symbol(ButtonProp.b, Decl(file.tsx, 3, 14)) +>b : Symbol(ButtonProp.b, Decl(file.tsx, 5, 14)) children: Button; ->children : Symbol(ButtonProp.children, Decl(file.tsx, 4, 14)) ->Button : Symbol(Button, Decl(file.tsx, 6, 1)) +>children : Symbol(ButtonProp.children, Decl(file.tsx, 6, 14)) +>Button : Symbol(Button, Decl(file.tsx, 8, 1)) } class Button extends React.Component { ->Button : Symbol(Button, Decl(file.tsx, 6, 1)) +>Button : Symbol(Button, Decl(file.tsx, 8, 1)) >React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66)) >React : Symbol(React, Decl(file.tsx, 0, 0)) >Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66)) ->ButtonProp : Symbol(ButtonProp, Decl(file.tsx, 0, 32)) +>ButtonProp : Symbol(ButtonProp, Decl(file.tsx, 2, 32)) render() { ->render : Symbol(Button.render, Decl(file.tsx, 8, 55)) +>render : Symbol(Button.render, Decl(file.tsx, 10, 55)) // Error children are specified twice return ( ->InnerButton : Symbol(InnerButton, Decl(file.tsx, 19, 1)) +>InnerButton : Symbol(InnerButton, Decl(file.tsx, 21, 1)) >this.props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37)) ->this : Symbol(Button, Decl(file.tsx, 6, 1)) +>this : Symbol(Button, Decl(file.tsx, 8, 1)) >props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37)) ->children : Symbol(children, Decl(file.tsx, 11, 44)) +>children : Symbol(children, Decl(file.tsx, 13, 44))
Hello World
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45)) >div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
); ->InnerButton : Symbol(InnerButton, Decl(file.tsx, 19, 1)) +>InnerButton : Symbol(InnerButton, Decl(file.tsx, 21, 1)) } } interface InnerButtonProp { ->InnerButtonProp : Symbol(InnerButtonProp, Decl(file.tsx, 15, 1)) +>InnerButtonProp : Symbol(InnerButtonProp, Decl(file.tsx, 17, 1)) a: number ->a : Symbol(InnerButtonProp.a, Decl(file.tsx, 17, 27)) +>a : Symbol(InnerButtonProp.a, Decl(file.tsx, 19, 27)) } class InnerButton extends React.Component { ->InnerButton : Symbol(InnerButton, Decl(file.tsx, 19, 1)) +>InnerButton : Symbol(InnerButton, Decl(file.tsx, 21, 1)) >React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66)) >React : Symbol(React, Decl(file.tsx, 0, 0)) >Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66)) ->InnerButtonProp : Symbol(InnerButtonProp, Decl(file.tsx, 15, 1)) +>InnerButtonProp : Symbol(InnerButtonProp, Decl(file.tsx, 17, 1)) render() { ->render : Symbol(InnerButton.render, Decl(file.tsx, 21, 65)) +>render : Symbol(InnerButton.render, Decl(file.tsx, 23, 65)) return (); >button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43)) diff --git a/tests/baselines/reference/checkJsxChildrenProperty13.types b/tests/baselines/reference/checkJsxChildrenProperty13.types index 5a28219181e49..01a48cd8bb23a 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty13.types +++ b/tests/baselines/reference/checkJsxChildrenProperty13.types @@ -1,6 +1,8 @@ //// [tests/cases/conformance/jsx/checkJsxChildrenProperty13.tsx] //// === file.tsx === +/// + import React = require('react'); >React : typeof React > : ^^^^^^^^^^^^ diff --git a/tests/baselines/reference/checkJsxChildrenProperty14.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty14.errors.txt index 0fefce4922a9f..f96e6ff95d086 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty14.errors.txt +++ b/tests/baselines/reference/checkJsxChildrenProperty14.errors.txt @@ -1,7 +1,9 @@ -file.tsx(42,11): error TS2746: This JSX tag's 'children' prop expects a single child of type 'Element', but multiple children were provided. +file.tsx(44,11): error TS2746: This JSX tag's 'children' prop expects a single child of type 'Element', but multiple children were provided. ==== file.tsx (1 errors) ==== + /// + import React = require('react'); interface Prop { diff --git a/tests/baselines/reference/checkJsxChildrenProperty14.js b/tests/baselines/reference/checkJsxChildrenProperty14.js index ea803d1134c64..d02609fbaf266 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty14.js +++ b/tests/baselines/reference/checkJsxChildrenProperty14.js @@ -1,6 +1,8 @@ //// [tests/cases/conformance/jsx/checkJsxChildrenProperty14.tsx] //// //// [file.tsx] +/// + import React = require('react'); interface Prop { @@ -46,6 +48,7 @@ let k5 = <>; >button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43)) diff --git a/tests/baselines/reference/correctlyMarkAliasAsReferences1.types b/tests/baselines/reference/correctlyMarkAliasAsReferences1.types index e21077fcfc11f..fff6b6515427f 100644 --- a/tests/baselines/reference/correctlyMarkAliasAsReferences1.types +++ b/tests/baselines/reference/correctlyMarkAliasAsReferences1.types @@ -1,6 +1,7 @@ //// [tests/cases/conformance/jsx/correctlyMarkAliasAsReferences1.tsx] //// === 0.tsx === +/// /// import * as cx from 'classnames'; >cx : any diff --git a/tests/baselines/reference/correctlyMarkAliasAsReferences2.js b/tests/baselines/reference/correctlyMarkAliasAsReferences2.js index 7af59b017a8ee..8124cf26d8984 100644 --- a/tests/baselines/reference/correctlyMarkAliasAsReferences2.js +++ b/tests/baselines/reference/correctlyMarkAliasAsReferences2.js @@ -4,6 +4,7 @@ declare module "classnames"; //// [0.tsx] +/// /// import * as cx from 'classnames'; import * as React from "react"; @@ -15,6 +16,7 @@ let k = ; >button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43)) diff --git a/tests/baselines/reference/correctlyMarkAliasAsReferences2.types b/tests/baselines/reference/correctlyMarkAliasAsReferences2.types index da7806339a7be..4eb31046db991 100644 --- a/tests/baselines/reference/correctlyMarkAliasAsReferences2.types +++ b/tests/baselines/reference/correctlyMarkAliasAsReferences2.types @@ -1,6 +1,7 @@ //// [tests/cases/conformance/jsx/correctlyMarkAliasAsReferences2.tsx] //// === 0.tsx === +/// /// import * as cx from 'classnames'; >cx : any diff --git a/tests/baselines/reference/correctlyMarkAliasAsReferences3.errors.txt b/tests/baselines/reference/correctlyMarkAliasAsReferences3.errors.txt index 47a8158859ea4..6eb67cbc99bd7 100644 --- a/tests/baselines/reference/correctlyMarkAliasAsReferences3.errors.txt +++ b/tests/baselines/reference/correctlyMarkAliasAsReferences3.errors.txt @@ -1,7 +1,8 @@ -0.tsx(6,21): error TS2698: Spread types may only be created from object types. +0.tsx(7,21): error TS2698: Spread types may only be created from object types. ==== 0.tsx (1 errors) ==== + /// /// import * as cx from 'classnames'; import * as React from "react"; diff --git a/tests/baselines/reference/correctlyMarkAliasAsReferences3.js b/tests/baselines/reference/correctlyMarkAliasAsReferences3.js index 166e29d56dbb9..1e1accca25f75 100644 --- a/tests/baselines/reference/correctlyMarkAliasAsReferences3.js +++ b/tests/baselines/reference/correctlyMarkAliasAsReferences3.js @@ -4,6 +4,7 @@ declare module "classnames"; //// [0.tsx] +/// /// import * as cx from 'classnames'; import * as React from "react"; @@ -15,6 +16,7 @@ let k = ; >button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43)) diff --git a/tests/baselines/reference/correctlyMarkAliasAsReferences3.types b/tests/baselines/reference/correctlyMarkAliasAsReferences3.types index 639409a9e3e7e..c1ef9ec38d157 100644 --- a/tests/baselines/reference/correctlyMarkAliasAsReferences3.types +++ b/tests/baselines/reference/correctlyMarkAliasAsReferences3.types @@ -1,6 +1,7 @@ //// [tests/cases/conformance/jsx/correctlyMarkAliasAsReferences3.tsx] //// === 0.tsx === +/// /// import * as cx from 'classnames'; >cx : any diff --git a/tests/baselines/reference/correctlyMarkAliasAsReferences4.js b/tests/baselines/reference/correctlyMarkAliasAsReferences4.js index 631d06cc5b362..5ece7ba7a1ae0 100644 --- a/tests/baselines/reference/correctlyMarkAliasAsReferences4.js +++ b/tests/baselines/reference/correctlyMarkAliasAsReferences4.js @@ -4,6 +4,7 @@ declare module "classnames"; //// [0.tsx] +/// /// import * as cx from 'classnames'; import * as React from "react"; @@ -12,6 +13,7 @@ let buttonProps : {[attributeName: string]: ''} let k = }/> ->MyComponent : Symbol(MyComponent, Decl(file.tsx, 4, 1)) ->AnyComponent : Symbol(AnyComponent, Decl(file.tsx, 14, 12)) +>MyComponent : Symbol(MyComponent, Decl(file.tsx, 6, 1)) +>AnyComponent : Symbol(AnyComponent, Decl(file.tsx, 16, 12)) >button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43)) >button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43)) // Component Class as Props class MyButtonComponent extends React.Component<{},{}> { ->MyButtonComponent : Symbol(MyButtonComponent, Decl(file.tsx, 14, 57)) +>MyButtonComponent : Symbol(MyButtonComponent, Decl(file.tsx, 16, 57)) >React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66)) >React : Symbol(React, Decl(file.tsx, 0, 0)) >Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66)) } ->MyComponent : Symbol(MyComponent, Decl(file.tsx, 4, 1)) ->AnyComponent : Symbol(AnyComponent, Decl(file.tsx, 20, 12)) ->MyButtonComponent : Symbol(MyButtonComponent, Decl(file.tsx, 14, 57)) +>MyComponent : Symbol(MyComponent, Decl(file.tsx, 6, 1)) +>AnyComponent : Symbol(AnyComponent, Decl(file.tsx, 22, 12)) +>MyButtonComponent : Symbol(MyButtonComponent, Decl(file.tsx, 16, 57)) diff --git a/tests/baselines/reference/tsxUnionTypeComponent1.types b/tests/baselines/reference/tsxUnionTypeComponent1.types index 27db7ab58bd9c..5c32b49abf43a 100644 --- a/tests/baselines/reference/tsxUnionTypeComponent1.types +++ b/tests/baselines/reference/tsxUnionTypeComponent1.types @@ -1,6 +1,8 @@ //// [tests/cases/conformance/jsx/tsxUnionTypeComponent1.tsx] //// === file.tsx === +/// + import React = require('react'); >React : typeof React > : ^^^^^^^^^^^^ diff --git a/tests/baselines/reference/tsxUnionTypeComponent2.errors.txt b/tests/baselines/reference/tsxUnionTypeComponent2.errors.txt index 6187e403688c1..7263b1e9c3ab1 100644 --- a/tests/baselines/reference/tsxUnionTypeComponent2.errors.txt +++ b/tests/baselines/reference/tsxUnionTypeComponent2.errors.txt @@ -1,7 +1,9 @@ -file.tsx(7,2): error TS2604: JSX element type 'X' does not have any construct or call signatures. +file.tsx(9,2): error TS2604: JSX element type 'X' does not have any construct or call signatures. ==== file.tsx (1 errors) ==== + /// + import React = require('react'); type Invalid1 = React.ComponentClass | number; diff --git a/tests/baselines/reference/tsxUnionTypeComponent2.js b/tests/baselines/reference/tsxUnionTypeComponent2.js index 8c839ca4a73d4..a27e8cc5ea0bf 100644 --- a/tests/baselines/reference/tsxUnionTypeComponent2.js +++ b/tests/baselines/reference/tsxUnionTypeComponent2.js @@ -1,6 +1,8 @@ //// [tests/cases/conformance/jsx/tsxUnionTypeComponent2.tsx] //// //// [file.tsx] +/// + import React = require('react'); type Invalid1 = React.ComponentClass | number; @@ -14,6 +16,7 @@ const X: Invalid1 = 1; //// [file.js] "use strict"; +/// Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var X = 1; diff --git a/tests/baselines/reference/tsxUnionTypeComponent2.symbols b/tests/baselines/reference/tsxUnionTypeComponent2.symbols index fc083c400ed8d..d9da2728211bc 100644 --- a/tests/baselines/reference/tsxUnionTypeComponent2.symbols +++ b/tests/baselines/reference/tsxUnionTypeComponent2.symbols @@ -1,20 +1,22 @@ //// [tests/cases/conformance/jsx/tsxUnionTypeComponent2.tsx] //// === file.tsx === +/// + import React = require('react'); >React : Symbol(React, Decl(file.tsx, 0, 0)) type Invalid1 = React.ComponentClass | number; ->Invalid1 : Symbol(Invalid1, Decl(file.tsx, 0, 32)) +>Invalid1 : Symbol(Invalid1, Decl(file.tsx, 2, 32)) >React : Symbol(React, Decl(file.tsx, 0, 0)) >ComponentClass : Symbol(React.ComponentClass, Decl(react.d.ts, 205, 5)) const X: Invalid1 = 1; ->X : Symbol(X, Decl(file.tsx, 4, 5)) ->Invalid1 : Symbol(Invalid1, Decl(file.tsx, 0, 32)) +>X : Symbol(X, Decl(file.tsx, 6, 5)) +>Invalid1 : Symbol(Invalid1, Decl(file.tsx, 2, 32)) ; ->X : Symbol(X, Decl(file.tsx, 4, 5)) +>X : Symbol(X, Decl(file.tsx, 6, 5)) diff --git a/tests/baselines/reference/tsxUnionTypeComponent2.types b/tests/baselines/reference/tsxUnionTypeComponent2.types index ae7af328f1eda..852f42ca8632b 100644 --- a/tests/baselines/reference/tsxUnionTypeComponent2.types +++ b/tests/baselines/reference/tsxUnionTypeComponent2.types @@ -1,6 +1,8 @@ //// [tests/cases/conformance/jsx/tsxUnionTypeComponent2.tsx] //// === file.tsx === +/// + import React = require('react'); >React : typeof React > : ^^^^^^^^^^^^ diff --git a/tests/baselines/reference/twoInterfacesDifferentRootModule.errors.txt b/tests/baselines/reference/twoInterfacesDifferentRootModule.errors.txt index b39a1ab1b8ced..02905e4542e34 100644 --- a/tests/baselines/reference/twoInterfacesDifferentRootModule.errors.txt +++ b/tests/baselines/reference/twoInterfacesDifferentRootModule.errors.txt @@ -20,7 +20,7 @@ twoInterfacesDifferentRootModule.ts(27,16): error TS2339: Property 'foo' does no bar: number; } - var a: A; + declare var a: A; var r1 = a.foo; // error ~~~ !!! error TS2339: Property 'foo' does not exist on type 'A'. @@ -30,7 +30,7 @@ twoInterfacesDifferentRootModule.ts(27,16): error TS2339: Property 'foo' does no bar: T; } - var b: B; + declare var b: B; var r3 = b.foo; // error ~~~ !!! error TS2339: Property 'foo' does not exist on type 'B'. diff --git a/tests/baselines/reference/twoInterfacesDifferentRootModule.js b/tests/baselines/reference/twoInterfacesDifferentRootModule.js index abc9a27d934db..850767ee17dba 100644 --- a/tests/baselines/reference/twoInterfacesDifferentRootModule.js +++ b/tests/baselines/reference/twoInterfacesDifferentRootModule.js @@ -18,7 +18,7 @@ namespace M2 { bar: number; } - var a: A; + declare var a: A; var r1 = a.foo; // error var r2 = a.bar; @@ -26,7 +26,7 @@ namespace M2 { bar: T; } - var b: B; + declare var b: B; var r3 = b.foo; // error var r4 = b.bar; } @@ -35,10 +35,8 @@ namespace M2 { // two interfaces with different root modules should not merge var M2; (function (M2) { - var a; var r1 = a.foo; // error var r2 = a.bar; - var b; var r3 = b.foo; // error var r4 = b.bar; })(M2 || (M2 = {})); diff --git a/tests/baselines/reference/twoInterfacesDifferentRootModule.symbols b/tests/baselines/reference/twoInterfacesDifferentRootModule.symbols index 7dbd1f5bf03c2..1a55782278951 100644 --- a/tests/baselines/reference/twoInterfacesDifferentRootModule.symbols +++ b/tests/baselines/reference/twoInterfacesDifferentRootModule.symbols @@ -33,18 +33,18 @@ namespace M2 { >bar : Symbol(A.bar, Decl(twoInterfacesDifferentRootModule.ts, 13, 24)) } - var a: A; ->a : Symbol(a, Decl(twoInterfacesDifferentRootModule.ts, 17, 7)) + declare var a: A; +>a : Symbol(a, Decl(twoInterfacesDifferentRootModule.ts, 17, 15)) >A : Symbol(A, Decl(twoInterfacesDifferentRootModule.ts, 12, 14)) var r1 = a.foo; // error >r1 : Symbol(r1, Decl(twoInterfacesDifferentRootModule.ts, 18, 7)) ->a : Symbol(a, Decl(twoInterfacesDifferentRootModule.ts, 17, 7)) +>a : Symbol(a, Decl(twoInterfacesDifferentRootModule.ts, 17, 15)) var r2 = a.bar; >r2 : Symbol(r2, Decl(twoInterfacesDifferentRootModule.ts, 19, 7)) >a.bar : Symbol(A.bar, Decl(twoInterfacesDifferentRootModule.ts, 13, 24)) ->a : Symbol(a, Decl(twoInterfacesDifferentRootModule.ts, 17, 7)) +>a : Symbol(a, Decl(twoInterfacesDifferentRootModule.ts, 17, 15)) >bar : Symbol(A.bar, Decl(twoInterfacesDifferentRootModule.ts, 13, 24)) export interface B { @@ -56,17 +56,17 @@ namespace M2 { >T : Symbol(T, Decl(twoInterfacesDifferentRootModule.ts, 21, 23)) } - var b: B; ->b : Symbol(b, Decl(twoInterfacesDifferentRootModule.ts, 25, 7)) + declare var b: B; +>b : Symbol(b, Decl(twoInterfacesDifferentRootModule.ts, 25, 15)) >B : Symbol(B, Decl(twoInterfacesDifferentRootModule.ts, 19, 19)) var r3 = b.foo; // error >r3 : Symbol(r3, Decl(twoInterfacesDifferentRootModule.ts, 26, 7)) ->b : Symbol(b, Decl(twoInterfacesDifferentRootModule.ts, 25, 7)) +>b : Symbol(b, Decl(twoInterfacesDifferentRootModule.ts, 25, 15)) var r4 = b.bar; >r4 : Symbol(r4, Decl(twoInterfacesDifferentRootModule.ts, 27, 7)) >b.bar : Symbol(B.bar, Decl(twoInterfacesDifferentRootModule.ts, 21, 27)) ->b : Symbol(b, Decl(twoInterfacesDifferentRootModule.ts, 25, 7)) +>b : Symbol(b, Decl(twoInterfacesDifferentRootModule.ts, 25, 15)) >bar : Symbol(B.bar, Decl(twoInterfacesDifferentRootModule.ts, 21, 27)) } diff --git a/tests/baselines/reference/twoInterfacesDifferentRootModule.types b/tests/baselines/reference/twoInterfacesDifferentRootModule.types index 7caf54bc64966..b6f0787703452 100644 --- a/tests/baselines/reference/twoInterfacesDifferentRootModule.types +++ b/tests/baselines/reference/twoInterfacesDifferentRootModule.types @@ -27,7 +27,7 @@ namespace M2 { > : ^^^^^^ } - var a: A; + declare var a: A; >a : A > : ^ @@ -57,7 +57,7 @@ namespace M2 { > : ^ } - var b: B; + declare var b: B; >b : B > : ^^^^^^^^^ diff --git a/tests/baselines/reference/twoInterfacesDifferentRootModule2.errors.txt b/tests/baselines/reference/twoInterfacesDifferentRootModule2.errors.txt index 55ba198e0ce47..3c977bc9946c7 100644 --- a/tests/baselines/reference/twoInterfacesDifferentRootModule2.errors.txt +++ b/tests/baselines/reference/twoInterfacesDifferentRootModule2.errors.txt @@ -21,7 +21,7 @@ twoInterfacesDifferentRootModule2.ts(36,16): error TS2339: Property 'bar' does n bar: number; } - var a: A; + declare var a: A; var r1 = a.foo; // error ~~~ !!! error TS2339: Property 'foo' does not exist on type 'A'. @@ -31,20 +31,20 @@ twoInterfacesDifferentRootModule2.ts(36,16): error TS2339: Property 'bar' does n bar: T; } - var b: B; + declare var b: B; var r3 = b.foo; // error ~~~ !!! error TS2339: Property 'foo' does not exist on type 'B'. var r4 = b.bar; } - var a: A; + declare var a: A; var r1 = a.foo; var r2 = a.bar; // error ~~~ !!! error TS2339: Property 'bar' does not exist on type 'A'. - var b: B; + declare var b: B; var r3 = b.foo; var r4 = b.bar; // error ~~~ diff --git a/tests/baselines/reference/twoInterfacesDifferentRootModule2.js b/tests/baselines/reference/twoInterfacesDifferentRootModule2.js index 042699b1c3523..3ec2dfcace514 100644 --- a/tests/baselines/reference/twoInterfacesDifferentRootModule2.js +++ b/tests/baselines/reference/twoInterfacesDifferentRootModule2.js @@ -17,7 +17,7 @@ namespace M { bar: number; } - var a: A; + declare var a: A; var r1 = a.foo; // error var r2 = a.bar; @@ -25,16 +25,16 @@ namespace M { bar: T; } - var b: B; + declare var b: B; var r3 = b.foo; // error var r4 = b.bar; } - var a: A; + declare var a: A; var r1 = a.foo; var r2 = a.bar; // error - var b: B; + declare var b: B; var r3 = b.foo; var r4 = b.bar; // error } @@ -45,17 +45,13 @@ var M; (function (M) { var M2; (function (M2) { - var a; var r1 = a.foo; // error var r2 = a.bar; - var b; var r3 = b.foo; // error var r4 = b.bar; })(M2 || (M2 = {})); - var a; var r1 = a.foo; var r2 = a.bar; // error - var b; var r3 = b.foo; var r4 = b.bar; // error })(M || (M = {})); diff --git a/tests/baselines/reference/twoInterfacesDifferentRootModule2.symbols b/tests/baselines/reference/twoInterfacesDifferentRootModule2.symbols index 9e1b322985727..287450491cc81 100644 --- a/tests/baselines/reference/twoInterfacesDifferentRootModule2.symbols +++ b/tests/baselines/reference/twoInterfacesDifferentRootModule2.symbols @@ -32,18 +32,18 @@ namespace M { >bar : Symbol(A.bar, Decl(twoInterfacesDifferentRootModule2.ts, 12, 28)) } - var a: A; ->a : Symbol(a, Decl(twoInterfacesDifferentRootModule2.ts, 16, 11)) + declare var a: A; +>a : Symbol(a, Decl(twoInterfacesDifferentRootModule2.ts, 16, 19)) >A : Symbol(A, Decl(twoInterfacesDifferentRootModule2.ts, 11, 18)) var r1 = a.foo; // error >r1 : Symbol(r1, Decl(twoInterfacesDifferentRootModule2.ts, 17, 11)) ->a : Symbol(a, Decl(twoInterfacesDifferentRootModule2.ts, 16, 11)) +>a : Symbol(a, Decl(twoInterfacesDifferentRootModule2.ts, 16, 19)) var r2 = a.bar; >r2 : Symbol(r2, Decl(twoInterfacesDifferentRootModule2.ts, 18, 11)) >a.bar : Symbol(A.bar, Decl(twoInterfacesDifferentRootModule2.ts, 12, 28)) ->a : Symbol(a, Decl(twoInterfacesDifferentRootModule2.ts, 16, 11)) +>a : Symbol(a, Decl(twoInterfacesDifferentRootModule2.ts, 16, 19)) >bar : Symbol(A.bar, Decl(twoInterfacesDifferentRootModule2.ts, 12, 28)) export interface B { @@ -55,46 +55,46 @@ namespace M { >T : Symbol(T, Decl(twoInterfacesDifferentRootModule2.ts, 20, 27)) } - var b: B; ->b : Symbol(b, Decl(twoInterfacesDifferentRootModule2.ts, 24, 11)) + declare var b: B; +>b : Symbol(b, Decl(twoInterfacesDifferentRootModule2.ts, 24, 19)) >B : Symbol(B, Decl(twoInterfacesDifferentRootModule2.ts, 18, 23)) var r3 = b.foo; // error >r3 : Symbol(r3, Decl(twoInterfacesDifferentRootModule2.ts, 25, 11)) ->b : Symbol(b, Decl(twoInterfacesDifferentRootModule2.ts, 24, 11)) +>b : Symbol(b, Decl(twoInterfacesDifferentRootModule2.ts, 24, 19)) var r4 = b.bar; >r4 : Symbol(r4, Decl(twoInterfacesDifferentRootModule2.ts, 26, 11)) >b.bar : Symbol(B.bar, Decl(twoInterfacesDifferentRootModule2.ts, 20, 31)) ->b : Symbol(b, Decl(twoInterfacesDifferentRootModule2.ts, 24, 11)) +>b : Symbol(b, Decl(twoInterfacesDifferentRootModule2.ts, 24, 19)) >bar : Symbol(B.bar, Decl(twoInterfacesDifferentRootModule2.ts, 20, 31)) } - var a: A; ->a : Symbol(a, Decl(twoInterfacesDifferentRootModule2.ts, 29, 7)) + declare var a: A; +>a : Symbol(a, Decl(twoInterfacesDifferentRootModule2.ts, 29, 15)) >A : Symbol(A, Decl(twoInterfacesDifferentRootModule2.ts, 2, 13)) var r1 = a.foo; >r1 : Symbol(r1, Decl(twoInterfacesDifferentRootModule2.ts, 30, 7)) >a.foo : Symbol(A.foo, Decl(twoInterfacesDifferentRootModule2.ts, 3, 24)) ->a : Symbol(a, Decl(twoInterfacesDifferentRootModule2.ts, 29, 7)) +>a : Symbol(a, Decl(twoInterfacesDifferentRootModule2.ts, 29, 15)) >foo : Symbol(A.foo, Decl(twoInterfacesDifferentRootModule2.ts, 3, 24)) var r2 = a.bar; // error >r2 : Symbol(r2, Decl(twoInterfacesDifferentRootModule2.ts, 31, 7)) ->a : Symbol(a, Decl(twoInterfacesDifferentRootModule2.ts, 29, 7)) +>a : Symbol(a, Decl(twoInterfacesDifferentRootModule2.ts, 29, 15)) - var b: B; ->b : Symbol(b, Decl(twoInterfacesDifferentRootModule2.ts, 33, 7)) + declare var b: B; +>b : Symbol(b, Decl(twoInterfacesDifferentRootModule2.ts, 33, 15)) >B : Symbol(B, Decl(twoInterfacesDifferentRootModule2.ts, 5, 5)) var r3 = b.foo; >r3 : Symbol(r3, Decl(twoInterfacesDifferentRootModule2.ts, 34, 7)) >b.foo : Symbol(B.foo, Decl(twoInterfacesDifferentRootModule2.ts, 7, 27)) ->b : Symbol(b, Decl(twoInterfacesDifferentRootModule2.ts, 33, 7)) +>b : Symbol(b, Decl(twoInterfacesDifferentRootModule2.ts, 33, 15)) >foo : Symbol(B.foo, Decl(twoInterfacesDifferentRootModule2.ts, 7, 27)) var r4 = b.bar; // error >r4 : Symbol(r4, Decl(twoInterfacesDifferentRootModule2.ts, 35, 7)) ->b : Symbol(b, Decl(twoInterfacesDifferentRootModule2.ts, 33, 7)) +>b : Symbol(b, Decl(twoInterfacesDifferentRootModule2.ts, 33, 15)) } diff --git a/tests/baselines/reference/twoInterfacesDifferentRootModule2.types b/tests/baselines/reference/twoInterfacesDifferentRootModule2.types index 6f800ceaa271c..1f61f7834b379 100644 --- a/tests/baselines/reference/twoInterfacesDifferentRootModule2.types +++ b/tests/baselines/reference/twoInterfacesDifferentRootModule2.types @@ -29,7 +29,7 @@ namespace M { > : ^^^^^^ } - var a: A; + declare var a: A; >a : A > : ^ @@ -59,7 +59,7 @@ namespace M { > : ^ } - var b: B; + declare var b: B; >b : B > : ^^^^^^^^^ @@ -84,7 +84,7 @@ namespace M { > : ^^^^^^ } - var a: A; + declare var a: A; >a : A > : ^ @@ -108,7 +108,7 @@ namespace M { >bar : any > : ^^^ - var b: B; + declare var b: B; >b : B > : ^^^^^^^^^ diff --git a/tests/baselines/reference/typeAliasDeclareKeywordNewlines.errors.txt b/tests/baselines/reference/typeAliasDeclareKeywordNewlines.errors.txt index afbea95e16117..576977a0f12c5 100644 --- a/tests/baselines/reference/typeAliasDeclareKeywordNewlines.errors.txt +++ b/tests/baselines/reference/typeAliasDeclareKeywordNewlines.errors.txt @@ -1,8 +1,9 @@ -typeAliasDeclareKeywordNewlines.ts(5,1): error TS1142: Line break not permitted here. +typeAliasDeclareKeywordNewlines.ts(6,1): error TS1142: Line break not permitted here. ==== typeAliasDeclareKeywordNewlines.ts (1 errors) ==== - var declare: string, type: number; + declare var declare: string; + declare var type: number; // The following is invalid but should declare a type alias named 'T1': declare type /*unexpected newline*/ @@ -11,7 +12,7 @@ typeAliasDeclareKeywordNewlines.ts(5,1): error TS1142: Line break not permitted !!! error TS1142: Line break not permitted here. const t1: T1 = null; // Assert that T1 is the null type. - let T: null; + let T: null = null; // The following should use a variable named 'declare', use a variable named // 'type', and assign to a variable named 'T'. declare /*ASI*/ diff --git a/tests/baselines/reference/typeAliasDeclareKeywordNewlines.js b/tests/baselines/reference/typeAliasDeclareKeywordNewlines.js index dda27f355c915..9c1a081b94a88 100644 --- a/tests/baselines/reference/typeAliasDeclareKeywordNewlines.js +++ b/tests/baselines/reference/typeAliasDeclareKeywordNewlines.js @@ -1,14 +1,15 @@ //// [tests/cases/compiler/typeAliasDeclareKeywordNewlines.ts] //// //// [typeAliasDeclareKeywordNewlines.ts] -var declare: string, type: number; +declare var declare: string; +declare var type: number; // The following is invalid but should declare a type alias named 'T1': declare type /*unexpected newline*/ T1 = null; const t1: T1 = null; // Assert that T1 is the null type. -let T: null; +let T: null = null; // The following should use a variable named 'declare', use a variable named // 'type', and assign to a variable named 'T'. declare /*ASI*/ @@ -23,9 +24,8 @@ const t2: T2 = null; // Assert that T2 is the null type. //// [typeAliasDeclareKeywordNewlines.js] -var declare, type; var t1 = null; // Assert that T1 is the null type. -var T; +var T = null; // The following should use a variable named 'declare', use a variable named // 'type', and assign to a variable named 'T'. declare; /*ASI*/ diff --git a/tests/baselines/reference/typeAliasDeclareKeywordNewlines.symbols b/tests/baselines/reference/typeAliasDeclareKeywordNewlines.symbols index 95ce65218ec83..1970170bccd36 100644 --- a/tests/baselines/reference/typeAliasDeclareKeywordNewlines.symbols +++ b/tests/baselines/reference/typeAliasDeclareKeywordNewlines.symbols @@ -1,42 +1,44 @@ //// [tests/cases/compiler/typeAliasDeclareKeywordNewlines.ts] //// === typeAliasDeclareKeywordNewlines.ts === -var declare: string, type: number; ->declare : Symbol(declare, Decl(typeAliasDeclareKeywordNewlines.ts, 0, 3)) ->type : Symbol(type, Decl(typeAliasDeclareKeywordNewlines.ts, 0, 20)) +declare var declare: string; +>declare : Symbol(declare, Decl(typeAliasDeclareKeywordNewlines.ts, 0, 11)) + +declare var type: number; +>type : Symbol(type, Decl(typeAliasDeclareKeywordNewlines.ts, 1, 11)) // The following is invalid but should declare a type alias named 'T1': declare type /*unexpected newline*/ T1 = null; ->T1 : Symbol(T1, Decl(typeAliasDeclareKeywordNewlines.ts, 0, 34)) +>T1 : Symbol(T1, Decl(typeAliasDeclareKeywordNewlines.ts, 1, 25)) const t1: T1 = null; // Assert that T1 is the null type. ->t1 : Symbol(t1, Decl(typeAliasDeclareKeywordNewlines.ts, 5, 5)) ->T1 : Symbol(T1, Decl(typeAliasDeclareKeywordNewlines.ts, 0, 34)) +>t1 : Symbol(t1, Decl(typeAliasDeclareKeywordNewlines.ts, 6, 5)) +>T1 : Symbol(T1, Decl(typeAliasDeclareKeywordNewlines.ts, 1, 25)) -let T: null; ->T : Symbol(T, Decl(typeAliasDeclareKeywordNewlines.ts, 7, 3)) +let T: null = null; +>T : Symbol(T, Decl(typeAliasDeclareKeywordNewlines.ts, 8, 3)) // The following should use a variable named 'declare', use a variable named // 'type', and assign to a variable named 'T'. declare /*ASI*/ ->declare : Symbol(declare, Decl(typeAliasDeclareKeywordNewlines.ts, 0, 3)) +>declare : Symbol(declare, Decl(typeAliasDeclareKeywordNewlines.ts, 0, 11)) type /*ASI*/ ->type : Symbol(type, Decl(typeAliasDeclareKeywordNewlines.ts, 0, 20)) +>type : Symbol(type, Decl(typeAliasDeclareKeywordNewlines.ts, 1, 11)) T = null; ->T : Symbol(T, Decl(typeAliasDeclareKeywordNewlines.ts, 7, 3)) +>T : Symbol(T, Decl(typeAliasDeclareKeywordNewlines.ts, 8, 3)) // The following should use a variable named 'declare' and declare a type alias // named 'T2': declare /*ASI*/ ->declare : Symbol(declare, Decl(typeAliasDeclareKeywordNewlines.ts, 0, 3)) +>declare : Symbol(declare, Decl(typeAliasDeclareKeywordNewlines.ts, 0, 11)) type T2 = null; ->T2 : Symbol(T2, Decl(typeAliasDeclareKeywordNewlines.ts, 16, 7)) +>T2 : Symbol(T2, Decl(typeAliasDeclareKeywordNewlines.ts, 17, 7)) const t2: T2 = null; // Assert that T2 is the null type. ->t2 : Symbol(t2, Decl(typeAliasDeclareKeywordNewlines.ts, 18, 5)) ->T2 : Symbol(T2, Decl(typeAliasDeclareKeywordNewlines.ts, 16, 7)) +>t2 : Symbol(t2, Decl(typeAliasDeclareKeywordNewlines.ts, 19, 5)) +>T2 : Symbol(T2, Decl(typeAliasDeclareKeywordNewlines.ts, 17, 7)) diff --git a/tests/baselines/reference/typeAliasDeclareKeywordNewlines.types b/tests/baselines/reference/typeAliasDeclareKeywordNewlines.types index b046ab654777b..6e082e79b06fa 100644 --- a/tests/baselines/reference/typeAliasDeclareKeywordNewlines.types +++ b/tests/baselines/reference/typeAliasDeclareKeywordNewlines.types @@ -1,9 +1,11 @@ //// [tests/cases/compiler/typeAliasDeclareKeywordNewlines.ts] //// === typeAliasDeclareKeywordNewlines.ts === -var declare: string, type: number; +declare var declare: string; >declare : string > : ^^^^^^ + +declare var type: number; >type : number > : ^^^^^^ @@ -17,7 +19,7 @@ const t1: T1 = null; // Assert that T1 is the null type. >t1 : null > : ^^^^ -let T: null; +let T: null = null; >T : null > : ^^^^ diff --git a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt index 98b9862c07c8f..1679e18f089f0 100644 --- a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt +++ b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt @@ -9,8 +9,8 @@ typeArgumentInferenceConstructSignatures.ts(81,45): error TS2345: Argument of ty Types of parameters 'n' and 'b' are incompatible. Type 'number' is not assignable to type 'string'. typeArgumentInferenceConstructSignatures.ts(106,33): error TS2345: Argument of type '0' is not assignable to parameter of type '""'. -typeArgumentInferenceConstructSignatures.ts(107,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a9a' must be of type 'string', but here has type '{}'. -typeArgumentInferenceConstructSignatures.ts(121,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' must be of type '{ x: number; z: Window & typeof globalThis; y?: undefined; } | { x: number; y: string; z?: undefined; }', but here has type '{}'. +typeArgumentInferenceConstructSignatures.ts(107,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'a9a' must be of type 'string', but here has type '{}'. +typeArgumentInferenceConstructSignatures.ts(121,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' must be of type '{ x: number; z: Window & typeof globalThis; y?: undefined; } | { x: number; y: string; z?: undefined; }', but here has type '{}'. typeArgumentInferenceConstructSignatures.ts(122,74): error TS2353: Object literal may only specify known properties, and 'y' does not exist in type 'A92'. @@ -19,7 +19,7 @@ typeArgumentInferenceConstructSignatures.ts(122,74): error TS2353: Object litera interface NoParams { new (); } - var noParams: NoParams; + declare var noParams: NoParams; new noParams(); new noParams(); new noParams<{}>(); @@ -28,7 +28,7 @@ typeArgumentInferenceConstructSignatures.ts(122,74): error TS2353: Object litera interface noGenericParams { new (n: string); } - var noGenericParams: noGenericParams; + declare var noGenericParams: noGenericParams; new noGenericParams(''); new noGenericParams(''); new noGenericParams<{}>(''); @@ -37,7 +37,7 @@ typeArgumentInferenceConstructSignatures.ts(122,74): error TS2353: Object litera interface someGenerics1 { new (n: T, m: number); } - var someGenerics1: someGenerics1; + declare var someGenerics1: someGenerics1; new someGenerics1(3, 4); new someGenerics1(3, 4); // Error ~ @@ -48,7 +48,7 @@ typeArgumentInferenceConstructSignatures.ts(122,74): error TS2353: Object litera interface someGenerics2a { new (n: (x: T) => void); } - var someGenerics2a: someGenerics2a; + declare var someGenerics2a: someGenerics2a; new someGenerics2a((n: string) => n); new someGenerics2a((n: string) => n); new someGenerics2a((n) => n.substr(0)); @@ -56,7 +56,7 @@ typeArgumentInferenceConstructSignatures.ts(122,74): error TS2353: Object litera interface someGenerics2b { new (n: (x: T, y: U) => void); } - var someGenerics2b: someGenerics2b; + declare var someGenerics2b: someGenerics2b; new someGenerics2b((n: string, x: number) => n); new someGenerics2b((n: string, t: number) => n); new someGenerics2b((n, t) => n.substr(t * t)); @@ -65,7 +65,7 @@ typeArgumentInferenceConstructSignatures.ts(122,74): error TS2353: Object litera interface someGenerics3 { new (producer: () => T); } - var someGenerics3: someGenerics3; + declare var someGenerics3: someGenerics3; new someGenerics3(() => ''); new someGenerics3(() => undefined); new someGenerics3(() => 3); @@ -74,7 +74,7 @@ typeArgumentInferenceConstructSignatures.ts(122,74): error TS2353: Object litera interface someGenerics4 { new (n: T, f: (x: U) => void); } - var someGenerics4: someGenerics4; + declare var someGenerics4: someGenerics4; new someGenerics4(4, () => null); new someGenerics4('', () => 3); new someGenerics4('', (x: string) => ''); // Error @@ -88,7 +88,7 @@ typeArgumentInferenceConstructSignatures.ts(122,74): error TS2353: Object litera interface someGenerics5 { new (n: T, f: (x: U) => void); } - var someGenerics5: someGenerics5; + declare var someGenerics5: someGenerics5; new someGenerics5(4, () => null); new someGenerics5('', () => 3); new someGenerics5('', (x: string) => ''); // Error @@ -102,7 +102,7 @@ typeArgumentInferenceConstructSignatures.ts(122,74): error TS2353: Object litera interface someGenerics6 { new (a: (a: A) => A, b: (b: A) => A, c: (c: A) => A); } - var someGenerics6: someGenerics6; + declare var someGenerics6: someGenerics6; new someGenerics6(n => n, n => n, n => n); new someGenerics6(n => n, n => n, n => n); new someGenerics6((n: number) => n, (n: string) => n, (n: number) => n); // Error @@ -116,7 +116,7 @@ typeArgumentInferenceConstructSignatures.ts(122,74): error TS2353: Object litera interface someGenerics7 { new (a: (a: A) => A, b: (b: B) => B, c: (c: C) => C); } - var someGenerics7: someGenerics7; + declare var someGenerics7: someGenerics7; new someGenerics7(n => n, n => n, n => n); new someGenerics7(n => n, n => n, n => n); new someGenerics7((n: number) => n, (n: string) => n, (n: number) => n); @@ -125,7 +125,7 @@ typeArgumentInferenceConstructSignatures.ts(122,74): error TS2353: Object litera interface someGenerics8 { new (n: T): T; } - var someGenerics8: someGenerics8; + declare var someGenerics8: someGenerics8; var x = new someGenerics8(someGenerics7); new x(null, null, null); @@ -133,16 +133,16 @@ typeArgumentInferenceConstructSignatures.ts(122,74): error TS2353: Object litera interface someGenerics9 { new (a: T, b: T, c: T): T; } - var someGenerics9: someGenerics9; + declare var someGenerics9: someGenerics9; var a9a = new someGenerics9('', 0, []); ~ !!! error TS2345: Argument of type '0' is not assignable to parameter of type '""'. - var a9a: {}; - ~~~ + declare var a9a: {}; + ~~~ !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a9a' must be of type 'string', but here has type '{}'. !!! related TS6203 typeArgumentInferenceConstructSignatures.ts:106:5: 'a9a' was also declared here. var a9b = new someGenerics9<{ a?: number; b?: string; }>({ a: 0 }, { b: '' }, null); - var a9b: { a?: number; b?: string; }; + declare var a9b: { a?: number; b?: string; }; // Generic call with multiple parameters of generic type passed arguments with multiple best common types interface A91 { @@ -154,26 +154,26 @@ typeArgumentInferenceConstructSignatures.ts(122,74): error TS2353: Object litera z?: Window; } var a9e = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }); - var a9e: {}; - ~~~ + declare var a9e: {}; + ~~~ !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' must be of type '{ x: number; z: Window & typeof globalThis; y?: undefined; } | { x: number; y: string; z?: undefined; }', but here has type '{}'. !!! related TS6203 typeArgumentInferenceConstructSignatures.ts:120:5: 'a9e' was also declared here. var a9f = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }); ~ !!! error TS2353: Object literal may only specify known properties, and 'y' does not exist in type 'A92'. - var a9f: A92; + declare var a9f: A92; // Generic call with multiple parameters of generic type passed arguments with a single best common type var a9d = new someGenerics9({ x: 3 }, { x: 6 }, { x: 6 }); - var a9d: { x: number; }; + declare var a9d: { x: number; }; // Generic call with multiple parameters of generic type where one argument is of type 'any' - var anyVar: any; + declare var anyVar: any; var a = new someGenerics9(7, anyVar, 4); - var a: any; + declare var a: any; // Generic call with multiple parameters of generic type where one argument is [] and the other is not 'any' var arr = new someGenerics9([], null, undefined); - var arr: any[]; + declare var arr: any[]; \ No newline at end of file diff --git a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.js b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.js index 477d8780dfc3d..44cb8cda02ae6 100644 --- a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.js +++ b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.js @@ -5,7 +5,7 @@ interface NoParams { new (); } -var noParams: NoParams; +declare var noParams: NoParams; new noParams(); new noParams(); new noParams<{}>(); @@ -14,7 +14,7 @@ new noParams<{}>(); interface noGenericParams { new (n: string); } -var noGenericParams: noGenericParams; +declare var noGenericParams: noGenericParams; new noGenericParams(''); new noGenericParams(''); new noGenericParams<{}>(''); @@ -23,7 +23,7 @@ new noGenericParams<{}>(''); interface someGenerics1 { new (n: T, m: number); } -var someGenerics1: someGenerics1; +declare var someGenerics1: someGenerics1; new someGenerics1(3, 4); new someGenerics1(3, 4); // Error new someGenerics1(3, 4); @@ -32,7 +32,7 @@ new someGenerics1(3, 4); interface someGenerics2a { new (n: (x: T) => void); } -var someGenerics2a: someGenerics2a; +declare var someGenerics2a: someGenerics2a; new someGenerics2a((n: string) => n); new someGenerics2a((n: string) => n); new someGenerics2a((n) => n.substr(0)); @@ -40,7 +40,7 @@ new someGenerics2a((n) => n.substr(0)); interface someGenerics2b { new (n: (x: T, y: U) => void); } -var someGenerics2b: someGenerics2b; +declare var someGenerics2b: someGenerics2b; new someGenerics2b((n: string, x: number) => n); new someGenerics2b((n: string, t: number) => n); new someGenerics2b((n, t) => n.substr(t * t)); @@ -49,7 +49,7 @@ new someGenerics2b((n, t) => n.substr(t * t)); interface someGenerics3 { new (producer: () => T); } -var someGenerics3: someGenerics3; +declare var someGenerics3: someGenerics3; new someGenerics3(() => ''); new someGenerics3(() => undefined); new someGenerics3(() => 3); @@ -58,7 +58,7 @@ new someGenerics3(() => 3); interface someGenerics4 { new (n: T, f: (x: U) => void); } -var someGenerics4: someGenerics4; +declare var someGenerics4: someGenerics4; new someGenerics4(4, () => null); new someGenerics4('', () => 3); new someGenerics4('', (x: string) => ''); // Error @@ -68,7 +68,7 @@ new someGenerics4(null, null); interface someGenerics5 { new (n: T, f: (x: U) => void); } -var someGenerics5: someGenerics5; +declare var someGenerics5: someGenerics5; new someGenerics5(4, () => null); new someGenerics5('', () => 3); new someGenerics5('', (x: string) => ''); // Error @@ -78,7 +78,7 @@ new someGenerics5(null, null); interface someGenerics6 { new (a: (a: A) => A, b: (b: A) => A, c: (c: A) => A); } -var someGenerics6: someGenerics6; +declare var someGenerics6: someGenerics6; new someGenerics6(n => n, n => n, n => n); new someGenerics6(n => n, n => n, n => n); new someGenerics6((n: number) => n, (n: string) => n, (n: number) => n); // Error @@ -88,7 +88,7 @@ new someGenerics6((n: number) => n, (n: number) => n, (n: number) => n); interface someGenerics7 { new (a: (a: A) => A, b: (b: B) => B, c: (c: C) => C); } -var someGenerics7: someGenerics7; +declare var someGenerics7: someGenerics7; new someGenerics7(n => n, n => n, n => n); new someGenerics7(n => n, n => n, n => n); new someGenerics7((n: number) => n, (n: string) => n, (n: number) => n); @@ -97,7 +97,7 @@ new someGenerics7((n: number) => n, (n: string) => n, (n interface someGenerics8 { new (n: T): T; } -var someGenerics8: someGenerics8; +declare var someGenerics8: someGenerics8; var x = new someGenerics8(someGenerics7); new x(null, null, null); @@ -105,11 +105,11 @@ new x(null, null, null); interface someGenerics9 { new (a: T, b: T, c: T): T; } -var someGenerics9: someGenerics9; +declare var someGenerics9: someGenerics9; var a9a = new someGenerics9('', 0, []); -var a9a: {}; +declare var a9a: {}; var a9b = new someGenerics9<{ a?: number; b?: string; }>({ a: 0 }, { b: '' }, null); -var a9b: { a?: number; b?: string; }; +declare var a9b: { a?: number; b?: string; }; // Generic call with multiple parameters of generic type passed arguments with multiple best common types interface A91 { @@ -121,88 +121,67 @@ interface A92 { z?: Window; } var a9e = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }); -var a9e: {}; +declare var a9e: {}; var a9f = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }); -var a9f: A92; +declare var a9f: A92; // Generic call with multiple parameters of generic type passed arguments with a single best common type var a9d = new someGenerics9({ x: 3 }, { x: 6 }, { x: 6 }); -var a9d: { x: number; }; +declare var a9d: { x: number; }; // Generic call with multiple parameters of generic type where one argument is of type 'any' -var anyVar: any; +declare var anyVar: any; var a = new someGenerics9(7, anyVar, 4); -var a: any; +declare var a: any; // Generic call with multiple parameters of generic type where one argument is [] and the other is not 'any' var arr = new someGenerics9([], null, undefined); -var arr: any[]; +declare var arr: any[]; //// [typeArgumentInferenceConstructSignatures.js] -var noParams; new noParams(); new noParams(); new noParams(); -var noGenericParams; new noGenericParams(''); new noGenericParams(''); new noGenericParams(''); -var someGenerics1; new someGenerics1(3, 4); new someGenerics1(3, 4); // Error new someGenerics1(3, 4); -var someGenerics2a; new someGenerics2a(function (n) { return n; }); new someGenerics2a(function (n) { return n; }); new someGenerics2a(function (n) { return n.substr(0); }); -var someGenerics2b; new someGenerics2b(function (n, x) { return n; }); new someGenerics2b(function (n, t) { return n; }); new someGenerics2b(function (n, t) { return n.substr(t * t); }); -var someGenerics3; new someGenerics3(function () { return ''; }); new someGenerics3(function () { return undefined; }); new someGenerics3(function () { return 3; }); -var someGenerics4; new someGenerics4(4, function () { return null; }); new someGenerics4('', function () { return 3; }); new someGenerics4('', function (x) { return ''; }); // Error new someGenerics4(null, null); -var someGenerics5; new someGenerics5(4, function () { return null; }); new someGenerics5('', function () { return 3; }); new someGenerics5('', function (x) { return ''; }); // Error new someGenerics5(null, null); -var someGenerics6; new someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); new someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); new someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); // Error new someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); -var someGenerics7; new someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); new someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); new someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); -var someGenerics8; var x = new someGenerics8(someGenerics7); new x(null, null, null); -var someGenerics9; var a9a = new someGenerics9('', 0, []); -var a9a; var a9b = new someGenerics9({ a: 0 }, { b: '' }, null); -var a9b; var a9e = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }); -var a9e; var a9f = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }); -var a9f; // Generic call with multiple parameters of generic type passed arguments with a single best common type var a9d = new someGenerics9({ x: 3 }, { x: 6 }, { x: 6 }); -var a9d; -// Generic call with multiple parameters of generic type where one argument is of type 'any' -var anyVar; var a = new someGenerics9(7, anyVar, 4); -var a; // Generic call with multiple parameters of generic type where one argument is [] and the other is not 'any' var arr = new someGenerics9([], null, undefined); -var arr; diff --git a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.symbols b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.symbols index 72b35c7bed0b7..bd5154351b307 100644 --- a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.symbols +++ b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.symbols @@ -8,43 +8,43 @@ interface NoParams { new (); >T : Symbol(T, Decl(typeArgumentInferenceConstructSignatures.ts, 2, 9)) } -var noParams: NoParams; ->noParams : Symbol(noParams, Decl(typeArgumentInferenceConstructSignatures.ts, 4, 3)) +declare var noParams: NoParams; +>noParams : Symbol(noParams, Decl(typeArgumentInferenceConstructSignatures.ts, 4, 11)) >NoParams : Symbol(NoParams, Decl(typeArgumentInferenceConstructSignatures.ts, 0, 0)) new noParams(); ->noParams : Symbol(noParams, Decl(typeArgumentInferenceConstructSignatures.ts, 4, 3)) +>noParams : Symbol(noParams, Decl(typeArgumentInferenceConstructSignatures.ts, 4, 11)) new noParams(); ->noParams : Symbol(noParams, Decl(typeArgumentInferenceConstructSignatures.ts, 4, 3)) +>noParams : Symbol(noParams, Decl(typeArgumentInferenceConstructSignatures.ts, 4, 11)) new noParams<{}>(); ->noParams : Symbol(noParams, Decl(typeArgumentInferenceConstructSignatures.ts, 4, 3)) +>noParams : Symbol(noParams, Decl(typeArgumentInferenceConstructSignatures.ts, 4, 11)) // Generic call with parameters but none use type parameter type interface noGenericParams { ->noGenericParams : Symbol(noGenericParams, Decl(typeArgumentInferenceConstructSignatures.ts, 7, 19), Decl(typeArgumentInferenceConstructSignatures.ts, 13, 3)) +>noGenericParams : Symbol(noGenericParams, Decl(typeArgumentInferenceConstructSignatures.ts, 7, 19), Decl(typeArgumentInferenceConstructSignatures.ts, 13, 11)) new (n: string); >T : Symbol(T, Decl(typeArgumentInferenceConstructSignatures.ts, 11, 9)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 11, 12)) } -var noGenericParams: noGenericParams; ->noGenericParams : Symbol(noGenericParams, Decl(typeArgumentInferenceConstructSignatures.ts, 7, 19), Decl(typeArgumentInferenceConstructSignatures.ts, 13, 3)) ->noGenericParams : Symbol(noGenericParams, Decl(typeArgumentInferenceConstructSignatures.ts, 7, 19), Decl(typeArgumentInferenceConstructSignatures.ts, 13, 3)) +declare var noGenericParams: noGenericParams; +>noGenericParams : Symbol(noGenericParams, Decl(typeArgumentInferenceConstructSignatures.ts, 7, 19), Decl(typeArgumentInferenceConstructSignatures.ts, 13, 11)) +>noGenericParams : Symbol(noGenericParams, Decl(typeArgumentInferenceConstructSignatures.ts, 7, 19), Decl(typeArgumentInferenceConstructSignatures.ts, 13, 11)) new noGenericParams(''); ->noGenericParams : Symbol(noGenericParams, Decl(typeArgumentInferenceConstructSignatures.ts, 7, 19), Decl(typeArgumentInferenceConstructSignatures.ts, 13, 3)) +>noGenericParams : Symbol(noGenericParams, Decl(typeArgumentInferenceConstructSignatures.ts, 7, 19), Decl(typeArgumentInferenceConstructSignatures.ts, 13, 11)) new noGenericParams(''); ->noGenericParams : Symbol(noGenericParams, Decl(typeArgumentInferenceConstructSignatures.ts, 7, 19), Decl(typeArgumentInferenceConstructSignatures.ts, 13, 3)) +>noGenericParams : Symbol(noGenericParams, Decl(typeArgumentInferenceConstructSignatures.ts, 7, 19), Decl(typeArgumentInferenceConstructSignatures.ts, 13, 11)) new noGenericParams<{}>(''); ->noGenericParams : Symbol(noGenericParams, Decl(typeArgumentInferenceConstructSignatures.ts, 7, 19), Decl(typeArgumentInferenceConstructSignatures.ts, 13, 3)) +>noGenericParams : Symbol(noGenericParams, Decl(typeArgumentInferenceConstructSignatures.ts, 7, 19), Decl(typeArgumentInferenceConstructSignatures.ts, 13, 11)) // Generic call with multiple type parameters and only one used in parameter type annotation interface someGenerics1 { ->someGenerics1 : Symbol(someGenerics1, Decl(typeArgumentInferenceConstructSignatures.ts, 16, 28), Decl(typeArgumentInferenceConstructSignatures.ts, 22, 3)) +>someGenerics1 : Symbol(someGenerics1, Decl(typeArgumentInferenceConstructSignatures.ts, 16, 28), Decl(typeArgumentInferenceConstructSignatures.ts, 22, 11)) new (n: T, m: number); >T : Symbol(T, Decl(typeArgumentInferenceConstructSignatures.ts, 20, 9)) @@ -53,22 +53,22 @@ interface someGenerics1 { >T : Symbol(T, Decl(typeArgumentInferenceConstructSignatures.ts, 20, 9)) >m : Symbol(m, Decl(typeArgumentInferenceConstructSignatures.ts, 20, 20)) } -var someGenerics1: someGenerics1; ->someGenerics1 : Symbol(someGenerics1, Decl(typeArgumentInferenceConstructSignatures.ts, 16, 28), Decl(typeArgumentInferenceConstructSignatures.ts, 22, 3)) ->someGenerics1 : Symbol(someGenerics1, Decl(typeArgumentInferenceConstructSignatures.ts, 16, 28), Decl(typeArgumentInferenceConstructSignatures.ts, 22, 3)) +declare var someGenerics1: someGenerics1; +>someGenerics1 : Symbol(someGenerics1, Decl(typeArgumentInferenceConstructSignatures.ts, 16, 28), Decl(typeArgumentInferenceConstructSignatures.ts, 22, 11)) +>someGenerics1 : Symbol(someGenerics1, Decl(typeArgumentInferenceConstructSignatures.ts, 16, 28), Decl(typeArgumentInferenceConstructSignatures.ts, 22, 11)) new someGenerics1(3, 4); ->someGenerics1 : Symbol(someGenerics1, Decl(typeArgumentInferenceConstructSignatures.ts, 16, 28), Decl(typeArgumentInferenceConstructSignatures.ts, 22, 3)) +>someGenerics1 : Symbol(someGenerics1, Decl(typeArgumentInferenceConstructSignatures.ts, 16, 28), Decl(typeArgumentInferenceConstructSignatures.ts, 22, 11)) new someGenerics1(3, 4); // Error ->someGenerics1 : Symbol(someGenerics1, Decl(typeArgumentInferenceConstructSignatures.ts, 16, 28), Decl(typeArgumentInferenceConstructSignatures.ts, 22, 3)) +>someGenerics1 : Symbol(someGenerics1, Decl(typeArgumentInferenceConstructSignatures.ts, 16, 28), Decl(typeArgumentInferenceConstructSignatures.ts, 22, 11)) new someGenerics1(3, 4); ->someGenerics1 : Symbol(someGenerics1, Decl(typeArgumentInferenceConstructSignatures.ts, 16, 28), Decl(typeArgumentInferenceConstructSignatures.ts, 22, 3)) +>someGenerics1 : Symbol(someGenerics1, Decl(typeArgumentInferenceConstructSignatures.ts, 16, 28), Decl(typeArgumentInferenceConstructSignatures.ts, 22, 11)) // Generic call with argument of function type whose parameter is of type parameter type interface someGenerics2a { ->someGenerics2a : Symbol(someGenerics2a, Decl(typeArgumentInferenceConstructSignatures.ts, 25, 36), Decl(typeArgumentInferenceConstructSignatures.ts, 31, 3)) +>someGenerics2a : Symbol(someGenerics2a, Decl(typeArgumentInferenceConstructSignatures.ts, 25, 36), Decl(typeArgumentInferenceConstructSignatures.ts, 31, 11)) new (n: (x: T) => void); >T : Symbol(T, Decl(typeArgumentInferenceConstructSignatures.ts, 29, 9)) @@ -76,29 +76,29 @@ interface someGenerics2a { >x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 29, 16)) >T : Symbol(T, Decl(typeArgumentInferenceConstructSignatures.ts, 29, 9)) } -var someGenerics2a: someGenerics2a; ->someGenerics2a : Symbol(someGenerics2a, Decl(typeArgumentInferenceConstructSignatures.ts, 25, 36), Decl(typeArgumentInferenceConstructSignatures.ts, 31, 3)) ->someGenerics2a : Symbol(someGenerics2a, Decl(typeArgumentInferenceConstructSignatures.ts, 25, 36), Decl(typeArgumentInferenceConstructSignatures.ts, 31, 3)) +declare var someGenerics2a: someGenerics2a; +>someGenerics2a : Symbol(someGenerics2a, Decl(typeArgumentInferenceConstructSignatures.ts, 25, 36), Decl(typeArgumentInferenceConstructSignatures.ts, 31, 11)) +>someGenerics2a : Symbol(someGenerics2a, Decl(typeArgumentInferenceConstructSignatures.ts, 25, 36), Decl(typeArgumentInferenceConstructSignatures.ts, 31, 11)) new someGenerics2a((n: string) => n); ->someGenerics2a : Symbol(someGenerics2a, Decl(typeArgumentInferenceConstructSignatures.ts, 25, 36), Decl(typeArgumentInferenceConstructSignatures.ts, 31, 3)) +>someGenerics2a : Symbol(someGenerics2a, Decl(typeArgumentInferenceConstructSignatures.ts, 25, 36), Decl(typeArgumentInferenceConstructSignatures.ts, 31, 11)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 32, 20)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 32, 20)) new someGenerics2a((n: string) => n); ->someGenerics2a : Symbol(someGenerics2a, Decl(typeArgumentInferenceConstructSignatures.ts, 25, 36), Decl(typeArgumentInferenceConstructSignatures.ts, 31, 3)) +>someGenerics2a : Symbol(someGenerics2a, Decl(typeArgumentInferenceConstructSignatures.ts, 25, 36), Decl(typeArgumentInferenceConstructSignatures.ts, 31, 11)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 33, 28)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 33, 28)) new someGenerics2a((n) => n.substr(0)); ->someGenerics2a : Symbol(someGenerics2a, Decl(typeArgumentInferenceConstructSignatures.ts, 25, 36), Decl(typeArgumentInferenceConstructSignatures.ts, 31, 3)) +>someGenerics2a : Symbol(someGenerics2a, Decl(typeArgumentInferenceConstructSignatures.ts, 25, 36), Decl(typeArgumentInferenceConstructSignatures.ts, 31, 11)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 34, 28)) >n.substr : Symbol(String.substr, Decl(lib.es5.d.ts, --, --)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 34, 28)) >substr : Symbol(String.substr, Decl(lib.es5.d.ts, --, --)) interface someGenerics2b { ->someGenerics2b : Symbol(someGenerics2b, Decl(typeArgumentInferenceConstructSignatures.ts, 34, 47), Decl(typeArgumentInferenceConstructSignatures.ts, 39, 3)) +>someGenerics2b : Symbol(someGenerics2b, Decl(typeArgumentInferenceConstructSignatures.ts, 34, 47), Decl(typeArgumentInferenceConstructSignatures.ts, 39, 11)) new (n: (x: T, y: U) => void); >T : Symbol(T, Decl(typeArgumentInferenceConstructSignatures.ts, 37, 9)) @@ -109,24 +109,24 @@ interface someGenerics2b { >y : Symbol(y, Decl(typeArgumentInferenceConstructSignatures.ts, 37, 24)) >U : Symbol(U, Decl(typeArgumentInferenceConstructSignatures.ts, 37, 11)) } -var someGenerics2b: someGenerics2b; ->someGenerics2b : Symbol(someGenerics2b, Decl(typeArgumentInferenceConstructSignatures.ts, 34, 47), Decl(typeArgumentInferenceConstructSignatures.ts, 39, 3)) ->someGenerics2b : Symbol(someGenerics2b, Decl(typeArgumentInferenceConstructSignatures.ts, 34, 47), Decl(typeArgumentInferenceConstructSignatures.ts, 39, 3)) +declare var someGenerics2b: someGenerics2b; +>someGenerics2b : Symbol(someGenerics2b, Decl(typeArgumentInferenceConstructSignatures.ts, 34, 47), Decl(typeArgumentInferenceConstructSignatures.ts, 39, 11)) +>someGenerics2b : Symbol(someGenerics2b, Decl(typeArgumentInferenceConstructSignatures.ts, 34, 47), Decl(typeArgumentInferenceConstructSignatures.ts, 39, 11)) new someGenerics2b((n: string, x: number) => n); ->someGenerics2b : Symbol(someGenerics2b, Decl(typeArgumentInferenceConstructSignatures.ts, 34, 47), Decl(typeArgumentInferenceConstructSignatures.ts, 39, 3)) +>someGenerics2b : Symbol(someGenerics2b, Decl(typeArgumentInferenceConstructSignatures.ts, 34, 47), Decl(typeArgumentInferenceConstructSignatures.ts, 39, 11)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 40, 20)) >x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 40, 30)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 40, 20)) new someGenerics2b((n: string, t: number) => n); ->someGenerics2b : Symbol(someGenerics2b, Decl(typeArgumentInferenceConstructSignatures.ts, 34, 47), Decl(typeArgumentInferenceConstructSignatures.ts, 39, 3)) +>someGenerics2b : Symbol(someGenerics2b, Decl(typeArgumentInferenceConstructSignatures.ts, 34, 47), Decl(typeArgumentInferenceConstructSignatures.ts, 39, 11)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 41, 36)) >t : Symbol(t, Decl(typeArgumentInferenceConstructSignatures.ts, 41, 46)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 41, 36)) new someGenerics2b((n, t) => n.substr(t * t)); ->someGenerics2b : Symbol(someGenerics2b, Decl(typeArgumentInferenceConstructSignatures.ts, 34, 47), Decl(typeArgumentInferenceConstructSignatures.ts, 39, 3)) +>someGenerics2b : Symbol(someGenerics2b, Decl(typeArgumentInferenceConstructSignatures.ts, 34, 47), Decl(typeArgumentInferenceConstructSignatures.ts, 39, 11)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 42, 36)) >t : Symbol(t, Decl(typeArgumentInferenceConstructSignatures.ts, 42, 38)) >n.substr : Symbol(String.substr, Decl(lib.es5.d.ts, --, --)) @@ -137,31 +137,31 @@ new someGenerics2b((n, t) => n.substr(t * t)); // Generic call with argument of function type whose parameter is not of type parameter type but body/return type uses type parameter interface someGenerics3 { ->someGenerics3 : Symbol(someGenerics3, Decl(typeArgumentInferenceConstructSignatures.ts, 42, 62), Decl(typeArgumentInferenceConstructSignatures.ts, 48, 3)) +>someGenerics3 : Symbol(someGenerics3, Decl(typeArgumentInferenceConstructSignatures.ts, 42, 62), Decl(typeArgumentInferenceConstructSignatures.ts, 48, 11)) new (producer: () => T); >T : Symbol(T, Decl(typeArgumentInferenceConstructSignatures.ts, 46, 9)) >producer : Symbol(producer, Decl(typeArgumentInferenceConstructSignatures.ts, 46, 12)) >T : Symbol(T, Decl(typeArgumentInferenceConstructSignatures.ts, 46, 9)) } -var someGenerics3: someGenerics3; ->someGenerics3 : Symbol(someGenerics3, Decl(typeArgumentInferenceConstructSignatures.ts, 42, 62), Decl(typeArgumentInferenceConstructSignatures.ts, 48, 3)) ->someGenerics3 : Symbol(someGenerics3, Decl(typeArgumentInferenceConstructSignatures.ts, 42, 62), Decl(typeArgumentInferenceConstructSignatures.ts, 48, 3)) +declare var someGenerics3: someGenerics3; +>someGenerics3 : Symbol(someGenerics3, Decl(typeArgumentInferenceConstructSignatures.ts, 42, 62), Decl(typeArgumentInferenceConstructSignatures.ts, 48, 11)) +>someGenerics3 : Symbol(someGenerics3, Decl(typeArgumentInferenceConstructSignatures.ts, 42, 62), Decl(typeArgumentInferenceConstructSignatures.ts, 48, 11)) new someGenerics3(() => ''); ->someGenerics3 : Symbol(someGenerics3, Decl(typeArgumentInferenceConstructSignatures.ts, 42, 62), Decl(typeArgumentInferenceConstructSignatures.ts, 48, 3)) +>someGenerics3 : Symbol(someGenerics3, Decl(typeArgumentInferenceConstructSignatures.ts, 42, 62), Decl(typeArgumentInferenceConstructSignatures.ts, 48, 11)) new someGenerics3(() => undefined); ->someGenerics3 : Symbol(someGenerics3, Decl(typeArgumentInferenceConstructSignatures.ts, 42, 62), Decl(typeArgumentInferenceConstructSignatures.ts, 48, 3)) +>someGenerics3 : Symbol(someGenerics3, Decl(typeArgumentInferenceConstructSignatures.ts, 42, 62), Decl(typeArgumentInferenceConstructSignatures.ts, 48, 11)) >Window : Symbol(Window, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) >undefined : Symbol(undefined) new someGenerics3(() => 3); ->someGenerics3 : Symbol(someGenerics3, Decl(typeArgumentInferenceConstructSignatures.ts, 42, 62), Decl(typeArgumentInferenceConstructSignatures.ts, 48, 3)) +>someGenerics3 : Symbol(someGenerics3, Decl(typeArgumentInferenceConstructSignatures.ts, 42, 62), Decl(typeArgumentInferenceConstructSignatures.ts, 48, 11)) // 2 parameter generic call with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type interface someGenerics4 { ->someGenerics4 : Symbol(someGenerics4, Decl(typeArgumentInferenceConstructSignatures.ts, 51, 35), Decl(typeArgumentInferenceConstructSignatures.ts, 57, 3)) +>someGenerics4 : Symbol(someGenerics4, Decl(typeArgumentInferenceConstructSignatures.ts, 51, 35), Decl(typeArgumentInferenceConstructSignatures.ts, 57, 11)) new (n: T, f: (x: U) => void); >T : Symbol(T, Decl(typeArgumentInferenceConstructSignatures.ts, 55, 9)) @@ -172,26 +172,26 @@ interface someGenerics4 { >x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 55, 25)) >U : Symbol(U, Decl(typeArgumentInferenceConstructSignatures.ts, 55, 11)) } -var someGenerics4: someGenerics4; ->someGenerics4 : Symbol(someGenerics4, Decl(typeArgumentInferenceConstructSignatures.ts, 51, 35), Decl(typeArgumentInferenceConstructSignatures.ts, 57, 3)) ->someGenerics4 : Symbol(someGenerics4, Decl(typeArgumentInferenceConstructSignatures.ts, 51, 35), Decl(typeArgumentInferenceConstructSignatures.ts, 57, 3)) +declare var someGenerics4: someGenerics4; +>someGenerics4 : Symbol(someGenerics4, Decl(typeArgumentInferenceConstructSignatures.ts, 51, 35), Decl(typeArgumentInferenceConstructSignatures.ts, 57, 11)) +>someGenerics4 : Symbol(someGenerics4, Decl(typeArgumentInferenceConstructSignatures.ts, 51, 35), Decl(typeArgumentInferenceConstructSignatures.ts, 57, 11)) new someGenerics4(4, () => null); ->someGenerics4 : Symbol(someGenerics4, Decl(typeArgumentInferenceConstructSignatures.ts, 51, 35), Decl(typeArgumentInferenceConstructSignatures.ts, 57, 3)) +>someGenerics4 : Symbol(someGenerics4, Decl(typeArgumentInferenceConstructSignatures.ts, 51, 35), Decl(typeArgumentInferenceConstructSignatures.ts, 57, 11)) new someGenerics4('', () => 3); ->someGenerics4 : Symbol(someGenerics4, Decl(typeArgumentInferenceConstructSignatures.ts, 51, 35), Decl(typeArgumentInferenceConstructSignatures.ts, 57, 3)) +>someGenerics4 : Symbol(someGenerics4, Decl(typeArgumentInferenceConstructSignatures.ts, 51, 35), Decl(typeArgumentInferenceConstructSignatures.ts, 57, 11)) new someGenerics4('', (x: string) => ''); // Error ->someGenerics4 : Symbol(someGenerics4, Decl(typeArgumentInferenceConstructSignatures.ts, 51, 35), Decl(typeArgumentInferenceConstructSignatures.ts, 57, 3)) +>someGenerics4 : Symbol(someGenerics4, Decl(typeArgumentInferenceConstructSignatures.ts, 51, 35), Decl(typeArgumentInferenceConstructSignatures.ts, 57, 11)) >x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 60, 39)) new someGenerics4(null, null); ->someGenerics4 : Symbol(someGenerics4, Decl(typeArgumentInferenceConstructSignatures.ts, 51, 35), Decl(typeArgumentInferenceConstructSignatures.ts, 57, 3)) +>someGenerics4 : Symbol(someGenerics4, Decl(typeArgumentInferenceConstructSignatures.ts, 51, 35), Decl(typeArgumentInferenceConstructSignatures.ts, 57, 11)) // 2 parameter generic call with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type interface someGenerics5 { ->someGenerics5 : Symbol(someGenerics5, Decl(typeArgumentInferenceConstructSignatures.ts, 61, 46), Decl(typeArgumentInferenceConstructSignatures.ts, 67, 3)) +>someGenerics5 : Symbol(someGenerics5, Decl(typeArgumentInferenceConstructSignatures.ts, 61, 46), Decl(typeArgumentInferenceConstructSignatures.ts, 67, 11)) new (n: T, f: (x: U) => void); >U : Symbol(U, Decl(typeArgumentInferenceConstructSignatures.ts, 65, 9)) @@ -202,26 +202,26 @@ interface someGenerics5 { >x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 65, 25)) >U : Symbol(U, Decl(typeArgumentInferenceConstructSignatures.ts, 65, 9)) } -var someGenerics5: someGenerics5; ->someGenerics5 : Symbol(someGenerics5, Decl(typeArgumentInferenceConstructSignatures.ts, 61, 46), Decl(typeArgumentInferenceConstructSignatures.ts, 67, 3)) ->someGenerics5 : Symbol(someGenerics5, Decl(typeArgumentInferenceConstructSignatures.ts, 61, 46), Decl(typeArgumentInferenceConstructSignatures.ts, 67, 3)) +declare var someGenerics5: someGenerics5; +>someGenerics5 : Symbol(someGenerics5, Decl(typeArgumentInferenceConstructSignatures.ts, 61, 46), Decl(typeArgumentInferenceConstructSignatures.ts, 67, 11)) +>someGenerics5 : Symbol(someGenerics5, Decl(typeArgumentInferenceConstructSignatures.ts, 61, 46), Decl(typeArgumentInferenceConstructSignatures.ts, 67, 11)) new someGenerics5(4, () => null); ->someGenerics5 : Symbol(someGenerics5, Decl(typeArgumentInferenceConstructSignatures.ts, 61, 46), Decl(typeArgumentInferenceConstructSignatures.ts, 67, 3)) +>someGenerics5 : Symbol(someGenerics5, Decl(typeArgumentInferenceConstructSignatures.ts, 61, 46), Decl(typeArgumentInferenceConstructSignatures.ts, 67, 11)) new someGenerics5('', () => 3); ->someGenerics5 : Symbol(someGenerics5, Decl(typeArgumentInferenceConstructSignatures.ts, 61, 46), Decl(typeArgumentInferenceConstructSignatures.ts, 67, 3)) +>someGenerics5 : Symbol(someGenerics5, Decl(typeArgumentInferenceConstructSignatures.ts, 61, 46), Decl(typeArgumentInferenceConstructSignatures.ts, 67, 11)) new someGenerics5('', (x: string) => ''); // Error ->someGenerics5 : Symbol(someGenerics5, Decl(typeArgumentInferenceConstructSignatures.ts, 61, 46), Decl(typeArgumentInferenceConstructSignatures.ts, 67, 3)) +>someGenerics5 : Symbol(someGenerics5, Decl(typeArgumentInferenceConstructSignatures.ts, 61, 46), Decl(typeArgumentInferenceConstructSignatures.ts, 67, 11)) >x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 70, 39)) new someGenerics5(null, null); ->someGenerics5 : Symbol(someGenerics5, Decl(typeArgumentInferenceConstructSignatures.ts, 61, 46), Decl(typeArgumentInferenceConstructSignatures.ts, 67, 3)) +>someGenerics5 : Symbol(someGenerics5, Decl(typeArgumentInferenceConstructSignatures.ts, 61, 46), Decl(typeArgumentInferenceConstructSignatures.ts, 67, 11)) // Generic call with multiple arguments of function types that each have parameters of the same generic type interface someGenerics6 { ->someGenerics6 : Symbol(someGenerics6, Decl(typeArgumentInferenceConstructSignatures.ts, 71, 46), Decl(typeArgumentInferenceConstructSignatures.ts, 77, 3)) +>someGenerics6 : Symbol(someGenerics6, Decl(typeArgumentInferenceConstructSignatures.ts, 71, 46), Decl(typeArgumentInferenceConstructSignatures.ts, 77, 11)) new (a: (a: A) => A, b: (b: A) => A, c: (c: A) => A); >A : Symbol(A, Decl(typeArgumentInferenceConstructSignatures.ts, 75, 9)) @@ -238,12 +238,12 @@ interface someGenerics6 { >A : Symbol(A, Decl(typeArgumentInferenceConstructSignatures.ts, 75, 9)) >A : Symbol(A, Decl(typeArgumentInferenceConstructSignatures.ts, 75, 9)) } -var someGenerics6: someGenerics6; ->someGenerics6 : Symbol(someGenerics6, Decl(typeArgumentInferenceConstructSignatures.ts, 71, 46), Decl(typeArgumentInferenceConstructSignatures.ts, 77, 3)) ->someGenerics6 : Symbol(someGenerics6, Decl(typeArgumentInferenceConstructSignatures.ts, 71, 46), Decl(typeArgumentInferenceConstructSignatures.ts, 77, 3)) +declare var someGenerics6: someGenerics6; +>someGenerics6 : Symbol(someGenerics6, Decl(typeArgumentInferenceConstructSignatures.ts, 71, 46), Decl(typeArgumentInferenceConstructSignatures.ts, 77, 11)) +>someGenerics6 : Symbol(someGenerics6, Decl(typeArgumentInferenceConstructSignatures.ts, 71, 46), Decl(typeArgumentInferenceConstructSignatures.ts, 77, 11)) new someGenerics6(n => n, n => n, n => n); ->someGenerics6 : Symbol(someGenerics6, Decl(typeArgumentInferenceConstructSignatures.ts, 71, 46), Decl(typeArgumentInferenceConstructSignatures.ts, 77, 3)) +>someGenerics6 : Symbol(someGenerics6, Decl(typeArgumentInferenceConstructSignatures.ts, 71, 46), Decl(typeArgumentInferenceConstructSignatures.ts, 77, 11)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 78, 18)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 78, 18)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 78, 25)) @@ -252,7 +252,7 @@ new someGenerics6(n => n, n => n, n => n); >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 78, 33)) new someGenerics6(n => n, n => n, n => n); ->someGenerics6 : Symbol(someGenerics6, Decl(typeArgumentInferenceConstructSignatures.ts, 71, 46), Decl(typeArgumentInferenceConstructSignatures.ts, 77, 3)) +>someGenerics6 : Symbol(someGenerics6, Decl(typeArgumentInferenceConstructSignatures.ts, 71, 46), Decl(typeArgumentInferenceConstructSignatures.ts, 77, 11)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 79, 26)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 79, 26)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 79, 33)) @@ -261,7 +261,7 @@ new someGenerics6(n => n, n => n, n => n); >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 79, 41)) new someGenerics6((n: number) => n, (n: string) => n, (n: number) => n); // Error ->someGenerics6 : Symbol(someGenerics6, Decl(typeArgumentInferenceConstructSignatures.ts, 71, 46), Decl(typeArgumentInferenceConstructSignatures.ts, 77, 3)) +>someGenerics6 : Symbol(someGenerics6, Decl(typeArgumentInferenceConstructSignatures.ts, 71, 46), Decl(typeArgumentInferenceConstructSignatures.ts, 77, 11)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 80, 27)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 80, 27)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 80, 45)) @@ -270,7 +270,7 @@ new someGenerics6((n: number) => n, (n: string) => n, (n: number) => n); >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 80, 63)) new someGenerics6((n: number) => n, (n: number) => n, (n: number) => n); ->someGenerics6 : Symbol(someGenerics6, Decl(typeArgumentInferenceConstructSignatures.ts, 71, 46), Decl(typeArgumentInferenceConstructSignatures.ts, 77, 3)) +>someGenerics6 : Symbol(someGenerics6, Decl(typeArgumentInferenceConstructSignatures.ts, 71, 46), Decl(typeArgumentInferenceConstructSignatures.ts, 77, 11)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 81, 27)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 81, 27)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 81, 45)) @@ -280,7 +280,7 @@ new someGenerics6((n: number) => n, (n: number) => n, (n: number) => n); // Generic call with multiple arguments of function types that each have parameters of different generic type interface someGenerics7 { ->someGenerics7 : Symbol(someGenerics7, Decl(typeArgumentInferenceConstructSignatures.ts, 81, 80), Decl(typeArgumentInferenceConstructSignatures.ts, 87, 3)) +>someGenerics7 : Symbol(someGenerics7, Decl(typeArgumentInferenceConstructSignatures.ts, 81, 80), Decl(typeArgumentInferenceConstructSignatures.ts, 87, 11)) new (a: (a: A) => A, b: (b: B) => B, c: (c: C) => C); >A : Symbol(A, Decl(typeArgumentInferenceConstructSignatures.ts, 85, 9)) @@ -299,12 +299,12 @@ interface someGenerics7 { >C : Symbol(C, Decl(typeArgumentInferenceConstructSignatures.ts, 85, 14)) >C : Symbol(C, Decl(typeArgumentInferenceConstructSignatures.ts, 85, 14)) } -var someGenerics7: someGenerics7; ->someGenerics7 : Symbol(someGenerics7, Decl(typeArgumentInferenceConstructSignatures.ts, 81, 80), Decl(typeArgumentInferenceConstructSignatures.ts, 87, 3)) ->someGenerics7 : Symbol(someGenerics7, Decl(typeArgumentInferenceConstructSignatures.ts, 81, 80), Decl(typeArgumentInferenceConstructSignatures.ts, 87, 3)) +declare var someGenerics7: someGenerics7; +>someGenerics7 : Symbol(someGenerics7, Decl(typeArgumentInferenceConstructSignatures.ts, 81, 80), Decl(typeArgumentInferenceConstructSignatures.ts, 87, 11)) +>someGenerics7 : Symbol(someGenerics7, Decl(typeArgumentInferenceConstructSignatures.ts, 81, 80), Decl(typeArgumentInferenceConstructSignatures.ts, 87, 11)) new someGenerics7(n => n, n => n, n => n); ->someGenerics7 : Symbol(someGenerics7, Decl(typeArgumentInferenceConstructSignatures.ts, 81, 80), Decl(typeArgumentInferenceConstructSignatures.ts, 87, 3)) +>someGenerics7 : Symbol(someGenerics7, Decl(typeArgumentInferenceConstructSignatures.ts, 81, 80), Decl(typeArgumentInferenceConstructSignatures.ts, 87, 11)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 88, 18)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 88, 18)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 88, 25)) @@ -313,7 +313,7 @@ new someGenerics7(n => n, n => n, n => n); >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 88, 33)) new someGenerics7(n => n, n => n, n => n); ->someGenerics7 : Symbol(someGenerics7, Decl(typeArgumentInferenceConstructSignatures.ts, 81, 80), Decl(typeArgumentInferenceConstructSignatures.ts, 87, 3)) +>someGenerics7 : Symbol(someGenerics7, Decl(typeArgumentInferenceConstructSignatures.ts, 81, 80), Decl(typeArgumentInferenceConstructSignatures.ts, 87, 11)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 89, 42)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 89, 42)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 89, 49)) @@ -322,7 +322,7 @@ new someGenerics7(n => n, n => n, n => n); >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 89, 57)) new someGenerics7((n: number) => n, (n: string) => n, (n: number) => n); ->someGenerics7 : Symbol(someGenerics7, Decl(typeArgumentInferenceConstructSignatures.ts, 81, 80), Decl(typeArgumentInferenceConstructSignatures.ts, 87, 3)) +>someGenerics7 : Symbol(someGenerics7, Decl(typeArgumentInferenceConstructSignatures.ts, 81, 80), Decl(typeArgumentInferenceConstructSignatures.ts, 87, 11)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 90, 43)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 90, 43)) >n : Symbol(n, Decl(typeArgumentInferenceConstructSignatures.ts, 90, 61)) @@ -332,7 +332,7 @@ new someGenerics7((n: number) => n, (n: string) => n, (n // Generic call with argument of generic function type interface someGenerics8 { ->someGenerics8 : Symbol(someGenerics8, Decl(typeArgumentInferenceConstructSignatures.ts, 90, 96), Decl(typeArgumentInferenceConstructSignatures.ts, 96, 3)) +>someGenerics8 : Symbol(someGenerics8, Decl(typeArgumentInferenceConstructSignatures.ts, 90, 96), Decl(typeArgumentInferenceConstructSignatures.ts, 96, 11)) new (n: T): T; >T : Symbol(T, Decl(typeArgumentInferenceConstructSignatures.ts, 94, 9)) @@ -340,21 +340,21 @@ interface someGenerics8 { >T : Symbol(T, Decl(typeArgumentInferenceConstructSignatures.ts, 94, 9)) >T : Symbol(T, Decl(typeArgumentInferenceConstructSignatures.ts, 94, 9)) } -var someGenerics8: someGenerics8; ->someGenerics8 : Symbol(someGenerics8, Decl(typeArgumentInferenceConstructSignatures.ts, 90, 96), Decl(typeArgumentInferenceConstructSignatures.ts, 96, 3)) ->someGenerics8 : Symbol(someGenerics8, Decl(typeArgumentInferenceConstructSignatures.ts, 90, 96), Decl(typeArgumentInferenceConstructSignatures.ts, 96, 3)) +declare var someGenerics8: someGenerics8; +>someGenerics8 : Symbol(someGenerics8, Decl(typeArgumentInferenceConstructSignatures.ts, 90, 96), Decl(typeArgumentInferenceConstructSignatures.ts, 96, 11)) +>someGenerics8 : Symbol(someGenerics8, Decl(typeArgumentInferenceConstructSignatures.ts, 90, 96), Decl(typeArgumentInferenceConstructSignatures.ts, 96, 11)) var x = new someGenerics8(someGenerics7); >x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 97, 3)) ->someGenerics8 : Symbol(someGenerics8, Decl(typeArgumentInferenceConstructSignatures.ts, 90, 96), Decl(typeArgumentInferenceConstructSignatures.ts, 96, 3)) ->someGenerics7 : Symbol(someGenerics7, Decl(typeArgumentInferenceConstructSignatures.ts, 81, 80), Decl(typeArgumentInferenceConstructSignatures.ts, 87, 3)) +>someGenerics8 : Symbol(someGenerics8, Decl(typeArgumentInferenceConstructSignatures.ts, 90, 96), Decl(typeArgumentInferenceConstructSignatures.ts, 96, 11)) +>someGenerics7 : Symbol(someGenerics7, Decl(typeArgumentInferenceConstructSignatures.ts, 81, 80), Decl(typeArgumentInferenceConstructSignatures.ts, 87, 11)) new x(null, null, null); >x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 97, 3)) // Generic call with multiple parameters of generic type passed arguments with no best common type interface someGenerics9 { ->someGenerics9 : Symbol(someGenerics9, Decl(typeArgumentInferenceConstructSignatures.ts, 98, 48), Decl(typeArgumentInferenceConstructSignatures.ts, 104, 3)) +>someGenerics9 : Symbol(someGenerics9, Decl(typeArgumentInferenceConstructSignatures.ts, 98, 48), Decl(typeArgumentInferenceConstructSignatures.ts, 104, 11)) new (a: T, b: T, c: T): T; >T : Symbol(T, Decl(typeArgumentInferenceConstructSignatures.ts, 102, 9)) @@ -366,33 +366,33 @@ interface someGenerics9 { >T : Symbol(T, Decl(typeArgumentInferenceConstructSignatures.ts, 102, 9)) >T : Symbol(T, Decl(typeArgumentInferenceConstructSignatures.ts, 102, 9)) } -var someGenerics9: someGenerics9; ->someGenerics9 : Symbol(someGenerics9, Decl(typeArgumentInferenceConstructSignatures.ts, 98, 48), Decl(typeArgumentInferenceConstructSignatures.ts, 104, 3)) ->someGenerics9 : Symbol(someGenerics9, Decl(typeArgumentInferenceConstructSignatures.ts, 98, 48), Decl(typeArgumentInferenceConstructSignatures.ts, 104, 3)) +declare var someGenerics9: someGenerics9; +>someGenerics9 : Symbol(someGenerics9, Decl(typeArgumentInferenceConstructSignatures.ts, 98, 48), Decl(typeArgumentInferenceConstructSignatures.ts, 104, 11)) +>someGenerics9 : Symbol(someGenerics9, Decl(typeArgumentInferenceConstructSignatures.ts, 98, 48), Decl(typeArgumentInferenceConstructSignatures.ts, 104, 11)) var a9a = new someGenerics9('', 0, []); ->a9a : Symbol(a9a, Decl(typeArgumentInferenceConstructSignatures.ts, 105, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 106, 3)) ->someGenerics9 : Symbol(someGenerics9, Decl(typeArgumentInferenceConstructSignatures.ts, 98, 48), Decl(typeArgumentInferenceConstructSignatures.ts, 104, 3)) +>a9a : Symbol(a9a, Decl(typeArgumentInferenceConstructSignatures.ts, 105, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 106, 11)) +>someGenerics9 : Symbol(someGenerics9, Decl(typeArgumentInferenceConstructSignatures.ts, 98, 48), Decl(typeArgumentInferenceConstructSignatures.ts, 104, 11)) -var a9a: {}; ->a9a : Symbol(a9a, Decl(typeArgumentInferenceConstructSignatures.ts, 105, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 106, 3)) +declare var a9a: {}; +>a9a : Symbol(a9a, Decl(typeArgumentInferenceConstructSignatures.ts, 105, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 106, 11)) var a9b = new someGenerics9<{ a?: number; b?: string; }>({ a: 0 }, { b: '' }, null); ->a9b : Symbol(a9b, Decl(typeArgumentInferenceConstructSignatures.ts, 107, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 108, 3)) ->someGenerics9 : Symbol(someGenerics9, Decl(typeArgumentInferenceConstructSignatures.ts, 98, 48), Decl(typeArgumentInferenceConstructSignatures.ts, 104, 3)) +>a9b : Symbol(a9b, Decl(typeArgumentInferenceConstructSignatures.ts, 107, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 108, 11)) +>someGenerics9 : Symbol(someGenerics9, Decl(typeArgumentInferenceConstructSignatures.ts, 98, 48), Decl(typeArgumentInferenceConstructSignatures.ts, 104, 11)) >a : Symbol(a, Decl(typeArgumentInferenceConstructSignatures.ts, 107, 29)) >b : Symbol(b, Decl(typeArgumentInferenceConstructSignatures.ts, 107, 41)) >a : Symbol(a, Decl(typeArgumentInferenceConstructSignatures.ts, 107, 58)) >b : Symbol(b, Decl(typeArgumentInferenceConstructSignatures.ts, 107, 68)) -var a9b: { a?: number; b?: string; }; ->a9b : Symbol(a9b, Decl(typeArgumentInferenceConstructSignatures.ts, 107, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 108, 3)) ->a : Symbol(a, Decl(typeArgumentInferenceConstructSignatures.ts, 108, 10)) ->b : Symbol(b, Decl(typeArgumentInferenceConstructSignatures.ts, 108, 22)) +declare var a9b: { a?: number; b?: string; }; +>a9b : Symbol(a9b, Decl(typeArgumentInferenceConstructSignatures.ts, 107, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 108, 11)) +>a : Symbol(a, Decl(typeArgumentInferenceConstructSignatures.ts, 108, 18)) +>b : Symbol(b, Decl(typeArgumentInferenceConstructSignatures.ts, 108, 30)) // Generic call with multiple parameters of generic type passed arguments with multiple best common types interface A91 { ->A91 : Symbol(A91, Decl(typeArgumentInferenceConstructSignatures.ts, 108, 37)) +>A91 : Symbol(A91, Decl(typeArgumentInferenceConstructSignatures.ts, 108, 45)) x: number; >x : Symbol(A91.x, Decl(typeArgumentInferenceConstructSignatures.ts, 111, 15)) @@ -411,8 +411,8 @@ interface A92 { >Window : Symbol(Window, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) } var a9e = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }); ->a9e : Symbol(a9e, Decl(typeArgumentInferenceConstructSignatures.ts, 119, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 120, 3)) ->someGenerics9 : Symbol(someGenerics9, Decl(typeArgumentInferenceConstructSignatures.ts, 98, 48), Decl(typeArgumentInferenceConstructSignatures.ts, 104, 3)) +>a9e : Symbol(a9e, Decl(typeArgumentInferenceConstructSignatures.ts, 119, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 120, 11)) +>someGenerics9 : Symbol(someGenerics9, Decl(typeArgumentInferenceConstructSignatures.ts, 98, 48), Decl(typeArgumentInferenceConstructSignatures.ts, 104, 11)) >undefined : Symbol(undefined) >x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 119, 40)) >z : Symbol(z, Decl(typeArgumentInferenceConstructSignatures.ts, 119, 46)) @@ -420,12 +420,12 @@ var a9e = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }); >x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 119, 61)) >y : Symbol(y, Decl(typeArgumentInferenceConstructSignatures.ts, 119, 67)) -var a9e: {}; ->a9e : Symbol(a9e, Decl(typeArgumentInferenceConstructSignatures.ts, 119, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 120, 3)) +declare var a9e: {}; +>a9e : Symbol(a9e, Decl(typeArgumentInferenceConstructSignatures.ts, 119, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 120, 11)) var a9f = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }); ->a9f : Symbol(a9f, Decl(typeArgumentInferenceConstructSignatures.ts, 121, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 122, 3)) ->someGenerics9 : Symbol(someGenerics9, Decl(typeArgumentInferenceConstructSignatures.ts, 98, 48), Decl(typeArgumentInferenceConstructSignatures.ts, 104, 3)) +>a9f : Symbol(a9f, Decl(typeArgumentInferenceConstructSignatures.ts, 121, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 122, 11)) +>someGenerics9 : Symbol(someGenerics9, Decl(typeArgumentInferenceConstructSignatures.ts, 98, 48), Decl(typeArgumentInferenceConstructSignatures.ts, 104, 11)) >A92 : Symbol(A92, Decl(typeArgumentInferenceConstructSignatures.ts, 114, 1)) >undefined : Symbol(undefined) >x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 121, 45)) @@ -434,41 +434,41 @@ var a9f = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' } >x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 121, 66)) >y : Symbol(y, Decl(typeArgumentInferenceConstructSignatures.ts, 121, 72)) -var a9f: A92; ->a9f : Symbol(a9f, Decl(typeArgumentInferenceConstructSignatures.ts, 121, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 122, 3)) +declare var a9f: A92; +>a9f : Symbol(a9f, Decl(typeArgumentInferenceConstructSignatures.ts, 121, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 122, 11)) >A92 : Symbol(A92, Decl(typeArgumentInferenceConstructSignatures.ts, 114, 1)) // Generic call with multiple parameters of generic type passed arguments with a single best common type var a9d = new someGenerics9({ x: 3 }, { x: 6 }, { x: 6 }); ->a9d : Symbol(a9d, Decl(typeArgumentInferenceConstructSignatures.ts, 125, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 126, 3)) ->someGenerics9 : Symbol(someGenerics9, Decl(typeArgumentInferenceConstructSignatures.ts, 98, 48), Decl(typeArgumentInferenceConstructSignatures.ts, 104, 3)) +>a9d : Symbol(a9d, Decl(typeArgumentInferenceConstructSignatures.ts, 125, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 126, 11)) +>someGenerics9 : Symbol(someGenerics9, Decl(typeArgumentInferenceConstructSignatures.ts, 98, 48), Decl(typeArgumentInferenceConstructSignatures.ts, 104, 11)) >x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 125, 29)) >x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 125, 39)) >x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 125, 49)) -var a9d: { x: number; }; ->a9d : Symbol(a9d, Decl(typeArgumentInferenceConstructSignatures.ts, 125, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 126, 3)) ->x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 126, 10)) +declare var a9d: { x: number; }; +>a9d : Symbol(a9d, Decl(typeArgumentInferenceConstructSignatures.ts, 125, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 126, 11)) +>x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 126, 18)) // Generic call with multiple parameters of generic type where one argument is of type 'any' -var anyVar: any; ->anyVar : Symbol(anyVar, Decl(typeArgumentInferenceConstructSignatures.ts, 129, 3)) +declare var anyVar: any; +>anyVar : Symbol(anyVar, Decl(typeArgumentInferenceConstructSignatures.ts, 129, 11)) var a = new someGenerics9(7, anyVar, 4); ->a : Symbol(a, Decl(typeArgumentInferenceConstructSignatures.ts, 130, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 131, 3)) ->someGenerics9 : Symbol(someGenerics9, Decl(typeArgumentInferenceConstructSignatures.ts, 98, 48), Decl(typeArgumentInferenceConstructSignatures.ts, 104, 3)) ->anyVar : Symbol(anyVar, Decl(typeArgumentInferenceConstructSignatures.ts, 129, 3)) +>a : Symbol(a, Decl(typeArgumentInferenceConstructSignatures.ts, 130, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 131, 11)) +>someGenerics9 : Symbol(someGenerics9, Decl(typeArgumentInferenceConstructSignatures.ts, 98, 48), Decl(typeArgumentInferenceConstructSignatures.ts, 104, 11)) +>anyVar : Symbol(anyVar, Decl(typeArgumentInferenceConstructSignatures.ts, 129, 11)) -var a: any; ->a : Symbol(a, Decl(typeArgumentInferenceConstructSignatures.ts, 130, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 131, 3)) +declare var a: any; +>a : Symbol(a, Decl(typeArgumentInferenceConstructSignatures.ts, 130, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 131, 11)) // Generic call with multiple parameters of generic type where one argument is [] and the other is not 'any' var arr = new someGenerics9([], null, undefined); ->arr : Symbol(arr, Decl(typeArgumentInferenceConstructSignatures.ts, 134, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 135, 3)) ->someGenerics9 : Symbol(someGenerics9, Decl(typeArgumentInferenceConstructSignatures.ts, 98, 48), Decl(typeArgumentInferenceConstructSignatures.ts, 104, 3)) +>arr : Symbol(arr, Decl(typeArgumentInferenceConstructSignatures.ts, 134, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 135, 11)) +>someGenerics9 : Symbol(someGenerics9, Decl(typeArgumentInferenceConstructSignatures.ts, 98, 48), Decl(typeArgumentInferenceConstructSignatures.ts, 104, 11)) >undefined : Symbol(undefined) -var arr: any[]; ->arr : Symbol(arr, Decl(typeArgumentInferenceConstructSignatures.ts, 134, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 135, 3)) +declare var arr: any[]; +>arr : Symbol(arr, Decl(typeArgumentInferenceConstructSignatures.ts, 134, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 135, 11)) diff --git a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.types b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.types index 6bc5dd052dfbf..8699e90d2839b 100644 --- a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.types +++ b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.types @@ -5,7 +5,7 @@ interface NoParams { new (); } -var noParams: NoParams; +declare var noParams: NoParams; >noParams : NoParams > : ^^^^^^^^ @@ -33,7 +33,7 @@ interface noGenericParams { >n : string > : ^^^^^^ } -var noGenericParams: noGenericParams; +declare var noGenericParams: noGenericParams; >noGenericParams : noGenericParams > : ^^^^^^^^^^^^^^^ @@ -69,7 +69,7 @@ interface someGenerics1 { >m : number > : ^^^^^^ } -var someGenerics1: someGenerics1; +declare var someGenerics1: someGenerics1; >someGenerics1 : someGenerics1 > : ^^^^^^^^^^^^^ @@ -111,7 +111,7 @@ interface someGenerics2a { >x : T > : ^ } -var someGenerics2a: someGenerics2a; +declare var someGenerics2a: someGenerics2a; >someGenerics2a : someGenerics2a > : ^^^^^^^^^^^^^^ @@ -168,7 +168,7 @@ interface someGenerics2b { >y : U > : ^ } -var someGenerics2b: someGenerics2b; +declare var someGenerics2b: someGenerics2b; >someGenerics2b : someGenerics2b > : ^^^^^^^^^^^^^^ @@ -232,7 +232,7 @@ interface someGenerics3 { >producer : () => T > : ^^^^^^ } -var someGenerics3: someGenerics3; +declare var someGenerics3: someGenerics3; >someGenerics3 : someGenerics3 > : ^^^^^^^^^^^^^ @@ -276,7 +276,7 @@ interface someGenerics4 { >x : U > : ^ } -var someGenerics4: someGenerics4; +declare var someGenerics4: someGenerics4; >someGenerics4 : someGenerics4 > : ^^^^^^^^^^^^^ @@ -332,7 +332,7 @@ interface someGenerics5 { >x : U > : ^ } -var someGenerics5: someGenerics5; +declare var someGenerics5: someGenerics5; >someGenerics5 : someGenerics5 > : ^^^^^^^^^^^^^ @@ -394,7 +394,7 @@ interface someGenerics6 { >c : A > : ^ } -var someGenerics6: someGenerics6; +declare var someGenerics6: someGenerics6; >someGenerics6 : someGenerics6 > : ^^^^^^^^^^^^^ @@ -510,7 +510,7 @@ interface someGenerics7 { >c : C > : ^ } -var someGenerics7: someGenerics7; +declare var someGenerics7: someGenerics7; >someGenerics7 : someGenerics7 > : ^^^^^^^^^^^^^ @@ -592,7 +592,7 @@ interface someGenerics8 { >n : T > : ^ } -var someGenerics8: someGenerics8; +declare var someGenerics8: someGenerics8; >someGenerics8 : someGenerics8 > : ^^^^^^^^^^^^^ @@ -622,7 +622,7 @@ interface someGenerics9 { >c : T > : ^ } -var someGenerics9: someGenerics9; +declare var someGenerics9: someGenerics9; >someGenerics9 : someGenerics9 > : ^^^^^^^^^^^^^ @@ -640,7 +640,7 @@ var a9a = new someGenerics9('', 0, []); >[] : undefined[] > : ^^^^^^^^^^^ -var a9a: {}; +declare var a9a: {}; >a9a : string > : ^^^^^^ @@ -668,7 +668,7 @@ var a9b = new someGenerics9<{ a?: number; b?: string; }>({ a: 0 }, { b: '' }, nu >'' : "" > : ^^ -var a9b: { a?: number; b?: string; }; +declare var a9b: { a?: number; b?: string; }; >a9b : { a?: number; b?: string; } > : ^^^^^^ ^^^^^^ ^^^ >a : number @@ -725,7 +725,7 @@ var a9e = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }); >'' : "" > : ^^ -var a9e: {}; +declare var a9e: {}; >a9e : { x: number; z: Window & typeof globalThis; y?: undefined; } | { x: number; y: string; z?: undefined; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -759,7 +759,7 @@ var a9f = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' } >'' : "" > : ^^ -var a9f: A92; +declare var a9f: A92; >a9f : A92 > : ^^^ @@ -790,14 +790,14 @@ var a9d = new someGenerics9({ x: 3 }, { x: 6 }, { x: 6 }); >6 : 6 > : ^ -var a9d: { x: number; }; +declare var a9d: { x: number; }; >a9d : { x: number; } > : ^^^^^^^^^^^^^^ >x : number > : ^^^^^^ // Generic call with multiple parameters of generic type where one argument is of type 'any' -var anyVar: any; +declare var anyVar: any; >anyVar : any > : ^^^ @@ -815,7 +815,7 @@ var a = new someGenerics9(7, anyVar, 4); >4 : 4 > : ^ -var a: any; +declare var a: any; >a : any > : ^^^ @@ -832,7 +832,7 @@ var arr = new someGenerics9([], null, undefined); >undefined : undefined > : ^^^^^^^^^ -var arr: any[]; +declare var arr: any[]; >arr : any[] > : ^^^^^ diff --git a/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.errors.txt b/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.errors.txt index 73382d9f2a776..8e4527e20ddf1 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.errors.txt +++ b/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.errors.txt @@ -7,8 +7,8 @@ typeArgumentInferenceWithConstraintAsCommonRoot.ts(7,6): error TS2345: Argument interface Giraffe extends Animal { y } interface Elephant extends Animal { z } function f(x: T, y: T): T { return undefined; } - var g: Giraffe; - var e: Elephant; + declare var g: Giraffe; + declare var e: Elephant; f(g, e); // valid because both Giraffe and Elephant satisfy the constraint. T is Animal ~ !!! error TS2345: Argument of type 'Elephant' is not assignable to parameter of type 'Giraffe'. diff --git a/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.js b/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.js index cab1a6a02af23..fe7e297f0675a 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.js +++ b/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.js @@ -5,12 +5,10 @@ interface Animal { x } interface Giraffe extends Animal { y } interface Elephant extends Animal { z } function f(x: T, y: T): T { return undefined; } -var g: Giraffe; -var e: Elephant; +declare var g: Giraffe; +declare var e: Elephant; f(g, e); // valid because both Giraffe and Elephant satisfy the constraint. T is Animal //// [typeArgumentInferenceWithConstraintAsCommonRoot.js] function f(x, y) { return undefined; } -var g; -var e; f(g, e); // valid because both Giraffe and Elephant satisfy the constraint. T is Animal diff --git a/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.symbols b/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.symbols index 23f54b285b287..95b5a415b1280 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.symbols +++ b/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.symbols @@ -26,16 +26,16 @@ function f(x: T, y: T): T { return undefined; } >T : Symbol(T, Decl(typeArgumentInferenceWithConstraintAsCommonRoot.ts, 3, 11)) >undefined : Symbol(undefined) -var g: Giraffe; ->g : Symbol(g, Decl(typeArgumentInferenceWithConstraintAsCommonRoot.ts, 4, 3)) +declare var g: Giraffe; +>g : Symbol(g, Decl(typeArgumentInferenceWithConstraintAsCommonRoot.ts, 4, 11)) >Giraffe : Symbol(Giraffe, Decl(typeArgumentInferenceWithConstraintAsCommonRoot.ts, 0, 22)) -var e: Elephant; ->e : Symbol(e, Decl(typeArgumentInferenceWithConstraintAsCommonRoot.ts, 5, 3)) +declare var e: Elephant; +>e : Symbol(e, Decl(typeArgumentInferenceWithConstraintAsCommonRoot.ts, 5, 11)) >Elephant : Symbol(Elephant, Decl(typeArgumentInferenceWithConstraintAsCommonRoot.ts, 1, 38)) f(g, e); // valid because both Giraffe and Elephant satisfy the constraint. T is Animal >f : Symbol(f, Decl(typeArgumentInferenceWithConstraintAsCommonRoot.ts, 2, 39)) ->g : Symbol(g, Decl(typeArgumentInferenceWithConstraintAsCommonRoot.ts, 4, 3)) ->e : Symbol(e, Decl(typeArgumentInferenceWithConstraintAsCommonRoot.ts, 5, 3)) +>g : Symbol(g, Decl(typeArgumentInferenceWithConstraintAsCommonRoot.ts, 4, 11)) +>e : Symbol(e, Decl(typeArgumentInferenceWithConstraintAsCommonRoot.ts, 5, 11)) diff --git a/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.types b/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.types index c43ed052bb0f4..0153731aba228 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.types +++ b/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.types @@ -23,11 +23,11 @@ function f(x: T, y: T): T { return undefined; } >undefined : undefined > : ^^^^^^^^^ -var g: Giraffe; +declare var g: Giraffe; >g : Giraffe > : ^^^^^^^ -var e: Elephant; +declare var e: Elephant; >e : Elephant > : ^^^^^^^^ diff --git a/tests/baselines/reference/typeAssertions.errors.txt b/tests/baselines/reference/typeAssertions.errors.txt index 1e4a84b919aa2..84d97f41ffbfe 100644 --- a/tests/baselines/reference/typeAssertions.errors.txt +++ b/tests/baselines/reference/typeAssertions.errors.txt @@ -32,8 +32,8 @@ typeAssertions.ts(48,50): error TS1128: Declaration or statement expected. ~~~~~~ !!! error TS2558: Expected 0 type arguments, but got 1. - var a: any; - var s: string; + declare var a: any; + declare var s: string; // Type assertion of non - unary expression var a = "" + 4; @@ -82,8 +82,8 @@ typeAssertions.ts(48,50): error TS1128: Declaration or statement expected. someOther = someOther; // Type assertion cannot be a type-predicate type - var numOrStr: number | string; - var str: string; + declare var numOrStr: number | string; + declare var str: string; if((numOrStr === undefined)) { // Error ~~~~~~~~ !!! error TS2749: 'numOrStr' refers to a value, but is being used as a type here. Did you mean 'typeof numOrStr'? diff --git a/tests/baselines/reference/typeAssertions.js b/tests/baselines/reference/typeAssertions.js index f20f4bd13b4e3..0a7c69663b68c 100644 --- a/tests/baselines/reference/typeAssertions.js +++ b/tests/baselines/reference/typeAssertions.js @@ -7,8 +7,8 @@ function fn2(t: any) { } fn1(fn2(4)); // Error -var a: any; -var s: string; +declare var a: any; +declare var s: string; // Type assertion of non - unary expression var a = "" + 4; @@ -42,8 +42,8 @@ someOther = someBase; // Error someOther = someOther; // Type assertion cannot be a type-predicate type -var numOrStr: number | string; -var str: string; +declare var numOrStr: number | string; +declare var str: string; if((numOrStr === undefined)) { // Error str = numOrStr; // Error, no narrowing occurred } @@ -73,8 +73,6 @@ var __extends = (this && this.__extends) || (function () { function fn1(t) { } function fn2(t) { } fn1(fn2(4)); // Error -var a; -var s; // Type assertion of non - unary expression var a = "" + 4; var s = "" + 4; @@ -108,9 +106,6 @@ someDerived = someOther; // Error someOther = someDerived; // Error someOther = someBase; // Error someOther = someOther; -// Type assertion cannot be a type-predicate type -var numOrStr; -var str; if (is) string > (numOrStr === undefined); { // Error diff --git a/tests/baselines/reference/typeAssertions.symbols b/tests/baselines/reference/typeAssertions.symbols index 72f37f556830d..a9d8dfc0d5084 100644 --- a/tests/baselines/reference/typeAssertions.symbols +++ b/tests/baselines/reference/typeAssertions.symbols @@ -16,18 +16,18 @@ fn1(fn2(4)); // Error >fn1 : Symbol(fn1, Decl(typeAssertions.ts, 0, 0)) >fn2 : Symbol(fn2, Decl(typeAssertions.ts, 1, 25)) -var a: any; ->a : Symbol(a, Decl(typeAssertions.ts, 6, 3), Decl(typeAssertions.ts, 10, 3)) +declare var a: any; +>a : Symbol(a, Decl(typeAssertions.ts, 6, 11), Decl(typeAssertions.ts, 10, 3)) -var s: string; ->s : Symbol(s, Decl(typeAssertions.ts, 7, 3), Decl(typeAssertions.ts, 11, 3)) +declare var s: string; +>s : Symbol(s, Decl(typeAssertions.ts, 7, 11), Decl(typeAssertions.ts, 11, 3)) // Type assertion of non - unary expression var a = "" + 4; ->a : Symbol(a, Decl(typeAssertions.ts, 6, 3), Decl(typeAssertions.ts, 10, 3)) +>a : Symbol(a, Decl(typeAssertions.ts, 6, 11), Decl(typeAssertions.ts, 10, 3)) var s = "" + 4; ->s : Symbol(s, Decl(typeAssertions.ts, 7, 3), Decl(typeAssertions.ts, 11, 3)) +>s : Symbol(s, Decl(typeAssertions.ts, 7, 11), Decl(typeAssertions.ts, 11, 3)) class SomeBase { >SomeBase : Symbol(SomeBase, Decl(typeAssertions.ts, 11, 20)) @@ -108,24 +108,24 @@ someOther = someOther; >someOther : Symbol(someOther, Decl(typeAssertions.ts, 26, 3)) // Type assertion cannot be a type-predicate type -var numOrStr: number | string; ->numOrStr : Symbol(numOrStr, Decl(typeAssertions.ts, 41, 3)) +declare var numOrStr: number | string; +>numOrStr : Symbol(numOrStr, Decl(typeAssertions.ts, 41, 11)) -var str: string; ->str : Symbol(str, Decl(typeAssertions.ts, 42, 3)) +declare var str: string; +>str : Symbol(str, Decl(typeAssertions.ts, 42, 11)) if((numOrStr === undefined)) { // Error >numOrStr : Symbol(numOrStr) ->numOrStr : Symbol(numOrStr, Decl(typeAssertions.ts, 41, 3)) +>numOrStr : Symbol(numOrStr, Decl(typeAssertions.ts, 41, 11)) >undefined : Symbol(undefined) str = numOrStr; // Error, no narrowing occurred ->str : Symbol(str, Decl(typeAssertions.ts, 42, 3)) ->numOrStr : Symbol(numOrStr, Decl(typeAssertions.ts, 41, 3)) +>str : Symbol(str, Decl(typeAssertions.ts, 42, 11)) +>numOrStr : Symbol(numOrStr, Decl(typeAssertions.ts, 41, 11)) } if((numOrStr === undefined) as numOrStr is string) { // Error ->numOrStr : Symbol(numOrStr, Decl(typeAssertions.ts, 41, 3)) +>numOrStr : Symbol(numOrStr, Decl(typeAssertions.ts, 41, 11)) >undefined : Symbol(undefined) >numOrStr : Symbol(numOrStr) } diff --git a/tests/baselines/reference/typeAssertions.types b/tests/baselines/reference/typeAssertions.types index bc6a8c82a5e03..31d6f8f3d426a 100644 --- a/tests/baselines/reference/typeAssertions.types +++ b/tests/baselines/reference/typeAssertions.types @@ -26,11 +26,11 @@ fn1(fn2(4)); // Error >4 : 4 > : ^ -var a: any; +declare var a: any; >a : any > : ^^^ -var s: string; +declare var s: string; >s : string > : ^^^^^^ @@ -202,11 +202,11 @@ someOther = someOther; > : ^^^^^^^^^ // Type assertion cannot be a type-predicate type -var numOrStr: number | string; +declare var numOrStr: number | string; >numOrStr : string | number > : ^^^^^^^^^^^^^^^ -var str: string; +declare var str: string; >str : string > : ^^^^^^ diff --git a/tests/baselines/reference/typeComparisonCaching.errors.txt b/tests/baselines/reference/typeComparisonCaching.errors.txt index e8a0c1a3e0662..fc243dd15c7e3 100644 --- a/tests/baselines/reference/typeComparisonCaching.errors.txt +++ b/tests/baselines/reference/typeComparisonCaching.errors.txt @@ -28,9 +28,9 @@ typeComparisonCaching.ts(27,1): error TS2322: Type 'D' is not assignable to type } var a: A; - var b: B; + declare var b: B; var c: C; - var d: D; + declare var d: D; a = b; ~ diff --git a/tests/baselines/reference/typeComparisonCaching.js b/tests/baselines/reference/typeComparisonCaching.js index e7efe3a864f69..ea062919b2a7f 100644 --- a/tests/baselines/reference/typeComparisonCaching.js +++ b/tests/baselines/reference/typeComparisonCaching.js @@ -22,9 +22,9 @@ interface D { } var a: A; -var b: B; +declare var b: B; var c: C; -var d: D; +declare var d: D; a = b; c = d; // Should not be allowed @@ -33,8 +33,6 @@ c = d; // Should not be allowed //// [typeComparisonCaching.js] // Check that we only cache results of type comparisons that are free of assumptions var a; -var b; var c; -var d; a = b; c = d; // Should not be allowed diff --git a/tests/baselines/reference/typeComparisonCaching.symbols b/tests/baselines/reference/typeComparisonCaching.symbols index a9ea598662073..a636ea61a2952 100644 --- a/tests/baselines/reference/typeComparisonCaching.symbols +++ b/tests/baselines/reference/typeComparisonCaching.symbols @@ -45,23 +45,23 @@ var a: A; >a : Symbol(a, Decl(typeComparisonCaching.ts, 20, 3)) >A : Symbol(A, Decl(typeComparisonCaching.ts, 0, 0)) -var b: B; ->b : Symbol(b, Decl(typeComparisonCaching.ts, 21, 3)) +declare var b: B; +>b : Symbol(b, Decl(typeComparisonCaching.ts, 21, 11)) >B : Symbol(B, Decl(typeComparisonCaching.ts, 5, 1)) var c: C; >c : Symbol(c, Decl(typeComparisonCaching.ts, 22, 3)) >C : Symbol(C, Decl(typeComparisonCaching.ts, 10, 1)) -var d: D; ->d : Symbol(d, Decl(typeComparisonCaching.ts, 23, 3)) +declare var d: D; +>d : Symbol(d, Decl(typeComparisonCaching.ts, 23, 11)) >D : Symbol(D, Decl(typeComparisonCaching.ts, 14, 1)) a = b; >a : Symbol(a, Decl(typeComparisonCaching.ts, 20, 3)) ->b : Symbol(b, Decl(typeComparisonCaching.ts, 21, 3)) +>b : Symbol(b, Decl(typeComparisonCaching.ts, 21, 11)) c = d; // Should not be allowed >c : Symbol(c, Decl(typeComparisonCaching.ts, 22, 3)) ->d : Symbol(d, Decl(typeComparisonCaching.ts, 23, 3)) +>d : Symbol(d, Decl(typeComparisonCaching.ts, 23, 11)) diff --git a/tests/baselines/reference/typeComparisonCaching.types b/tests/baselines/reference/typeComparisonCaching.types index b9a2765a5fd5d..12e1c150d5053 100644 --- a/tests/baselines/reference/typeComparisonCaching.types +++ b/tests/baselines/reference/typeComparisonCaching.types @@ -39,7 +39,7 @@ var a: A; >a : A > : ^ -var b: B; +declare var b: B; >b : B > : ^ @@ -47,7 +47,7 @@ var c: C; >c : C > : ^ -var d: D; +declare var d: D; >d : D > : ^ diff --git a/tests/baselines/reference/typeGuardConstructorClassAndNumber.errors.txt b/tests/baselines/reference/typeGuardConstructorClassAndNumber.errors.txt index 95a3da3583f12..157a2a7ea374c 100644 --- a/tests/baselines/reference/typeGuardConstructorClassAndNumber.errors.txt +++ b/tests/baselines/reference/typeGuardConstructorClassAndNumber.errors.txt @@ -19,10 +19,10 @@ typeGuardConstructorClassAndNumber.ts(115,10): error TS2339: Property 'property1 ==== typeGuardConstructorClassAndNumber.ts (8 errors) ==== // Typical case class C1 { - property1: string; + property1!: string; } - let var1: C1 | number; + declare let var1: C1 | number; if (var1.constructor == C1) { var1; // C1 var1.property1; // string diff --git a/tests/baselines/reference/typeGuardConstructorClassAndNumber.js b/tests/baselines/reference/typeGuardConstructorClassAndNumber.js index 47a761fd04f72..6f2ead90bb8e8 100644 --- a/tests/baselines/reference/typeGuardConstructorClassAndNumber.js +++ b/tests/baselines/reference/typeGuardConstructorClassAndNumber.js @@ -3,10 +3,10 @@ //// [typeGuardConstructorClassAndNumber.ts] // Typical case class C1 { - property1: string; + property1!: string; } -let var1: C1 | number; +declare let var1: C1 | number; if (var1.constructor == C1) { var1; // C1 var1.property1; // string @@ -139,7 +139,6 @@ var C1 = /** @class */ (function () { } return C1; }()); -var var1; if (var1.constructor == C1) { var1; // C1 var1.property1; // string diff --git a/tests/baselines/reference/typeGuardConstructorClassAndNumber.symbols b/tests/baselines/reference/typeGuardConstructorClassAndNumber.symbols index 8565033061736..0cd380326c6d4 100644 --- a/tests/baselines/reference/typeGuardConstructorClassAndNumber.symbols +++ b/tests/baselines/reference/typeGuardConstructorClassAndNumber.symbols @@ -5,278 +5,278 @@ class C1 { >C1 : Symbol(C1, Decl(typeGuardConstructorClassAndNumber.ts, 0, 0)) - property1: string; + property1!: string; >property1 : Symbol(C1.property1, Decl(typeGuardConstructorClassAndNumber.ts, 1, 10)) } -let var1: C1 | number; ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +declare let var1: C1 | number; +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) >C1 : Symbol(C1, Decl(typeGuardConstructorClassAndNumber.ts, 0, 0)) if (var1.constructor == C1) { >var1.constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) >constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) >C1 : Symbol(C1, Decl(typeGuardConstructorClassAndNumber.ts, 0, 0)) var1; // C1 ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) var1.property1; // string >var1.property1 : Symbol(C1.property1, Decl(typeGuardConstructorClassAndNumber.ts, 1, 10)) ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) >property1 : Symbol(C1.property1, Decl(typeGuardConstructorClassAndNumber.ts, 1, 10)) } else { var1; // number | C1 ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) } if (var1["constructor"] == C1) { ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) >"constructor" : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) >C1 : Symbol(C1, Decl(typeGuardConstructorClassAndNumber.ts, 0, 0)) var1; // C1 ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) var1.property1; // string >var1.property1 : Symbol(C1.property1, Decl(typeGuardConstructorClassAndNumber.ts, 1, 10)) ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) >property1 : Symbol(C1.property1, Decl(typeGuardConstructorClassAndNumber.ts, 1, 10)) } else { var1; // number | C1 ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) } if (var1.constructor === C1) { >var1.constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) >constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) >C1 : Symbol(C1, Decl(typeGuardConstructorClassAndNumber.ts, 0, 0)) var1; // C1 ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) var1.property1; // string >var1.property1 : Symbol(C1.property1, Decl(typeGuardConstructorClassAndNumber.ts, 1, 10)) ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) >property1 : Symbol(C1.property1, Decl(typeGuardConstructorClassAndNumber.ts, 1, 10)) } else { var1; // number | C1 ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) } if (var1["constructor"] === C1) { ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) >"constructor" : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) >C1 : Symbol(C1, Decl(typeGuardConstructorClassAndNumber.ts, 0, 0)) var1; // C1 ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) var1.property1; // string >var1.property1 : Symbol(C1.property1, Decl(typeGuardConstructorClassAndNumber.ts, 1, 10)) ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) >property1 : Symbol(C1.property1, Decl(typeGuardConstructorClassAndNumber.ts, 1, 10)) } else { var1; // number | C1 ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) } if (C1 == var1.constructor) { >C1 : Symbol(C1, Decl(typeGuardConstructorClassAndNumber.ts, 0, 0)) >var1.constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) >constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) var1; // C1 ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) var1.property1; // string >var1.property1 : Symbol(C1.property1, Decl(typeGuardConstructorClassAndNumber.ts, 1, 10)) ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) >property1 : Symbol(C1.property1, Decl(typeGuardConstructorClassAndNumber.ts, 1, 10)) } else { var1; // number | C1 ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) } if (C1 == var1["constructor"]) { >C1 : Symbol(C1, Decl(typeGuardConstructorClassAndNumber.ts, 0, 0)) ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) >"constructor" : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) var1; // C1 ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) var1.property1; // string >var1.property1 : Symbol(C1.property1, Decl(typeGuardConstructorClassAndNumber.ts, 1, 10)) ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) >property1 : Symbol(C1.property1, Decl(typeGuardConstructorClassAndNumber.ts, 1, 10)) } else { var1; // number | C1 ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) } if (C1 === var1.constructor) { >C1 : Symbol(C1, Decl(typeGuardConstructorClassAndNumber.ts, 0, 0)) >var1.constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) >constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) var1; // C1 ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) var1.property1; // string >var1.property1 : Symbol(C1.property1, Decl(typeGuardConstructorClassAndNumber.ts, 1, 10)) ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) >property1 : Symbol(C1.property1, Decl(typeGuardConstructorClassAndNumber.ts, 1, 10)) } else { var1; // number | C1 ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) } if (C1 === var1["constructor"]) { >C1 : Symbol(C1, Decl(typeGuardConstructorClassAndNumber.ts, 0, 0)) ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) >"constructor" : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) var1; // C1 ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) var1.property1; // string >var1.property1 : Symbol(C1.property1, Decl(typeGuardConstructorClassAndNumber.ts, 1, 10)) ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) >property1 : Symbol(C1.property1, Decl(typeGuardConstructorClassAndNumber.ts, 1, 10)) } else { var1; // number | C1 ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) } if (var1.constructor != C1) { >var1.constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) >constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) >C1 : Symbol(C1, Decl(typeGuardConstructorClassAndNumber.ts, 0, 0)) var1; // C1 | number ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) var1.property1; // error ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) } else { var1; // C1 ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) } if (var1["constructor"] != C1) { ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) >"constructor" : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) >C1 : Symbol(C1, Decl(typeGuardConstructorClassAndNumber.ts, 0, 0)) var1; // C1 | number ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) var1.property1; // error ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) } else { var1; // C1 ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) } if (var1.constructor !== C1) { >var1.constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) >constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) >C1 : Symbol(C1, Decl(typeGuardConstructorClassAndNumber.ts, 0, 0)) var1; // C1 | number ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) var1.property1; // error ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) } else { var1; // C1 ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) } if (var1["constructor"] !== C1) { ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) >"constructor" : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) >C1 : Symbol(C1, Decl(typeGuardConstructorClassAndNumber.ts, 0, 0)) var1; // C1 | number ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) var1.property1; // error ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) } else { var1; // C1 ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) } if (C1 != var1.constructor) { >C1 : Symbol(C1, Decl(typeGuardConstructorClassAndNumber.ts, 0, 0)) >var1.constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) >constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) var1; // C1 | number ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) var1.property1; // error ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) } else { var1; // C1 ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) } if (C1 != var1["constructor"]) { >C1 : Symbol(C1, Decl(typeGuardConstructorClassAndNumber.ts, 0, 0)) ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) >"constructor" : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) var1; // C1 | number ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) var1.property1; // error ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) } else { var1; // C1 ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) } if (C1 !== var1.constructor) { >C1 : Symbol(C1, Decl(typeGuardConstructorClassAndNumber.ts, 0, 0)) >var1.constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) >constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) var1; // C1 | number ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) var1.property1; // error ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) } else { var1; // C1 ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) } if (C1 !== var1["constructor"]) { >C1 : Symbol(C1, Decl(typeGuardConstructorClassAndNumber.ts, 0, 0)) ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) >"constructor" : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) var1; // C1 | number ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) var1.property1; // error ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) } else { var1; // C1 ->var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorClassAndNumber.ts, 5, 11)) } // Repro from #37660 diff --git a/tests/baselines/reference/typeGuardConstructorClassAndNumber.types b/tests/baselines/reference/typeGuardConstructorClassAndNumber.types index 9d0ecfeefab9c..decfae66a4a6d 100644 --- a/tests/baselines/reference/typeGuardConstructorClassAndNumber.types +++ b/tests/baselines/reference/typeGuardConstructorClassAndNumber.types @@ -6,12 +6,12 @@ class C1 { >C1 : C1 > : ^^ - property1: string; + property1!: string; >property1 : string > : ^^^^^^ } -let var1: C1 | number; +declare let var1: C1 | number; >var1 : number | C1 > : ^^^^^^^^^^^ diff --git a/tests/baselines/reference/typeGuardConstructorDerivedClass.errors.txt b/tests/baselines/reference/typeGuardConstructorDerivedClass.errors.txt index 414004aa881f7..939a371b7abb4 100644 --- a/tests/baselines/reference/typeGuardConstructorDerivedClass.errors.txt +++ b/tests/baselines/reference/typeGuardConstructorDerivedClass.errors.txt @@ -4,14 +4,14 @@ typeGuardConstructorDerivedClass.ts(13,10): error TS2339: Property 'property1' d ==== typeGuardConstructorDerivedClass.ts (1 errors) ==== // Derived class with different structures class C1 { - property1: number; + property1!: number; } class C2 extends C1 { - property2: number; + property2!: number; } - let var1: C2 | string; + declare let var1: C2 | string; if (var1.constructor === C1) { var1; // never var1.property1; // error @@ -28,7 +28,7 @@ typeGuardConstructorDerivedClass.ts(13,10): error TS2339: Property 'property1' d class C4 extends C3 {} - let var2: C4 | string; + declare let var2: C4 | string; if (var2.constructor === C3) { var2; // never } @@ -38,14 +38,14 @@ typeGuardConstructorDerivedClass.ts(13,10): error TS2339: Property 'property1' d // Disjointly structured classes class C5 { - property1: number; + property1!: number; } class C6 { - property2: number; + property2!: number; } - let let3: C6 | string; + declare let let3: C6 | string; if (let3.constructor === C5) { let3; // never } @@ -62,7 +62,7 @@ typeGuardConstructorDerivedClass.ts(13,10): error TS2339: Property 'property1' d property1: number; } - let let4: C8 | string; + declare let let4: C8 | string; if (let4.constructor === C7) { let4; // never } diff --git a/tests/baselines/reference/typeGuardConstructorDerivedClass.js b/tests/baselines/reference/typeGuardConstructorDerivedClass.js index f7230f28ff501..a403694443e01 100644 --- a/tests/baselines/reference/typeGuardConstructorDerivedClass.js +++ b/tests/baselines/reference/typeGuardConstructorDerivedClass.js @@ -3,14 +3,14 @@ //// [typeGuardConstructorDerivedClass.ts] // Derived class with different structures class C1 { - property1: number; + property1!: number; } class C2 extends C1 { - property2: number; + property2!: number; } -let var1: C2 | string; +declare let var1: C2 | string; if (var1.constructor === C1) { var1; // never var1.property1; // error @@ -25,7 +25,7 @@ class C3 {} class C4 extends C3 {} -let var2: C4 | string; +declare let var2: C4 | string; if (var2.constructor === C3) { var2; // never } @@ -35,14 +35,14 @@ if (var2.constructor === C4) { // Disjointly structured classes class C5 { - property1: number; + property1!: number; } class C6 { - property2: number; + property2!: number; } -let let3: C6 | string; +declare let let3: C6 | string; if (let3.constructor === C5) { let3; // never } @@ -59,7 +59,7 @@ class C8 { property1: number; } -let let4: C8 | string; +declare let let4: C8 | string; if (let4.constructor === C7) { let4; // never } @@ -97,7 +97,6 @@ var C2 = /** @class */ (function (_super) { } return C2; }(C1)); -var var1; if (var1.constructor === C1) { var1; // never var1.property1; // error @@ -119,7 +118,6 @@ var C4 = /** @class */ (function (_super) { } return C4; }(C3)); -var var2; if (var2.constructor === C3) { var2; // never } @@ -137,7 +135,6 @@ var C6 = /** @class */ (function () { } return C6; }()); -var let3; if (let3.constructor === C5) { let3; // never } @@ -155,7 +152,6 @@ var C8 = /** @class */ (function () { } return C8; }()); -var let4; if (let4.constructor === C7) { let4; // never } diff --git a/tests/baselines/reference/typeGuardConstructorDerivedClass.symbols b/tests/baselines/reference/typeGuardConstructorDerivedClass.symbols index dd61f212ae5bb..bb81b66c75658 100644 --- a/tests/baselines/reference/typeGuardConstructorDerivedClass.symbols +++ b/tests/baselines/reference/typeGuardConstructorDerivedClass.symbols @@ -5,7 +5,7 @@ class C1 { >C1 : Symbol(C1, Decl(typeGuardConstructorDerivedClass.ts, 0, 0)) - property1: number; + property1!: number; >property1 : Symbol(C1.property1, Decl(typeGuardConstructorDerivedClass.ts, 1, 10)) } @@ -13,38 +13,38 @@ class C2 extends C1 { >C2 : Symbol(C2, Decl(typeGuardConstructorDerivedClass.ts, 3, 1)) >C1 : Symbol(C1, Decl(typeGuardConstructorDerivedClass.ts, 0, 0)) - property2: number; + property2!: number; >property2 : Symbol(C2.property2, Decl(typeGuardConstructorDerivedClass.ts, 5, 21)) } -let var1: C2 | string; ->var1 : Symbol(var1, Decl(typeGuardConstructorDerivedClass.ts, 9, 3)) +declare let var1: C2 | string; +>var1 : Symbol(var1, Decl(typeGuardConstructorDerivedClass.ts, 9, 11)) >C2 : Symbol(C2, Decl(typeGuardConstructorDerivedClass.ts, 3, 1)) if (var1.constructor === C1) { >var1.constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) ->var1 : Symbol(var1, Decl(typeGuardConstructorDerivedClass.ts, 9, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorDerivedClass.ts, 9, 11)) >constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) >C1 : Symbol(C1, Decl(typeGuardConstructorDerivedClass.ts, 0, 0)) var1; // never ->var1 : Symbol(var1, Decl(typeGuardConstructorDerivedClass.ts, 9, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorDerivedClass.ts, 9, 11)) var1.property1; // error ->var1 : Symbol(var1, Decl(typeGuardConstructorDerivedClass.ts, 9, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorDerivedClass.ts, 9, 11)) } if (var1.constructor === C2) { >var1.constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) ->var1 : Symbol(var1, Decl(typeGuardConstructorDerivedClass.ts, 9, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorDerivedClass.ts, 9, 11)) >constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) >C2 : Symbol(C2, Decl(typeGuardConstructorDerivedClass.ts, 3, 1)) var1; // C2 ->var1 : Symbol(var1, Decl(typeGuardConstructorDerivedClass.ts, 9, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorDerivedClass.ts, 9, 11)) var1.property1; // number >var1.property1 : Symbol(C1.property1, Decl(typeGuardConstructorDerivedClass.ts, 1, 10)) ->var1 : Symbol(var1, Decl(typeGuardConstructorDerivedClass.ts, 9, 3)) +>var1 : Symbol(var1, Decl(typeGuardConstructorDerivedClass.ts, 9, 11)) >property1 : Symbol(C1.property1, Decl(typeGuardConstructorDerivedClass.ts, 1, 10)) } @@ -56,65 +56,65 @@ class C4 extends C3 {} >C4 : Symbol(C4, Decl(typeGuardConstructorDerivedClass.ts, 20, 11)) >C3 : Symbol(C3, Decl(typeGuardConstructorDerivedClass.ts, 17, 1)) -let var2: C4 | string; ->var2 : Symbol(var2, Decl(typeGuardConstructorDerivedClass.ts, 24, 3)) +declare let var2: C4 | string; +>var2 : Symbol(var2, Decl(typeGuardConstructorDerivedClass.ts, 24, 11)) >C4 : Symbol(C4, Decl(typeGuardConstructorDerivedClass.ts, 20, 11)) if (var2.constructor === C3) { >var2.constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) ->var2 : Symbol(var2, Decl(typeGuardConstructorDerivedClass.ts, 24, 3)) +>var2 : Symbol(var2, Decl(typeGuardConstructorDerivedClass.ts, 24, 11)) >constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) >C3 : Symbol(C3, Decl(typeGuardConstructorDerivedClass.ts, 17, 1)) var2; // never ->var2 : Symbol(var2, Decl(typeGuardConstructorDerivedClass.ts, 24, 3)) +>var2 : Symbol(var2, Decl(typeGuardConstructorDerivedClass.ts, 24, 11)) } if (var2.constructor === C4) { >var2.constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) ->var2 : Symbol(var2, Decl(typeGuardConstructorDerivedClass.ts, 24, 3)) +>var2 : Symbol(var2, Decl(typeGuardConstructorDerivedClass.ts, 24, 11)) >constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) >C4 : Symbol(C4, Decl(typeGuardConstructorDerivedClass.ts, 20, 11)) var2; // C4 ->var2 : Symbol(var2, Decl(typeGuardConstructorDerivedClass.ts, 24, 3)) +>var2 : Symbol(var2, Decl(typeGuardConstructorDerivedClass.ts, 24, 11)) } // Disjointly structured classes class C5 { >C5 : Symbol(C5, Decl(typeGuardConstructorDerivedClass.ts, 30, 1)) - property1: number; + property1!: number; >property1 : Symbol(C5.property1, Decl(typeGuardConstructorDerivedClass.ts, 33, 10)) } class C6 { >C6 : Symbol(C6, Decl(typeGuardConstructorDerivedClass.ts, 35, 1)) - property2: number; + property2!: number; >property2 : Symbol(C6.property2, Decl(typeGuardConstructorDerivedClass.ts, 37, 10)) } -let let3: C6 | string; ->let3 : Symbol(let3, Decl(typeGuardConstructorDerivedClass.ts, 41, 3)) +declare let let3: C6 | string; +>let3 : Symbol(let3, Decl(typeGuardConstructorDerivedClass.ts, 41, 11)) >C6 : Symbol(C6, Decl(typeGuardConstructorDerivedClass.ts, 35, 1)) if (let3.constructor === C5) { >let3.constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) ->let3 : Symbol(let3, Decl(typeGuardConstructorDerivedClass.ts, 41, 3)) +>let3 : Symbol(let3, Decl(typeGuardConstructorDerivedClass.ts, 41, 11)) >constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) >C5 : Symbol(C5, Decl(typeGuardConstructorDerivedClass.ts, 30, 1)) let3; // never ->let3 : Symbol(let3, Decl(typeGuardConstructorDerivedClass.ts, 41, 3)) +>let3 : Symbol(let3, Decl(typeGuardConstructorDerivedClass.ts, 41, 11)) } if (let3.constructor === C6) { >let3.constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) ->let3 : Symbol(let3, Decl(typeGuardConstructorDerivedClass.ts, 41, 3)) +>let3 : Symbol(let3, Decl(typeGuardConstructorDerivedClass.ts, 41, 11)) >constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) >C6 : Symbol(C6, Decl(typeGuardConstructorDerivedClass.ts, 35, 1)) let3; // C6 ->let3 : Symbol(let3, Decl(typeGuardConstructorDerivedClass.ts, 41, 3)) +>let3 : Symbol(let3, Decl(typeGuardConstructorDerivedClass.ts, 41, 11)) } // Classes with the same structure @@ -132,26 +132,26 @@ class C8 { >property1 : Symbol(C8.property1, Decl(typeGuardConstructorDerivedClass.ts, 54, 10)) } -let let4: C8 | string; ->let4 : Symbol(let4, Decl(typeGuardConstructorDerivedClass.ts, 58, 3)) +declare let let4: C8 | string; +>let4 : Symbol(let4, Decl(typeGuardConstructorDerivedClass.ts, 58, 11)) >C8 : Symbol(C8, Decl(typeGuardConstructorDerivedClass.ts, 52, 1)) if (let4.constructor === C7) { >let4.constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) ->let4 : Symbol(let4, Decl(typeGuardConstructorDerivedClass.ts, 58, 3)) +>let4 : Symbol(let4, Decl(typeGuardConstructorDerivedClass.ts, 58, 11)) >constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) >C7 : Symbol(C7, Decl(typeGuardConstructorDerivedClass.ts, 47, 1)) let4; // never ->let4 : Symbol(let4, Decl(typeGuardConstructorDerivedClass.ts, 58, 3)) +>let4 : Symbol(let4, Decl(typeGuardConstructorDerivedClass.ts, 58, 11)) } if (let4.constructor === C8) { >let4.constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) ->let4 : Symbol(let4, Decl(typeGuardConstructorDerivedClass.ts, 58, 3)) +>let4 : Symbol(let4, Decl(typeGuardConstructorDerivedClass.ts, 58, 11)) >constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) >C8 : Symbol(C8, Decl(typeGuardConstructorDerivedClass.ts, 52, 1)) let4; // C8 ->let4 : Symbol(let4, Decl(typeGuardConstructorDerivedClass.ts, 58, 3)) +>let4 : Symbol(let4, Decl(typeGuardConstructorDerivedClass.ts, 58, 11)) } diff --git a/tests/baselines/reference/typeGuardConstructorDerivedClass.types b/tests/baselines/reference/typeGuardConstructorDerivedClass.types index 73f7021300123..dcee3a38ef6d1 100644 --- a/tests/baselines/reference/typeGuardConstructorDerivedClass.types +++ b/tests/baselines/reference/typeGuardConstructorDerivedClass.types @@ -6,7 +6,7 @@ class C1 { >C1 : C1 > : ^^ - property1: number; + property1!: number; >property1 : number > : ^^^^^^ } @@ -17,12 +17,12 @@ class C2 extends C1 { >C1 : C1 > : ^^ - property2: number; + property2!: number; >property2 : number > : ^^^^^^ } -let var1: C2 | string; +declare let var1: C2 | string; >var1 : string | C2 > : ^^^^^^^^^^^ @@ -86,7 +86,7 @@ class C4 extends C3 {} >C3 : C3 > : ^^ -let var2: C4 | string; +declare let var2: C4 | string; >var2 : string | C4 > : ^^^^^^^^^^^ @@ -128,7 +128,7 @@ class C5 { >C5 : C5 > : ^^ - property1: number; + property1!: number; >property1 : number > : ^^^^^^ } @@ -137,12 +137,12 @@ class C6 { >C6 : C6 > : ^^ - property2: number; + property2!: number; >property2 : number > : ^^^^^^ } -let let3: C6 | string; +declare let let3: C6 | string; >let3 : string | C6 > : ^^^^^^^^^^^ @@ -198,7 +198,7 @@ class C8 { > : ^^^^^^ } -let let4: C8 | string; +declare let let4: C8 | string; >let4 : string | C8 > : ^^^^^^^^^^^ diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.errors.txt b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.errors.txt index 8c8da810d4748..2855aba365fcb 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.errors.txt +++ b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.errors.txt @@ -67,7 +67,7 @@ typeGuardFunctionOfFormThisErrors.ts(58,7): error TS2339: Property 'lead' does n return false; } - let c: number | number[]; + declare var c: number | number[]; if (invalidGuard(c)) { c; } diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js index 3de4086386995..a3a125d01f438 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js +++ b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js @@ -33,7 +33,7 @@ function invalidGuard(c: any): this is number { return false; } -let c: number | number[]; +declare var c: number | number[]; if (invalidGuard(c)) { c; } @@ -116,7 +116,6 @@ a.isLeader = a.isFollower; function invalidGuard(c) { return false; } -var c; if (invalidGuard(c)) { c; } @@ -157,7 +156,7 @@ interface GuardInterface extends RoyalGuard { declare let a: RoyalGuard; declare let b: GuardInterface; declare function invalidGuard(c: any): this is number; -declare let c: number | number[]; +declare var c: number | number[]; declare let holder: { invalidGuard: typeof invalidGuard; }; diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.symbols b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.symbols index 3efd7359c1c0a..116e69c5f64e0 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.symbols +++ b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.symbols @@ -92,19 +92,19 @@ function invalidGuard(c: any): this is number { return false; } -let c: number | number[]; ->c : Symbol(c, Decl(typeGuardFunctionOfFormThisErrors.ts, 32, 3)) +declare var c: number | number[]; +>c : Symbol(c, Decl(typeGuardFunctionOfFormThisErrors.ts, 32, 11)) if (invalidGuard(c)) { >invalidGuard : Symbol(invalidGuard, Decl(typeGuardFunctionOfFormThisErrors.ts, 26, 26)) ->c : Symbol(c, Decl(typeGuardFunctionOfFormThisErrors.ts, 32, 3)) +>c : Symbol(c, Decl(typeGuardFunctionOfFormThisErrors.ts, 32, 11)) c; ->c : Symbol(c, Decl(typeGuardFunctionOfFormThisErrors.ts, 32, 3)) +>c : Symbol(c, Decl(typeGuardFunctionOfFormThisErrors.ts, 32, 11)) } else { c; ->c : Symbol(c, Decl(typeGuardFunctionOfFormThisErrors.ts, 32, 3)) +>c : Symbol(c, Decl(typeGuardFunctionOfFormThisErrors.ts, 32, 11)) } let holder = {invalidGuard}; @@ -115,17 +115,17 @@ if (holder.invalidGuard(c)) { >holder.invalidGuard : Symbol(invalidGuard, Decl(typeGuardFunctionOfFormThisErrors.ts, 40, 14)) >holder : Symbol(holder, Decl(typeGuardFunctionOfFormThisErrors.ts, 40, 3)) >invalidGuard : Symbol(invalidGuard, Decl(typeGuardFunctionOfFormThisErrors.ts, 40, 14)) ->c : Symbol(c, Decl(typeGuardFunctionOfFormThisErrors.ts, 32, 3)) +>c : Symbol(c, Decl(typeGuardFunctionOfFormThisErrors.ts, 32, 11)) c; ->c : Symbol(c, Decl(typeGuardFunctionOfFormThisErrors.ts, 32, 3)) +>c : Symbol(c, Decl(typeGuardFunctionOfFormThisErrors.ts, 32, 11)) holder; >holder : Symbol(holder, Decl(typeGuardFunctionOfFormThisErrors.ts, 40, 3)) } else { c; ->c : Symbol(c, Decl(typeGuardFunctionOfFormThisErrors.ts, 32, 3)) +>c : Symbol(c, Decl(typeGuardFunctionOfFormThisErrors.ts, 32, 11)) holder; >holder : Symbol(holder, Decl(typeGuardFunctionOfFormThisErrors.ts, 40, 3)) diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.types b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.types index 28598a91262a4..33f886160e437 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.types +++ b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.types @@ -146,7 +146,7 @@ function invalidGuard(c: any): this is number { > : ^^^^^ } -let c: number | number[]; +declare var c: number | number[]; >c : number | number[] > : ^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/typeGuardInClass.errors.txt b/tests/baselines/reference/typeGuardInClass.errors.txt index 9c668a335a84c..b1870b009fe39 100644 --- a/tests/baselines/reference/typeGuardInClass.errors.txt +++ b/tests/baselines/reference/typeGuardInClass.errors.txt @@ -5,7 +5,7 @@ typeGuardInClass.ts(13,17): error TS2322: Type 'string | number' is not assignab ==== typeGuardInClass.ts (2 errors) ==== - let x: string | number; + declare var x: string | number; if (typeof x === "string") { let n = class { diff --git a/tests/baselines/reference/typeGuardInClass.js b/tests/baselines/reference/typeGuardInClass.js index 7b15566b7c7f2..e1b1d633247eb 100644 --- a/tests/baselines/reference/typeGuardInClass.js +++ b/tests/baselines/reference/typeGuardInClass.js @@ -1,7 +1,7 @@ //// [tests/cases/conformance/expressions/typeGuards/typeGuardInClass.ts] //// //// [typeGuardInClass.ts] -let x: string | number; +declare var x: string | number; if (typeof x === "string") { let n = class { @@ -20,7 +20,6 @@ else { //// [typeGuardInClass.js] -var x; if (typeof x === "string") { var n = /** @class */ (function () { function class_1() { diff --git a/tests/baselines/reference/typeGuardInClass.symbols b/tests/baselines/reference/typeGuardInClass.symbols index ee1b2d5090f92..fc3c616d8766e 100644 --- a/tests/baselines/reference/typeGuardInClass.symbols +++ b/tests/baselines/reference/typeGuardInClass.symbols @@ -1,11 +1,11 @@ //// [tests/cases/conformance/expressions/typeGuards/typeGuardInClass.ts] //// === typeGuardInClass.ts === -let x: string | number; ->x : Symbol(x, Decl(typeGuardInClass.ts, 0, 3)) +declare var x: string | number; +>x : Symbol(x, Decl(typeGuardInClass.ts, 0, 11)) if (typeof x === "string") { ->x : Symbol(x, Decl(typeGuardInClass.ts, 0, 3)) +>x : Symbol(x, Decl(typeGuardInClass.ts, 0, 11)) let n = class { >n : Symbol(n, Decl(typeGuardInClass.ts, 3, 7)) @@ -13,7 +13,7 @@ if (typeof x === "string") { constructor() { let y: string = x; >y : Symbol(y, Decl(typeGuardInClass.ts, 5, 15)) ->x : Symbol(x, Decl(typeGuardInClass.ts, 0, 3)) +>x : Symbol(x, Decl(typeGuardInClass.ts, 0, 11)) } } } @@ -24,7 +24,7 @@ else { constructor() { let y: number = x; >y : Symbol(y, Decl(typeGuardInClass.ts, 12, 15)) ->x : Symbol(x, Decl(typeGuardInClass.ts, 0, 3)) +>x : Symbol(x, Decl(typeGuardInClass.ts, 0, 11)) } } } diff --git a/tests/baselines/reference/typeGuardInClass.types b/tests/baselines/reference/typeGuardInClass.types index 3cb864873d1a4..49259595d061a 100644 --- a/tests/baselines/reference/typeGuardInClass.types +++ b/tests/baselines/reference/typeGuardInClass.types @@ -1,7 +1,7 @@ //// [tests/cases/conformance/expressions/typeGuards/typeGuardInClass.ts] //// === typeGuardInClass.ts === -let x: string | number; +declare var x: string | number; >x : string | number > : ^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/typeGuardOfFormThisMember.errors.txt b/tests/baselines/reference/typeGuardOfFormThisMember.errors.txt index 64657216b082f..35aa351318d29 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMember.errors.txt +++ b/tests/baselines/reference/typeGuardOfFormThisMember.errors.txt @@ -98,7 +98,7 @@ typeGuardOfFormThisMember.ts(79,11): error TS2339: Property 'do' does not exist !!! error TS1228: A type predicate is only allowed in return type position for functions and methods. } - let guard: GenericGuard; + declare var guard: GenericGuard; if (guard.isLeader) { guard.lead(); ~~~~ @@ -120,7 +120,7 @@ typeGuardOfFormThisMember.ts(79,11): error TS2339: Property 'do' does not exist do(): void; } - let general: SpecificGuard; + declare var general: SpecificGuard; if (general.isMoreSpecific) { general.do(); ~~ diff --git a/tests/baselines/reference/typeGuardOfFormThisMember.js b/tests/baselines/reference/typeGuardOfFormThisMember.js index dca2ae2a07115..832cdf672636c 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMember.js +++ b/tests/baselines/reference/typeGuardOfFormThisMember.js @@ -61,7 +61,7 @@ namespace Test { isFollower: this is GenericFollowerGuard; } - let guard: GenericGuard; + declare var guard: GenericGuard; if (guard.isLeader) { guard.lead(); } @@ -77,7 +77,7 @@ namespace Test { do(): void; } - let general: SpecificGuard; + declare var general: SpecificGuard; if (general.isMoreSpecific) { general.do(); } @@ -163,14 +163,12 @@ var Test; else if (file.isNetworked) { file.host; } - var guard; if (guard.isLeader) { guard.lead(); } else if (guard.isFollower) { guard.follow(); } - var general; if (general.isMoreSpecific) { general.do(); } diff --git a/tests/baselines/reference/typeGuardOfFormThisMember.symbols b/tests/baselines/reference/typeGuardOfFormThisMember.symbols index 3071a72e32578..e546c3430e5e5 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMember.symbols +++ b/tests/baselines/reference/typeGuardOfFormThisMember.symbols @@ -172,26 +172,26 @@ namespace Test { >T : Symbol(T, Decl(typeGuardOfFormThisMember.ts, 54, 24)) } - let guard: GenericGuard; ->guard : Symbol(guard, Decl(typeGuardOfFormThisMember.ts, 60, 4)) + declare var guard: GenericGuard; +>guard : Symbol(guard, Decl(typeGuardOfFormThisMember.ts, 60, 12)) >GenericGuard : Symbol(GenericGuard, Decl(typeGuardOfFormThisMember.ts, 52, 2)) >File : Symbol(File, Decl(typeGuardOfFormThisMember.ts, 15, 2)) if (guard.isLeader) { >guard.isLeader : Symbol(GenericGuard.isLeader, Decl(typeGuardOfFormThisMember.ts, 55, 12)) ->guard : Symbol(guard, Decl(typeGuardOfFormThisMember.ts, 60, 4)) +>guard : Symbol(guard, Decl(typeGuardOfFormThisMember.ts, 60, 12)) >isLeader : Symbol(GenericGuard.isLeader, Decl(typeGuardOfFormThisMember.ts, 55, 12)) guard.lead(); ->guard : Symbol(guard, Decl(typeGuardOfFormThisMember.ts, 60, 4)) +>guard : Symbol(guard, Decl(typeGuardOfFormThisMember.ts, 60, 12)) } else if (guard.isFollower) { >guard.isFollower : Symbol(GenericGuard.isFollower, Decl(typeGuardOfFormThisMember.ts, 56, 42)) ->guard : Symbol(guard, Decl(typeGuardOfFormThisMember.ts, 60, 4)) +>guard : Symbol(guard, Decl(typeGuardOfFormThisMember.ts, 60, 12)) >isFollower : Symbol(GenericGuard.isFollower, Decl(typeGuardOfFormThisMember.ts, 56, 42)) guard.follow(); ->guard : Symbol(guard, Decl(typeGuardOfFormThisMember.ts, 60, 4)) +>guard : Symbol(guard, Decl(typeGuardOfFormThisMember.ts, 60, 12)) } interface SpecificGuard { @@ -210,17 +210,17 @@ namespace Test { >do : Symbol(MoreSpecificGuard.do, Decl(typeGuardOfFormThisMember.ts, 72, 52)) } - let general: SpecificGuard; ->general : Symbol(general, Decl(typeGuardOfFormThisMember.ts, 76, 4)) + declare var general: SpecificGuard; +>general : Symbol(general, Decl(typeGuardOfFormThisMember.ts, 76, 12)) >SpecificGuard : Symbol(SpecificGuard, Decl(typeGuardOfFormThisMember.ts, 66, 2)) if (general.isMoreSpecific) { >general.isMoreSpecific : Symbol(SpecificGuard.isMoreSpecific, Decl(typeGuardOfFormThisMember.ts, 68, 26)) ->general : Symbol(general, Decl(typeGuardOfFormThisMember.ts, 76, 4)) +>general : Symbol(general, Decl(typeGuardOfFormThisMember.ts, 76, 12)) >isMoreSpecific : Symbol(SpecificGuard.isMoreSpecific, Decl(typeGuardOfFormThisMember.ts, 68, 26)) general.do(); ->general : Symbol(general, Decl(typeGuardOfFormThisMember.ts, 76, 4)) +>general : Symbol(general, Decl(typeGuardOfFormThisMember.ts, 76, 12)) } } diff --git a/tests/baselines/reference/typeGuardOfFormThisMember.types b/tests/baselines/reference/typeGuardOfFormThisMember.types index c81aba9070e46..220996fb07760 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMember.types +++ b/tests/baselines/reference/typeGuardOfFormThisMember.types @@ -251,7 +251,7 @@ namespace Test { > : ^^^^^^^ } - let guard: GenericGuard; + declare var guard: GenericGuard; >guard : GenericGuard > : ^^^^^^^^^^^^^^^^^^ @@ -304,7 +304,7 @@ namespace Test { > : ^^^^^^ } - let general: SpecificGuard; + declare var general: SpecificGuard; >general : SpecificGuard > : ^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.errors.txt b/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.errors.txt index 0f0e9d27cc62a..0f875c0538181 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.errors.txt +++ b/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.errors.txt @@ -8,10 +8,10 @@ typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts(34,9): error TS2403: Subsequent va ==== typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts (5 errors) ==== class C { private p: string }; - var strOrNum: string | number; - var strOrBool: string | boolean; - var numOrBool: number | boolean - var strOrC: string | C; + declare var strOrNum: string | number; + declare var strOrBool: string | boolean; + declare var numOrBool: number | boolean; + declare var strOrC: string | C; // typeof x == s has not effect on typeguard if (typeof strOrNum == "string") { diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.js b/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.js index 9bf218444e1a3..5acccdc6dba1b 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.js +++ b/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.js @@ -3,10 +3,10 @@ //// [typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts] class C { private p: string }; -var strOrNum: string | number; -var strOrBool: string | boolean; -var numOrBool: number | boolean -var strOrC: string | C; +declare var strOrNum: string | number; +declare var strOrBool: string | boolean; +declare var numOrBool: number | boolean; +declare var strOrC: string | C; // typeof x == s has not effect on typeguard if (typeof strOrNum == "string") { @@ -44,10 +44,6 @@ var C = /** @class */ (function () { return C; }()); ; -var strOrNum; -var strOrBool; -var numOrBool; -var strOrC; // typeof x == s has not effect on typeguard if (typeof strOrNum == "string") { var r1 = strOrNum; // string | number diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.symbols b/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.symbols index cff09a0e0f9d1..33c925a242954 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.symbols +++ b/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.symbols @@ -5,68 +5,68 @@ class C { private p: string }; >C : Symbol(C, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 0, 0)) >p : Symbol(C.p, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 0, 9)) -var strOrNum: string | number; ->strOrNum : Symbol(strOrNum, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 2, 3)) +declare var strOrNum: string | number; +>strOrNum : Symbol(strOrNum, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 2, 11)) -var strOrBool: string | boolean; ->strOrBool : Symbol(strOrBool, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 3, 3)) +declare var strOrBool: string | boolean; +>strOrBool : Symbol(strOrBool, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 3, 11)) -var numOrBool: number | boolean ->numOrBool : Symbol(numOrBool, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 4, 3)) +declare var numOrBool: number | boolean; +>numOrBool : Symbol(numOrBool, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 4, 11)) -var strOrC: string | C; ->strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 5, 3)) +declare var strOrC: string | C; +>strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 5, 11)) >C : Symbol(C, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 0, 0)) // typeof x == s has not effect on typeguard if (typeof strOrNum == "string") { ->strOrNum : Symbol(strOrNum, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 2, 3)) +>strOrNum : Symbol(strOrNum, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 2, 11)) var r1 = strOrNum; // string | number >r1 : Symbol(r1, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 9, 7), Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 12, 7)) ->strOrNum : Symbol(strOrNum, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 2, 3)) +>strOrNum : Symbol(strOrNum, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 2, 11)) } else { var r1 = strOrNum; // string | number >r1 : Symbol(r1, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 9, 7), Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 12, 7)) ->strOrNum : Symbol(strOrNum, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 2, 3)) +>strOrNum : Symbol(strOrNum, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 2, 11)) } if (typeof strOrBool == "boolean") { ->strOrBool : Symbol(strOrBool, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 3, 3)) +>strOrBool : Symbol(strOrBool, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 3, 11)) var r2 = strOrBool; // string | boolean >r2 : Symbol(r2, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 16, 7), Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 19, 7)) ->strOrBool : Symbol(strOrBool, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 3, 3)) +>strOrBool : Symbol(strOrBool, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 3, 11)) } else { var r2 = strOrBool; // string | boolean >r2 : Symbol(r2, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 16, 7), Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 19, 7)) ->strOrBool : Symbol(strOrBool, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 3, 3)) +>strOrBool : Symbol(strOrBool, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 3, 11)) } if (typeof numOrBool == "number") { ->numOrBool : Symbol(numOrBool, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 4, 3)) +>numOrBool : Symbol(numOrBool, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 4, 11)) var r3 = numOrBool; // number | boolean >r3 : Symbol(r3, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 23, 7), Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 26, 7)) ->numOrBool : Symbol(numOrBool, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 4, 3)) +>numOrBool : Symbol(numOrBool, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 4, 11)) } else { var r3 = numOrBool; // number | boolean >r3 : Symbol(r3, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 23, 7), Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 26, 7)) ->numOrBool : Symbol(numOrBool, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 4, 3)) +>numOrBool : Symbol(numOrBool, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 4, 11)) } if (typeof strOrC == "Object") { ->strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 5, 3)) +>strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 5, 11)) var r4 = strOrC; // string | C >r4 : Symbol(r4, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 30, 7), Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 33, 7)) ->strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 5, 3)) +>strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 5, 11)) } else { var r4 = strOrC; // string | C >r4 : Symbol(r4, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 30, 7), Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 33, 7)) ->strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 5, 3)) +>strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts, 5, 11)) } diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.types b/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.types index 4fc268abbdedd..772145f5c6a35 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.types +++ b/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.types @@ -7,19 +7,19 @@ class C { private p: string }; >p : string > : ^^^^^^ -var strOrNum: string | number; +declare var strOrNum: string | number; >strOrNum : string | number > : ^^^^^^^^^^^^^^^ -var strOrBool: string | boolean; +declare var strOrBool: string | boolean; >strOrBool : string | boolean > : ^^^^^^^^^^^^^^^^ -var numOrBool: number | boolean +declare var numOrBool: number | boolean; >numOrBool : number | boolean > : ^^^^^^^^^^^^^^^^ -var strOrC: string | C; +declare var strOrC: string | C; >strOrC : string | C > : ^^^^^^^^^^ diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.errors.txt b/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.errors.txt index 0032b0b422311..0f460c94953b7 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.errors.txt +++ b/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.errors.txt @@ -8,10 +8,10 @@ typeGuardOfFormTypeOfNotEqualHasNoEffect.ts(34,9): error TS2403: Subsequent vari ==== typeGuardOfFormTypeOfNotEqualHasNoEffect.ts (5 errors) ==== class C { private p: string }; - var strOrNum: string | number; - var strOrBool: string | boolean; - var numOrBool: number | boolean - var strOrC: string | C; + declare var strOrNum: string | number; + declare var strOrBool: string | boolean; + declare var numOrBool: number | boolean; + declare var strOrC: string | C; // typeof x != s has not effect on typeguard if (typeof strOrNum != "string") { diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.js b/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.js index e1bf25b928639..506357c25c4d1 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.js +++ b/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.js @@ -3,10 +3,10 @@ //// [typeGuardOfFormTypeOfNotEqualHasNoEffect.ts] class C { private p: string }; -var strOrNum: string | number; -var strOrBool: string | boolean; -var numOrBool: number | boolean -var strOrC: string | C; +declare var strOrNum: string | number; +declare var strOrBool: string | boolean; +declare var numOrBool: number | boolean; +declare var strOrC: string | C; // typeof x != s has not effect on typeguard if (typeof strOrNum != "string") { @@ -44,10 +44,6 @@ var C = /** @class */ (function () { return C; }()); ; -var strOrNum; -var strOrBool; -var numOrBool; -var strOrC; // typeof x != s has not effect on typeguard if (typeof strOrNum != "string") { var r1 = strOrNum; // string | number diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.symbols b/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.symbols index 9054186e4dcb8..477ce691bfb71 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.symbols +++ b/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.symbols @@ -5,68 +5,68 @@ class C { private p: string }; >C : Symbol(C, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 0, 0)) >p : Symbol(C.p, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 0, 9)) -var strOrNum: string | number; ->strOrNum : Symbol(strOrNum, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 2, 3)) +declare var strOrNum: string | number; +>strOrNum : Symbol(strOrNum, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 2, 11)) -var strOrBool: string | boolean; ->strOrBool : Symbol(strOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 3, 3)) +declare var strOrBool: string | boolean; +>strOrBool : Symbol(strOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 3, 11)) -var numOrBool: number | boolean ->numOrBool : Symbol(numOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 4, 3)) +declare var numOrBool: number | boolean; +>numOrBool : Symbol(numOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 4, 11)) -var strOrC: string | C; ->strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 5, 3)) +declare var strOrC: string | C; +>strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 5, 11)) >C : Symbol(C, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 0, 0)) // typeof x != s has not effect on typeguard if (typeof strOrNum != "string") { ->strOrNum : Symbol(strOrNum, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 2, 3)) +>strOrNum : Symbol(strOrNum, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 2, 11)) var r1 = strOrNum; // string | number >r1 : Symbol(r1, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 9, 7), Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 12, 7)) ->strOrNum : Symbol(strOrNum, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 2, 3)) +>strOrNum : Symbol(strOrNum, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 2, 11)) } else { var r1 = strOrNum; // string | number >r1 : Symbol(r1, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 9, 7), Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 12, 7)) ->strOrNum : Symbol(strOrNum, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 2, 3)) +>strOrNum : Symbol(strOrNum, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 2, 11)) } if (typeof strOrBool != "boolean") { ->strOrBool : Symbol(strOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 3, 3)) +>strOrBool : Symbol(strOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 3, 11)) var r2 = strOrBool; // string | boolean >r2 : Symbol(r2, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 16, 7), Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 19, 7)) ->strOrBool : Symbol(strOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 3, 3)) +>strOrBool : Symbol(strOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 3, 11)) } else { var r2 = strOrBool; // string | boolean >r2 : Symbol(r2, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 16, 7), Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 19, 7)) ->strOrBool : Symbol(strOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 3, 3)) +>strOrBool : Symbol(strOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 3, 11)) } if (typeof numOrBool != "number") { ->numOrBool : Symbol(numOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 4, 3)) +>numOrBool : Symbol(numOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 4, 11)) var r3 = numOrBool; // number | boolean >r3 : Symbol(r3, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 23, 7), Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 26, 7)) ->numOrBool : Symbol(numOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 4, 3)) +>numOrBool : Symbol(numOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 4, 11)) } else { var r3 = numOrBool; // number | boolean >r3 : Symbol(r3, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 23, 7), Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 26, 7)) ->numOrBool : Symbol(numOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 4, 3)) +>numOrBool : Symbol(numOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 4, 11)) } if (typeof strOrC != "Object") { ->strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 5, 3)) +>strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 5, 11)) var r4 = strOrC; // string | C >r4 : Symbol(r4, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 30, 7), Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 33, 7)) ->strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 5, 3)) +>strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 5, 11)) } else { var r4 = strOrC; // string | C >r4 : Symbol(r4, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 30, 7), Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 33, 7)) ->strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 5, 3)) +>strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 5, 11)) } diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.types b/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.types index 3ee867159b67b..5c66816175342 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.types +++ b/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.types @@ -7,19 +7,19 @@ class C { private p: string }; >p : string > : ^^^^^^ -var strOrNum: string | number; +declare var strOrNum: string | number; >strOrNum : string | number > : ^^^^^^^^^^^^^^^ -var strOrBool: string | boolean; +declare var strOrBool: string | boolean; >strOrBool : string | boolean > : ^^^^^^^^^^^^^^^^ -var numOrBool: number | boolean +declare var numOrBool: number | boolean; >numOrBool : number | boolean > : ^^^^^^^^^^^^^^^^ -var strOrC: string | C; +declare var strOrC: string | C; >strOrC : string | C > : ^^^^^^^^^^ diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfOther.errors.txt b/tests/baselines/reference/typeGuardOfFormTypeOfOther.errors.txt index d7be75b79a458..ae419c3e30828 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfOther.errors.txt +++ b/tests/baselines/reference/typeGuardOfFormTypeOfOther.errors.txt @@ -22,9 +22,9 @@ typeGuardOfFormTypeOfOther.ts(75,5): error TS2367: This comparison appears to be var strOrBool: string | boolean; var numOrBool: number | boolean var strOrNumOrBool: string | number | boolean; - var strOrC: string | C; - var numOrC: number | C; - var boolOrC: boolean | C; + declare var strOrC: string | C; + declare var numOrC: number | C; + declare var boolOrC: boolean | C; var emptyObj: {}; var c: C; diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfOther.js b/tests/baselines/reference/typeGuardOfFormTypeOfOther.js index 4fdaa2261ea69..b14c83e17c9e4 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfOther.js +++ b/tests/baselines/reference/typeGuardOfFormTypeOfOther.js @@ -10,9 +10,9 @@ var strOrNum: string | number; var strOrBool: string | boolean; var numOrBool: number | boolean var strOrNumOrBool: string | number | boolean; -var strOrC: string | C; -var numOrC: number | C; -var boolOrC: boolean | C; +declare var strOrC: string | C; +declare var numOrC: number | C; +declare var boolOrC: boolean | C; var emptyObj: {}; var c: C; @@ -97,9 +97,6 @@ var strOrNum; var strOrBool; var numOrBool; var strOrNumOrBool; -var strOrC; -var numOrC; -var boolOrC; var emptyObj; var c; // A type guard of the form typeof x === s, diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfOther.symbols b/tests/baselines/reference/typeGuardOfFormTypeOfOther.symbols index 16d96d5f7ffd7..c28ad34beee26 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfOther.symbols +++ b/tests/baselines/reference/typeGuardOfFormTypeOfOther.symbols @@ -26,16 +26,16 @@ var numOrBool: number | boolean var strOrNumOrBool: string | number | boolean; >strOrNumOrBool : Symbol(strOrNumOrBool, Decl(typeGuardOfFormTypeOfOther.ts, 8, 3)) -var strOrC: string | C; ->strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfOther.ts, 9, 3)) +declare var strOrC: string | C; +>strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfOther.ts, 9, 11)) >C : Symbol(C, Decl(typeGuardOfFormTypeOfOther.ts, 0, 0)) -var numOrC: number | C; ->numOrC : Symbol(numOrC, Decl(typeGuardOfFormTypeOfOther.ts, 10, 3)) +declare var numOrC: number | C; +>numOrC : Symbol(numOrC, Decl(typeGuardOfFormTypeOfOther.ts, 10, 11)) >C : Symbol(C, Decl(typeGuardOfFormTypeOfOther.ts, 0, 0)) -var boolOrC: boolean | C; ->boolOrC : Symbol(boolOrC, Decl(typeGuardOfFormTypeOfOther.ts, 11, 3)) +declare var boolOrC: boolean | C; +>boolOrC : Symbol(boolOrC, Decl(typeGuardOfFormTypeOfOther.ts, 11, 11)) >C : Symbol(C, Decl(typeGuardOfFormTypeOfOther.ts, 0, 0)) var emptyObj: {}; @@ -51,52 +51,52 @@ var c: C; // - when false, has no effect on the type of x. if (typeof strOrC === "Object") { ->strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfOther.ts, 9, 3)) +>strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfOther.ts, 9, 11)) c = strOrC; // C >c : Symbol(c, Decl(typeGuardOfFormTypeOfOther.ts, 13, 3)) ->strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfOther.ts, 9, 3)) +>strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfOther.ts, 9, 11)) } else { var r2: string = strOrC; // string >r2 : Symbol(r2, Decl(typeGuardOfFormTypeOfOther.ts, 24, 7), Decl(typeGuardOfFormTypeOfOther.ts, 56, 7)) ->strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfOther.ts, 9, 3)) +>strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfOther.ts, 9, 11)) } if (typeof numOrC === "Object") { ->numOrC : Symbol(numOrC, Decl(typeGuardOfFormTypeOfOther.ts, 10, 3)) +>numOrC : Symbol(numOrC, Decl(typeGuardOfFormTypeOfOther.ts, 10, 11)) c = numOrC; // C >c : Symbol(c, Decl(typeGuardOfFormTypeOfOther.ts, 13, 3)) ->numOrC : Symbol(numOrC, Decl(typeGuardOfFormTypeOfOther.ts, 10, 3)) +>numOrC : Symbol(numOrC, Decl(typeGuardOfFormTypeOfOther.ts, 10, 11)) } else { var r3: number = numOrC; // number >r3 : Symbol(r3, Decl(typeGuardOfFormTypeOfOther.ts, 30, 7), Decl(typeGuardOfFormTypeOfOther.ts, 62, 7)) ->numOrC : Symbol(numOrC, Decl(typeGuardOfFormTypeOfOther.ts, 10, 3)) +>numOrC : Symbol(numOrC, Decl(typeGuardOfFormTypeOfOther.ts, 10, 11)) } if (typeof boolOrC === "Object") { ->boolOrC : Symbol(boolOrC, Decl(typeGuardOfFormTypeOfOther.ts, 11, 3)) +>boolOrC : Symbol(boolOrC, Decl(typeGuardOfFormTypeOfOther.ts, 11, 11)) c = boolOrC; // C >c : Symbol(c, Decl(typeGuardOfFormTypeOfOther.ts, 13, 3)) ->boolOrC : Symbol(boolOrC, Decl(typeGuardOfFormTypeOfOther.ts, 11, 3)) +>boolOrC : Symbol(boolOrC, Decl(typeGuardOfFormTypeOfOther.ts, 11, 11)) } else { var r4: boolean = boolOrC; // boolean >r4 : Symbol(r4, Decl(typeGuardOfFormTypeOfOther.ts, 36, 7), Decl(typeGuardOfFormTypeOfOther.ts, 68, 7)) ->boolOrC : Symbol(boolOrC, Decl(typeGuardOfFormTypeOfOther.ts, 11, 3)) +>boolOrC : Symbol(boolOrC, Decl(typeGuardOfFormTypeOfOther.ts, 11, 11)) } if (typeof strOrC === "Object" as string) { // comparison is OK with cast ->strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfOther.ts, 9, 3)) +>strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfOther.ts, 9, 11)) c = strOrC; // error: but no narrowing to C >c : Symbol(c, Decl(typeGuardOfFormTypeOfOther.ts, 13, 3)) ->strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfOther.ts, 9, 3)) +>strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfOther.ts, 9, 11)) } else { var r5: string = strOrC; // error: no narrowing to string >r5 : Symbol(r5, Decl(typeGuardOfFormTypeOfOther.ts, 42, 7)) ->strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfOther.ts, 9, 3)) +>strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfOther.ts, 9, 11)) } if (typeof strOrNumOrBool === "Object") { @@ -116,40 +116,40 @@ else { // - when true, narrows the type of x by typeof x === s when false, or // - when false, narrows the type of x by typeof x === s when true. if (typeof strOrC !== "Object") { ->strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfOther.ts, 9, 3)) +>strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfOther.ts, 9, 11)) var r2: string = strOrC; // string >r2 : Symbol(r2, Decl(typeGuardOfFormTypeOfOther.ts, 24, 7), Decl(typeGuardOfFormTypeOfOther.ts, 56, 7)) ->strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfOther.ts, 9, 3)) +>strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfOther.ts, 9, 11)) } else { c = strOrC; // C >c : Symbol(c, Decl(typeGuardOfFormTypeOfOther.ts, 13, 3)) ->strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfOther.ts, 9, 3)) +>strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfOther.ts, 9, 11)) } if (typeof numOrC !== "Object") { ->numOrC : Symbol(numOrC, Decl(typeGuardOfFormTypeOfOther.ts, 10, 3)) +>numOrC : Symbol(numOrC, Decl(typeGuardOfFormTypeOfOther.ts, 10, 11)) var r3: number = numOrC; // number >r3 : Symbol(r3, Decl(typeGuardOfFormTypeOfOther.ts, 30, 7), Decl(typeGuardOfFormTypeOfOther.ts, 62, 7)) ->numOrC : Symbol(numOrC, Decl(typeGuardOfFormTypeOfOther.ts, 10, 3)) +>numOrC : Symbol(numOrC, Decl(typeGuardOfFormTypeOfOther.ts, 10, 11)) } else { c = numOrC; // C >c : Symbol(c, Decl(typeGuardOfFormTypeOfOther.ts, 13, 3)) ->numOrC : Symbol(numOrC, Decl(typeGuardOfFormTypeOfOther.ts, 10, 3)) +>numOrC : Symbol(numOrC, Decl(typeGuardOfFormTypeOfOther.ts, 10, 11)) } if (typeof boolOrC !== "Object") { ->boolOrC : Symbol(boolOrC, Decl(typeGuardOfFormTypeOfOther.ts, 11, 3)) +>boolOrC : Symbol(boolOrC, Decl(typeGuardOfFormTypeOfOther.ts, 11, 11)) var r4: boolean = boolOrC; // boolean >r4 : Symbol(r4, Decl(typeGuardOfFormTypeOfOther.ts, 36, 7), Decl(typeGuardOfFormTypeOfOther.ts, 68, 7)) ->boolOrC : Symbol(boolOrC, Decl(typeGuardOfFormTypeOfOther.ts, 11, 3)) +>boolOrC : Symbol(boolOrC, Decl(typeGuardOfFormTypeOfOther.ts, 11, 11)) } else { c = boolOrC; // C >c : Symbol(c, Decl(typeGuardOfFormTypeOfOther.ts, 13, 3)) ->boolOrC : Symbol(boolOrC, Decl(typeGuardOfFormTypeOfOther.ts, 11, 3)) +>boolOrC : Symbol(boolOrC, Decl(typeGuardOfFormTypeOfOther.ts, 11, 11)) } if (typeof strOrNumOrBool !== "Object") { diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfOther.types b/tests/baselines/reference/typeGuardOfFormTypeOfOther.types index 5acd032dc4a48..a9123f1e4c9c1 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfOther.types +++ b/tests/baselines/reference/typeGuardOfFormTypeOfOther.types @@ -35,15 +35,15 @@ var strOrNumOrBool: string | number | boolean; >strOrNumOrBool : string | number | boolean > : ^^^^^^^^^^^^^^^^^^^^^^^^^ -var strOrC: string | C; +declare var strOrC: string | C; >strOrC : string | C > : ^^^^^^^^^^ -var numOrC: number | C; +declare var numOrC: number | C; >numOrC : number | C > : ^^^^^^^^^^ -var boolOrC: boolean | C; +declare var boolOrC: boolean | C; >boolOrC : boolean | C > : ^^^^^^^^^^^ diff --git a/tests/baselines/reference/typeGuardsNestedAssignments.js b/tests/baselines/reference/typeGuardsNestedAssignments.js index e195cde18833c..8534f78d9d4f3 100644 --- a/tests/baselines/reference/typeGuardsNestedAssignments.js +++ b/tests/baselines/reference/typeGuardsNestedAssignments.js @@ -2,7 +2,7 @@ //// [typeGuardsNestedAssignments.ts] class Foo { - x: string; + x: string = ""; } declare function getFooOrNull(): Foo | null; @@ -50,6 +50,7 @@ while ((match = re.exec("xxx")) != null) { //// [typeGuardsNestedAssignments.js] var Foo = /** @class */ (function () { function Foo() { + this.x = ""; } return Foo; }()); diff --git a/tests/baselines/reference/typeGuardsNestedAssignments.symbols b/tests/baselines/reference/typeGuardsNestedAssignments.symbols index 49ccb47beb265..576f1a0a43277 100644 --- a/tests/baselines/reference/typeGuardsNestedAssignments.symbols +++ b/tests/baselines/reference/typeGuardsNestedAssignments.symbols @@ -4,7 +4,7 @@ class Foo { >Foo : Symbol(Foo, Decl(typeGuardsNestedAssignments.ts, 0, 0)) - x: string; + x: string = ""; >x : Symbol(Foo.x, Decl(typeGuardsNestedAssignments.ts, 0, 11)) } diff --git a/tests/baselines/reference/typeGuardsNestedAssignments.types b/tests/baselines/reference/typeGuardsNestedAssignments.types index 069a2e6612356..88d5c0d34fe86 100644 --- a/tests/baselines/reference/typeGuardsNestedAssignments.types +++ b/tests/baselines/reference/typeGuardsNestedAssignments.types @@ -5,9 +5,11 @@ class Foo { >Foo : Foo > : ^^^ - x: string; + x: string = ""; >x : string > : ^^^^^^ +>"" : "" +> : ^^ } declare function getFooOrNull(): Foo | null; diff --git a/tests/baselines/reference/typeGuardsTypeParameters.js b/tests/baselines/reference/typeGuardsTypeParameters.js index cde3d832ff343..273099ee99642 100644 --- a/tests/baselines/reference/typeGuardsTypeParameters.js +++ b/tests/baselines/reference/typeGuardsTypeParameters.js @@ -4,7 +4,7 @@ // Type guards involving type parameters produce intersection types class C { - prop: string; + prop: string = ""; } function f1(x: T) { @@ -40,6 +40,7 @@ function fun(item: { [P in keyof T]: T[P] }) { // Type guards involving type parameters produce intersection types var C = /** @class */ (function () { function C() { + this.prop = ""; } return C; }()); diff --git a/tests/baselines/reference/typeGuardsTypeParameters.symbols b/tests/baselines/reference/typeGuardsTypeParameters.symbols index 4aa4f9447773e..45879e84ea37d 100644 --- a/tests/baselines/reference/typeGuardsTypeParameters.symbols +++ b/tests/baselines/reference/typeGuardsTypeParameters.symbols @@ -6,7 +6,7 @@ class C { >C : Symbol(C, Decl(typeGuardsTypeParameters.ts, 0, 0)) - prop: string; + prop: string = ""; >prop : Symbol(C.prop, Decl(typeGuardsTypeParameters.ts, 2, 9)) } diff --git a/tests/baselines/reference/typeGuardsTypeParameters.types b/tests/baselines/reference/typeGuardsTypeParameters.types index 40614718b6193..174d6a4cc1593 100644 --- a/tests/baselines/reference/typeGuardsTypeParameters.types +++ b/tests/baselines/reference/typeGuardsTypeParameters.types @@ -7,9 +7,11 @@ class C { >C : C > : ^ - prop: string; + prop: string = ""; >prop : string > : ^^^^^^ +>"" : "" +> : ^^ } function f1(x: T) { diff --git a/tests/baselines/reference/typeGuardsWithInstanceOfByConstructorSignature.errors.txt b/tests/baselines/reference/typeGuardsWithInstanceOfByConstructorSignature.errors.txt index f0c93a11efe23..18bea63bde47e 100644 --- a/tests/baselines/reference/typeGuardsWithInstanceOfByConstructorSignature.errors.txt +++ b/tests/baselines/reference/typeGuardsWithInstanceOfByConstructorSignature.errors.txt @@ -35,7 +35,7 @@ typeGuardsWithInstanceOfByConstructorSignature.ts(188,11): error TS2551: Propert } declare var A: AConstructor; - var obj1: A | string; + declare var obj1: A | string; if (obj1 instanceof A) { // narrowed to A. obj1.foo; obj1.bar; @@ -43,7 +43,7 @@ typeGuardsWithInstanceOfByConstructorSignature.ts(188,11): error TS2551: Propert !!! error TS2339: Property 'bar' does not exist on type 'A'. } - var obj2: any; + declare var obj2: any; if (obj2 instanceof A) { obj2.foo; obj2.bar; @@ -60,7 +60,7 @@ typeGuardsWithInstanceOfByConstructorSignature.ts(188,11): error TS2551: Propert } declare var B: BConstructor; - var obj3: B | string; + declare var obj3: B | string; if (obj3 instanceof B) { // narrowed to B. obj3.foo = 1; obj3.foo = "str"; @@ -71,7 +71,7 @@ typeGuardsWithInstanceOfByConstructorSignature.ts(188,11): error TS2551: Propert !!! error TS2339: Property 'bar' does not exist on type 'B'. } - var obj4: any; + declare var obj4: any; if (obj4 instanceof B) { obj4.foo = "str"; obj4.foo = 1; @@ -97,7 +97,7 @@ typeGuardsWithInstanceOfByConstructorSignature.ts(188,11): error TS2551: Propert } declare var C: CConstructor; - var obj5: C1 | A; + declare var obj5: C1 | A; if (obj5 instanceof C) { // narrowed to C1. obj5.foo; obj5.c; @@ -107,7 +107,7 @@ typeGuardsWithInstanceOfByConstructorSignature.ts(188,11): error TS2551: Propert !!! error TS2339: Property 'bar2' does not exist on type 'C1'. } - var obj6: any; + declare var obj6: any; if (obj6 instanceof C) { obj6.foo; obj6.bar1; @@ -126,7 +126,7 @@ typeGuardsWithInstanceOfByConstructorSignature.ts(188,11): error TS2551: Propert } declare var D: { new (): D; }; - var obj7: D | string; + declare var obj7: D | string; if (obj7 instanceof D) { // narrowed to D. obj7.foo; obj7.bar; @@ -134,7 +134,7 @@ typeGuardsWithInstanceOfByConstructorSignature.ts(188,11): error TS2551: Propert !!! error TS2339: Property 'bar' does not exist on type 'D'. } - var obj8: any; + declare var obj8: any; if (obj8 instanceof D) { obj8.foo; obj8.bar; @@ -156,7 +156,7 @@ typeGuardsWithInstanceOfByConstructorSignature.ts(188,11): error TS2551: Propert } declare var E: EConstructor; - var obj9: E1 | A; + declare var obj9: E1 | A; if (obj9 instanceof E) { // narrowed to E1 obj9.foo; obj9.bar1; @@ -165,7 +165,7 @@ typeGuardsWithInstanceOfByConstructorSignature.ts(188,11): error TS2551: Propert !!! error TS2339: Property 'bar2' does not exist on type 'E1'. } - var obj10: any; + declare var obj10: any; if (obj10 instanceof E) { obj10.foo; obj10.bar1; @@ -188,7 +188,7 @@ typeGuardsWithInstanceOfByConstructorSignature.ts(188,11): error TS2551: Propert } declare var F: FConstructor; - var obj11: F | string; + declare var obj11: F | string; if (obj11 instanceof F) { // can't type narrowing, construct signature returns any. obj11.foo; ~~~ @@ -200,7 +200,7 @@ typeGuardsWithInstanceOfByConstructorSignature.ts(188,11): error TS2551: Propert !!! error TS2339: Property 'bar' does not exist on type 'string'. } - var obj12: any; + declare var obj12: any; if (obj12 instanceof F) { obj12.foo; obj12.bar; @@ -219,7 +219,7 @@ typeGuardsWithInstanceOfByConstructorSignature.ts(188,11): error TS2551: Propert } declare var G: GConstructor; - var obj13: G1 | G2; + declare var obj13: G1 | G2; if (obj13 instanceof G) { // narrowed to G1. G1 is return type of prototype property. obj13.foo1; obj13.foo2; @@ -227,7 +227,7 @@ typeGuardsWithInstanceOfByConstructorSignature.ts(188,11): error TS2551: Propert !!! error TS2339: Property 'foo2' does not exist on type 'G1'. } - var obj14: any; + declare var obj14: any; if (obj14 instanceof G) { obj14.foo1; obj14.foo2; @@ -245,7 +245,7 @@ typeGuardsWithInstanceOfByConstructorSignature.ts(188,11): error TS2551: Propert } declare var H: HConstructor; - var obj15: H | string; + declare var obj15: H | string; if (obj15 instanceof H) { // narrowed to H. obj15.foo; obj15.bar; @@ -253,7 +253,7 @@ typeGuardsWithInstanceOfByConstructorSignature.ts(188,11): error TS2551: Propert !!! error TS2339: Property 'bar' does not exist on type 'H'. } - var obj16: any; + declare var obj16: any; if (obj16 instanceof H) { obj16.foo1; ~~~~ @@ -265,13 +265,13 @@ typeGuardsWithInstanceOfByConstructorSignature.ts(188,11): error TS2551: Propert !!! related TS2728 typeGuardsWithInstanceOfByConstructorSignature.ts:175:5: 'foo' is declared here. } - var obj17: any; + declare var obj17: any; if (obj17 instanceof Object) { // can't narrow type from 'any' to 'Object' obj17.foo1; obj17.foo2; } - var obj18: any; + declare var obj18: any; if (obj18 instanceof Function) { // can't narrow type from 'any' to 'Function' obj18.foo1; obj18.foo2; diff --git a/tests/baselines/reference/typeGuardsWithInstanceOfByConstructorSignature.js b/tests/baselines/reference/typeGuardsWithInstanceOfByConstructorSignature.js index 1beff0fd46200..cb88a6d4ab038 100644 --- a/tests/baselines/reference/typeGuardsWithInstanceOfByConstructorSignature.js +++ b/tests/baselines/reference/typeGuardsWithInstanceOfByConstructorSignature.js @@ -9,13 +9,13 @@ interface A { } declare var A: AConstructor; -var obj1: A | string; +declare var obj1: A | string; if (obj1 instanceof A) { // narrowed to A. obj1.foo; obj1.bar; } -var obj2: any; +declare var obj2: any; if (obj2 instanceof A) { obj2.foo; obj2.bar; @@ -30,14 +30,14 @@ interface B { } declare var B: BConstructor; -var obj3: B | string; +declare var obj3: B | string; if (obj3 instanceof B) { // narrowed to B. obj3.foo = 1; obj3.foo = "str"; obj3.bar = "str"; } -var obj4: any; +declare var obj4: any; if (obj4 instanceof B) { obj4.foo = "str"; obj4.foo = 1; @@ -61,7 +61,7 @@ interface C2 { } declare var C: CConstructor; -var obj5: C1 | A; +declare var obj5: C1 | A; if (obj5 instanceof C) { // narrowed to C1. obj5.foo; obj5.c; @@ -69,7 +69,7 @@ if (obj5 instanceof C) { // narrowed to C1. obj5.bar2; } -var obj6: any; +declare var obj6: any; if (obj6 instanceof C) { obj6.foo; obj6.bar1; @@ -82,13 +82,13 @@ interface D { } declare var D: { new (): D; }; -var obj7: D | string; +declare var obj7: D | string; if (obj7 instanceof D) { // narrowed to D. obj7.foo; obj7.bar; } -var obj8: any; +declare var obj8: any; if (obj8 instanceof D) { obj8.foo; obj8.bar; @@ -108,14 +108,14 @@ interface E2 { } declare var E: EConstructor; -var obj9: E1 | A; +declare var obj9: E1 | A; if (obj9 instanceof E) { // narrowed to E1 obj9.foo; obj9.bar1; obj9.bar2; } -var obj10: any; +declare var obj10: any; if (obj10 instanceof E) { obj10.foo; obj10.bar1; @@ -132,13 +132,13 @@ interface F { } declare var F: FConstructor; -var obj11: F | string; +declare var obj11: F | string; if (obj11 instanceof F) { // can't type narrowing, construct signature returns any. obj11.foo; obj11.bar; } -var obj12: any; +declare var obj12: any; if (obj12 instanceof F) { obj12.foo; obj12.bar; @@ -157,13 +157,13 @@ interface G2 { } declare var G: GConstructor; -var obj13: G1 | G2; +declare var obj13: G1 | G2; if (obj13 instanceof G) { // narrowed to G1. G1 is return type of prototype property. obj13.foo1; obj13.foo2; } -var obj14: any; +declare var obj14: any; if (obj14 instanceof G) { obj14.foo1; obj14.foo2; @@ -179,25 +179,25 @@ interface H { } declare var H: HConstructor; -var obj15: H | string; +declare var obj15: H | string; if (obj15 instanceof H) { // narrowed to H. obj15.foo; obj15.bar; } -var obj16: any; +declare var obj16: any; if (obj16 instanceof H) { obj16.foo1; obj16.foo2; } -var obj17: any; +declare var obj17: any; if (obj17 instanceof Object) { // can't narrow type from 'any' to 'Object' obj17.foo1; obj17.foo2; } -var obj18: any; +declare var obj18: any; if (obj18 instanceof Function) { // can't narrow type from 'any' to 'Function' obj18.foo1; obj18.foo2; @@ -205,99 +205,81 @@ if (obj18 instanceof Function) { // can't narrow type from 'any' to 'Function' //// [typeGuardsWithInstanceOfByConstructorSignature.js] -var obj1; if (obj1 instanceof A) { // narrowed to A. obj1.foo; obj1.bar; } -var obj2; if (obj2 instanceof A) { obj2.foo; obj2.bar; } -var obj3; if (obj3 instanceof B) { // narrowed to B. obj3.foo = 1; obj3.foo = "str"; obj3.bar = "str"; } -var obj4; if (obj4 instanceof B) { obj4.foo = "str"; obj4.foo = 1; obj4.bar = "str"; } -var obj5; if (obj5 instanceof C) { // narrowed to C1. obj5.foo; obj5.c; obj5.bar1; obj5.bar2; } -var obj6; if (obj6 instanceof C) { obj6.foo; obj6.bar1; obj6.bar2; } -var obj7; if (obj7 instanceof D) { // narrowed to D. obj7.foo; obj7.bar; } -var obj8; if (obj8 instanceof D) { obj8.foo; obj8.bar; } -var obj9; if (obj9 instanceof E) { // narrowed to E1 obj9.foo; obj9.bar1; obj9.bar2; } -var obj10; if (obj10 instanceof E) { obj10.foo; obj10.bar1; obj10.bar2; } -var obj11; if (obj11 instanceof F) { // can't type narrowing, construct signature returns any. obj11.foo; obj11.bar; } -var obj12; if (obj12 instanceof F) { obj12.foo; obj12.bar; } -var obj13; if (obj13 instanceof G) { // narrowed to G1. G1 is return type of prototype property. obj13.foo1; obj13.foo2; } -var obj14; if (obj14 instanceof G) { obj14.foo1; obj14.foo2; } -var obj15; if (obj15 instanceof H) { // narrowed to H. obj15.foo; obj15.bar; } -var obj16; if (obj16 instanceof H) { obj16.foo1; obj16.foo2; } -var obj17; if (obj17 instanceof Object) { // can't narrow type from 'any' to 'Object' obj17.foo1; obj17.foo2; } -var obj18; if (obj18 instanceof Function) { // can't narrow type from 'any' to 'Function' obj18.foo1; obj18.foo2; diff --git a/tests/baselines/reference/typeGuardsWithInstanceOfByConstructorSignature.symbols b/tests/baselines/reference/typeGuardsWithInstanceOfByConstructorSignature.symbols index 7398cd8a65326..2eead1f34542e 100644 --- a/tests/baselines/reference/typeGuardsWithInstanceOfByConstructorSignature.symbols +++ b/tests/baselines/reference/typeGuardsWithInstanceOfByConstructorSignature.symbols @@ -17,37 +17,37 @@ declare var A: AConstructor; >A : Symbol(A, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 2, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 6, 11)) >AConstructor : Symbol(AConstructor, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 0, 0)) -var obj1: A | string; ->obj1 : Symbol(obj1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 8, 3)) +declare var obj1: A | string; +>obj1 : Symbol(obj1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 8, 11)) >A : Symbol(A, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 2, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 6, 11)) if (obj1 instanceof A) { // narrowed to A. ->obj1 : Symbol(obj1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 8, 3)) +>obj1 : Symbol(obj1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 8, 11)) >A : Symbol(A, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 2, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 6, 11)) obj1.foo; >obj1.foo : Symbol(A.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 3, 13)) ->obj1 : Symbol(obj1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 8, 3)) +>obj1 : Symbol(obj1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 8, 11)) >foo : Symbol(A.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 3, 13)) obj1.bar; ->obj1 : Symbol(obj1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 8, 3)) +>obj1 : Symbol(obj1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 8, 11)) } -var obj2: any; ->obj2 : Symbol(obj2, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 14, 3)) +declare var obj2: any; +>obj2 : Symbol(obj2, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 14, 11)) if (obj2 instanceof A) { ->obj2 : Symbol(obj2, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 14, 3)) +>obj2 : Symbol(obj2, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 14, 11)) >A : Symbol(A, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 2, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 6, 11)) obj2.foo; >obj2.foo : Symbol(A.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 3, 13)) ->obj2 : Symbol(obj2, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 14, 3)) +>obj2 : Symbol(obj2, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 14, 11)) >foo : Symbol(A.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 3, 13)) obj2.bar; ->obj2 : Symbol(obj2, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 14, 3)) +>obj2 : Symbol(obj2, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 14, 11)) } // a construct signature with generics @@ -71,47 +71,47 @@ declare var B: BConstructor; >B : Symbol(B, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 23, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 27, 11)) >BConstructor : Symbol(BConstructor, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 18, 1)) -var obj3: B | string; ->obj3 : Symbol(obj3, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 29, 3)) +declare var obj3: B | string; +>obj3 : Symbol(obj3, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 29, 11)) >B : Symbol(B, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 23, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 27, 11)) if (obj3 instanceof B) { // narrowed to B. ->obj3 : Symbol(obj3, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 29, 3)) +>obj3 : Symbol(obj3, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 29, 11)) >B : Symbol(B, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 23, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 27, 11)) obj3.foo = 1; >obj3.foo : Symbol(B.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 24, 16)) ->obj3 : Symbol(obj3, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 29, 3)) +>obj3 : Symbol(obj3, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 29, 11)) >foo : Symbol(B.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 24, 16)) obj3.foo = "str"; >obj3.foo : Symbol(B.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 24, 16)) ->obj3 : Symbol(obj3, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 29, 3)) +>obj3 : Symbol(obj3, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 29, 11)) >foo : Symbol(B.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 24, 16)) obj3.bar = "str"; ->obj3 : Symbol(obj3, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 29, 3)) +>obj3 : Symbol(obj3, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 29, 11)) } -var obj4: any; ->obj4 : Symbol(obj4, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 36, 3)) +declare var obj4: any; +>obj4 : Symbol(obj4, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 36, 11)) if (obj4 instanceof B) { ->obj4 : Symbol(obj4, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 36, 3)) +>obj4 : Symbol(obj4, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 36, 11)) >B : Symbol(B, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 23, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 27, 11)) obj4.foo = "str"; >obj4.foo : Symbol(B.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 24, 16)) ->obj4 : Symbol(obj4, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 36, 3)) +>obj4 : Symbol(obj4, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 36, 11)) >foo : Symbol(B.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 24, 16)) obj4.foo = 1; >obj4.foo : Symbol(B.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 24, 16)) ->obj4 : Symbol(obj4, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 36, 3)) +>obj4 : Symbol(obj4, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 36, 11)) >foo : Symbol(B.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 24, 16)) obj4.bar = "str"; ->obj4 : Symbol(obj4, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 36, 3)) +>obj4 : Symbol(obj4, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 36, 11)) } // has multiple construct signature @@ -154,51 +154,51 @@ declare var C: CConstructor; >C : Symbol(C, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 58, 11)) >CConstructor : Symbol(CConstructor, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 41, 1)) -var obj5: C1 | A; ->obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 60, 3)) +declare var obj5: C1 | A; +>obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 60, 11)) >C1 : Symbol(C1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 47, 1)) >A : Symbol(A, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 2, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 6, 11)) if (obj5 instanceof C) { // narrowed to C1. ->obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 60, 3)) +>obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 60, 11)) >C : Symbol(C, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 58, 11)) obj5.foo; >obj5.foo : Symbol(C1.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 48, 14)) ->obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 60, 3)) +>obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 60, 11)) >foo : Symbol(C1.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 48, 14)) obj5.c; >obj5.c : Symbol(C1.c, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 49, 16)) ->obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 60, 3)) +>obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 60, 11)) >c : Symbol(C1.c, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 49, 16)) obj5.bar1; >obj5.bar1 : Symbol(C1.bar1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 50, 14)) ->obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 60, 3)) +>obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 60, 11)) >bar1 : Symbol(C1.bar1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 50, 14)) obj5.bar2; ->obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 60, 3)) +>obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 60, 11)) } -var obj6: any; ->obj6 : Symbol(obj6, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 68, 3)) +declare var obj6: any; +>obj6 : Symbol(obj6, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 68, 11)) if (obj6 instanceof C) { ->obj6 : Symbol(obj6, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 68, 3)) +>obj6 : Symbol(obj6, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 68, 11)) >C : Symbol(C, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 58, 11)) obj6.foo; >obj6.foo : Symbol(foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 48, 14), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 53, 14)) ->obj6 : Symbol(obj6, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 68, 3)) +>obj6 : Symbol(obj6, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 68, 11)) >foo : Symbol(foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 48, 14), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 53, 14)) obj6.bar1; ->obj6 : Symbol(obj6, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 68, 3)) +>obj6 : Symbol(obj6, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 68, 11)) obj6.bar2; ->obj6 : Symbol(obj6, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 68, 3)) +>obj6 : Symbol(obj6, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 68, 11)) } // with object type literal @@ -212,37 +212,37 @@ declare var D: { new (): D; }; >D : Symbol(D, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 73, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 79, 11)) >D : Symbol(D, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 73, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 79, 11)) -var obj7: D | string; ->obj7 : Symbol(obj7, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 81, 3)) +declare var obj7: D | string; +>obj7 : Symbol(obj7, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 81, 11)) >D : Symbol(D, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 73, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 79, 11)) if (obj7 instanceof D) { // narrowed to D. ->obj7 : Symbol(obj7, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 81, 3)) +>obj7 : Symbol(obj7, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 81, 11)) >D : Symbol(D, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 73, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 79, 11)) obj7.foo; >obj7.foo : Symbol(D.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 76, 13)) ->obj7 : Symbol(obj7, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 81, 3)) +>obj7 : Symbol(obj7, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 81, 11)) >foo : Symbol(D.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 76, 13)) obj7.bar; ->obj7 : Symbol(obj7, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 81, 3)) +>obj7 : Symbol(obj7, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 81, 11)) } -var obj8: any; ->obj8 : Symbol(obj8, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 87, 3)) +declare var obj8: any; +>obj8 : Symbol(obj8, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 87, 11)) if (obj8 instanceof D) { ->obj8 : Symbol(obj8, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 87, 3)) +>obj8 : Symbol(obj8, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 87, 11)) >D : Symbol(D, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 73, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 79, 11)) obj8.foo; >obj8.foo : Symbol(D.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 76, 13)) ->obj8 : Symbol(obj8, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 87, 3)) +>obj8 : Symbol(obj8, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 87, 11)) >foo : Symbol(D.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 76, 13)) obj8.bar; ->obj8 : Symbol(obj8, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 87, 3)) +>obj8 : Symbol(obj8, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 87, 11)) } // a construct signature that returns a union type @@ -275,46 +275,46 @@ declare var E: EConstructor; >E : Symbol(E, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 105, 11)) >EConstructor : Symbol(EConstructor, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 91, 1)) -var obj9: E1 | A; ->obj9 : Symbol(obj9, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 107, 3)) +declare var obj9: E1 | A; +>obj9 : Symbol(obj9, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 107, 11)) >E1 : Symbol(E1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 96, 1)) >A : Symbol(A, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 2, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 6, 11)) if (obj9 instanceof E) { // narrowed to E1 ->obj9 : Symbol(obj9, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 107, 3)) +>obj9 : Symbol(obj9, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 107, 11)) >E : Symbol(E, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 105, 11)) obj9.foo; >obj9.foo : Symbol(E1.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 97, 14)) ->obj9 : Symbol(obj9, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 107, 3)) +>obj9 : Symbol(obj9, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 107, 11)) >foo : Symbol(E1.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 97, 14)) obj9.bar1; >obj9.bar1 : Symbol(E1.bar1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 98, 16)) ->obj9 : Symbol(obj9, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 107, 3)) +>obj9 : Symbol(obj9, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 107, 11)) >bar1 : Symbol(E1.bar1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 98, 16)) obj9.bar2; ->obj9 : Symbol(obj9, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 107, 3)) +>obj9 : Symbol(obj9, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 107, 11)) } -var obj10: any; ->obj10 : Symbol(obj10, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 114, 3)) +declare var obj10: any; +>obj10 : Symbol(obj10, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 114, 11)) if (obj10 instanceof E) { ->obj10 : Symbol(obj10, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 114, 3)) +>obj10 : Symbol(obj10, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 114, 11)) >E : Symbol(E, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 105, 11)) obj10.foo; >obj10.foo : Symbol(foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 97, 14), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 101, 14)) ->obj10 : Symbol(obj10, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 114, 3)) +>obj10 : Symbol(obj10, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 114, 11)) >foo : Symbol(foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 97, 14), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 101, 14)) obj10.bar1; ->obj10 : Symbol(obj10, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 114, 3)) +>obj10 : Symbol(obj10, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 114, 11)) obj10.bar2; ->obj10 : Symbol(obj10, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 114, 3)) +>obj10 : Symbol(obj10, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 114, 11)) } // a construct signature that returns any @@ -336,33 +336,33 @@ declare var F: FConstructor; >F : Symbol(F, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 124, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 129, 11)) >FConstructor : Symbol(FConstructor, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 119, 1)) -var obj11: F | string; ->obj11 : Symbol(obj11, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 131, 3)) +declare var obj11: F | string; +>obj11 : Symbol(obj11, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 131, 11)) >F : Symbol(F, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 124, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 129, 11)) if (obj11 instanceof F) { // can't type narrowing, construct signature returns any. ->obj11 : Symbol(obj11, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 131, 3)) +>obj11 : Symbol(obj11, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 131, 11)) >F : Symbol(F, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 124, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 129, 11)) obj11.foo; ->obj11 : Symbol(obj11, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 131, 3)) +>obj11 : Symbol(obj11, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 131, 11)) obj11.bar; ->obj11 : Symbol(obj11, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 131, 3)) +>obj11 : Symbol(obj11, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 131, 11)) } -var obj12: any; ->obj12 : Symbol(obj12, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 137, 3)) +declare var obj12: any; +>obj12 : Symbol(obj12, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 137, 11)) if (obj12 instanceof F) { ->obj12 : Symbol(obj12, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 137, 3)) +>obj12 : Symbol(obj12, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 137, 11)) >F : Symbol(F, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 124, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 129, 11)) obj12.foo; ->obj12 : Symbol(obj12, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 137, 3)) +>obj12 : Symbol(obj12, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 137, 11)) obj12.bar; ->obj12 : Symbol(obj12, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 137, 3)) +>obj12 : Symbol(obj12, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 137, 11)) } // a type with a prototype, it overrides the construct signature @@ -392,38 +392,38 @@ declare var G: GConstructor; >G : Symbol(G, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 154, 11)) >GConstructor : Symbol(GConstructor, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 141, 1)) -var obj13: G1 | G2; ->obj13 : Symbol(obj13, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 156, 3)) +declare var obj13: G1 | G2; +>obj13 : Symbol(obj13, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 156, 11)) >G1 : Symbol(G1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 147, 1)) >G2 : Symbol(G2, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 150, 1)) if (obj13 instanceof G) { // narrowed to G1. G1 is return type of prototype property. ->obj13 : Symbol(obj13, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 156, 3)) +>obj13 : Symbol(obj13, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 156, 11)) >G : Symbol(G, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 154, 11)) obj13.foo1; >obj13.foo1 : Symbol(G1.foo1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 148, 14)) ->obj13 : Symbol(obj13, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 156, 3)) +>obj13 : Symbol(obj13, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 156, 11)) >foo1 : Symbol(G1.foo1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 148, 14)) obj13.foo2; ->obj13 : Symbol(obj13, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 156, 3)) +>obj13 : Symbol(obj13, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 156, 11)) } -var obj14: any; ->obj14 : Symbol(obj14, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 162, 3)) +declare var obj14: any; +>obj14 : Symbol(obj14, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 162, 11)) if (obj14 instanceof G) { ->obj14 : Symbol(obj14, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 162, 3)) +>obj14 : Symbol(obj14, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 162, 11)) >G : Symbol(G, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 154, 11)) obj14.foo1; >obj14.foo1 : Symbol(G1.foo1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 148, 14)) ->obj14 : Symbol(obj14, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 162, 3)) +>obj14 : Symbol(obj14, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 162, 11)) >foo1 : Symbol(G1.foo1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 148, 14)) obj14.foo2; ->obj14 : Symbol(obj14, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 162, 3)) +>obj14 : Symbol(obj14, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 162, 11)) } // a type with a prototype that has any type @@ -446,62 +446,62 @@ declare var H: HConstructor; >H : Symbol(H, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 172, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 176, 11)) >HConstructor : Symbol(HConstructor, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 166, 1)) -var obj15: H | string; ->obj15 : Symbol(obj15, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 178, 3)) +declare var obj15: H | string; +>obj15 : Symbol(obj15, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 178, 11)) >H : Symbol(H, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 172, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 176, 11)) if (obj15 instanceof H) { // narrowed to H. ->obj15 : Symbol(obj15, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 178, 3)) +>obj15 : Symbol(obj15, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 178, 11)) >H : Symbol(H, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 172, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 176, 11)) obj15.foo; >obj15.foo : Symbol(H.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 173, 13)) ->obj15 : Symbol(obj15, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 178, 3)) +>obj15 : Symbol(obj15, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 178, 11)) >foo : Symbol(H.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 173, 13)) obj15.bar; ->obj15 : Symbol(obj15, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 178, 3)) +>obj15 : Symbol(obj15, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 178, 11)) } -var obj16: any; ->obj16 : Symbol(obj16, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 184, 3)) +declare var obj16: any; +>obj16 : Symbol(obj16, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 184, 11)) if (obj16 instanceof H) { ->obj16 : Symbol(obj16, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 184, 3)) +>obj16 : Symbol(obj16, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 184, 11)) >H : Symbol(H, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 172, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 176, 11)) obj16.foo1; ->obj16 : Symbol(obj16, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 184, 3)) +>obj16 : Symbol(obj16, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 184, 11)) obj16.foo2; ->obj16 : Symbol(obj16, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 184, 3)) +>obj16 : Symbol(obj16, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 184, 11)) } -var obj17: any; ->obj17 : Symbol(obj17, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 190, 3)) +declare var obj17: any; +>obj17 : Symbol(obj17, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 190, 11)) if (obj17 instanceof Object) { // can't narrow type from 'any' to 'Object' ->obj17 : Symbol(obj17, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 190, 3)) +>obj17 : Symbol(obj17, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 190, 11)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) obj17.foo1; ->obj17 : Symbol(obj17, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 190, 3)) +>obj17 : Symbol(obj17, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 190, 11)) obj17.foo2; ->obj17 : Symbol(obj17, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 190, 3)) +>obj17 : Symbol(obj17, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 190, 11)) } -var obj18: any; ->obj18 : Symbol(obj18, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 196, 3)) +declare var obj18: any; +>obj18 : Symbol(obj18, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 196, 11)) if (obj18 instanceof Function) { // can't narrow type from 'any' to 'Function' ->obj18 : Symbol(obj18, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 196, 3)) +>obj18 : Symbol(obj18, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 196, 11)) >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) obj18.foo1; ->obj18 : Symbol(obj18, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 196, 3)) +>obj18 : Symbol(obj18, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 196, 11)) obj18.foo2; ->obj18 : Symbol(obj18, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 196, 3)) +>obj18 : Symbol(obj18, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 196, 11)) } diff --git a/tests/baselines/reference/typeGuardsWithInstanceOfByConstructorSignature.types b/tests/baselines/reference/typeGuardsWithInstanceOfByConstructorSignature.types index 3cf06c72adecd..c1898be93a314 100644 --- a/tests/baselines/reference/typeGuardsWithInstanceOfByConstructorSignature.types +++ b/tests/baselines/reference/typeGuardsWithInstanceOfByConstructorSignature.types @@ -13,7 +13,7 @@ declare var A: AConstructor; >A : AConstructor > : ^^^^^^^^^^^^ -var obj1: A | string; +declare var obj1: A | string; >obj1 : string | A > : ^^^^^^^^^^ @@ -42,7 +42,7 @@ if (obj1 instanceof A) { // narrowed to A. > : ^^^ } -var obj2: any; +declare var obj2: any; >obj2 : any > : ^^^ @@ -84,7 +84,7 @@ declare var B: BConstructor; >B : BConstructor > : ^^^^^^^^^^^^ -var obj3: B | string; +declare var obj3: B | string; >obj3 : string | B > : ^^^^^^^^^^^^^^^^^^ @@ -133,7 +133,7 @@ if (obj3 instanceof B) { // narrowed to B. > : ^^^^^ } -var obj4: any; +declare var obj4: any; >obj4 : any > : ^^^ @@ -222,7 +222,7 @@ declare var C: CConstructor; >C : CConstructor > : ^^^^^^^^^^^^ -var obj5: C1 | A; +declare var obj5: C1 | A; >obj5 : A | C1 > : ^^^^^^ @@ -267,7 +267,7 @@ if (obj5 instanceof C) { // narrowed to C1. > : ^^^ } -var obj6: any; +declare var obj6: any; >obj6 : any > : ^^^ @@ -314,7 +314,7 @@ declare var D: { new (): D; }; >D : new () => D > : ^^^^^^^^^^ -var obj7: D | string; +declare var obj7: D | string; >obj7 : string | D > : ^^^^^^^^^^ @@ -343,7 +343,7 @@ if (obj7 instanceof D) { // narrowed to D. > : ^^^ } -var obj8: any; +declare var obj8: any; >obj8 : any > : ^^^ @@ -398,7 +398,7 @@ declare var E: EConstructor; >E : EConstructor > : ^^^^^^^^^^^^ -var obj9: E1 | A; +declare var obj9: E1 | A; >obj9 : A | E1 > : ^^^^^^ @@ -435,7 +435,7 @@ if (obj9 instanceof E) { // narrowed to E1 > : ^^^ } -var obj10: any; +declare var obj10: any; >obj10 : any > : ^^^ @@ -489,7 +489,7 @@ declare var F: FConstructor; >F : FConstructor > : ^^^^^^^^^^^^ -var obj11: F | string; +declare var obj11: F | string; >obj11 : string | F > : ^^^^^^^^^^ @@ -518,7 +518,7 @@ if (obj11 instanceof F) { // can't type narrowing, construct signature returns a > : ^^^ } -var obj12: any; +declare var obj12: any; >obj12 : any > : ^^^ @@ -569,7 +569,7 @@ declare var G: GConstructor; >G : GConstructor > : ^^^^^^^^^^^^ -var obj13: G1 | G2; +declare var obj13: G1 | G2; >obj13 : G1 | G2 > : ^^^^^^^ @@ -598,7 +598,7 @@ if (obj13 instanceof G) { // narrowed to G1. G1 is return type of prototype prop > : ^^^ } -var obj14: any; +declare var obj14: any; >obj14 : any > : ^^^ @@ -644,7 +644,7 @@ declare var H: HConstructor; >H : HConstructor > : ^^^^^^^^^^^^ -var obj15: H | string; +declare var obj15: H | string; >obj15 : string | H > : ^^^^^^^^^^ @@ -673,7 +673,7 @@ if (obj15 instanceof H) { // narrowed to H. > : ^^^ } -var obj16: any; +declare var obj16: any; >obj16 : any > : ^^^ @@ -702,7 +702,7 @@ if (obj16 instanceof H) { > : ^^^ } -var obj17: any; +declare var obj17: any; >obj17 : any > : ^^^ @@ -731,7 +731,7 @@ if (obj17 instanceof Object) { // can't narrow type from 'any' to 'Object' > : ^^^ } -var obj18: any; +declare var obj18: any; >obj18 : any > : ^^^ diff --git a/tests/baselines/reference/typeGuardsWithInstanceOfBySymbolHasInstance.errors.txt b/tests/baselines/reference/typeGuardsWithInstanceOfBySymbolHasInstance.errors.txt index f4ec1af5217f5..65e1efdde3a61 100644 --- a/tests/baselines/reference/typeGuardsWithInstanceOfBySymbolHasInstance.errors.txt +++ b/tests/baselines/reference/typeGuardsWithInstanceOfBySymbolHasInstance.errors.txt @@ -36,7 +36,7 @@ typeGuardsWithInstanceOfBySymbolHasInstance.ts(198,11): error TS2551: Property ' } declare var A: AConstructor; - var obj1: A | string; + declare var obj1: A | string; if (obj1 instanceof A) { // narrowed to A. obj1.foo; obj1.bar; @@ -44,7 +44,7 @@ typeGuardsWithInstanceOfBySymbolHasInstance.ts(198,11): error TS2551: Property ' !!! error TS2339: Property 'bar' does not exist on type 'A'. } - var obj2: any; + declare var obj2: any; if (obj2 instanceof A) { obj2.foo; obj2.bar; @@ -62,7 +62,7 @@ typeGuardsWithInstanceOfBySymbolHasInstance.ts(198,11): error TS2551: Property ' } declare var B: BConstructor; - var obj3: B | string; + declare var obj3: B | string; if (obj3 instanceof B) { // narrowed to B. obj3.foo = 1; obj3.foo = "str"; @@ -73,7 +73,7 @@ typeGuardsWithInstanceOfBySymbolHasInstance.ts(198,11): error TS2551: Property ' !!! error TS2339: Property 'bar' does not exist on type 'B'. } - var obj4: any; + declare var obj4: any; if (obj4 instanceof B) { obj4.foo = "str"; obj4.foo = 1; @@ -100,7 +100,7 @@ typeGuardsWithInstanceOfBySymbolHasInstance.ts(198,11): error TS2551: Property ' } declare var C: CConstructor; - var obj5: C1 | A; + declare var obj5: C1 | A; if (obj5 instanceof C) { // narrowed to C1. obj5.foo; obj5.c; @@ -110,7 +110,7 @@ typeGuardsWithInstanceOfBySymbolHasInstance.ts(198,11): error TS2551: Property ' !!! error TS2339: Property 'bar2' does not exist on type 'C1'. } - var obj6: any; + declare var obj6: any; if (obj6 instanceof C) { obj6.foo; obj6.bar1; @@ -132,7 +132,7 @@ typeGuardsWithInstanceOfBySymbolHasInstance.ts(198,11): error TS2551: Property ' [Symbol.hasInstance](value: unknown): value is D; }; - var obj7: D | string; + declare var obj7: D | string; if (obj7 instanceof D) { // narrowed to D. obj7.foo; obj7.bar; @@ -140,7 +140,7 @@ typeGuardsWithInstanceOfBySymbolHasInstance.ts(198,11): error TS2551: Property ' !!! error TS2339: Property 'bar' does not exist on type 'D'. } - var obj8: any; + declare var obj8: any; if (obj8 instanceof D) { obj8.foo; obj8.bar; @@ -163,7 +163,7 @@ typeGuardsWithInstanceOfBySymbolHasInstance.ts(198,11): error TS2551: Property ' } declare var E: EConstructor; - var obj9: E1 | A; + declare var obj9: E1 | A; if (obj9 instanceof E) { // narrowed to E1 obj9.foo; obj9.bar1; @@ -172,7 +172,7 @@ typeGuardsWithInstanceOfBySymbolHasInstance.ts(198,11): error TS2551: Property ' !!! error TS2339: Property 'bar2' does not exist on type 'E1'. } - var obj10: any; + declare var obj10: any; if (obj10 instanceof E) { obj10.foo; obj10.bar1; @@ -196,7 +196,7 @@ typeGuardsWithInstanceOfBySymbolHasInstance.ts(198,11): error TS2551: Property ' } declare var F: FConstructor; - var obj11: F | string; + declare var obj11: F | string; if (obj11 instanceof F) { // can't type narrowing, construct signature returns any. obj11.foo; ~~~ @@ -208,7 +208,7 @@ typeGuardsWithInstanceOfBySymbolHasInstance.ts(198,11): error TS2551: Property ' !!! error TS2339: Property 'bar' does not exist on type 'string'. } - var obj12: any; + declare var obj12: any; if (obj12 instanceof F) { obj12.foo; obj12.bar; @@ -228,7 +228,7 @@ typeGuardsWithInstanceOfBySymbolHasInstance.ts(198,11): error TS2551: Property ' } declare var G: GConstructor; - var obj13: G1 | G2; + declare var obj13: G1 | G2; if (obj13 instanceof G) { // narrowed to G1. G1 is return type of prototype property. obj13.foo1; obj13.foo2; @@ -236,7 +236,7 @@ typeGuardsWithInstanceOfBySymbolHasInstance.ts(198,11): error TS2551: Property ' !!! error TS2339: Property 'foo2' does not exist on type 'G1'. } - var obj14: any; + declare var obj14: any; if (obj14 instanceof G) { obj14.foo1; obj14.foo2; @@ -255,7 +255,7 @@ typeGuardsWithInstanceOfBySymbolHasInstance.ts(198,11): error TS2551: Property ' } declare var H: HConstructor; - var obj15: H | string; + declare var obj15: H | string; if (obj15 instanceof H) { // narrowed to H. obj15.foo; obj15.bar; @@ -263,7 +263,7 @@ typeGuardsWithInstanceOfBySymbolHasInstance.ts(198,11): error TS2551: Property ' !!! error TS2339: Property 'bar' does not exist on type 'H'. } - var obj16: any; + declare var obj16: any; if (obj16 instanceof H) { obj16.foo1; ~~~~ @@ -275,13 +275,13 @@ typeGuardsWithInstanceOfBySymbolHasInstance.ts(198,11): error TS2551: Property ' !!! related TS2728 typeGuardsWithInstanceOfBySymbolHasInstance.ts:185:5: 'foo' is declared here. } - var obj17: any; + declare var obj17: any; if (obj17 instanceof Object) { // can't narrow type from 'any' to 'Object' obj17.foo1; obj17.foo2; } - var obj18: any; + declare var obj18: any; if (obj18 instanceof Function) { // can't narrow type from 'any' to 'Function' obj18.foo1; obj18.foo2; diff --git a/tests/baselines/reference/typeGuardsWithInstanceOfBySymbolHasInstance.js b/tests/baselines/reference/typeGuardsWithInstanceOfBySymbolHasInstance.js index 07f4b5178a2e2..cb51a51d546d5 100644 --- a/tests/baselines/reference/typeGuardsWithInstanceOfBySymbolHasInstance.js +++ b/tests/baselines/reference/typeGuardsWithInstanceOfBySymbolHasInstance.js @@ -10,13 +10,13 @@ interface A { } declare var A: AConstructor; -var obj1: A | string; +declare var obj1: A | string; if (obj1 instanceof A) { // narrowed to A. obj1.foo; obj1.bar; } -var obj2: any; +declare var obj2: any; if (obj2 instanceof A) { obj2.foo; obj2.bar; @@ -32,14 +32,14 @@ interface B { } declare var B: BConstructor; -var obj3: B | string; +declare var obj3: B | string; if (obj3 instanceof B) { // narrowed to B. obj3.foo = 1; obj3.foo = "str"; obj3.bar = "str"; } -var obj4: any; +declare var obj4: any; if (obj4 instanceof B) { obj4.foo = "str"; obj4.foo = 1; @@ -64,7 +64,7 @@ interface C2 { } declare var C: CConstructor; -var obj5: C1 | A; +declare var obj5: C1 | A; if (obj5 instanceof C) { // narrowed to C1. obj5.foo; obj5.c; @@ -72,7 +72,7 @@ if (obj5 instanceof C) { // narrowed to C1. obj5.bar2; } -var obj6: any; +declare var obj6: any; if (obj6 instanceof C) { obj6.foo; obj6.bar1; @@ -88,13 +88,13 @@ declare var D: { [Symbol.hasInstance](value: unknown): value is D; }; -var obj7: D | string; +declare var obj7: D | string; if (obj7 instanceof D) { // narrowed to D. obj7.foo; obj7.bar; } -var obj8: any; +declare var obj8: any; if (obj8 instanceof D) { obj8.foo; obj8.bar; @@ -115,14 +115,14 @@ interface E2 { } declare var E: EConstructor; -var obj9: E1 | A; +declare var obj9: E1 | A; if (obj9 instanceof E) { // narrowed to E1 obj9.foo; obj9.bar1; obj9.bar2; } -var obj10: any; +declare var obj10: any; if (obj10 instanceof E) { obj10.foo; obj10.bar1; @@ -140,13 +140,13 @@ interface F { } declare var F: FConstructor; -var obj11: F | string; +declare var obj11: F | string; if (obj11 instanceof F) { // can't type narrowing, construct signature returns any. obj11.foo; obj11.bar; } -var obj12: any; +declare var obj12: any; if (obj12 instanceof F) { obj12.foo; obj12.bar; @@ -166,13 +166,13 @@ interface G2 { } declare var G: GConstructor; -var obj13: G1 | G2; +declare var obj13: G1 | G2; if (obj13 instanceof G) { // narrowed to G1. G1 is return type of prototype property. obj13.foo1; obj13.foo2; } -var obj14: any; +declare var obj14: any; if (obj14 instanceof G) { obj14.foo1; obj14.foo2; @@ -189,25 +189,25 @@ interface H { } declare var H: HConstructor; -var obj15: H | string; +declare var obj15: H | string; if (obj15 instanceof H) { // narrowed to H. obj15.foo; obj15.bar; } -var obj16: any; +declare var obj16: any; if (obj16 instanceof H) { obj16.foo1; obj16.foo2; } -var obj17: any; +declare var obj17: any; if (obj17 instanceof Object) { // can't narrow type from 'any' to 'Object' obj17.foo1; obj17.foo2; } -var obj18: any; +declare var obj18: any; if (obj18 instanceof Function) { // can't narrow type from 'any' to 'Function' obj18.foo1; obj18.foo2; @@ -215,99 +215,81 @@ if (obj18 instanceof Function) { // can't narrow type from 'any' to 'Function' //// [typeGuardsWithInstanceOfBySymbolHasInstance.js] -var obj1; if (obj1 instanceof A) { // narrowed to A. obj1.foo; obj1.bar; } -var obj2; if (obj2 instanceof A) { obj2.foo; obj2.bar; } -var obj3; if (obj3 instanceof B) { // narrowed to B. obj3.foo = 1; obj3.foo = "str"; obj3.bar = "str"; } -var obj4; if (obj4 instanceof B) { obj4.foo = "str"; obj4.foo = 1; obj4.bar = "str"; } -var obj5; if (obj5 instanceof C) { // narrowed to C1. obj5.foo; obj5.c; obj5.bar1; obj5.bar2; } -var obj6; if (obj6 instanceof C) { obj6.foo; obj6.bar1; obj6.bar2; } -var obj7; if (obj7 instanceof D) { // narrowed to D. obj7.foo; obj7.bar; } -var obj8; if (obj8 instanceof D) { obj8.foo; obj8.bar; } -var obj9; if (obj9 instanceof E) { // narrowed to E1 obj9.foo; obj9.bar1; obj9.bar2; } -var obj10; if (obj10 instanceof E) { obj10.foo; obj10.bar1; obj10.bar2; } -var obj11; if (obj11 instanceof F) { // can't type narrowing, construct signature returns any. obj11.foo; obj11.bar; } -var obj12; if (obj12 instanceof F) { obj12.foo; obj12.bar; } -var obj13; if (obj13 instanceof G) { // narrowed to G1. G1 is return type of prototype property. obj13.foo1; obj13.foo2; } -var obj14; if (obj14 instanceof G) { obj14.foo1; obj14.foo2; } -var obj15; if (obj15 instanceof H) { // narrowed to H. obj15.foo; obj15.bar; } -var obj16; if (obj16 instanceof H) { obj16.foo1; obj16.foo2; } -var obj17; if (obj17 instanceof Object) { // can't narrow type from 'any' to 'Object' obj17.foo1; obj17.foo2; } -var obj18; if (obj18 instanceof Function) { // can't narrow type from 'any' to 'Function' obj18.foo1; obj18.foo2; diff --git a/tests/baselines/reference/typeGuardsWithInstanceOfBySymbolHasInstance.symbols b/tests/baselines/reference/typeGuardsWithInstanceOfBySymbolHasInstance.symbols index 6be6f0afde989..d215a6302cab1 100644 --- a/tests/baselines/reference/typeGuardsWithInstanceOfBySymbolHasInstance.symbols +++ b/tests/baselines/reference/typeGuardsWithInstanceOfBySymbolHasInstance.symbols @@ -26,37 +26,37 @@ declare var A: AConstructor; >A : Symbol(A, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 3, 1), Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 7, 11)) >AConstructor : Symbol(AConstructor, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 0, 0)) -var obj1: A | string; ->obj1 : Symbol(obj1, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 9, 3)) +declare var obj1: A | string; +>obj1 : Symbol(obj1, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 9, 11)) >A : Symbol(A, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 3, 1), Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 7, 11)) if (obj1 instanceof A) { // narrowed to A. ->obj1 : Symbol(obj1, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 9, 3)) +>obj1 : Symbol(obj1, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 9, 11)) >A : Symbol(A, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 3, 1), Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 7, 11)) obj1.foo; >obj1.foo : Symbol(A.foo, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 4, 13)) ->obj1 : Symbol(obj1, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 9, 3)) +>obj1 : Symbol(obj1, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 9, 11)) >foo : Symbol(A.foo, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 4, 13)) obj1.bar; ->obj1 : Symbol(obj1, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 9, 3)) +>obj1 : Symbol(obj1, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 9, 11)) } -var obj2: any; ->obj2 : Symbol(obj2, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 15, 3)) +declare var obj2: any; +>obj2 : Symbol(obj2, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 15, 11)) if (obj2 instanceof A) { ->obj2 : Symbol(obj2, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 15, 3)) +>obj2 : Symbol(obj2, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 15, 11)) >A : Symbol(A, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 3, 1), Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 7, 11)) obj2.foo; >obj2.foo : Symbol(A.foo, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 4, 13)) ->obj2 : Symbol(obj2, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 15, 3)) +>obj2 : Symbol(obj2, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 15, 11)) >foo : Symbol(A.foo, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 4, 13)) obj2.bar; ->obj2 : Symbol(obj2, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 15, 3)) +>obj2 : Symbol(obj2, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 15, 11)) } // a construct signature with generics @@ -89,47 +89,47 @@ declare var B: BConstructor; >B : Symbol(B, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 25, 1), Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 29, 11)) >BConstructor : Symbol(BConstructor, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 19, 1)) -var obj3: B | string; ->obj3 : Symbol(obj3, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 31, 3)) +declare var obj3: B | string; +>obj3 : Symbol(obj3, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 31, 11)) >B : Symbol(B, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 25, 1), Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 29, 11)) if (obj3 instanceof B) { // narrowed to B. ->obj3 : Symbol(obj3, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 31, 3)) +>obj3 : Symbol(obj3, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 31, 11)) >B : Symbol(B, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 25, 1), Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 29, 11)) obj3.foo = 1; >obj3.foo : Symbol(B.foo, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 26, 16)) ->obj3 : Symbol(obj3, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 31, 3)) +>obj3 : Symbol(obj3, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 31, 11)) >foo : Symbol(B.foo, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 26, 16)) obj3.foo = "str"; >obj3.foo : Symbol(B.foo, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 26, 16)) ->obj3 : Symbol(obj3, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 31, 3)) +>obj3 : Symbol(obj3, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 31, 11)) >foo : Symbol(B.foo, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 26, 16)) obj3.bar = "str"; ->obj3 : Symbol(obj3, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 31, 3)) +>obj3 : Symbol(obj3, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 31, 11)) } -var obj4: any; ->obj4 : Symbol(obj4, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 38, 3)) +declare var obj4: any; +>obj4 : Symbol(obj4, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 38, 11)) if (obj4 instanceof B) { ->obj4 : Symbol(obj4, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 38, 3)) +>obj4 : Symbol(obj4, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 38, 11)) >B : Symbol(B, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 25, 1), Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 29, 11)) obj4.foo = "str"; >obj4.foo : Symbol(B.foo, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 26, 16)) ->obj4 : Symbol(obj4, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 38, 3)) +>obj4 : Symbol(obj4, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 38, 11)) >foo : Symbol(B.foo, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 26, 16)) obj4.foo = 1; >obj4.foo : Symbol(B.foo, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 26, 16)) ->obj4 : Symbol(obj4, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 38, 3)) +>obj4 : Symbol(obj4, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 38, 11)) >foo : Symbol(B.foo, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 26, 16)) obj4.bar = "str"; ->obj4 : Symbol(obj4, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 38, 3)) +>obj4 : Symbol(obj4, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 38, 11)) } // has multiple construct signature @@ -182,51 +182,51 @@ declare var C: CConstructor; >C : Symbol(C, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 61, 11)) >CConstructor : Symbol(CConstructor, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 43, 1)) -var obj5: C1 | A; ->obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 63, 3)) +declare var obj5: C1 | A; +>obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 63, 11)) >C1 : Symbol(C1, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 50, 1)) >A : Symbol(A, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 3, 1), Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 7, 11)) if (obj5 instanceof C) { // narrowed to C1. ->obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 63, 3)) +>obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 63, 11)) >C : Symbol(C, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 61, 11)) obj5.foo; >obj5.foo : Symbol(C1.foo, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 51, 14)) ->obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 63, 3)) +>obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 63, 11)) >foo : Symbol(C1.foo, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 51, 14)) obj5.c; >obj5.c : Symbol(C1.c, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 52, 16)) ->obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 63, 3)) +>obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 63, 11)) >c : Symbol(C1.c, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 52, 16)) obj5.bar1; >obj5.bar1 : Symbol(C1.bar1, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 53, 14)) ->obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 63, 3)) +>obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 63, 11)) >bar1 : Symbol(C1.bar1, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 53, 14)) obj5.bar2; ->obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 63, 3)) +>obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 63, 11)) } -var obj6: any; ->obj6 : Symbol(obj6, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 71, 3)) +declare var obj6: any; +>obj6 : Symbol(obj6, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 71, 11)) if (obj6 instanceof C) { ->obj6 : Symbol(obj6, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 71, 3)) +>obj6 : Symbol(obj6, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 71, 11)) >C : Symbol(C, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 61, 11)) obj6.foo; >obj6.foo : Symbol(foo, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 51, 14), Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 56, 14)) ->obj6 : Symbol(obj6, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 71, 3)) +>obj6 : Symbol(obj6, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 71, 11)) >foo : Symbol(foo, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 51, 14), Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 56, 14)) obj6.bar1; ->obj6 : Symbol(obj6, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 71, 3)) +>obj6 : Symbol(obj6, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 71, 11)) obj6.bar2; ->obj6 : Symbol(obj6, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 71, 3)) +>obj6 : Symbol(obj6, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 71, 11)) } // with object type literal @@ -253,37 +253,37 @@ declare var D: { }; -var obj7: D | string; ->obj7 : Symbol(obj7, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 87, 3)) +declare var obj7: D | string; +>obj7 : Symbol(obj7, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 87, 11)) >D : Symbol(D, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 76, 1), Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 82, 11)) if (obj7 instanceof D) { // narrowed to D. ->obj7 : Symbol(obj7, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 87, 3)) +>obj7 : Symbol(obj7, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 87, 11)) >D : Symbol(D, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 76, 1), Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 82, 11)) obj7.foo; >obj7.foo : Symbol(D.foo, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 79, 13)) ->obj7 : Symbol(obj7, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 87, 3)) +>obj7 : Symbol(obj7, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 87, 11)) >foo : Symbol(D.foo, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 79, 13)) obj7.bar; ->obj7 : Symbol(obj7, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 87, 3)) +>obj7 : Symbol(obj7, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 87, 11)) } -var obj8: any; ->obj8 : Symbol(obj8, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 93, 3)) +declare var obj8: any; +>obj8 : Symbol(obj8, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 93, 11)) if (obj8 instanceof D) { ->obj8 : Symbol(obj8, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 93, 3)) +>obj8 : Symbol(obj8, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 93, 11)) >D : Symbol(D, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 76, 1), Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 82, 11)) obj8.foo; >obj8.foo : Symbol(D.foo, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 79, 13)) ->obj8 : Symbol(obj8, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 93, 3)) +>obj8 : Symbol(obj8, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 93, 11)) >foo : Symbol(D.foo, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 79, 13)) obj8.bar; ->obj8 : Symbol(obj8, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 93, 3)) +>obj8 : Symbol(obj8, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 93, 11)) } // a construct signature that returns a union type @@ -326,46 +326,46 @@ declare var E: EConstructor; >E : Symbol(E, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 112, 11)) >EConstructor : Symbol(EConstructor, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 97, 1)) -var obj9: E1 | A; ->obj9 : Symbol(obj9, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 114, 3)) +declare var obj9: E1 | A; +>obj9 : Symbol(obj9, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 114, 11)) >E1 : Symbol(E1, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 103, 1)) >A : Symbol(A, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 3, 1), Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 7, 11)) if (obj9 instanceof E) { // narrowed to E1 ->obj9 : Symbol(obj9, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 114, 3)) +>obj9 : Symbol(obj9, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 114, 11)) >E : Symbol(E, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 112, 11)) obj9.foo; >obj9.foo : Symbol(E1.foo, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 104, 14)) ->obj9 : Symbol(obj9, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 114, 3)) +>obj9 : Symbol(obj9, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 114, 11)) >foo : Symbol(E1.foo, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 104, 14)) obj9.bar1; >obj9.bar1 : Symbol(E1.bar1, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 105, 16)) ->obj9 : Symbol(obj9, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 114, 3)) +>obj9 : Symbol(obj9, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 114, 11)) >bar1 : Symbol(E1.bar1, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 105, 16)) obj9.bar2; ->obj9 : Symbol(obj9, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 114, 3)) +>obj9 : Symbol(obj9, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 114, 11)) } -var obj10: any; ->obj10 : Symbol(obj10, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 121, 3)) +declare var obj10: any; +>obj10 : Symbol(obj10, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 121, 11)) if (obj10 instanceof E) { ->obj10 : Symbol(obj10, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 121, 3)) +>obj10 : Symbol(obj10, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 121, 11)) >E : Symbol(E, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 112, 11)) obj10.foo; >obj10.foo : Symbol(foo, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 104, 14), Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 108, 14)) ->obj10 : Symbol(obj10, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 121, 3)) +>obj10 : Symbol(obj10, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 121, 11)) >foo : Symbol(foo, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 104, 14), Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 108, 14)) obj10.bar1; ->obj10 : Symbol(obj10, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 121, 3)) +>obj10 : Symbol(obj10, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 121, 11)) obj10.bar2; ->obj10 : Symbol(obj10, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 121, 3)) +>obj10 : Symbol(obj10, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 121, 11)) } // a construct signature that returns any @@ -394,33 +394,33 @@ declare var F: FConstructor; >F : Symbol(F, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 132, 1), Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 137, 11)) >FConstructor : Symbol(FConstructor, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 126, 1)) -var obj11: F | string; ->obj11 : Symbol(obj11, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 139, 3)) +declare var obj11: F | string; +>obj11 : Symbol(obj11, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 139, 11)) >F : Symbol(F, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 132, 1), Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 137, 11)) if (obj11 instanceof F) { // can't type narrowing, construct signature returns any. ->obj11 : Symbol(obj11, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 139, 3)) +>obj11 : Symbol(obj11, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 139, 11)) >F : Symbol(F, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 132, 1), Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 137, 11)) obj11.foo; ->obj11 : Symbol(obj11, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 139, 3)) +>obj11 : Symbol(obj11, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 139, 11)) obj11.bar; ->obj11 : Symbol(obj11, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 139, 3)) +>obj11 : Symbol(obj11, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 139, 11)) } -var obj12: any; ->obj12 : Symbol(obj12, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 145, 3)) +declare var obj12: any; +>obj12 : Symbol(obj12, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 145, 11)) if (obj12 instanceof F) { ->obj12 : Symbol(obj12, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 145, 3)) +>obj12 : Symbol(obj12, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 145, 11)) >F : Symbol(F, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 132, 1), Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 137, 11)) obj12.foo; ->obj12 : Symbol(obj12, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 145, 3)) +>obj12 : Symbol(obj12, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 145, 11)) obj12.bar; ->obj12 : Symbol(obj12, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 145, 3)) +>obj12 : Symbol(obj12, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 145, 11)) } // a type with a prototype, it overrides the construct signature @@ -459,38 +459,38 @@ declare var G: GConstructor; >G : Symbol(G, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 163, 11)) >GConstructor : Symbol(GConstructor, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 149, 1)) -var obj13: G1 | G2; ->obj13 : Symbol(obj13, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 165, 3)) +declare var obj13: G1 | G2; +>obj13 : Symbol(obj13, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 165, 11)) >G1 : Symbol(G1, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 156, 1)) >G2 : Symbol(G2, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 159, 1)) if (obj13 instanceof G) { // narrowed to G1. G1 is return type of prototype property. ->obj13 : Symbol(obj13, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 165, 3)) +>obj13 : Symbol(obj13, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 165, 11)) >G : Symbol(G, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 163, 11)) obj13.foo1; >obj13.foo1 : Symbol(G1.foo1, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 157, 14)) ->obj13 : Symbol(obj13, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 165, 3)) +>obj13 : Symbol(obj13, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 165, 11)) >foo1 : Symbol(G1.foo1, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 157, 14)) obj13.foo2; ->obj13 : Symbol(obj13, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 165, 3)) +>obj13 : Symbol(obj13, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 165, 11)) } -var obj14: any; ->obj14 : Symbol(obj14, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 171, 3)) +declare var obj14: any; +>obj14 : Symbol(obj14, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 171, 11)) if (obj14 instanceof G) { ->obj14 : Symbol(obj14, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 171, 3)) +>obj14 : Symbol(obj14, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 171, 11)) >G : Symbol(G, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 163, 11)) obj14.foo1; >obj14.foo1 : Symbol(G1.foo1, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 157, 14)) ->obj14 : Symbol(obj14, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 171, 3)) +>obj14 : Symbol(obj14, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 171, 11)) >foo1 : Symbol(G1.foo1, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 157, 14)) obj14.foo2; ->obj14 : Symbol(obj14, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 171, 3)) +>obj14 : Symbol(obj14, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 171, 11)) } // a type with a prototype that has any type @@ -522,62 +522,62 @@ declare var H: HConstructor; >H : Symbol(H, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 182, 1), Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 186, 11)) >HConstructor : Symbol(HConstructor, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 175, 1)) -var obj15: H | string; ->obj15 : Symbol(obj15, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 188, 3)) +declare var obj15: H | string; +>obj15 : Symbol(obj15, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 188, 11)) >H : Symbol(H, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 182, 1), Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 186, 11)) if (obj15 instanceof H) { // narrowed to H. ->obj15 : Symbol(obj15, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 188, 3)) +>obj15 : Symbol(obj15, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 188, 11)) >H : Symbol(H, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 182, 1), Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 186, 11)) obj15.foo; >obj15.foo : Symbol(H.foo, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 183, 13)) ->obj15 : Symbol(obj15, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 188, 3)) +>obj15 : Symbol(obj15, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 188, 11)) >foo : Symbol(H.foo, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 183, 13)) obj15.bar; ->obj15 : Symbol(obj15, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 188, 3)) +>obj15 : Symbol(obj15, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 188, 11)) } -var obj16: any; ->obj16 : Symbol(obj16, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 194, 3)) +declare var obj16: any; +>obj16 : Symbol(obj16, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 194, 11)) if (obj16 instanceof H) { ->obj16 : Symbol(obj16, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 194, 3)) +>obj16 : Symbol(obj16, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 194, 11)) >H : Symbol(H, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 182, 1), Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 186, 11)) obj16.foo1; ->obj16 : Symbol(obj16, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 194, 3)) +>obj16 : Symbol(obj16, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 194, 11)) obj16.foo2; ->obj16 : Symbol(obj16, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 194, 3)) +>obj16 : Symbol(obj16, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 194, 11)) } -var obj17: any; ->obj17 : Symbol(obj17, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 200, 3)) +declare var obj17: any; +>obj17 : Symbol(obj17, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 200, 11)) if (obj17 instanceof Object) { // can't narrow type from 'any' to 'Object' ->obj17 : Symbol(obj17, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 200, 3)) +>obj17 : Symbol(obj17, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 200, 11)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) obj17.foo1; ->obj17 : Symbol(obj17, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 200, 3)) +>obj17 : Symbol(obj17, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 200, 11)) obj17.foo2; ->obj17 : Symbol(obj17, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 200, 3)) +>obj17 : Symbol(obj17, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 200, 11)) } -var obj18: any; ->obj18 : Symbol(obj18, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 206, 3)) +declare var obj18: any; +>obj18 : Symbol(obj18, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 206, 11)) if (obj18 instanceof Function) { // can't narrow type from 'any' to 'Function' ->obj18 : Symbol(obj18, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 206, 3)) +>obj18 : Symbol(obj18, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 206, 11)) >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.esnext.decorators.d.ts, --, --)) obj18.foo1; ->obj18 : Symbol(obj18, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 206, 3)) +>obj18 : Symbol(obj18, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 206, 11)) obj18.foo2; ->obj18 : Symbol(obj18, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 206, 3)) +>obj18 : Symbol(obj18, Decl(typeGuardsWithInstanceOfBySymbolHasInstance.ts, 206, 11)) } diff --git a/tests/baselines/reference/typeGuardsWithInstanceOfBySymbolHasInstance.types b/tests/baselines/reference/typeGuardsWithInstanceOfBySymbolHasInstance.types index f0f867b8e235f..242e44a54a0f4 100644 --- a/tests/baselines/reference/typeGuardsWithInstanceOfBySymbolHasInstance.types +++ b/tests/baselines/reference/typeGuardsWithInstanceOfBySymbolHasInstance.types @@ -24,7 +24,7 @@ declare var A: AConstructor; >A : AConstructor > : ^^^^^^^^^^^^ -var obj1: A | string; +declare var obj1: A | string; >obj1 : string | A > : ^^^^^^^^^^ @@ -53,7 +53,7 @@ if (obj1 instanceof A) { // narrowed to A. > : ^^^ } -var obj2: any; +declare var obj2: any; >obj2 : any > : ^^^ @@ -106,7 +106,7 @@ declare var B: BConstructor; >B : BConstructor > : ^^^^^^^^^^^^ -var obj3: B | string; +declare var obj3: B | string; >obj3 : string | B > : ^^^^^^^^^^^^^^^^^^ @@ -155,7 +155,7 @@ if (obj3 instanceof B) { // narrowed to B. > : ^^^^^ } -var obj4: any; +declare var obj4: any; >obj4 : any > : ^^^ @@ -256,7 +256,7 @@ declare var C: CConstructor; >C : CConstructor > : ^^^^^^^^^^^^ -var obj5: C1 | A; +declare var obj5: C1 | A; >obj5 : A | C1 > : ^^^^^^ @@ -301,7 +301,7 @@ if (obj5 instanceof C) { // narrowed to C1. > : ^^^ } -var obj6: any; +declare var obj6: any; >obj6 : any > : ^^^ @@ -363,7 +363,7 @@ declare var D: { }; -var obj7: D | string; +declare var obj7: D | string; >obj7 : string | D > : ^^^^^^^^^^ @@ -392,7 +392,7 @@ if (obj7 instanceof D) { // narrowed to D. > : ^^^ } -var obj8: any; +declare var obj8: any; >obj8 : any > : ^^^ @@ -458,7 +458,7 @@ declare var E: EConstructor; >E : EConstructor > : ^^^^^^^^^^^^ -var obj9: E1 | A; +declare var obj9: E1 | A; >obj9 : A | E1 > : ^^^^^^ @@ -495,7 +495,7 @@ if (obj9 instanceof E) { // narrowed to E1 > : ^^^ } -var obj10: any; +declare var obj10: any; >obj10 : any > : ^^^ @@ -560,7 +560,7 @@ declare var F: FConstructor; >F : FConstructor > : ^^^^^^^^^^^^ -var obj11: F | string; +declare var obj11: F | string; >obj11 : string | F > : ^^^^^^^^^^ @@ -589,7 +589,7 @@ if (obj11 instanceof F) { // can't type narrowing, construct signature returns a > : ^^^ } -var obj12: any; +declare var obj12: any; >obj12 : any > : ^^^ @@ -651,7 +651,7 @@ declare var G: GConstructor; >G : GConstructor > : ^^^^^^^^^^^^ -var obj13: G1 | G2; +declare var obj13: G1 | G2; >obj13 : G1 | G2 > : ^^^^^^^ @@ -680,7 +680,7 @@ if (obj13 instanceof G) { // narrowed to G1. G1 is return type of prototype prop > : ^^^ } -var obj14: any; +declare var obj14: any; >obj14 : any > : ^^^ @@ -737,7 +737,7 @@ declare var H: HConstructor; >H : HConstructor > : ^^^^^^^^^^^^ -var obj15: H | string; +declare var obj15: H | string; >obj15 : string | H > : ^^^^^^^^^^ @@ -766,7 +766,7 @@ if (obj15 instanceof H) { // narrowed to H. > : ^^^ } -var obj16: any; +declare var obj16: any; >obj16 : any > : ^^^ @@ -795,7 +795,7 @@ if (obj16 instanceof H) { > : ^^^ } -var obj17: any; +declare var obj17: any; >obj17 : any > : ^^^ @@ -824,7 +824,7 @@ if (obj17 instanceof Object) { // can't narrow type from 'any' to 'Object' > : ^^^ } -var obj18: any; +declare var obj18: any; >obj18 : any > : ^^^ diff --git a/tests/baselines/reference/typeMatch1.errors.txt b/tests/baselines/reference/typeMatch1.errors.txt index ed2421871edf0..e86395ed3c8a1 100644 --- a/tests/baselines/reference/typeMatch1.errors.txt +++ b/tests/baselines/reference/typeMatch1.errors.txt @@ -8,10 +8,10 @@ typeMatch1.ts(20,1): error TS2367: This comparison appears to be unintentional b interface I { z; } interface I2 { z; } - var x1: { z: number; f(n: number): string; f(s: string): number; } + declare var x1: { z: number; f(n: number): string; f(s: string): number; } var x2: { z:number;f:{(n:number):string;(s:string):number;}; } = x1; - var i:I; - var i2:I2; + declare var i:I; + declare var i2:I2; var x3:{ z; }= i; var x4:{ z; }= i2; var x5:I=i2; diff --git a/tests/baselines/reference/typeMatch1.js b/tests/baselines/reference/typeMatch1.js index b135b482de904..9276f327a7a1d 100644 --- a/tests/baselines/reference/typeMatch1.js +++ b/tests/baselines/reference/typeMatch1.js @@ -4,10 +4,10 @@ interface I { z; } interface I2 { z; } -var x1: { z: number; f(n: number): string; f(s: string): number; } +declare var x1: { z: number; f(n: number): string; f(s: string): number; } var x2: { z:number;f:{(n:number):string;(s:string):number;}; } = x1; -var i:I; -var i2:I2; +declare var i:I; +declare var i2:I2; var x3:{ z; }= i; var x4:{ z; }= i2; var x5:I=i2; @@ -26,10 +26,7 @@ C==C; //// [typeMatch1.js] -var x1; var x2 = x1; -var i; -var i2; var x3 = i; var x4 = i2; var x5 = i2; diff --git a/tests/baselines/reference/typeMatch1.symbols b/tests/baselines/reference/typeMatch1.symbols index 5df3c541d9962..5dd7abec8ada4 100644 --- a/tests/baselines/reference/typeMatch1.symbols +++ b/tests/baselines/reference/typeMatch1.symbols @@ -9,13 +9,13 @@ interface I2 { z; } >I2 : Symbol(I2, Decl(typeMatch1.ts, 0, 18)) >z : Symbol(I2.z, Decl(typeMatch1.ts, 1, 14)) -var x1: { z: number; f(n: number): string; f(s: string): number; } ->x1 : Symbol(x1, Decl(typeMatch1.ts, 3, 3)) ->z : Symbol(z, Decl(typeMatch1.ts, 3, 9)) ->f : Symbol(f, Decl(typeMatch1.ts, 3, 20), Decl(typeMatch1.ts, 3, 42)) ->n : Symbol(n, Decl(typeMatch1.ts, 3, 23)) ->f : Symbol(f, Decl(typeMatch1.ts, 3, 20), Decl(typeMatch1.ts, 3, 42)) ->s : Symbol(s, Decl(typeMatch1.ts, 3, 45)) +declare var x1: { z: number; f(n: number): string; f(s: string): number; } +>x1 : Symbol(x1, Decl(typeMatch1.ts, 3, 11)) +>z : Symbol(z, Decl(typeMatch1.ts, 3, 17)) +>f : Symbol(f, Decl(typeMatch1.ts, 3, 28), Decl(typeMatch1.ts, 3, 50)) +>n : Symbol(n, Decl(typeMatch1.ts, 3, 31)) +>f : Symbol(f, Decl(typeMatch1.ts, 3, 28), Decl(typeMatch1.ts, 3, 50)) +>s : Symbol(s, Decl(typeMatch1.ts, 3, 53)) var x2: { z:number;f:{(n:number):string;(s:string):number;}; } = x1; >x2 : Symbol(x2, Decl(typeMatch1.ts, 4, 3)) @@ -23,30 +23,30 @@ var x2: { z:number;f:{(n:number):string;(s:string):number;}; } = x1; >f : Symbol(f, Decl(typeMatch1.ts, 4, 19)) >n : Symbol(n, Decl(typeMatch1.ts, 4, 23)) >s : Symbol(s, Decl(typeMatch1.ts, 4, 41)) ->x1 : Symbol(x1, Decl(typeMatch1.ts, 3, 3)) +>x1 : Symbol(x1, Decl(typeMatch1.ts, 3, 11)) -var i:I; ->i : Symbol(i, Decl(typeMatch1.ts, 5, 3)) +declare var i:I; +>i : Symbol(i, Decl(typeMatch1.ts, 5, 11)) >I : Symbol(I, Decl(typeMatch1.ts, 0, 0)) -var i2:I2; ->i2 : Symbol(i2, Decl(typeMatch1.ts, 6, 3)) +declare var i2:I2; +>i2 : Symbol(i2, Decl(typeMatch1.ts, 6, 11)) >I2 : Symbol(I2, Decl(typeMatch1.ts, 0, 18)) var x3:{ z; }= i; >x3 : Symbol(x3, Decl(typeMatch1.ts, 7, 3)) >z : Symbol(z, Decl(typeMatch1.ts, 7, 8)) ->i : Symbol(i, Decl(typeMatch1.ts, 5, 3)) +>i : Symbol(i, Decl(typeMatch1.ts, 5, 11)) var x4:{ z; }= i2; >x4 : Symbol(x4, Decl(typeMatch1.ts, 8, 3)) >z : Symbol(z, Decl(typeMatch1.ts, 8, 8)) ->i2 : Symbol(i2, Decl(typeMatch1.ts, 6, 3)) +>i2 : Symbol(i2, Decl(typeMatch1.ts, 6, 11)) var x5:I=i2; >x5 : Symbol(x5, Decl(typeMatch1.ts, 9, 3)) >I : Symbol(I, Decl(typeMatch1.ts, 0, 0)) ->i2 : Symbol(i2, Decl(typeMatch1.ts, 6, 3)) +>i2 : Symbol(i2, Decl(typeMatch1.ts, 6, 11)) class C { private x; } >C : Symbol(C, Decl(typeMatch1.ts, 9, 12)) diff --git a/tests/baselines/reference/typeMatch1.types b/tests/baselines/reference/typeMatch1.types index 4b11351c1160a..25c425921461d 100644 --- a/tests/baselines/reference/typeMatch1.types +++ b/tests/baselines/reference/typeMatch1.types @@ -9,7 +9,7 @@ interface I2 { z; } >z : any > : ^^^ -var x1: { z: number; f(n: number): string; f(s: string): number; } +declare var x1: { z: number; f(n: number): string; f(s: string): number; } >x1 : { z: number; f(n: number): string; f(s: string): number; } > : ^^^^^ ^^^^ ^^ ^^^ ^^^^ ^^ ^^^ ^^^ >z : number @@ -37,11 +37,11 @@ var x2: { z:number;f:{(n:number):string;(s:string):number;}; } = x1; >x1 : { z: number; f(n: number): string; f(s: string): number; } > : ^^^^^ ^^^^ ^^ ^^^ ^^^^ ^^ ^^^ ^^^ -var i:I; +declare var i:I; >i : I > : ^ -var i2:I2; +declare var i2:I2; >i2 : I2 > : ^^ diff --git a/tests/baselines/reference/typeOfThisGeneral.errors.txt b/tests/baselines/reference/typeOfThisGeneral.errors.txt index 04bc11e51718c..75217b8b0843a 100644 --- a/tests/baselines/reference/typeOfThisGeneral.errors.txt +++ b/tests/baselines/reference/typeOfThisGeneral.errors.txt @@ -18,20 +18,20 @@ typeOfThisGeneral.ts(106,13): error TS2403: Subsequent variable declarations mus constructor() { //type of 'this' in constructor body is the class instance type var p = this.canary; - var p: number; + var p!: number; this.canary = 3; } //type of 'this' in member function param list is the class instance type memberFunc(t = this) { - var t: MyTestClass; + var t!: MyTestClass; ~ !!! error TS2403: Subsequent variable declarations must have the same type. Variable 't' must be of type 'this', but here has type 'MyTestClass'. !!! related TS6203 typeOfThisGeneral.ts:13:16: 't' was also declared here. //type of 'this' in member function body is the class instance type var p = this; - var p: MyTestClass; + var p!: MyTestClass; ~ !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'this', but here has type 'MyTestClass'. !!! related TS6203 typeOfThisGeneral.ts:17:13: 'p' was also declared here. @@ -40,7 +40,7 @@ typeOfThisGeneral.ts(106,13): error TS2403: Subsequent variable declarations mus //type of 'this' in member accessor(get and set) body is the class instance type get prop() { var p = this; - var p: MyTestClass; + var p!: MyTestClass; ~ !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'this', but here has type 'MyTestClass'. !!! related TS6203 typeOfThisGeneral.ts:23:13: 'p' was also declared here. @@ -48,7 +48,7 @@ typeOfThisGeneral.ts(106,13): error TS2403: Subsequent variable declarations mus } set prop(v) { var p = this; - var p: MyTestClass; + var p!: MyTestClass; ~ !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'this', but here has type 'MyTestClass'. !!! related TS6203 typeOfThisGeneral.ts:28:13: 'p' was also declared here. @@ -59,7 +59,7 @@ typeOfThisGeneral.ts(106,13): error TS2403: Subsequent variable declarations mus someFunc = () => { //type of 'this' in member variable initializer is the class instance type var t = this; - var t: MyTestClass; + var t!: MyTestClass; ~ !!! error TS2403: Subsequent variable declarations must have the same type. Variable 't' must be of type 'this', but here has type 'MyTestClass'. !!! related TS6203 typeOfThisGeneral.ts:36:13: 't' was also declared here. @@ -67,13 +67,13 @@ typeOfThisGeneral.ts(106,13): error TS2403: Subsequent variable declarations mus //type of 'this' in static function param list is constructor function type static staticFn(t = this) { - var t: typeof MyTestClass; + var t!: typeof MyTestClass; var t = MyTestClass; t.staticCanary; //type of 'this' in static function body is constructor function type var p = this; - var p: typeof MyTestClass; + var p!: typeof MyTestClass; var p = MyTestClass; p.staticCanary; } @@ -81,7 +81,7 @@ typeOfThisGeneral.ts(106,13): error TS2403: Subsequent variable declarations mus static get staticProp() { //type of 'this' in static accessor body is constructor function type var p = this; - var p: typeof MyTestClass; + var p!: typeof MyTestClass; var p = MyTestClass; p.staticCanary; return this; @@ -89,7 +89,7 @@ typeOfThisGeneral.ts(106,13): error TS2403: Subsequent variable declarations mus static set staticProp(v: typeof MyTestClass) { //type of 'this' in static accessor body is constructor function type var p = this; - var p: typeof MyTestClass; + var p!: typeof MyTestClass; var p = MyTestClass; p.staticCanary; } @@ -102,20 +102,20 @@ typeOfThisGeneral.ts(106,13): error TS2403: Subsequent variable declarations mus constructor() { //type of 'this' in constructor body is the class instance type var p = this.canary; - var p: number; + var p!: number; this.canary = 3; } //type of 'this' in member function param list is the class instance type memberFunc(t = this) { - var t: MyGenericTestClass; + var t!: MyGenericTestClass; ~ !!! error TS2403: Subsequent variable declarations must have the same type. Variable 't' must be of type 'this', but here has type 'MyGenericTestClass'. !!! related TS6203 typeOfThisGeneral.ts:82:16: 't' was also declared here. //type of 'this' in member function body is the class instance type var p = this; - var p: MyGenericTestClass; + var p!: MyGenericTestClass; ~ !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'this', but here has type 'MyGenericTestClass'. !!! related TS6203 typeOfThisGeneral.ts:86:13: 'p' was also declared here. @@ -124,7 +124,7 @@ typeOfThisGeneral.ts(106,13): error TS2403: Subsequent variable declarations mus //type of 'this' in member accessor(get and set) body is the class instance type get prop() { var p = this; - var p: MyGenericTestClass; + var p!: MyGenericTestClass; ~ !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'this', but here has type 'MyGenericTestClass'. !!! related TS6203 typeOfThisGeneral.ts:92:13: 'p' was also declared here. @@ -132,7 +132,7 @@ typeOfThisGeneral.ts(106,13): error TS2403: Subsequent variable declarations mus } set prop(v) { var p = this; - var p: MyGenericTestClass; + var p!: MyGenericTestClass; ~ !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'this', but here has type 'MyGenericTestClass'. !!! related TS6203 typeOfThisGeneral.ts:97:13: 'p' was also declared here. @@ -143,7 +143,7 @@ typeOfThisGeneral.ts(106,13): error TS2403: Subsequent variable declarations mus someFunc = () => { //type of 'this' in member variable initializer is the class instance type var t = this; - var t: MyGenericTestClass; + var t!: MyGenericTestClass; ~ !!! error TS2403: Subsequent variable declarations must have the same type. Variable 't' must be of type 'this', but here has type 'MyGenericTestClass'. !!! related TS6203 typeOfThisGeneral.ts:105:13: 't' was also declared here. @@ -151,13 +151,13 @@ typeOfThisGeneral.ts(106,13): error TS2403: Subsequent variable declarations mus //type of 'this' in static function param list is constructor function type static staticFn(t = this) { - var t: typeof MyGenericTestClass; + var t!: typeof MyGenericTestClass; var t = MyGenericTestClass; t.staticCanary; //type of 'this' in static function body is constructor function type var p = this; - var p: typeof MyGenericTestClass; + var p!: typeof MyGenericTestClass; var p = MyGenericTestClass; p.staticCanary; } @@ -165,7 +165,7 @@ typeOfThisGeneral.ts(106,13): error TS2403: Subsequent variable declarations mus static get staticProp() { //type of 'this' in static accessor body is constructor function type var p = this; - var p: typeof MyGenericTestClass; + var p!: typeof MyGenericTestClass; var p = MyGenericTestClass; p.staticCanary; return this; @@ -173,7 +173,7 @@ typeOfThisGeneral.ts(106,13): error TS2403: Subsequent variable declarations mus static set staticProp(v: typeof MyGenericTestClass) { //type of 'this' in static accessor body is constructor function type var p = this; - var p: typeof MyGenericTestClass; + var p!: typeof MyGenericTestClass; var p = MyGenericTestClass; p.staticCanary; } @@ -181,39 +181,39 @@ typeOfThisGeneral.ts(106,13): error TS2403: Subsequent variable declarations mus //type of 'this' in a function declaration param list is Any function fn(s = this) { - var s: any; + var s!: any; s.spaaaaaaace = 4; //type of 'this' in a function declaration body is Any - var t: any; + var t!: any; var t = this; this.spaaaaace = 4; } //type of 'this' in a function expression param list list is Any var q1 = function (s = this) { - var s: any; + var s!: any; s.spaaaaaaace = 4; //type of 'this' in a function expression body is Any - var t: any; + var t!: any; var t = this; this.spaaaaace = 4; } //type of 'this' in a fat arrow expression param list is typeof globalThis var q2 = (s = this) => { - var s: typeof globalThis; + var s!: typeof globalThis; s.spaaaaaaace = 4; //type of 'this' in a fat arrow expression body is typeof globalThis - var t: typeof globalThis; + var t!: typeof globalThis; var t = this; this.spaaaaace = 4; } - //type of 'this' in global module is GlobalThis - var t: typeof globalThis; + //type of 'this' in global namespace is GlobalThis + var t!: typeof globalThis; var t = this; this.spaaaaace = 4; diff --git a/tests/baselines/reference/typeOfThisGeneral.js b/tests/baselines/reference/typeOfThisGeneral.js index e474f566f62f2..031ca1e0ac58c 100644 --- a/tests/baselines/reference/typeOfThisGeneral.js +++ b/tests/baselines/reference/typeOfThisGeneral.js @@ -8,28 +8,28 @@ class MyTestClass { constructor() { //type of 'this' in constructor body is the class instance type var p = this.canary; - var p: number; + var p!: number; this.canary = 3; } //type of 'this' in member function param list is the class instance type memberFunc(t = this) { - var t: MyTestClass; + var t!: MyTestClass; //type of 'this' in member function body is the class instance type var p = this; - var p: MyTestClass; + var p!: MyTestClass; } //type of 'this' in member accessor(get and set) body is the class instance type get prop() { var p = this; - var p: MyTestClass; + var p!: MyTestClass; return this; } set prop(v) { var p = this; - var p: MyTestClass; + var p!: MyTestClass; p = v; v = p; } @@ -37,18 +37,18 @@ class MyTestClass { someFunc = () => { //type of 'this' in member variable initializer is the class instance type var t = this; - var t: MyTestClass; + var t!: MyTestClass; }; //type of 'this' in static function param list is constructor function type static staticFn(t = this) { - var t: typeof MyTestClass; + var t!: typeof MyTestClass; var t = MyTestClass; t.staticCanary; //type of 'this' in static function body is constructor function type var p = this; - var p: typeof MyTestClass; + var p!: typeof MyTestClass; var p = MyTestClass; p.staticCanary; } @@ -56,7 +56,7 @@ class MyTestClass { static get staticProp() { //type of 'this' in static accessor body is constructor function type var p = this; - var p: typeof MyTestClass; + var p!: typeof MyTestClass; var p = MyTestClass; p.staticCanary; return this; @@ -64,7 +64,7 @@ class MyTestClass { static set staticProp(v: typeof MyTestClass) { //type of 'this' in static accessor body is constructor function type var p = this; - var p: typeof MyTestClass; + var p!: typeof MyTestClass; var p = MyTestClass; p.staticCanary; } @@ -77,28 +77,28 @@ class MyGenericTestClass { constructor() { //type of 'this' in constructor body is the class instance type var p = this.canary; - var p: number; + var p!: number; this.canary = 3; } //type of 'this' in member function param list is the class instance type memberFunc(t = this) { - var t: MyGenericTestClass; + var t!: MyGenericTestClass; //type of 'this' in member function body is the class instance type var p = this; - var p: MyGenericTestClass; + var p!: MyGenericTestClass; } //type of 'this' in member accessor(get and set) body is the class instance type get prop() { var p = this; - var p: MyGenericTestClass; + var p!: MyGenericTestClass; return this; } set prop(v) { var p = this; - var p: MyGenericTestClass; + var p!: MyGenericTestClass; p = v; v = p; } @@ -106,18 +106,18 @@ class MyGenericTestClass { someFunc = () => { //type of 'this' in member variable initializer is the class instance type var t = this; - var t: MyGenericTestClass; + var t!: MyGenericTestClass; }; //type of 'this' in static function param list is constructor function type static staticFn(t = this) { - var t: typeof MyGenericTestClass; + var t!: typeof MyGenericTestClass; var t = MyGenericTestClass; t.staticCanary; //type of 'this' in static function body is constructor function type var p = this; - var p: typeof MyGenericTestClass; + var p!: typeof MyGenericTestClass; var p = MyGenericTestClass; p.staticCanary; } @@ -125,7 +125,7 @@ class MyGenericTestClass { static get staticProp() { //type of 'this' in static accessor body is constructor function type var p = this; - var p: typeof MyGenericTestClass; + var p!: typeof MyGenericTestClass; var p = MyGenericTestClass; p.staticCanary; return this; @@ -133,7 +133,7 @@ class MyGenericTestClass { static set staticProp(v: typeof MyGenericTestClass) { //type of 'this' in static accessor body is constructor function type var p = this; - var p: typeof MyGenericTestClass; + var p!: typeof MyGenericTestClass; var p = MyGenericTestClass; p.staticCanary; } @@ -141,39 +141,39 @@ class MyGenericTestClass { //type of 'this' in a function declaration param list is Any function fn(s = this) { - var s: any; + var s!: any; s.spaaaaaaace = 4; //type of 'this' in a function declaration body is Any - var t: any; + var t!: any; var t = this; this.spaaaaace = 4; } //type of 'this' in a function expression param list list is Any var q1 = function (s = this) { - var s: any; + var s!: any; s.spaaaaaaace = 4; //type of 'this' in a function expression body is Any - var t: any; + var t!: any; var t = this; this.spaaaaace = 4; } //type of 'this' in a fat arrow expression param list is typeof globalThis var q2 = (s = this) => { - var s: typeof globalThis; + var s!: typeof globalThis; s.spaaaaaaace = 4; //type of 'this' in a fat arrow expression body is typeof globalThis - var t: typeof globalThis; + var t!: typeof globalThis; var t = this; this.spaaaaace = 4; } -//type of 'this' in global module is GlobalThis -var t: typeof globalThis; +//type of 'this' in global namespace is GlobalThis +var t!: typeof globalThis; var t = this; this.spaaaaace = 4; @@ -323,7 +323,7 @@ var q2 = (s = this) => { var t = this; this.spaaaaace = 4; }; -//type of 'this' in global module is GlobalThis +//type of 'this' in global namespace is GlobalThis var t; var t = this; this.spaaaaace = 4; diff --git a/tests/baselines/reference/typeOfThisGeneral.symbols b/tests/baselines/reference/typeOfThisGeneral.symbols index 173801468f60f..c64c79cb58b8b 100644 --- a/tests/baselines/reference/typeOfThisGeneral.symbols +++ b/tests/baselines/reference/typeOfThisGeneral.symbols @@ -18,7 +18,7 @@ class MyTestClass { >this : Symbol(MyTestClass, Decl(typeOfThisGeneral.ts, 0, 0)) >canary : Symbol(MyTestClass.canary, Decl(typeOfThisGeneral.ts, 0, 19)) - var p: number; + var p!: number; >p : Symbol(p, Decl(typeOfThisGeneral.ts, 6, 11), Decl(typeOfThisGeneral.ts, 7, 11)) this.canary = 3; @@ -33,7 +33,7 @@ class MyTestClass { >t : Symbol(t, Decl(typeOfThisGeneral.ts, 12, 15), Decl(typeOfThisGeneral.ts, 13, 11)) >this : Symbol(MyTestClass, Decl(typeOfThisGeneral.ts, 0, 0)) - var t: MyTestClass; + var t!: MyTestClass; >t : Symbol(t, Decl(typeOfThisGeneral.ts, 12, 15), Decl(typeOfThisGeneral.ts, 13, 11)) >MyTestClass : Symbol(MyTestClass, Decl(typeOfThisGeneral.ts, 0, 0)) @@ -42,7 +42,7 @@ class MyTestClass { >p : Symbol(p, Decl(typeOfThisGeneral.ts, 16, 11), Decl(typeOfThisGeneral.ts, 17, 11)) >this : Symbol(MyTestClass, Decl(typeOfThisGeneral.ts, 0, 0)) - var p: MyTestClass; + var p!: MyTestClass; >p : Symbol(p, Decl(typeOfThisGeneral.ts, 16, 11), Decl(typeOfThisGeneral.ts, 17, 11)) >MyTestClass : Symbol(MyTestClass, Decl(typeOfThisGeneral.ts, 0, 0)) } @@ -55,7 +55,7 @@ class MyTestClass { >p : Symbol(p, Decl(typeOfThisGeneral.ts, 22, 11), Decl(typeOfThisGeneral.ts, 23, 11)) >this : Symbol(MyTestClass, Decl(typeOfThisGeneral.ts, 0, 0)) - var p: MyTestClass; + var p!: MyTestClass; >p : Symbol(p, Decl(typeOfThisGeneral.ts, 22, 11), Decl(typeOfThisGeneral.ts, 23, 11)) >MyTestClass : Symbol(MyTestClass, Decl(typeOfThisGeneral.ts, 0, 0)) @@ -70,7 +70,7 @@ class MyTestClass { >p : Symbol(p, Decl(typeOfThisGeneral.ts, 27, 11), Decl(typeOfThisGeneral.ts, 28, 11)) >this : Symbol(MyTestClass, Decl(typeOfThisGeneral.ts, 0, 0)) - var p: MyTestClass; + var p!: MyTestClass; >p : Symbol(p, Decl(typeOfThisGeneral.ts, 27, 11), Decl(typeOfThisGeneral.ts, 28, 11)) >MyTestClass : Symbol(MyTestClass, Decl(typeOfThisGeneral.ts, 0, 0)) @@ -91,7 +91,7 @@ class MyTestClass { >t : Symbol(t, Decl(typeOfThisGeneral.ts, 35, 11), Decl(typeOfThisGeneral.ts, 36, 11)) >this : Symbol(MyTestClass, Decl(typeOfThisGeneral.ts, 0, 0)) - var t: MyTestClass; + var t!: MyTestClass; >t : Symbol(t, Decl(typeOfThisGeneral.ts, 35, 11), Decl(typeOfThisGeneral.ts, 36, 11)) >MyTestClass : Symbol(MyTestClass, Decl(typeOfThisGeneral.ts, 0, 0)) @@ -103,7 +103,7 @@ class MyTestClass { >t : Symbol(t, Decl(typeOfThisGeneral.ts, 40, 20), Decl(typeOfThisGeneral.ts, 41, 11), Decl(typeOfThisGeneral.ts, 42, 11)) >this : Symbol(MyTestClass, Decl(typeOfThisGeneral.ts, 0, 0)) - var t: typeof MyTestClass; + var t!: typeof MyTestClass; >t : Symbol(t, Decl(typeOfThisGeneral.ts, 40, 20), Decl(typeOfThisGeneral.ts, 41, 11), Decl(typeOfThisGeneral.ts, 42, 11)) >MyTestClass : Symbol(MyTestClass, Decl(typeOfThisGeneral.ts, 0, 0)) @@ -121,7 +121,7 @@ class MyTestClass { >p : Symbol(p, Decl(typeOfThisGeneral.ts, 46, 11), Decl(typeOfThisGeneral.ts, 47, 11), Decl(typeOfThisGeneral.ts, 48, 11)) >this : Symbol(MyTestClass, Decl(typeOfThisGeneral.ts, 0, 0)) - var p: typeof MyTestClass; + var p!: typeof MyTestClass; >p : Symbol(p, Decl(typeOfThisGeneral.ts, 46, 11), Decl(typeOfThisGeneral.ts, 47, 11), Decl(typeOfThisGeneral.ts, 48, 11)) >MyTestClass : Symbol(MyTestClass, Decl(typeOfThisGeneral.ts, 0, 0)) @@ -143,7 +143,7 @@ class MyTestClass { >p : Symbol(p, Decl(typeOfThisGeneral.ts, 54, 11), Decl(typeOfThisGeneral.ts, 55, 11), Decl(typeOfThisGeneral.ts, 56, 11)) >this : Symbol(MyTestClass, Decl(typeOfThisGeneral.ts, 0, 0)) - var p: typeof MyTestClass; + var p!: typeof MyTestClass; >p : Symbol(p, Decl(typeOfThisGeneral.ts, 54, 11), Decl(typeOfThisGeneral.ts, 55, 11), Decl(typeOfThisGeneral.ts, 56, 11)) >MyTestClass : Symbol(MyTestClass, Decl(typeOfThisGeneral.ts, 0, 0)) @@ -169,7 +169,7 @@ class MyTestClass { >p : Symbol(p, Decl(typeOfThisGeneral.ts, 62, 11), Decl(typeOfThisGeneral.ts, 63, 11), Decl(typeOfThisGeneral.ts, 64, 11)) >this : Symbol(MyTestClass, Decl(typeOfThisGeneral.ts, 0, 0)) - var p: typeof MyTestClass; + var p!: typeof MyTestClass; >p : Symbol(p, Decl(typeOfThisGeneral.ts, 62, 11), Decl(typeOfThisGeneral.ts, 63, 11), Decl(typeOfThisGeneral.ts, 64, 11)) >MyTestClass : Symbol(MyTestClass, Decl(typeOfThisGeneral.ts, 0, 0)) @@ -203,7 +203,7 @@ class MyGenericTestClass { >this : Symbol(MyGenericTestClass, Decl(typeOfThisGeneral.ts, 67, 1)) >canary : Symbol(MyGenericTestClass.canary, Decl(typeOfThisGeneral.ts, 69, 32)) - var p: number; + var p!: number; >p : Symbol(p, Decl(typeOfThisGeneral.ts, 75, 11), Decl(typeOfThisGeneral.ts, 76, 11)) this.canary = 3; @@ -218,7 +218,7 @@ class MyGenericTestClass { >t : Symbol(t, Decl(typeOfThisGeneral.ts, 81, 15), Decl(typeOfThisGeneral.ts, 82, 11)) >this : Symbol(MyGenericTestClass, Decl(typeOfThisGeneral.ts, 67, 1)) - var t: MyGenericTestClass; + var t!: MyGenericTestClass; >t : Symbol(t, Decl(typeOfThisGeneral.ts, 81, 15), Decl(typeOfThisGeneral.ts, 82, 11)) >MyGenericTestClass : Symbol(MyGenericTestClass, Decl(typeOfThisGeneral.ts, 67, 1)) >T : Symbol(T, Decl(typeOfThisGeneral.ts, 69, 25)) @@ -229,7 +229,7 @@ class MyGenericTestClass { >p : Symbol(p, Decl(typeOfThisGeneral.ts, 85, 11), Decl(typeOfThisGeneral.ts, 86, 11)) >this : Symbol(MyGenericTestClass, Decl(typeOfThisGeneral.ts, 67, 1)) - var p: MyGenericTestClass; + var p!: MyGenericTestClass; >p : Symbol(p, Decl(typeOfThisGeneral.ts, 85, 11), Decl(typeOfThisGeneral.ts, 86, 11)) >MyGenericTestClass : Symbol(MyGenericTestClass, Decl(typeOfThisGeneral.ts, 67, 1)) >T : Symbol(T, Decl(typeOfThisGeneral.ts, 69, 25)) @@ -244,7 +244,7 @@ class MyGenericTestClass { >p : Symbol(p, Decl(typeOfThisGeneral.ts, 91, 11), Decl(typeOfThisGeneral.ts, 92, 11)) >this : Symbol(MyGenericTestClass, Decl(typeOfThisGeneral.ts, 67, 1)) - var p: MyGenericTestClass; + var p!: MyGenericTestClass; >p : Symbol(p, Decl(typeOfThisGeneral.ts, 91, 11), Decl(typeOfThisGeneral.ts, 92, 11)) >MyGenericTestClass : Symbol(MyGenericTestClass, Decl(typeOfThisGeneral.ts, 67, 1)) >T : Symbol(T, Decl(typeOfThisGeneral.ts, 69, 25)) @@ -261,7 +261,7 @@ class MyGenericTestClass { >p : Symbol(p, Decl(typeOfThisGeneral.ts, 96, 11), Decl(typeOfThisGeneral.ts, 97, 11)) >this : Symbol(MyGenericTestClass, Decl(typeOfThisGeneral.ts, 67, 1)) - var p: MyGenericTestClass; + var p!: MyGenericTestClass; >p : Symbol(p, Decl(typeOfThisGeneral.ts, 96, 11), Decl(typeOfThisGeneral.ts, 97, 11)) >MyGenericTestClass : Symbol(MyGenericTestClass, Decl(typeOfThisGeneral.ts, 67, 1)) >T : Symbol(T, Decl(typeOfThisGeneral.ts, 69, 25)) @@ -284,7 +284,7 @@ class MyGenericTestClass { >t : Symbol(t, Decl(typeOfThisGeneral.ts, 104, 11), Decl(typeOfThisGeneral.ts, 105, 11)) >this : Symbol(MyGenericTestClass, Decl(typeOfThisGeneral.ts, 67, 1)) - var t: MyGenericTestClass; + var t!: MyGenericTestClass; >t : Symbol(t, Decl(typeOfThisGeneral.ts, 104, 11), Decl(typeOfThisGeneral.ts, 105, 11)) >MyGenericTestClass : Symbol(MyGenericTestClass, Decl(typeOfThisGeneral.ts, 67, 1)) >T : Symbol(T, Decl(typeOfThisGeneral.ts, 69, 25)) @@ -298,7 +298,7 @@ class MyGenericTestClass { >t : Symbol(t, Decl(typeOfThisGeneral.ts, 109, 20), Decl(typeOfThisGeneral.ts, 110, 11), Decl(typeOfThisGeneral.ts, 111, 11)) >this : Symbol(MyGenericTestClass, Decl(typeOfThisGeneral.ts, 67, 1)) - var t: typeof MyGenericTestClass; + var t!: typeof MyGenericTestClass; >t : Symbol(t, Decl(typeOfThisGeneral.ts, 109, 20), Decl(typeOfThisGeneral.ts, 110, 11), Decl(typeOfThisGeneral.ts, 111, 11)) >MyGenericTestClass : Symbol(MyGenericTestClass, Decl(typeOfThisGeneral.ts, 67, 1)) @@ -316,7 +316,7 @@ class MyGenericTestClass { >p : Symbol(p, Decl(typeOfThisGeneral.ts, 115, 11), Decl(typeOfThisGeneral.ts, 116, 11), Decl(typeOfThisGeneral.ts, 117, 11)) >this : Symbol(MyGenericTestClass, Decl(typeOfThisGeneral.ts, 67, 1)) - var p: typeof MyGenericTestClass; + var p!: typeof MyGenericTestClass; >p : Symbol(p, Decl(typeOfThisGeneral.ts, 115, 11), Decl(typeOfThisGeneral.ts, 116, 11), Decl(typeOfThisGeneral.ts, 117, 11)) >MyGenericTestClass : Symbol(MyGenericTestClass, Decl(typeOfThisGeneral.ts, 67, 1)) @@ -338,7 +338,7 @@ class MyGenericTestClass { >p : Symbol(p, Decl(typeOfThisGeneral.ts, 123, 11), Decl(typeOfThisGeneral.ts, 124, 11), Decl(typeOfThisGeneral.ts, 125, 11)) >this : Symbol(MyGenericTestClass, Decl(typeOfThisGeneral.ts, 67, 1)) - var p: typeof MyGenericTestClass; + var p!: typeof MyGenericTestClass; >p : Symbol(p, Decl(typeOfThisGeneral.ts, 123, 11), Decl(typeOfThisGeneral.ts, 124, 11), Decl(typeOfThisGeneral.ts, 125, 11)) >MyGenericTestClass : Symbol(MyGenericTestClass, Decl(typeOfThisGeneral.ts, 67, 1)) @@ -364,7 +364,7 @@ class MyGenericTestClass { >p : Symbol(p, Decl(typeOfThisGeneral.ts, 131, 11), Decl(typeOfThisGeneral.ts, 132, 11), Decl(typeOfThisGeneral.ts, 133, 11)) >this : Symbol(MyGenericTestClass, Decl(typeOfThisGeneral.ts, 67, 1)) - var p: typeof MyGenericTestClass; + var p!: typeof MyGenericTestClass; >p : Symbol(p, Decl(typeOfThisGeneral.ts, 131, 11), Decl(typeOfThisGeneral.ts, 132, 11), Decl(typeOfThisGeneral.ts, 133, 11)) >MyGenericTestClass : Symbol(MyGenericTestClass, Decl(typeOfThisGeneral.ts, 67, 1)) @@ -384,14 +384,14 @@ function fn(s = this) { >fn : Symbol(fn, Decl(typeOfThisGeneral.ts, 136, 1)) >s : Symbol(s, Decl(typeOfThisGeneral.ts, 139, 12), Decl(typeOfThisGeneral.ts, 140, 7)) - var s: any; + var s!: any; >s : Symbol(s, Decl(typeOfThisGeneral.ts, 139, 12), Decl(typeOfThisGeneral.ts, 140, 7)) s.spaaaaaaace = 4; >s : Symbol(s, Decl(typeOfThisGeneral.ts, 139, 12), Decl(typeOfThisGeneral.ts, 140, 7)) //type of 'this' in a function declaration body is Any - var t: any; + var t!: any; >t : Symbol(t, Decl(typeOfThisGeneral.ts, 144, 7), Decl(typeOfThisGeneral.ts, 145, 7)) var t = this; @@ -405,14 +405,14 @@ var q1 = function (s = this) { >q1 : Symbol(q1, Decl(typeOfThisGeneral.ts, 150, 3)) >s : Symbol(s, Decl(typeOfThisGeneral.ts, 150, 19), Decl(typeOfThisGeneral.ts, 151, 7)) - var s: any; + var s!: any; >s : Symbol(s, Decl(typeOfThisGeneral.ts, 150, 19), Decl(typeOfThisGeneral.ts, 151, 7)) s.spaaaaaaace = 4; >s : Symbol(s, Decl(typeOfThisGeneral.ts, 150, 19), Decl(typeOfThisGeneral.ts, 151, 7)) //type of 'this' in a function expression body is Any - var t: any; + var t!: any; >t : Symbol(t, Decl(typeOfThisGeneral.ts, 155, 7), Decl(typeOfThisGeneral.ts, 156, 7)) var t = this; @@ -427,7 +427,7 @@ var q2 = (s = this) => { >s : Symbol(s, Decl(typeOfThisGeneral.ts, 161, 10), Decl(typeOfThisGeneral.ts, 162, 7)) >this : Symbol(globalThis) - var s: typeof globalThis; + var s!: typeof globalThis; >s : Symbol(s, Decl(typeOfThisGeneral.ts, 161, 10), Decl(typeOfThisGeneral.ts, 162, 7)) >globalThis : Symbol(globalThis) @@ -435,7 +435,7 @@ var q2 = (s = this) => { >s : Symbol(s, Decl(typeOfThisGeneral.ts, 161, 10), Decl(typeOfThisGeneral.ts, 162, 7)) //type of 'this' in a fat arrow expression body is typeof globalThis - var t: typeof globalThis; + var t!: typeof globalThis; >t : Symbol(t, Decl(typeOfThisGeneral.ts, 166, 7), Decl(typeOfThisGeneral.ts, 167, 7)) >globalThis : Symbol(globalThis) @@ -447,8 +447,8 @@ var q2 = (s = this) => { >this : Symbol(globalThis) } -//type of 'this' in global module is GlobalThis -var t: typeof globalThis; +//type of 'this' in global namespace is GlobalThis +var t!: typeof globalThis; >t : Symbol(t, Decl(typeOfThisGeneral.ts, 172, 3), Decl(typeOfThisGeneral.ts, 173, 3)) >globalThis : Symbol(globalThis) diff --git a/tests/baselines/reference/typeOfThisGeneral.types b/tests/baselines/reference/typeOfThisGeneral.types index 4e53282ef731a..167ee89924de6 100644 --- a/tests/baselines/reference/typeOfThisGeneral.types +++ b/tests/baselines/reference/typeOfThisGeneral.types @@ -25,7 +25,7 @@ class MyTestClass { >canary : number > : ^^^^^^ - var p: number; + var p!: number; >p : number > : ^^^^^^ @@ -51,7 +51,7 @@ class MyTestClass { >this : this > : ^^^^ - var t: MyTestClass; + var t!: MyTestClass; >t : this > : ^^^^ @@ -62,7 +62,7 @@ class MyTestClass { >this : this > : ^^^^ - var p: MyTestClass; + var p!: MyTestClass; >p : this > : ^^^^ } @@ -78,7 +78,7 @@ class MyTestClass { >this : this > : ^^^^ - var p: MyTestClass; + var p!: MyTestClass; >p : this > : ^^^^ @@ -98,7 +98,7 @@ class MyTestClass { >this : this > : ^^^^ - var p: MyTestClass; + var p!: MyTestClass; >p : this > : ^^^^ @@ -122,8 +122,8 @@ class MyTestClass { someFunc = () => { >someFunc : () => void > : ^^^^^^^^^^ ->() => { //type of 'this' in member variable initializer is the class instance type var t = this; var t: MyTestClass; } : () => void -> : ^^^^^^^^^^ +>() => { //type of 'this' in member variable initializer is the class instance type var t = this; var t!: MyTestClass; } : () => void +> : ^^^^^^^^^^ //type of 'this' in member variable initializer is the class instance type var t = this; @@ -132,7 +132,7 @@ class MyTestClass { >this : this > : ^^^^ - var t: MyTestClass; + var t!: MyTestClass; >t : this > : ^^^^ @@ -147,7 +147,7 @@ class MyTestClass { >this : typeof MyTestClass > : ^^^^^^^^^^^^^^^^^^ - var t: typeof MyTestClass; + var t!: typeof MyTestClass; >t : typeof MyTestClass > : ^^^^^^^^^^^^^^^^^^ >MyTestClass : typeof MyTestClass @@ -174,7 +174,7 @@ class MyTestClass { >this : typeof MyTestClass > : ^^^^^^^^^^^^^^^^^^ - var p: typeof MyTestClass; + var p!: typeof MyTestClass; >p : typeof MyTestClass > : ^^^^^^^^^^^^^^^^^^ >MyTestClass : typeof MyTestClass @@ -206,7 +206,7 @@ class MyTestClass { >this : typeof MyTestClass > : ^^^^^^^^^^^^^^^^^^ - var p: typeof MyTestClass; + var p!: typeof MyTestClass; >p : typeof MyTestClass > : ^^^^^^^^^^^^^^^^^^ >MyTestClass : typeof MyTestClass @@ -245,7 +245,7 @@ class MyTestClass { >this : typeof MyTestClass > : ^^^^^^^^^^^^^^^^^^ - var p: typeof MyTestClass; + var p!: typeof MyTestClass; >p : typeof MyTestClass > : ^^^^^^^^^^^^^^^^^^ >MyTestClass : typeof MyTestClass @@ -291,7 +291,7 @@ class MyGenericTestClass { >canary : number > : ^^^^^^ - var p: number; + var p!: number; >p : number > : ^^^^^^ @@ -317,7 +317,7 @@ class MyGenericTestClass { >this : this > : ^^^^ - var t: MyGenericTestClass; + var t!: MyGenericTestClass; >t : this > : ^^^^ @@ -328,7 +328,7 @@ class MyGenericTestClass { >this : this > : ^^^^ - var p: MyGenericTestClass; + var p!: MyGenericTestClass; >p : this > : ^^^^ } @@ -344,7 +344,7 @@ class MyGenericTestClass { >this : this > : ^^^^ - var p: MyGenericTestClass; + var p!: MyGenericTestClass; >p : this > : ^^^^ @@ -364,7 +364,7 @@ class MyGenericTestClass { >this : this > : ^^^^ - var p: MyGenericTestClass; + var p!: MyGenericTestClass; >p : this > : ^^^^ @@ -388,8 +388,8 @@ class MyGenericTestClass { someFunc = () => { >someFunc : () => void > : ^^^^^^^^^^ ->() => { //type of 'this' in member variable initializer is the class instance type var t = this; var t: MyGenericTestClass; } : () => void -> : ^^^^^^^^^^ +>() => { //type of 'this' in member variable initializer is the class instance type var t = this; var t!: MyGenericTestClass; } : () => void +> : ^^^^^^^^^^ //type of 'this' in member variable initializer is the class instance type var t = this; @@ -398,7 +398,7 @@ class MyGenericTestClass { >this : this > : ^^^^ - var t: MyGenericTestClass; + var t!: MyGenericTestClass; >t : this > : ^^^^ @@ -413,7 +413,7 @@ class MyGenericTestClass { >this : typeof MyGenericTestClass > : ^^^^^^^^^^^^^^^^^^^^^^^^^ - var t: typeof MyGenericTestClass; + var t!: typeof MyGenericTestClass; >t : typeof MyGenericTestClass > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >MyGenericTestClass : typeof MyGenericTestClass @@ -440,7 +440,7 @@ class MyGenericTestClass { >this : typeof MyGenericTestClass > : ^^^^^^^^^^^^^^^^^^^^^^^^^ - var p: typeof MyGenericTestClass; + var p!: typeof MyGenericTestClass; >p : typeof MyGenericTestClass > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >MyGenericTestClass : typeof MyGenericTestClass @@ -472,7 +472,7 @@ class MyGenericTestClass { >this : typeof MyGenericTestClass > : ^^^^^^^^^^^^^^^^^^^^^^^^^ - var p: typeof MyGenericTestClass; + var p!: typeof MyGenericTestClass; >p : typeof MyGenericTestClass > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >MyGenericTestClass : typeof MyGenericTestClass @@ -511,7 +511,7 @@ class MyGenericTestClass { >this : typeof MyGenericTestClass > : ^^^^^^^^^^^^^^^^^^^^^^^^^ - var p: typeof MyGenericTestClass; + var p!: typeof MyGenericTestClass; >p : typeof MyGenericTestClass > : ^^^^^^^^^^^^^^^^^^^^^^^^^ >MyGenericTestClass : typeof MyGenericTestClass @@ -542,7 +542,7 @@ function fn(s = this) { >this : any > : ^^^ - var s: any; + var s!: any; >s : any > : ^^^ @@ -559,7 +559,7 @@ function fn(s = this) { > : ^ //type of 'this' in a function declaration body is Any - var t: any; + var t!: any; >t : any > : ^^^ @@ -586,14 +586,14 @@ function fn(s = this) { var q1 = function (s = this) { >q1 : (s?: any) => void > : ^ ^^^^^^^^^^^^^^^ ->function (s = this) { var s: any; s.spaaaaaaace = 4; //type of 'this' in a function expression body is Any var t: any; var t = this; this.spaaaaace = 4;} : (s?: any) => void -> : ^ ^^^^^^^^^^^^^^^ +>function (s = this) { var s!: any; s.spaaaaaaace = 4; //type of 'this' in a function expression body is Any var t!: any; var t = this; this.spaaaaace = 4;} : (s?: any) => void +> : ^ ^^^^^^^^^^^^^^^ >s : any > : ^^^ >this : any > : ^^^ - var s: any; + var s!: any; >s : any > : ^^^ @@ -610,7 +610,7 @@ var q1 = function (s = this) { > : ^ //type of 'this' in a function expression body is Any - var t: any; + var t!: any; >t : any > : ^^^ @@ -637,14 +637,14 @@ var q1 = function (s = this) { var q2 = (s = this) => { >q2 : (s?: typeof globalThis) => void > : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->(s = this) => { var s: typeof globalThis; s.spaaaaaaace = 4; //type of 'this' in a fat arrow expression body is typeof globalThis var t: typeof globalThis; var t = this; this.spaaaaace = 4;} : (s?: typeof globalThis) => void -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>(s = this) => { var s!: typeof globalThis; s.spaaaaaaace = 4; //type of 'this' in a fat arrow expression body is typeof globalThis var t!: typeof globalThis; var t = this; this.spaaaaace = 4;} : (s?: typeof globalThis) => void +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >s : typeof globalThis > : ^^^^^^^^^^^^^^^^^ >this : typeof globalThis > : ^^^^^^^^^^^^^^^^^ - var s: typeof globalThis; + var s!: typeof globalThis; >s : typeof globalThis > : ^^^^^^^^^^^^^^^^^ >globalThis : typeof globalThis @@ -663,7 +663,7 @@ var q2 = (s = this) => { > : ^ //type of 'this' in a fat arrow expression body is typeof globalThis - var t: typeof globalThis; + var t!: typeof globalThis; >t : typeof globalThis > : ^^^^^^^^^^^^^^^^^ >globalThis : typeof globalThis @@ -688,8 +688,8 @@ var q2 = (s = this) => { > : ^ } -//type of 'this' in global module is GlobalThis -var t: typeof globalThis; +//type of 'this' in global namespace is GlobalThis +var t!: typeof globalThis; >t : typeof globalThis > : ^^^^^^^^^^^^^^^^^ >globalThis : typeof globalThis diff --git a/tests/baselines/reference/typeOfThisInInstanceMember.errors.txt b/tests/baselines/reference/typeOfThisInInstanceMember.errors.txt index b560d6498825b..c9dc3406784be 100644 --- a/tests/baselines/reference/typeOfThisInInstanceMember.errors.txt +++ b/tests/baselines/reference/typeOfThisInInstanceMember.errors.txt @@ -22,7 +22,7 @@ typeOfThisInInstanceMember.ts(10,11): error TS2339: Property 'z' does not exist } } - var c: C; + declare var c: C; // all ok var r = c.x; var ra = c.x.x.x; diff --git a/tests/baselines/reference/typeOfThisInInstanceMember.js b/tests/baselines/reference/typeOfThisInInstanceMember.js index 4056077c13096..66600548512d7 100644 --- a/tests/baselines/reference/typeOfThisInInstanceMember.js +++ b/tests/baselines/reference/typeOfThisInInstanceMember.js @@ -19,7 +19,7 @@ class C { } } -var c: C; +declare var c: C; // all ok var r = c.x; var ra = c.x.x.x; @@ -55,7 +55,6 @@ var C = /** @class */ (function () { }); return C; }()); -var c; // all ok var r = c.x; var ra = c.x.x.x; diff --git a/tests/baselines/reference/typeOfThisInInstanceMember.symbols b/tests/baselines/reference/typeOfThisInInstanceMember.symbols index d22259cbcd654..f5d95eb54f7c5 100644 --- a/tests/baselines/reference/typeOfThisInInstanceMember.symbols +++ b/tests/baselines/reference/typeOfThisInInstanceMember.symbols @@ -49,15 +49,15 @@ class C { } } -var c: C; ->c : Symbol(c, Decl(typeOfThisInInstanceMember.ts, 18, 3)) +declare var c: C; +>c : Symbol(c, Decl(typeOfThisInInstanceMember.ts, 18, 11)) >C : Symbol(C, Decl(typeOfThisInInstanceMember.ts, 0, 0)) // all ok var r = c.x; >r : Symbol(r, Decl(typeOfThisInInstanceMember.ts, 20, 3)) >c.x : Symbol(C.x, Decl(typeOfThisInInstanceMember.ts, 0, 9)) ->c : Symbol(c, Decl(typeOfThisInInstanceMember.ts, 18, 3)) +>c : Symbol(c, Decl(typeOfThisInInstanceMember.ts, 18, 11)) >x : Symbol(C.x, Decl(typeOfThisInInstanceMember.ts, 0, 9)) var ra = c.x.x.x; @@ -65,7 +65,7 @@ var ra = c.x.x.x; >c.x.x.x : Symbol(C.x, Decl(typeOfThisInInstanceMember.ts, 0, 9)) >c.x.x : Symbol(C.x, Decl(typeOfThisInInstanceMember.ts, 0, 9)) >c.x : Symbol(C.x, Decl(typeOfThisInInstanceMember.ts, 0, 9)) ->c : Symbol(c, Decl(typeOfThisInInstanceMember.ts, 18, 3)) +>c : Symbol(c, Decl(typeOfThisInInstanceMember.ts, 18, 11)) >x : Symbol(C.x, Decl(typeOfThisInInstanceMember.ts, 0, 9)) >x : Symbol(C.x, Decl(typeOfThisInInstanceMember.ts, 0, 9)) >x : Symbol(C.x, Decl(typeOfThisInInstanceMember.ts, 0, 9)) @@ -73,13 +73,13 @@ var ra = c.x.x.x; var r2 = c.y; >r2 : Symbol(r2, Decl(typeOfThisInInstanceMember.ts, 22, 3)) >c.y : Symbol(C.y, Decl(typeOfThisInInstanceMember.ts, 11, 5)) ->c : Symbol(c, Decl(typeOfThisInInstanceMember.ts, 18, 3)) +>c : Symbol(c, Decl(typeOfThisInInstanceMember.ts, 18, 11)) >y : Symbol(C.y, Decl(typeOfThisInInstanceMember.ts, 11, 5)) var r3 = c.foo(); >r3 : Symbol(r3, Decl(typeOfThisInInstanceMember.ts, 23, 3)) >c.foo : Symbol(C.foo, Decl(typeOfThisInInstanceMember.ts, 1, 13)) ->c : Symbol(c, Decl(typeOfThisInInstanceMember.ts, 18, 3)) +>c : Symbol(c, Decl(typeOfThisInInstanceMember.ts, 18, 11)) >foo : Symbol(C.foo, Decl(typeOfThisInInstanceMember.ts, 1, 13)) var rs = [r, r2, r3]; diff --git a/tests/baselines/reference/typeOfThisInInstanceMember.types b/tests/baselines/reference/typeOfThisInInstanceMember.types index 778004f41e4cd..fecd02b324de4 100644 --- a/tests/baselines/reference/typeOfThisInInstanceMember.types +++ b/tests/baselines/reference/typeOfThisInInstanceMember.types @@ -76,7 +76,7 @@ class C { } } -var c: C; +declare var c: C; >c : C > : ^ diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence.errors.txt b/tests/baselines/reference/typeParameterArgumentEquivalence.errors.txt index e7baf233b1e01..53c3a48519a91 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence.errors.txt +++ b/tests/baselines/reference/typeParameterArgumentEquivalence.errors.txt @@ -9,8 +9,8 @@ typeParameterArgumentEquivalence.ts(5,5): error TS2322: Type '(item: number) => ==== typeParameterArgumentEquivalence.ts (2 errors) ==== function foo() { - var x: (item: number) => boolean; - var y: (item: T) => boolean; + var x!: (item: number) => boolean; + var y!: (item: T) => boolean; x = y; // Should be an error ~ !!! error TS2322: Type '(item: T) => boolean' is not assignable to type '(item: number) => boolean'. diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence.js b/tests/baselines/reference/typeParameterArgumentEquivalence.js index 101a452d0eaa8..0bb472a4ad56d 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence.js +++ b/tests/baselines/reference/typeParameterArgumentEquivalence.js @@ -2,8 +2,8 @@ //// [typeParameterArgumentEquivalence.ts] function foo() { - var x: (item: number) => boolean; - var y: (item: T) => boolean; + var x!: (item: number) => boolean; + var y!: (item: T) => boolean; x = y; // Should be an error y = x; // Shound be an error } diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence.symbols b/tests/baselines/reference/typeParameterArgumentEquivalence.symbols index c9f07ee86fc45..b009d3c30e53d 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence.symbols +++ b/tests/baselines/reference/typeParameterArgumentEquivalence.symbols @@ -5,13 +5,13 @@ function foo() { >foo : Symbol(foo, Decl(typeParameterArgumentEquivalence.ts, 0, 0)) >T : Symbol(T, Decl(typeParameterArgumentEquivalence.ts, 0, 13)) - var x: (item: number) => boolean; + var x!: (item: number) => boolean; >x : Symbol(x, Decl(typeParameterArgumentEquivalence.ts, 1, 7)) ->item : Symbol(item, Decl(typeParameterArgumentEquivalence.ts, 1, 12)) +>item : Symbol(item, Decl(typeParameterArgumentEquivalence.ts, 1, 13)) - var y: (item: T) => boolean; + var y!: (item: T) => boolean; >y : Symbol(y, Decl(typeParameterArgumentEquivalence.ts, 2, 7)) ->item : Symbol(item, Decl(typeParameterArgumentEquivalence.ts, 2, 12)) +>item : Symbol(item, Decl(typeParameterArgumentEquivalence.ts, 2, 13)) >T : Symbol(T, Decl(typeParameterArgumentEquivalence.ts, 0, 13)) x = y; // Should be an error diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence.types b/tests/baselines/reference/typeParameterArgumentEquivalence.types index f0c07d8e65963..c231186983c7a 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence.types +++ b/tests/baselines/reference/typeParameterArgumentEquivalence.types @@ -5,13 +5,13 @@ function foo() { >foo : () => void > : ^ ^^^^^^^^^^^ - var x: (item: number) => boolean; + var x!: (item: number) => boolean; >x : (item: number) => boolean > : ^ ^^ ^^^^^ >item : number > : ^^^^^^ - var y: (item: T) => boolean; + var y!: (item: T) => boolean; >y : (item: T) => boolean > : ^ ^^ ^^^^^ >item : T diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence2.errors.txt b/tests/baselines/reference/typeParameterArgumentEquivalence2.errors.txt index fd34093a24146..8895a8ac9d4cc 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence2.errors.txt +++ b/tests/baselines/reference/typeParameterArgumentEquivalence2.errors.txt @@ -10,8 +10,8 @@ typeParameterArgumentEquivalence2.ts(5,5): error TS2322: Type '(item: U) => bool ==== typeParameterArgumentEquivalence2.ts (2 errors) ==== function foo() { - var x: (item: U) => boolean; - var y: (item: T) => boolean; + var x!: (item: U) => boolean; + var y!: (item: T) => boolean; x = y; // Should be an error ~ !!! error TS2322: Type '(item: T) => boolean' is not assignable to type '(item: U) => boolean'. diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence2.js b/tests/baselines/reference/typeParameterArgumentEquivalence2.js index 72e10f1805d36..a411b05ac7c09 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence2.js +++ b/tests/baselines/reference/typeParameterArgumentEquivalence2.js @@ -2,8 +2,8 @@ //// [typeParameterArgumentEquivalence2.ts] function foo() { - var x: (item: U) => boolean; - var y: (item: T) => boolean; + var x!: (item: U) => boolean; + var y!: (item: T) => boolean; x = y; // Should be an error y = x; // Shound be an error } diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence2.symbols b/tests/baselines/reference/typeParameterArgumentEquivalence2.symbols index 88917eea03d7a..cf01bb9233865 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence2.symbols +++ b/tests/baselines/reference/typeParameterArgumentEquivalence2.symbols @@ -6,14 +6,14 @@ function foo() { >T : Symbol(T, Decl(typeParameterArgumentEquivalence2.ts, 0, 13)) >U : Symbol(U, Decl(typeParameterArgumentEquivalence2.ts, 0, 15)) - var x: (item: U) => boolean; + var x!: (item: U) => boolean; >x : Symbol(x, Decl(typeParameterArgumentEquivalence2.ts, 1, 7)) ->item : Symbol(item, Decl(typeParameterArgumentEquivalence2.ts, 1, 12)) +>item : Symbol(item, Decl(typeParameterArgumentEquivalence2.ts, 1, 13)) >U : Symbol(U, Decl(typeParameterArgumentEquivalence2.ts, 0, 15)) - var y: (item: T) => boolean; + var y!: (item: T) => boolean; >y : Symbol(y, Decl(typeParameterArgumentEquivalence2.ts, 2, 7)) ->item : Symbol(item, Decl(typeParameterArgumentEquivalence2.ts, 2, 12)) +>item : Symbol(item, Decl(typeParameterArgumentEquivalence2.ts, 2, 13)) >T : Symbol(T, Decl(typeParameterArgumentEquivalence2.ts, 0, 13)) x = y; // Should be an error diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence2.types b/tests/baselines/reference/typeParameterArgumentEquivalence2.types index d39f0c9cbd565..46bec0037c507 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence2.types +++ b/tests/baselines/reference/typeParameterArgumentEquivalence2.types @@ -5,13 +5,13 @@ function foo() { >foo : () => void > : ^ ^^ ^^^^^^^^^^^ - var x: (item: U) => boolean; + var x!: (item: U) => boolean; >x : (item: U) => boolean > : ^ ^^ ^^^^^ >item : U > : ^ - var y: (item: T) => boolean; + var y!: (item: T) => boolean; >y : (item: T) => boolean > : ^ ^^ ^^^^^ >item : T diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence3.errors.txt b/tests/baselines/reference/typeParameterArgumentEquivalence3.errors.txt index 67323fa6992c2..b9a4a726c3bf8 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence3.errors.txt +++ b/tests/baselines/reference/typeParameterArgumentEquivalence3.errors.txt @@ -7,8 +7,8 @@ typeParameterArgumentEquivalence3.ts(5,5): error TS2322: Type '(item: any) => T' ==== typeParameterArgumentEquivalence3.ts (2 errors) ==== function foo() { - var x: (item) => T; - var y: (item) => boolean; + var x!: (item: any) => T; + var y!: (item: any) => boolean; x = y; // Should be an error ~ !!! error TS2322: Type '(item: any) => boolean' is not assignable to type '(item: any) => T'. diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence3.js b/tests/baselines/reference/typeParameterArgumentEquivalence3.js index 91ad3922e2a5a..14e61352e5401 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence3.js +++ b/tests/baselines/reference/typeParameterArgumentEquivalence3.js @@ -2,8 +2,8 @@ //// [typeParameterArgumentEquivalence3.ts] function foo() { - var x: (item) => T; - var y: (item) => boolean; + var x!: (item: any) => T; + var y!: (item: any) => boolean; x = y; // Should be an error y = x; // Shound be an error } diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence3.symbols b/tests/baselines/reference/typeParameterArgumentEquivalence3.symbols index 3e88cc71a2743..23ecf245d0338 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence3.symbols +++ b/tests/baselines/reference/typeParameterArgumentEquivalence3.symbols @@ -6,14 +6,14 @@ function foo() { >T : Symbol(T, Decl(typeParameterArgumentEquivalence3.ts, 0, 13)) >U : Symbol(U, Decl(typeParameterArgumentEquivalence3.ts, 0, 15)) - var x: (item) => T; + var x!: (item: any) => T; >x : Symbol(x, Decl(typeParameterArgumentEquivalence3.ts, 1, 7)) ->item : Symbol(item, Decl(typeParameterArgumentEquivalence3.ts, 1, 12)) +>item : Symbol(item, Decl(typeParameterArgumentEquivalence3.ts, 1, 13)) >T : Symbol(T, Decl(typeParameterArgumentEquivalence3.ts, 0, 13)) - var y: (item) => boolean; + var y!: (item: any) => boolean; >y : Symbol(y, Decl(typeParameterArgumentEquivalence3.ts, 2, 7)) ->item : Symbol(item, Decl(typeParameterArgumentEquivalence3.ts, 2, 12)) +>item : Symbol(item, Decl(typeParameterArgumentEquivalence3.ts, 2, 13)) x = y; // Should be an error >x : Symbol(x, Decl(typeParameterArgumentEquivalence3.ts, 1, 7)) diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence3.types b/tests/baselines/reference/typeParameterArgumentEquivalence3.types index 723e6d3da3b64..205bb5bfa50c4 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence3.types +++ b/tests/baselines/reference/typeParameterArgumentEquivalence3.types @@ -5,32 +5,32 @@ function foo() { >foo : () => void > : ^ ^^ ^^^^^^^^^^^ - var x: (item) => T; + var x!: (item: any) => T; >x : (item: any) => T -> : ^ ^^^^^^^^^^ +> : ^ ^^ ^^^^^ >item : any > : ^^^ - var y: (item) => boolean; + var y!: (item: any) => boolean; >y : (item: any) => boolean -> : ^ ^^^^^^^^^^ +> : ^ ^^ ^^^^^ >item : any > : ^^^ x = y; // Should be an error >x = y : (item: any) => boolean -> : ^ ^^^^^^^^^^ +> : ^ ^^ ^^^^^ >x : (item: any) => T -> : ^ ^^^^^^^^^^ +> : ^ ^^ ^^^^^ >y : (item: any) => boolean -> : ^ ^^^^^^^^^^ +> : ^ ^^ ^^^^^ y = x; // Shound be an error >y = x : (item: any) => T -> : ^ ^^^^^^^^^^ +> : ^ ^^ ^^^^^ >y : (item: any) => boolean -> : ^ ^^^^^^^^^^ +> : ^ ^^ ^^^^^ >x : (item: any) => T -> : ^ ^^^^^^^^^^ +> : ^ ^^ ^^^^^ } diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence4.errors.txt b/tests/baselines/reference/typeParameterArgumentEquivalence4.errors.txt index 8bfde43d3cb23..8907304ee7fac 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence4.errors.txt +++ b/tests/baselines/reference/typeParameterArgumentEquivalence4.errors.txt @@ -8,8 +8,8 @@ typeParameterArgumentEquivalence4.ts(5,5): error TS2322: Type '(item: any) => U' ==== typeParameterArgumentEquivalence4.ts (2 errors) ==== function foo() { - var x: (item) => U; - var y: (item) => T; + var x!: (item: any) => U; + var y!: (item: any) => T; x = y; // Should be an error ~ !!! error TS2322: Type '(item: any) => T' is not assignable to type '(item: any) => U'. diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence4.js b/tests/baselines/reference/typeParameterArgumentEquivalence4.js index bfb17bc56f530..0796ea59b79f0 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence4.js +++ b/tests/baselines/reference/typeParameterArgumentEquivalence4.js @@ -2,8 +2,8 @@ //// [typeParameterArgumentEquivalence4.ts] function foo() { - var x: (item) => U; - var y: (item) => T; + var x!: (item: any) => U; + var y!: (item: any) => T; x = y; // Should be an error y = x; // Shound be an error } diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence4.symbols b/tests/baselines/reference/typeParameterArgumentEquivalence4.symbols index 9150933185745..affae4df91a06 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence4.symbols +++ b/tests/baselines/reference/typeParameterArgumentEquivalence4.symbols @@ -6,14 +6,14 @@ function foo() { >T : Symbol(T, Decl(typeParameterArgumentEquivalence4.ts, 0, 13)) >U : Symbol(U, Decl(typeParameterArgumentEquivalence4.ts, 0, 15)) - var x: (item) => U; + var x!: (item: any) => U; >x : Symbol(x, Decl(typeParameterArgumentEquivalence4.ts, 1, 7)) ->item : Symbol(item, Decl(typeParameterArgumentEquivalence4.ts, 1, 12)) +>item : Symbol(item, Decl(typeParameterArgumentEquivalence4.ts, 1, 13)) >U : Symbol(U, Decl(typeParameterArgumentEquivalence4.ts, 0, 15)) - var y: (item) => T; + var y!: (item: any) => T; >y : Symbol(y, Decl(typeParameterArgumentEquivalence4.ts, 2, 7)) ->item : Symbol(item, Decl(typeParameterArgumentEquivalence4.ts, 2, 12)) +>item : Symbol(item, Decl(typeParameterArgumentEquivalence4.ts, 2, 13)) >T : Symbol(T, Decl(typeParameterArgumentEquivalence4.ts, 0, 13)) x = y; // Should be an error diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence4.types b/tests/baselines/reference/typeParameterArgumentEquivalence4.types index 6550f15502c8a..7771d2c6a5ccb 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence4.types +++ b/tests/baselines/reference/typeParameterArgumentEquivalence4.types @@ -5,32 +5,32 @@ function foo() { >foo : () => void > : ^ ^^ ^^^^^^^^^^^ - var x: (item) => U; + var x!: (item: any) => U; >x : (item: any) => U -> : ^ ^^^^^^^^^^ +> : ^ ^^ ^^^^^ >item : any > : ^^^ - var y: (item) => T; + var y!: (item: any) => T; >y : (item: any) => T -> : ^ ^^^^^^^^^^ +> : ^ ^^ ^^^^^ >item : any > : ^^^ x = y; // Should be an error >x = y : (item: any) => T -> : ^ ^^^^^^^^^^ +> : ^ ^^ ^^^^^ >x : (item: any) => U -> : ^ ^^^^^^^^^^ +> : ^ ^^ ^^^^^ >y : (item: any) => T -> : ^ ^^^^^^^^^^ +> : ^ ^^ ^^^^^ y = x; // Shound be an error >y = x : (item: any) => U -> : ^ ^^^^^^^^^^ +> : ^ ^^ ^^^^^ >y : (item: any) => T -> : ^ ^^^^^^^^^^ +> : ^ ^^ ^^^^^ >x : (item: any) => U -> : ^ ^^^^^^^^^^ +> : ^ ^^ ^^^^^ } diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence5.errors.txt b/tests/baselines/reference/typeParameterArgumentEquivalence5.errors.txt index 3fdd5cbeb0321..adc1fc4a37d6f 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence5.errors.txt +++ b/tests/baselines/reference/typeParameterArgumentEquivalence5.errors.txt @@ -10,8 +10,8 @@ typeParameterArgumentEquivalence5.ts(5,5): error TS2322: Type '() => (item: any) ==== typeParameterArgumentEquivalence5.ts (2 errors) ==== function foo() { - var x: () => (item) => U; - var y: () => (item) => T; + var x!: () => (item: any) => U; + var y!: () => (item: any) => T; x = y; // Should be an error ~ !!! error TS2322: Type '() => (item: any) => T' is not assignable to type '() => (item: any) => U'. diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence5.js b/tests/baselines/reference/typeParameterArgumentEquivalence5.js index f978d8e476598..b1fe8b8aae72d 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence5.js +++ b/tests/baselines/reference/typeParameterArgumentEquivalence5.js @@ -2,8 +2,8 @@ //// [typeParameterArgumentEquivalence5.ts] function foo() { - var x: () => (item) => U; - var y: () => (item) => T; + var x!: () => (item: any) => U; + var y!: () => (item: any) => T; x = y; // Should be an error y = x; // Shound be an error } diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence5.symbols b/tests/baselines/reference/typeParameterArgumentEquivalence5.symbols index 4e1ae87b9ccc1..5f948940cabd2 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence5.symbols +++ b/tests/baselines/reference/typeParameterArgumentEquivalence5.symbols @@ -6,14 +6,14 @@ function foo() { >T : Symbol(T, Decl(typeParameterArgumentEquivalence5.ts, 0, 13)) >U : Symbol(U, Decl(typeParameterArgumentEquivalence5.ts, 0, 15)) - var x: () => (item) => U; + var x!: () => (item: any) => U; >x : Symbol(x, Decl(typeParameterArgumentEquivalence5.ts, 1, 7)) ->item : Symbol(item, Decl(typeParameterArgumentEquivalence5.ts, 1, 18)) +>item : Symbol(item, Decl(typeParameterArgumentEquivalence5.ts, 1, 19)) >U : Symbol(U, Decl(typeParameterArgumentEquivalence5.ts, 0, 15)) - var y: () => (item) => T; + var y!: () => (item: any) => T; >y : Symbol(y, Decl(typeParameterArgumentEquivalence5.ts, 2, 7)) ->item : Symbol(item, Decl(typeParameterArgumentEquivalence5.ts, 2, 18)) +>item : Symbol(item, Decl(typeParameterArgumentEquivalence5.ts, 2, 19)) >T : Symbol(T, Decl(typeParameterArgumentEquivalence5.ts, 0, 13)) x = y; // Should be an error diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence5.types b/tests/baselines/reference/typeParameterArgumentEquivalence5.types index fc0e28f525809..725726f673caa 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence5.types +++ b/tests/baselines/reference/typeParameterArgumentEquivalence5.types @@ -5,32 +5,32 @@ function foo() { >foo : () => void > : ^ ^^ ^^^^^^^^^^^ - var x: () => (item) => U; + var x!: () => (item: any) => U; >x : () => (item: any) => U -> : ^^^^^^ ^^^ +> : ^^^^^^ >item : any > : ^^^ - var y: () => (item) => T; + var y!: () => (item: any) => T; >y : () => (item: any) => T -> : ^^^^^^ ^^^ +> : ^^^^^^ >item : any > : ^^^ x = y; // Should be an error >x = y : () => (item: any) => T -> : ^^^^^^ ^^^ +> : ^^^^^^ >x : () => (item: any) => U -> : ^^^^^^ ^^^ +> : ^^^^^^ >y : () => (item: any) => T -> : ^^^^^^ ^^^ +> : ^^^^^^ y = x; // Shound be an error >y = x : () => (item: any) => U -> : ^^^^^^ ^^^ +> : ^^^^^^ >y : () => (item: any) => T -> : ^^^^^^ ^^^ +> : ^^^^^^ >x : () => (item: any) => U -> : ^^^^^^ ^^^ +> : ^^^^^^ } diff --git a/tests/baselines/reference/typeParameterAssignmentCompat1.errors.txt b/tests/baselines/reference/typeParameterAssignmentCompat1.errors.txt index cbba70ca89e80..c52940e03ad2c 100644 --- a/tests/baselines/reference/typeParameterAssignmentCompat1.errors.txt +++ b/tests/baselines/reference/typeParameterAssignmentCompat1.errors.txt @@ -18,8 +18,8 @@ typeParameterAssignmentCompat1.ts(17,9): error TS2322: Type 'Foo' is not assi } function f(): Foo { - var x: Foo; - var y: Foo; + var x!: Foo; + var y!: Foo; x = y; // should be an error ~ !!! error TS2322: Type 'Foo' is not assignable to type 'Foo'. @@ -36,8 +36,8 @@ typeParameterAssignmentCompat1.ts(17,9): error TS2322: Type 'Foo' is not assi class C { f(): Foo { - var x: Foo; - var y: Foo; + var x!: Foo; + var y!: Foo; x = y; // should be an error ~ !!! error TS2322: Type 'Foo' is not assignable to type 'Foo'. diff --git a/tests/baselines/reference/typeParameterAssignmentCompat1.js b/tests/baselines/reference/typeParameterAssignmentCompat1.js index a356e284505f7..bba984c1e1fa4 100644 --- a/tests/baselines/reference/typeParameterAssignmentCompat1.js +++ b/tests/baselines/reference/typeParameterAssignmentCompat1.js @@ -6,16 +6,16 @@ interface Foo { } function f(): Foo { - var x: Foo; - var y: Foo; + var x!: Foo; + var y!: Foo; x = y; // should be an error return x; } class C { f(): Foo { - var x: Foo; - var y: Foo; + var x!: Foo; + var y!: Foo; x = y; // should be an error return x; } diff --git a/tests/baselines/reference/typeParameterAssignmentCompat1.symbols b/tests/baselines/reference/typeParameterAssignmentCompat1.symbols index 9042e3493dac0..7ac0befb44daa 100644 --- a/tests/baselines/reference/typeParameterAssignmentCompat1.symbols +++ b/tests/baselines/reference/typeParameterAssignmentCompat1.symbols @@ -19,12 +19,12 @@ function f(): Foo { >Foo : Symbol(Foo, Decl(typeParameterAssignmentCompat1.ts, 0, 0)) >U : Symbol(U, Decl(typeParameterAssignmentCompat1.ts, 4, 13)) - var x: Foo; + var x!: Foo; >x : Symbol(x, Decl(typeParameterAssignmentCompat1.ts, 5, 7)) >Foo : Symbol(Foo, Decl(typeParameterAssignmentCompat1.ts, 0, 0)) >T : Symbol(T, Decl(typeParameterAssignmentCompat1.ts, 4, 11)) - var y: Foo; + var y!: Foo; >y : Symbol(y, Decl(typeParameterAssignmentCompat1.ts, 6, 7)) >Foo : Symbol(Foo, Decl(typeParameterAssignmentCompat1.ts, 0, 0)) >U : Symbol(U, Decl(typeParameterAssignmentCompat1.ts, 4, 13)) @@ -47,12 +47,12 @@ class C { >Foo : Symbol(Foo, Decl(typeParameterAssignmentCompat1.ts, 0, 0)) >U : Symbol(U, Decl(typeParameterAssignmentCompat1.ts, 12, 6)) - var x: Foo; + var x!: Foo; >x : Symbol(x, Decl(typeParameterAssignmentCompat1.ts, 13, 11)) >Foo : Symbol(Foo, Decl(typeParameterAssignmentCompat1.ts, 0, 0)) >T : Symbol(T, Decl(typeParameterAssignmentCompat1.ts, 11, 8)) - var y: Foo; + var y!: Foo; >y : Symbol(y, Decl(typeParameterAssignmentCompat1.ts, 14, 11)) >Foo : Symbol(Foo, Decl(typeParameterAssignmentCompat1.ts, 0, 0)) >U : Symbol(U, Decl(typeParameterAssignmentCompat1.ts, 12, 6)) diff --git a/tests/baselines/reference/typeParameterAssignmentCompat1.types b/tests/baselines/reference/typeParameterAssignmentCompat1.types index 0b3c05aabcea7..4a970b8c46bb2 100644 --- a/tests/baselines/reference/typeParameterAssignmentCompat1.types +++ b/tests/baselines/reference/typeParameterAssignmentCompat1.types @@ -13,11 +13,11 @@ function f(): Foo { >f : () => Foo > : ^ ^^ ^^^^^^^ - var x: Foo; + var x!: Foo; >x : Foo > : ^^^^^^ - var y: Foo; + var y!: Foo; >y : Foo > : ^^^^^^ @@ -42,11 +42,11 @@ class C { >f : () => Foo > : ^ ^^^^^^^ - var x: Foo; + var x!: Foo; >x : Foo > : ^^^^^^ - var y: Foo; + var y!: Foo; >y : Foo > : ^^^^^^ diff --git a/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter.errors.txt b/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter.errors.txt index 11e95c8421bb7..0cbcbc35d3912 100644 --- a/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter.errors.txt +++ b/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter.errors.txt @@ -13,7 +13,7 @@ typeParameterConstrainedToOuterTypeParameter.ts(10,5): error TS2322: Type 'A(x: U) } - var a: A + declare var a: A; var b: B = a; // assignment should be legal (both U's get instantiated to any for comparison) ~ !!! error TS2322: Type 'A' is not assignable to type 'B'. diff --git a/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter.js b/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter.js index e9d733cf5f255..dc43590415aa9 100644 --- a/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter.js +++ b/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter.js @@ -9,9 +9,8 @@ interface B { (x: U) } -var a: A +declare var a: A; var b: B = a; // assignment should be legal (both U's get instantiated to any for comparison) //// [typeParameterConstrainedToOuterTypeParameter.js] -var a; var b = a; // assignment should be legal (both U's get instantiated to any for comparison) diff --git a/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter.symbols b/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter.symbols index 029ecca9f1191..4214e090b4daf 100644 --- a/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter.symbols +++ b/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter.symbols @@ -23,12 +23,12 @@ interface B { >U : Symbol(U, Decl(typeParameterConstrainedToOuterTypeParameter.ts, 5, 5)) } -var a: A ->a : Symbol(a, Decl(typeParameterConstrainedToOuterTypeParameter.ts, 8, 3)) +declare var a: A; +>a : Symbol(a, Decl(typeParameterConstrainedToOuterTypeParameter.ts, 8, 11)) >A : Symbol(A, Decl(typeParameterConstrainedToOuterTypeParameter.ts, 0, 0)) var b: B = a; // assignment should be legal (both U's get instantiated to any for comparison) >b : Symbol(b, Decl(typeParameterConstrainedToOuterTypeParameter.ts, 9, 3)) >B : Symbol(B, Decl(typeParameterConstrainedToOuterTypeParameter.ts, 2, 1)) ->a : Symbol(a, Decl(typeParameterConstrainedToOuterTypeParameter.ts, 8, 3)) +>a : Symbol(a, Decl(typeParameterConstrainedToOuterTypeParameter.ts, 8, 11)) diff --git a/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter.types b/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter.types index 9ff9b55891336..9536dfd9da740 100644 --- a/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter.types +++ b/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter.types @@ -13,7 +13,7 @@ interface B { > : ^ } -var a: A +declare var a: A; >a : A > : ^^^^^^^^^ diff --git a/tests/baselines/reference/typeParameterDiamond2.errors.txt b/tests/baselines/reference/typeParameterDiamond2.errors.txt index 411486bf90830..c1fa82b270038 100644 --- a/tests/baselines/reference/typeParameterDiamond2.errors.txt +++ b/tests/baselines/reference/typeParameterDiamond2.errors.txt @@ -8,9 +8,9 @@ typeParameterDiamond2.ts(10,13): error TS2322: Type 'Bottom' is not assignable t function diamondTop() { function diamondMiddle() { function diamondBottom() { - var top: Top; - var middle: T | U; - var bottom: Bottom; + var top!: Top; + var middle!: T | U; + var bottom!: Bottom; top = middle; ~~~ diff --git a/tests/baselines/reference/typeParameterDiamond2.js b/tests/baselines/reference/typeParameterDiamond2.js index 4863f45323bb3..788e86ef28153 100644 --- a/tests/baselines/reference/typeParameterDiamond2.js +++ b/tests/baselines/reference/typeParameterDiamond2.js @@ -4,9 +4,9 @@ function diamondTop() { function diamondMiddle() { function diamondBottom() { - var top: Top; - var middle: T | U; - var bottom: Bottom; + var top!: Top; + var middle!: T | U; + var bottom!: Bottom; top = middle; middle = bottom; diff --git a/tests/baselines/reference/typeParameterDiamond2.symbols b/tests/baselines/reference/typeParameterDiamond2.symbols index 361d2e2eb96a7..b754bd5fae13e 100644 --- a/tests/baselines/reference/typeParameterDiamond2.symbols +++ b/tests/baselines/reference/typeParameterDiamond2.symbols @@ -17,16 +17,16 @@ function diamondTop() { >T : Symbol(T, Decl(typeParameterDiamond2.ts, 1, 27)) >U : Symbol(U, Decl(typeParameterDiamond2.ts, 1, 41)) - var top: Top; + var top!: Top; >top : Symbol(top, Decl(typeParameterDiamond2.ts, 3, 15)) >Top : Symbol(Top, Decl(typeParameterDiamond2.ts, 0, 20)) - var middle: T | U; + var middle!: T | U; >middle : Symbol(middle, Decl(typeParameterDiamond2.ts, 4, 15)) >T : Symbol(T, Decl(typeParameterDiamond2.ts, 1, 27)) >U : Symbol(U, Decl(typeParameterDiamond2.ts, 1, 41)) - var bottom: Bottom; + var bottom!: Bottom; >bottom : Symbol(bottom, Decl(typeParameterDiamond2.ts, 5, 15)) >Bottom : Symbol(Bottom, Decl(typeParameterDiamond2.ts, 2, 31)) diff --git a/tests/baselines/reference/typeParameterDiamond2.types b/tests/baselines/reference/typeParameterDiamond2.types index edf1c60232221..563f1e9ebca8a 100644 --- a/tests/baselines/reference/typeParameterDiamond2.types +++ b/tests/baselines/reference/typeParameterDiamond2.types @@ -13,15 +13,15 @@ function diamondTop() { >diamondBottom : () => void > : ^ ^^^^^^^^^ ^^^^^^^^^^^ - var top: Top; + var top!: Top; >top : Top > : ^^^ - var middle: T | U; + var middle!: T | U; >middle : T | U > : ^^^^^ - var bottom: Bottom; + var bottom!: Bottom; >bottom : Bottom > : ^^^^^^ diff --git a/tests/baselines/reference/typeParameterDiamond3.errors.txt b/tests/baselines/reference/typeParameterDiamond3.errors.txt index 0a65c77595899..59920354f0dcf 100644 --- a/tests/baselines/reference/typeParameterDiamond3.errors.txt +++ b/tests/baselines/reference/typeParameterDiamond3.errors.txt @@ -11,9 +11,9 @@ typeParameterDiamond3.ts(10,13): error TS2322: Type 'Bottom' is not assignable t function diamondTop() { function diamondMiddle() { function diamondBottom() { - var top: Top; - var middle: T | U; - var bottom: Bottom; + var top!: Top; + var middle!: T | U; + var bottom!: Bottom; top = middle; ~~~ diff --git a/tests/baselines/reference/typeParameterDiamond3.js b/tests/baselines/reference/typeParameterDiamond3.js index 0e5c968b52d72..962862f244bbc 100644 --- a/tests/baselines/reference/typeParameterDiamond3.js +++ b/tests/baselines/reference/typeParameterDiamond3.js @@ -4,9 +4,9 @@ function diamondTop() { function diamondMiddle() { function diamondBottom() { - var top: Top; - var middle: T | U; - var bottom: Bottom; + var top!: Top; + var middle!: T | U; + var bottom!: Bottom; top = middle; middle = bottom; diff --git a/tests/baselines/reference/typeParameterDiamond3.symbols b/tests/baselines/reference/typeParameterDiamond3.symbols index 5cefe5e401e8d..5e2dae72106db 100644 --- a/tests/baselines/reference/typeParameterDiamond3.symbols +++ b/tests/baselines/reference/typeParameterDiamond3.symbols @@ -17,16 +17,16 @@ function diamondTop() { >T : Symbol(T, Decl(typeParameterDiamond3.ts, 1, 27)) >U : Symbol(U, Decl(typeParameterDiamond3.ts, 1, 29)) - var top: Top; + var top!: Top; >top : Symbol(top, Decl(typeParameterDiamond3.ts, 3, 15)) >Top : Symbol(Top, Decl(typeParameterDiamond3.ts, 0, 20)) - var middle: T | U; + var middle!: T | U; >middle : Symbol(middle, Decl(typeParameterDiamond3.ts, 4, 15)) >T : Symbol(T, Decl(typeParameterDiamond3.ts, 1, 27)) >U : Symbol(U, Decl(typeParameterDiamond3.ts, 1, 29)) - var bottom: Bottom; + var bottom!: Bottom; >bottom : Symbol(bottom, Decl(typeParameterDiamond3.ts, 5, 15)) >Bottom : Symbol(Bottom, Decl(typeParameterDiamond3.ts, 2, 31)) diff --git a/tests/baselines/reference/typeParameterDiamond3.types b/tests/baselines/reference/typeParameterDiamond3.types index b74ac85eaeda8..9da135943d79e 100644 --- a/tests/baselines/reference/typeParameterDiamond3.types +++ b/tests/baselines/reference/typeParameterDiamond3.types @@ -13,15 +13,15 @@ function diamondTop() { >diamondBottom : () => void > : ^ ^^^^^^^^^ ^^^^^^^^^^^ - var top: Top; + var top!: Top; >top : Top > : ^^^ - var middle: T | U; + var middle!: T | U; >middle : T | U > : ^^^^^ - var bottom: Bottom; + var bottom!: Bottom; >bottom : Bottom > : ^^^^^^ diff --git a/tests/baselines/reference/typeParameterDiamond4.errors.txt b/tests/baselines/reference/typeParameterDiamond4.errors.txt index 0a55ce915a378..1422a6eccfdb8 100644 --- a/tests/baselines/reference/typeParameterDiamond4.errors.txt +++ b/tests/baselines/reference/typeParameterDiamond4.errors.txt @@ -8,9 +8,9 @@ typeParameterDiamond4.ts(10,13): error TS2322: Type 'Bottom' is not assignable t function diamondTop() { function diamondMiddle() { function diamondBottom() { - var top: Top; - var middle: Top | T | U; - var bottom: Bottom; + var top!: Top; + var middle!: Top | T | U; + var bottom!: Bottom; top = middle; ~~~ diff --git a/tests/baselines/reference/typeParameterDiamond4.js b/tests/baselines/reference/typeParameterDiamond4.js index 5c210d49c1019..b09a9f99b9185 100644 --- a/tests/baselines/reference/typeParameterDiamond4.js +++ b/tests/baselines/reference/typeParameterDiamond4.js @@ -4,9 +4,9 @@ function diamondTop() { function diamondMiddle() { function diamondBottom() { - var top: Top; - var middle: Top | T | U; - var bottom: Bottom; + var top!: Top; + var middle!: Top | T | U; + var bottom!: Bottom; top = middle; middle = bottom; diff --git a/tests/baselines/reference/typeParameterDiamond4.symbols b/tests/baselines/reference/typeParameterDiamond4.symbols index bbeb02ddacd96..c309ff8da5f39 100644 --- a/tests/baselines/reference/typeParameterDiamond4.symbols +++ b/tests/baselines/reference/typeParameterDiamond4.symbols @@ -17,17 +17,17 @@ function diamondTop() { >T : Symbol(T, Decl(typeParameterDiamond4.ts, 1, 27)) >U : Symbol(U, Decl(typeParameterDiamond4.ts, 1, 29)) - var top: Top; + var top!: Top; >top : Symbol(top, Decl(typeParameterDiamond4.ts, 3, 15)) >Top : Symbol(Top, Decl(typeParameterDiamond4.ts, 0, 20)) - var middle: Top | T | U; + var middle!: Top | T | U; >middle : Symbol(middle, Decl(typeParameterDiamond4.ts, 4, 15)) >Top : Symbol(Top, Decl(typeParameterDiamond4.ts, 0, 20)) >T : Symbol(T, Decl(typeParameterDiamond4.ts, 1, 27)) >U : Symbol(U, Decl(typeParameterDiamond4.ts, 1, 29)) - var bottom: Bottom; + var bottom!: Bottom; >bottom : Symbol(bottom, Decl(typeParameterDiamond4.ts, 5, 15)) >Bottom : Symbol(Bottom, Decl(typeParameterDiamond4.ts, 2, 31)) diff --git a/tests/baselines/reference/typeParameterDiamond4.types b/tests/baselines/reference/typeParameterDiamond4.types index 154ae0312ab80..eeb8d2ce682c4 100644 --- a/tests/baselines/reference/typeParameterDiamond4.types +++ b/tests/baselines/reference/typeParameterDiamond4.types @@ -13,15 +13,15 @@ function diamondTop() { >diamondBottom : () => void > : ^ ^^^^^^^^^ ^^^^^^^^^^^ - var top: Top; + var top!: Top; >top : Top > : ^^^ - var middle: Top | T | U; + var middle!: Top | T | U; >middle : Top | T | U > : ^^^^^^^^^^^ - var bottom: Bottom; + var bottom!: Bottom; >bottom : Bottom > : ^^^^^^ diff --git a/tests/baselines/reference/typeParameterExplicitlyExtendsAny.errors.txt b/tests/baselines/reference/typeParameterExplicitlyExtendsAny.errors.txt index 72ffcb76a1610..80fbfaffc7e28 100644 --- a/tests/baselines/reference/typeParameterExplicitlyExtendsAny.errors.txt +++ b/tests/baselines/reference/typeParameterExplicitlyExtendsAny.errors.txt @@ -10,7 +10,7 @@ typeParameterExplicitlyExtendsAny.ts(30,14): error TS2339: Property 'children' d ==== typeParameterExplicitlyExtendsAny.ts (6 errors) ==== function fee() { - var t: T; + var t!: T; t.blah; // Error ~~~~ !!! error TS2339: Property 'blah' does not exist on type 'T'. @@ -18,7 +18,7 @@ typeParameterExplicitlyExtendsAny.ts(30,14): error TS2339: Property 'children' d } function fee2() { - var t: T; + var t!: T; t.blah; // ok ~~~~ !!! error TS2339: Property 'blah' does not exist on type 'T'. diff --git a/tests/baselines/reference/typeParameterExplicitlyExtendsAny.js b/tests/baselines/reference/typeParameterExplicitlyExtendsAny.js index 4123e6e9ad1a0..c61b7e56d7f61 100644 --- a/tests/baselines/reference/typeParameterExplicitlyExtendsAny.js +++ b/tests/baselines/reference/typeParameterExplicitlyExtendsAny.js @@ -2,13 +2,13 @@ //// [typeParameterExplicitlyExtendsAny.ts] function fee() { - var t: T; + var t!: T; t.blah; // Error t.toString; // ok } function fee2() { - var t: T; + var t!: T; t.blah; // ok t.toString; // ok } diff --git a/tests/baselines/reference/typeParameterExplicitlyExtendsAny.symbols b/tests/baselines/reference/typeParameterExplicitlyExtendsAny.symbols index c95e8202cc8b7..d4fa3b6188ee1 100644 --- a/tests/baselines/reference/typeParameterExplicitlyExtendsAny.symbols +++ b/tests/baselines/reference/typeParameterExplicitlyExtendsAny.symbols @@ -5,7 +5,7 @@ function fee() { >fee : Symbol(fee, Decl(typeParameterExplicitlyExtendsAny.ts, 0, 0)) >T : Symbol(T, Decl(typeParameterExplicitlyExtendsAny.ts, 0, 13)) - var t: T; + var t!: T; >t : Symbol(t, Decl(typeParameterExplicitlyExtendsAny.ts, 1, 7)) >T : Symbol(T, Decl(typeParameterExplicitlyExtendsAny.ts, 0, 13)) @@ -22,7 +22,7 @@ function fee2() { >fee2 : Symbol(fee2, Decl(typeParameterExplicitlyExtendsAny.ts, 4, 1)) >T : Symbol(T, Decl(typeParameterExplicitlyExtendsAny.ts, 6, 14)) - var t: T; + var t!: T; >t : Symbol(t, Decl(typeParameterExplicitlyExtendsAny.ts, 7, 7)) >T : Symbol(T, Decl(typeParameterExplicitlyExtendsAny.ts, 6, 14)) diff --git a/tests/baselines/reference/typeParameterExplicitlyExtendsAny.types b/tests/baselines/reference/typeParameterExplicitlyExtendsAny.types index 5d8dfdcaa1f98..267881f94f777 100644 --- a/tests/baselines/reference/typeParameterExplicitlyExtendsAny.types +++ b/tests/baselines/reference/typeParameterExplicitlyExtendsAny.types @@ -5,7 +5,7 @@ function fee() { >fee : () => void > : ^ ^^^^^^^^^^^ - var t: T; + var t!: T; >t : T > : ^ @@ -30,7 +30,7 @@ function fee2() { >fee2 : () => void > : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - var t: T; + var t!: T; >t : T > : ^ diff --git a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.errors.txt b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.errors.txt index 85d26cfa6283e..dc127c5ec9479 100644 --- a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.errors.txt +++ b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.errors.txt @@ -6,7 +6,7 @@ typeParameterFixingWithContextSensitiveArguments2.ts(7,30): error TS2741: Proper interface A { a: A; } interface B extends A { b; } - var a: A, b: B; + declare var a: A, b: B; var d = f(a, b, x => x, x => x); // A => A not assignable to A => B ~ diff --git a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.js b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.js index 1d19fc37e4f59..fd324a622c98c 100644 --- a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.js +++ b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.js @@ -5,11 +5,10 @@ function f(y: T, y1: U, p: (z: U) => T, p1: (x: T) => U): [T, U] { return interface A { a: A; } interface B extends A { b; } -var a: A, b: B; +declare var a: A, b: B; var d = f(a, b, x => x, x => x); // A => A not assignable to A => B //// [typeParameterFixingWithContextSensitiveArguments2.js] function f(y, y1, p, p1) { return [y, p1(y)]; } -var a, b; var d = f(a, b, function (x) { return x; }, function (x) { return x; }); // A => A not assignable to A => B diff --git a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.symbols b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.symbols index dc9008ea3dfd1..bcb365c8a3516 100644 --- a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.symbols +++ b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.symbols @@ -33,17 +33,17 @@ interface B extends A { b; } >A : Symbol(A, Decl(typeParameterFixingWithContextSensitiveArguments2.ts, 0, 93)) >b : Symbol(B.b, Decl(typeParameterFixingWithContextSensitiveArguments2.ts, 2, 23)) -var a: A, b: B; ->a : Symbol(a, Decl(typeParameterFixingWithContextSensitiveArguments2.ts, 4, 3)) +declare var a: A, b: B; +>a : Symbol(a, Decl(typeParameterFixingWithContextSensitiveArguments2.ts, 4, 11)) >A : Symbol(A, Decl(typeParameterFixingWithContextSensitiveArguments2.ts, 0, 93)) ->b : Symbol(b, Decl(typeParameterFixingWithContextSensitiveArguments2.ts, 4, 9)) +>b : Symbol(b, Decl(typeParameterFixingWithContextSensitiveArguments2.ts, 4, 17)) >B : Symbol(B, Decl(typeParameterFixingWithContextSensitiveArguments2.ts, 1, 21)) var d = f(a, b, x => x, x => x); // A => A not assignable to A => B >d : Symbol(d, Decl(typeParameterFixingWithContextSensitiveArguments2.ts, 6, 3)) >f : Symbol(f, Decl(typeParameterFixingWithContextSensitiveArguments2.ts, 0, 0)) ->a : Symbol(a, Decl(typeParameterFixingWithContextSensitiveArguments2.ts, 4, 3)) ->b : Symbol(b, Decl(typeParameterFixingWithContextSensitiveArguments2.ts, 4, 9)) +>a : Symbol(a, Decl(typeParameterFixingWithContextSensitiveArguments2.ts, 4, 11)) +>b : Symbol(b, Decl(typeParameterFixingWithContextSensitiveArguments2.ts, 4, 17)) >x : Symbol(x, Decl(typeParameterFixingWithContextSensitiveArguments2.ts, 6, 15)) >x : Symbol(x, Decl(typeParameterFixingWithContextSensitiveArguments2.ts, 6, 15)) >x : Symbol(x, Decl(typeParameterFixingWithContextSensitiveArguments2.ts, 6, 23)) diff --git a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.types b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.types index 42f1ca3d701a8..de10e8879d0cd 100644 --- a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.types +++ b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.types @@ -35,7 +35,7 @@ interface B extends A { b; } >b : any > : ^^^ -var a: A, b: B; +declare var a: A, b: B; >a : A > : ^ >b : B diff --git a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.errors.txt b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.errors.txt index 1670671cfc2c9..3cc1181e234c8 100644 --- a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.errors.txt +++ b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.errors.txt @@ -6,7 +6,7 @@ typeParameterFixingWithContextSensitiveArguments3.ts(7,35): error TS2741: Proper interface A { a: A; } interface B extends A { b: B; } - var a: A, b: B; + declare var a: A, b: B; var d = f(a, b, u2 => u2.b, t2 => t2); ~~ diff --git a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.js b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.js index ede8ce3b1706b..3d25093176322 100644 --- a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.js +++ b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.js @@ -5,11 +5,10 @@ function f(t1: T, u1: U, pf1: (u2: U) => T, pf2: (t2: T) => U): [T, U] { r interface A { a: A; } interface B extends A { b: B; } -var a: A, b: B; +declare var a: A, b: B; var d = f(a, b, u2 => u2.b, t2 => t2); //// [typeParameterFixingWithContextSensitiveArguments3.js] function f(t1, u1, pf1, pf2) { return [t1, pf2(t1)]; } -var a, b; var d = f(a, b, function (u2) { return u2.b; }, function (t2) { return t2; }); diff --git a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.symbols b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.symbols index 0dd1b7ef88686..d2756a5a1511d 100644 --- a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.symbols +++ b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.symbols @@ -34,17 +34,17 @@ interface B extends A { b: B; } >b : Symbol(B.b, Decl(typeParameterFixingWithContextSensitiveArguments3.ts, 2, 23)) >B : Symbol(B, Decl(typeParameterFixingWithContextSensitiveArguments3.ts, 1, 21)) -var a: A, b: B; ->a : Symbol(a, Decl(typeParameterFixingWithContextSensitiveArguments3.ts, 4, 3)) +declare var a: A, b: B; +>a : Symbol(a, Decl(typeParameterFixingWithContextSensitiveArguments3.ts, 4, 11)) >A : Symbol(A, Decl(typeParameterFixingWithContextSensitiveArguments3.ts, 0, 102)) ->b : Symbol(b, Decl(typeParameterFixingWithContextSensitiveArguments3.ts, 4, 9)) +>b : Symbol(b, Decl(typeParameterFixingWithContextSensitiveArguments3.ts, 4, 17)) >B : Symbol(B, Decl(typeParameterFixingWithContextSensitiveArguments3.ts, 1, 21)) var d = f(a, b, u2 => u2.b, t2 => t2); >d : Symbol(d, Decl(typeParameterFixingWithContextSensitiveArguments3.ts, 6, 3)) >f : Symbol(f, Decl(typeParameterFixingWithContextSensitiveArguments3.ts, 0, 0)) ->a : Symbol(a, Decl(typeParameterFixingWithContextSensitiveArguments3.ts, 4, 3)) ->b : Symbol(b, Decl(typeParameterFixingWithContextSensitiveArguments3.ts, 4, 9)) +>a : Symbol(a, Decl(typeParameterFixingWithContextSensitiveArguments3.ts, 4, 11)) +>b : Symbol(b, Decl(typeParameterFixingWithContextSensitiveArguments3.ts, 4, 17)) >u2 : Symbol(u2, Decl(typeParameterFixingWithContextSensitiveArguments3.ts, 6, 15)) >u2.b : Symbol(B.b, Decl(typeParameterFixingWithContextSensitiveArguments3.ts, 2, 23)) >u2 : Symbol(u2, Decl(typeParameterFixingWithContextSensitiveArguments3.ts, 6, 15)) diff --git a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.types b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.types index 4e538eec3f2f2..d2276cd97201e 100644 --- a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.types +++ b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.types @@ -35,7 +35,7 @@ interface B extends A { b: B; } >b : B > : ^ -var a: A, b: B; +declare var a: A, b: B; >a : A > : ^ >b : B diff --git a/tests/baselines/reference/typeParameterWithInvalidConstraintType.errors.txt b/tests/baselines/reference/typeParameterWithInvalidConstraintType.errors.txt index d5fa251adcc4f..342cb732ba6ff 100644 --- a/tests/baselines/reference/typeParameterWithInvalidConstraintType.errors.txt +++ b/tests/baselines/reference/typeParameterWithInvalidConstraintType.errors.txt @@ -11,7 +11,7 @@ typeParameterWithInvalidConstraintType.ts(7,17): error TS2349: This expression i ~ !!! error TS2313: Type parameter 'T' has a circular constraint. foo() { - var x: T; + var x!: T; var a = x.foo(); ~~~ !!! error TS2339: Property 'foo' does not exist on type 'T'. diff --git a/tests/baselines/reference/typeParameterWithInvalidConstraintType.js b/tests/baselines/reference/typeParameterWithInvalidConstraintType.js index 0f28d2b742138..f7a89a4816c39 100644 --- a/tests/baselines/reference/typeParameterWithInvalidConstraintType.js +++ b/tests/baselines/reference/typeParameterWithInvalidConstraintType.js @@ -3,7 +3,7 @@ //// [typeParameterWithInvalidConstraintType.ts] class A { foo() { - var x: T; + var x!: T; var a = x.foo(); var b = new x(123); var c = x[1]; diff --git a/tests/baselines/reference/typeParameterWithInvalidConstraintType.symbols b/tests/baselines/reference/typeParameterWithInvalidConstraintType.symbols index e9684a730b59c..d05b5155e734e 100644 --- a/tests/baselines/reference/typeParameterWithInvalidConstraintType.symbols +++ b/tests/baselines/reference/typeParameterWithInvalidConstraintType.symbols @@ -9,7 +9,7 @@ class A { foo() { >foo : Symbol(A.foo, Decl(typeParameterWithInvalidConstraintType.ts, 0, 22)) - var x: T; + var x!: T; >x : Symbol(x, Decl(typeParameterWithInvalidConstraintType.ts, 2, 11)) >T : Symbol(T, Decl(typeParameterWithInvalidConstraintType.ts, 0, 8)) diff --git a/tests/baselines/reference/typeParameterWithInvalidConstraintType.types b/tests/baselines/reference/typeParameterWithInvalidConstraintType.types index 45592c10b4157..c1a47f8b2e68c 100644 --- a/tests/baselines/reference/typeParameterWithInvalidConstraintType.types +++ b/tests/baselines/reference/typeParameterWithInvalidConstraintType.types @@ -9,7 +9,7 @@ class A { >foo : () => void > : ^^^^^^^^^^ - var x: T; + var x!: T; >x : T > : ^ diff --git a/tests/baselines/reference/typeParametersShouldNotBeEqual.errors.txt b/tests/baselines/reference/typeParametersShouldNotBeEqual.errors.txt index 3241095401ef9..a90141036c136 100644 --- a/tests/baselines/reference/typeParametersShouldNotBeEqual.errors.txt +++ b/tests/baselines/reference/typeParametersShouldNotBeEqual.errors.txt @@ -6,7 +6,7 @@ typeParametersShouldNotBeEqual.ts(5,5): error TS2322: Type 'Object' is not assig ==== typeParametersShouldNotBeEqual.ts (2 errors) ==== function ff(x: T, y: U) { - var z: Object; + var z!: Object; x = x; // Ok x = y; // Error ~ diff --git a/tests/baselines/reference/typeParametersShouldNotBeEqual.js b/tests/baselines/reference/typeParametersShouldNotBeEqual.js index e15aac7380087..c4ea6842486d3 100644 --- a/tests/baselines/reference/typeParametersShouldNotBeEqual.js +++ b/tests/baselines/reference/typeParametersShouldNotBeEqual.js @@ -2,7 +2,7 @@ //// [typeParametersShouldNotBeEqual.ts] function ff(x: T, y: U) { - var z: Object; + var z!: Object; x = x; // Ok x = y; // Error x = z; // Error diff --git a/tests/baselines/reference/typeParametersShouldNotBeEqual.symbols b/tests/baselines/reference/typeParametersShouldNotBeEqual.symbols index 80a90740e6f30..1ab1b1d198250 100644 --- a/tests/baselines/reference/typeParametersShouldNotBeEqual.symbols +++ b/tests/baselines/reference/typeParametersShouldNotBeEqual.symbols @@ -10,7 +10,7 @@ function ff(x: T, y: U) { >y : Symbol(y, Decl(typeParametersShouldNotBeEqual.ts, 0, 23)) >U : Symbol(U, Decl(typeParametersShouldNotBeEqual.ts, 0, 14)) - var z: Object; + var z!: Object; >z : Symbol(z, Decl(typeParametersShouldNotBeEqual.ts, 1, 7)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/typeParametersShouldNotBeEqual.types b/tests/baselines/reference/typeParametersShouldNotBeEqual.types index 72d54644670df..f4a6875f02c92 100644 --- a/tests/baselines/reference/typeParametersShouldNotBeEqual.types +++ b/tests/baselines/reference/typeParametersShouldNotBeEqual.types @@ -9,7 +9,7 @@ function ff(x: T, y: U) { >y : U > : ^ - var z: Object; + var z!: Object; >z : Object > : ^^^^^^ diff --git a/tests/baselines/reference/typeParametersShouldNotBeEqual2.errors.txt b/tests/baselines/reference/typeParametersShouldNotBeEqual2.errors.txt index 6f45110e9877c..08a27a16bb294 100644 --- a/tests/baselines/reference/typeParametersShouldNotBeEqual2.errors.txt +++ b/tests/baselines/reference/typeParametersShouldNotBeEqual2.errors.txt @@ -14,7 +14,7 @@ typeParametersShouldNotBeEqual2.ts(9,5): error TS2322: Type 'Object' is not assi ==== typeParametersShouldNotBeEqual2.ts (6 errors) ==== function ff(x: T, y: U, z: V) { - var zz: Object; + var zz!: Object; x = x; // Ok x = y; // Ok ~ diff --git a/tests/baselines/reference/typeParametersShouldNotBeEqual2.js b/tests/baselines/reference/typeParametersShouldNotBeEqual2.js index f934be3524ef3..f71c6df7d6fc2 100644 --- a/tests/baselines/reference/typeParametersShouldNotBeEqual2.js +++ b/tests/baselines/reference/typeParametersShouldNotBeEqual2.js @@ -2,7 +2,7 @@ //// [typeParametersShouldNotBeEqual2.ts] function ff(x: T, y: U, z: V) { - var zz: Object; + var zz!: Object; x = x; // Ok x = y; // Ok x = z; // Error diff --git a/tests/baselines/reference/typeParametersShouldNotBeEqual2.symbols b/tests/baselines/reference/typeParametersShouldNotBeEqual2.symbols index 08fc654f5e888..830a39b578017 100644 --- a/tests/baselines/reference/typeParametersShouldNotBeEqual2.symbols +++ b/tests/baselines/reference/typeParametersShouldNotBeEqual2.symbols @@ -15,7 +15,7 @@ function ff(x: T, y: U, z: V) { >z : Symbol(z, Decl(typeParametersShouldNotBeEqual2.ts, 0, 58)) >V : Symbol(V, Decl(typeParametersShouldNotBeEqual2.ts, 0, 43)) - var zz: Object; + var zz!: Object; >zz : Symbol(zz, Decl(typeParametersShouldNotBeEqual2.ts, 1, 7)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/typeParametersShouldNotBeEqual2.types b/tests/baselines/reference/typeParametersShouldNotBeEqual2.types index da7c03932120f..465ea7286ebe7 100644 --- a/tests/baselines/reference/typeParametersShouldNotBeEqual2.types +++ b/tests/baselines/reference/typeParametersShouldNotBeEqual2.types @@ -11,7 +11,7 @@ function ff(x: T, y: U, z: V) { >z : V > : ^ - var zz: Object; + var zz!: Object; >zz : Object > : ^^^^^^ diff --git a/tests/baselines/reference/typeParametersShouldNotBeEqual3.errors.txt b/tests/baselines/reference/typeParametersShouldNotBeEqual3.errors.txt index b5e5f1a6bff9d..40f22b9ceb560 100644 --- a/tests/baselines/reference/typeParametersShouldNotBeEqual3.errors.txt +++ b/tests/baselines/reference/typeParametersShouldNotBeEqual3.errors.txt @@ -7,7 +7,7 @@ typeParametersShouldNotBeEqual3.ts(5,5): error TS2322: Type 'Object' is not assi ==== typeParametersShouldNotBeEqual3.ts (2 errors) ==== function ff(x: T, y: U) { - var z: Object; + var z!: Object; x = x; // Ok x = y; // Ok ~ diff --git a/tests/baselines/reference/typeParametersShouldNotBeEqual3.js b/tests/baselines/reference/typeParametersShouldNotBeEqual3.js index ae507eac8c654..f6e4472f1f46e 100644 --- a/tests/baselines/reference/typeParametersShouldNotBeEqual3.js +++ b/tests/baselines/reference/typeParametersShouldNotBeEqual3.js @@ -2,7 +2,7 @@ //// [typeParametersShouldNotBeEqual3.ts] function ff(x: T, y: U) { - var z: Object; + var z!: Object; x = x; // Ok x = y; // Ok x = z; // Ok diff --git a/tests/baselines/reference/typeParametersShouldNotBeEqual3.symbols b/tests/baselines/reference/typeParametersShouldNotBeEqual3.symbols index 98b1b97e9100e..4c5788324810e 100644 --- a/tests/baselines/reference/typeParametersShouldNotBeEqual3.symbols +++ b/tests/baselines/reference/typeParametersShouldNotBeEqual3.symbols @@ -12,7 +12,7 @@ function ff(x: T, y: U) { >y : Symbol(y, Decl(typeParametersShouldNotBeEqual3.ts, 0, 53)) >U : Symbol(U, Decl(typeParametersShouldNotBeEqual3.ts, 0, 29)) - var z: Object; + var z!: Object; >z : Symbol(z, Decl(typeParametersShouldNotBeEqual3.ts, 1, 7)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/typeParametersShouldNotBeEqual3.types b/tests/baselines/reference/typeParametersShouldNotBeEqual3.types index 7d9075ec04813..699e18abe22cb 100644 --- a/tests/baselines/reference/typeParametersShouldNotBeEqual3.types +++ b/tests/baselines/reference/typeParametersShouldNotBeEqual3.types @@ -9,7 +9,7 @@ function ff(x: T, y: U) { >y : U > : ^ - var z: Object; + var z!: Object; >z : Object > : ^^^^^^ diff --git a/tests/baselines/reference/typeReferenceDirectives11.errors.txt b/tests/baselines/reference/typeReferenceDirectives11.errors.txt index fa3bba15ee23d..7949645483b5c 100644 --- a/tests/baselines/reference/typeReferenceDirectives11.errors.txt +++ b/tests/baselines/reference/typeReferenceDirectives11.errors.txt @@ -1,6 +1,8 @@ +error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. /mod1.ts(1,17): error TS6131: Cannot compile modules using option 'outFile' unless the '--module' flag is 'amd' or 'system'. +!!! error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== /mod2.ts (0 errors) ==== import {foo} from "./mod1"; export const bar = foo(); diff --git a/tests/baselines/reference/typeReferenceDirectives12.errors.txt b/tests/baselines/reference/typeReferenceDirectives12.errors.txt index dce188dc25ca5..ea73362f0a3e9 100644 --- a/tests/baselines/reference/typeReferenceDirectives12.errors.txt +++ b/tests/baselines/reference/typeReferenceDirectives12.errors.txt @@ -1,6 +1,8 @@ +error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. /main.ts(1,14): error TS6131: Cannot compile modules using option 'outFile' unless the '--module' flag is 'amd' or 'system'. +!!! error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== /mod2.ts (0 errors) ==== import { Cls } from "./main"; import "./mod1"; diff --git a/tests/baselines/reference/typeSatisfaction_js.errors.txt b/tests/baselines/reference/typeSatisfaction_js.errors.txt index 0858b35c7e426..fe8112216e6e6 100644 --- a/tests/baselines/reference/typeSatisfaction_js.errors.txt +++ b/tests/baselines/reference/typeSatisfaction_js.errors.txt @@ -1,6 +1,8 @@ +error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. /src/a.js(1,29): error TS8037: Type satisfaction expressions can only be used in TypeScript files. +!!! error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== /src/a.js (1 errors) ==== var v = undefined satisfies 1; ~ diff --git a/tests/baselines/reference/typeofClass.errors.txt b/tests/baselines/reference/typeofClass.errors.txt index e49465a0e71fe..157d581d26455 100644 --- a/tests/baselines/reference/typeofClass.errors.txt +++ b/tests/baselines/reference/typeofClass.errors.txt @@ -8,12 +8,12 @@ typeofClass.ts(10,4): error TS2339: Property 'foo' does not exist on type 'typeo static bar: string; } - var k1: K; + declare var k1: K; k1.foo; k1.bar; ~~~ !!! error TS2576: Property 'bar' does not exist on type 'K'. Did you mean to access the static member 'K.bar' instead? - var k2: typeof K; + declare var k2: typeof K; k2.foo; ~~~ !!! error TS2339: Property 'foo' does not exist on type 'typeof K'. diff --git a/tests/baselines/reference/typeofClass.js b/tests/baselines/reference/typeofClass.js index a688d6d03dffe..aa6aeca9c8a49 100644 --- a/tests/baselines/reference/typeofClass.js +++ b/tests/baselines/reference/typeofClass.js @@ -6,10 +6,10 @@ class K { static bar: string; } -var k1: K; +declare var k1: K; k1.foo; k1.bar; -var k2: typeof K; +declare var k2: typeof K; k2.foo; k2.bar; @@ -19,9 +19,7 @@ var K = /** @class */ (function () { } return K; }()); -var k1; k1.foo; k1.bar; -var k2; k2.foo; k2.bar; diff --git a/tests/baselines/reference/typeofClass.symbols b/tests/baselines/reference/typeofClass.symbols index ef9d49a8fa0fb..b3dbffeabf7e9 100644 --- a/tests/baselines/reference/typeofClass.symbols +++ b/tests/baselines/reference/typeofClass.symbols @@ -11,27 +11,27 @@ class K { >bar : Symbol(K.bar, Decl(typeofClass.ts, 1, 16)) } -var k1: K; ->k1 : Symbol(k1, Decl(typeofClass.ts, 5, 3)) +declare var k1: K; +>k1 : Symbol(k1, Decl(typeofClass.ts, 5, 11)) >K : Symbol(K, Decl(typeofClass.ts, 0, 0)) k1.foo; >k1.foo : Symbol(K.foo, Decl(typeofClass.ts, 0, 9)) ->k1 : Symbol(k1, Decl(typeofClass.ts, 5, 3)) +>k1 : Symbol(k1, Decl(typeofClass.ts, 5, 11)) >foo : Symbol(K.foo, Decl(typeofClass.ts, 0, 9)) k1.bar; ->k1 : Symbol(k1, Decl(typeofClass.ts, 5, 3)) +>k1 : Symbol(k1, Decl(typeofClass.ts, 5, 11)) -var k2: typeof K; ->k2 : Symbol(k2, Decl(typeofClass.ts, 8, 3)) +declare var k2: typeof K; +>k2 : Symbol(k2, Decl(typeofClass.ts, 8, 11)) >K : Symbol(K, Decl(typeofClass.ts, 0, 0)) k2.foo; ->k2 : Symbol(k2, Decl(typeofClass.ts, 8, 3)) +>k2 : Symbol(k2, Decl(typeofClass.ts, 8, 11)) k2.bar; >k2.bar : Symbol(K.bar, Decl(typeofClass.ts, 1, 16)) ->k2 : Symbol(k2, Decl(typeofClass.ts, 8, 3)) +>k2 : Symbol(k2, Decl(typeofClass.ts, 8, 11)) >bar : Symbol(K.bar, Decl(typeofClass.ts, 1, 16)) diff --git a/tests/baselines/reference/typeofClass.types b/tests/baselines/reference/typeofClass.types index 8c678d20c2526..5bd67fd178b5d 100644 --- a/tests/baselines/reference/typeofClass.types +++ b/tests/baselines/reference/typeofClass.types @@ -14,7 +14,7 @@ class K { > : ^^^^^^ } -var k1: K; +declare var k1: K; >k1 : K > : ^ @@ -34,7 +34,7 @@ k1.bar; >bar : any > : ^^^ -var k2: typeof K; +declare var k2: typeof K; >k2 : typeof K > : ^^^^^^^^ >K : typeof K diff --git a/tests/baselines/reference/typeofOperatorWithAnyOtherType.errors.txt b/tests/baselines/reference/typeofOperatorWithAnyOtherType.errors.txt index 4ff9a46c50111..811a2b1c8e1ca 100644 --- a/tests/baselines/reference/typeofOperatorWithAnyOtherType.errors.txt +++ b/tests/baselines/reference/typeofOperatorWithAnyOtherType.errors.txt @@ -7,25 +7,25 @@ typeofOperatorWithAnyOtherType.ts(58,1): error TS2695: Left side of comma operat ==== typeofOperatorWithAnyOtherType.ts (4 errors) ==== // typeof operator on any type - var ANY: any; - var ANY1; + declare var ANY: any; + declare var ANY1; var ANY2: any[] = ["", ""]; - var obj: () => {} + declare var obj: () => {}; var obj1 = { x: "a", y: () => { }}; function foo(): any { - var a; + var a!: any; return a; } class A { public a: any; static foo() { - var a; + var a!: any; return a; } } namespace M { - export var n: any; + export var n!: any; } var objA = new A(); @@ -77,9 +77,9 @@ typeofOperatorWithAnyOtherType.ts(58,1): error TS2695: Left side of comma operat typeof M.n; // use typeof in type query - var z: any; - var x: any[]; - var r: () => any; + var z!: any; + var x!: any[]; + var r!: () => any; z: typeof ANY; x: typeof ANY2; r: typeof foo; diff --git a/tests/baselines/reference/typeofOperatorWithAnyOtherType.js b/tests/baselines/reference/typeofOperatorWithAnyOtherType.js index 43be56aa759b5..7a67a47959b49 100644 --- a/tests/baselines/reference/typeofOperatorWithAnyOtherType.js +++ b/tests/baselines/reference/typeofOperatorWithAnyOtherType.js @@ -3,25 +3,25 @@ //// [typeofOperatorWithAnyOtherType.ts] // typeof operator on any type -var ANY: any; -var ANY1; +declare var ANY: any; +declare var ANY1; var ANY2: any[] = ["", ""]; -var obj: () => {} +declare var obj: () => {}; var obj1 = { x: "a", y: () => { }}; function foo(): any { - var a; + var a!: any; return a; } class A { public a: any; static foo() { - var a; + var a!: any; return a; } } namespace M { - export var n: any; + export var n!: any; } var objA = new A(); @@ -65,9 +65,9 @@ typeof objA.a; typeof M.n; // use typeof in type query -var z: any; -var x: any[]; -var r: () => any; +var z!: any; +var x!: any[]; +var r!: () => any; z: typeof ANY; x: typeof ANY2; r: typeof foo; @@ -78,10 +78,7 @@ z: typeof obj1.x; //// [typeofOperatorWithAnyOtherType.js] // typeof operator on any type -var ANY; -var ANY1; var ANY2 = ["", ""]; -var obj; var obj1 = { x: "a", y: function () { } }; function foo() { var a; diff --git a/tests/baselines/reference/typeofOperatorWithAnyOtherType.symbols b/tests/baselines/reference/typeofOperatorWithAnyOtherType.symbols index 7eacc9ce48e73..b6b6422fd567e 100644 --- a/tests/baselines/reference/typeofOperatorWithAnyOtherType.symbols +++ b/tests/baselines/reference/typeofOperatorWithAnyOtherType.symbols @@ -3,17 +3,17 @@ === typeofOperatorWithAnyOtherType.ts === // typeof operator on any type -var ANY: any; ->ANY : Symbol(ANY, Decl(typeofOperatorWithAnyOtherType.ts, 2, 3)) +declare var ANY: any; +>ANY : Symbol(ANY, Decl(typeofOperatorWithAnyOtherType.ts, 2, 11)) -var ANY1; ->ANY1 : Symbol(ANY1, Decl(typeofOperatorWithAnyOtherType.ts, 3, 3)) +declare var ANY1; +>ANY1 : Symbol(ANY1, Decl(typeofOperatorWithAnyOtherType.ts, 3, 11)) var ANY2: any[] = ["", ""]; >ANY2 : Symbol(ANY2, Decl(typeofOperatorWithAnyOtherType.ts, 4, 3)) -var obj: () => {} ->obj : Symbol(obj, Decl(typeofOperatorWithAnyOtherType.ts, 5, 3)) +declare var obj: () => {}; +>obj : Symbol(obj, Decl(typeofOperatorWithAnyOtherType.ts, 5, 11)) var obj1 = { x: "a", y: () => { }}; >obj1 : Symbol(obj1, Decl(typeofOperatorWithAnyOtherType.ts, 6, 3)) @@ -23,7 +23,7 @@ var obj1 = { x: "a", y: () => { }}; function foo(): any { >foo : Symbol(foo, Decl(typeofOperatorWithAnyOtherType.ts, 6, 35)) - var a; + var a!: any; >a : Symbol(a, Decl(typeofOperatorWithAnyOtherType.ts, 9, 7)) return a; @@ -38,7 +38,7 @@ class A { static foo() { >foo : Symbol(A.foo, Decl(typeofOperatorWithAnyOtherType.ts, 13, 18)) - var a; + var a!: any; >a : Symbol(a, Decl(typeofOperatorWithAnyOtherType.ts, 15, 11)) return a; @@ -48,7 +48,7 @@ class A { namespace M { >M : Symbol(M, Decl(typeofOperatorWithAnyOtherType.ts, 18, 1)) - export var n: any; + export var n!: any; >n : Symbol(n, Decl(typeofOperatorWithAnyOtherType.ts, 20, 14)) } var objA = new A(); @@ -58,7 +58,7 @@ var objA = new A(); // any type var var ResultIsString1 = typeof ANY1; >ResultIsString1 : Symbol(ResultIsString1, Decl(typeofOperatorWithAnyOtherType.ts, 25, 3)) ->ANY1 : Symbol(ANY1, Decl(typeofOperatorWithAnyOtherType.ts, 3, 3)) +>ANY1 : Symbol(ANY1, Decl(typeofOperatorWithAnyOtherType.ts, 3, 11)) var ResultIsString2 = typeof ANY2; >ResultIsString2 : Symbol(ResultIsString2, Decl(typeofOperatorWithAnyOtherType.ts, 26, 3)) @@ -74,7 +74,7 @@ var ResultIsString4 = typeof M; var ResultIsString5 = typeof obj; >ResultIsString5 : Symbol(ResultIsString5, Decl(typeofOperatorWithAnyOtherType.ts, 29, 3)) ->obj : Symbol(obj, Decl(typeofOperatorWithAnyOtherType.ts, 5, 3)) +>obj : Symbol(obj, Decl(typeofOperatorWithAnyOtherType.ts, 5, 11)) var ResultIsString6 = typeof obj1; >ResultIsString6 : Symbol(ResultIsString6, Decl(typeofOperatorWithAnyOtherType.ts, 30, 3)) @@ -126,8 +126,8 @@ var ResultIsString15 = typeof A.foo(); var ResultIsString16 = typeof (ANY + ANY1); >ResultIsString16 : Symbol(ResultIsString16, Decl(typeofOperatorWithAnyOtherType.ts, 44, 3)) ->ANY : Symbol(ANY, Decl(typeofOperatorWithAnyOtherType.ts, 2, 3)) ->ANY1 : Symbol(ANY1, Decl(typeofOperatorWithAnyOtherType.ts, 3, 3)) +>ANY : Symbol(ANY, Decl(typeofOperatorWithAnyOtherType.ts, 2, 11)) +>ANY1 : Symbol(ANY1, Decl(typeofOperatorWithAnyOtherType.ts, 3, 11)) var ResultIsString17 = typeof (null + undefined); >ResultIsString17 : Symbol(ResultIsString17, Decl(typeofOperatorWithAnyOtherType.ts, 45, 3)) @@ -144,26 +144,26 @@ var ResultIsString19 = typeof (undefined + undefined); // multiple typeof operators var ResultIsString20 = typeof typeof ANY; >ResultIsString20 : Symbol(ResultIsString20, Decl(typeofOperatorWithAnyOtherType.ts, 50, 3)) ->ANY : Symbol(ANY, Decl(typeofOperatorWithAnyOtherType.ts, 2, 3)) +>ANY : Symbol(ANY, Decl(typeofOperatorWithAnyOtherType.ts, 2, 11)) var ResultIsString21 = typeof typeof typeof (ANY + ANY1); >ResultIsString21 : Symbol(ResultIsString21, Decl(typeofOperatorWithAnyOtherType.ts, 51, 3)) ->ANY : Symbol(ANY, Decl(typeofOperatorWithAnyOtherType.ts, 2, 3)) ->ANY1 : Symbol(ANY1, Decl(typeofOperatorWithAnyOtherType.ts, 3, 3)) +>ANY : Symbol(ANY, Decl(typeofOperatorWithAnyOtherType.ts, 2, 11)) +>ANY1 : Symbol(ANY1, Decl(typeofOperatorWithAnyOtherType.ts, 3, 11)) // miss assignment operators typeof ANY; ->ANY : Symbol(ANY, Decl(typeofOperatorWithAnyOtherType.ts, 2, 3)) +>ANY : Symbol(ANY, Decl(typeofOperatorWithAnyOtherType.ts, 2, 11)) typeof ANY1; ->ANY1 : Symbol(ANY1, Decl(typeofOperatorWithAnyOtherType.ts, 3, 3)) +>ANY1 : Symbol(ANY1, Decl(typeofOperatorWithAnyOtherType.ts, 3, 11)) typeof ANY2[0]; >ANY2 : Symbol(ANY2, Decl(typeofOperatorWithAnyOtherType.ts, 4, 3)) typeof ANY, ANY1; ->ANY : Symbol(ANY, Decl(typeofOperatorWithAnyOtherType.ts, 2, 3)) ->ANY1 : Symbol(ANY1, Decl(typeofOperatorWithAnyOtherType.ts, 3, 3)) +>ANY : Symbol(ANY, Decl(typeofOperatorWithAnyOtherType.ts, 2, 11)) +>ANY1 : Symbol(ANY1, Decl(typeofOperatorWithAnyOtherType.ts, 3, 11)) typeof obj1; >obj1 : Symbol(obj1, Decl(typeofOperatorWithAnyOtherType.ts, 6, 3)) @@ -184,17 +184,17 @@ typeof M.n; >n : Symbol(M.n, Decl(typeofOperatorWithAnyOtherType.ts, 20, 14)) // use typeof in type query -var z: any; +var z!: any; >z : Symbol(z, Decl(typeofOperatorWithAnyOtherType.ts, 64, 3)) -var x: any[]; +var x!: any[]; >x : Symbol(x, Decl(typeofOperatorWithAnyOtherType.ts, 65, 3)) -var r: () => any; +var r!: () => any; >r : Symbol(r, Decl(typeofOperatorWithAnyOtherType.ts, 66, 3)) z: typeof ANY; ->ANY : Symbol(ANY, Decl(typeofOperatorWithAnyOtherType.ts, 2, 3)) +>ANY : Symbol(ANY, Decl(typeofOperatorWithAnyOtherType.ts, 2, 11)) x: typeof ANY2; >ANY2 : Symbol(ANY2, Decl(typeofOperatorWithAnyOtherType.ts, 4, 3)) diff --git a/tests/baselines/reference/typeofOperatorWithAnyOtherType.types b/tests/baselines/reference/typeofOperatorWithAnyOtherType.types index 76059fda5ea20..10560f48e6844 100644 --- a/tests/baselines/reference/typeofOperatorWithAnyOtherType.types +++ b/tests/baselines/reference/typeofOperatorWithAnyOtherType.types @@ -3,11 +3,11 @@ === typeofOperatorWithAnyOtherType.ts === // typeof operator on any type -var ANY: any; +declare var ANY: any; >ANY : any > : ^^^ -var ANY1; +declare var ANY1; >ANY1 : any > : ^^^ @@ -21,7 +21,7 @@ var ANY2: any[] = ["", ""]; >"" : "" > : ^^ -var obj: () => {} +declare var obj: () => {}; >obj : () => {} > : ^^^^^^ @@ -43,7 +43,7 @@ function foo(): any { >foo : () => any > : ^^^^^^ - var a; + var a!: any; >a : any > : ^^^ @@ -63,7 +63,7 @@ class A { >foo : () => any > : ^^^^^^^^^ - var a; + var a!: any; >a : any > : ^^^ @@ -76,7 +76,7 @@ namespace M { >M : typeof M > : ^^^^^^^^ - export var n: any; + export var n!: any; >n : any > : ^^^ } @@ -382,15 +382,15 @@ typeof M.n; > : ^^^ // use typeof in type query -var z: any; +var z!: any; >z : any > : ^^^ -var x: any[]; +var x!: any[]; >x : any[] > : ^^^^^ -var r: () => any; +var r!: () => any; >r : () => any > : ^^^^^^ diff --git a/tests/baselines/reference/typeofOperatorWithBooleanType.errors.txt b/tests/baselines/reference/typeofOperatorWithBooleanType.errors.txt index ef9d0afab04ca..427396d238af5 100644 --- a/tests/baselines/reference/typeofOperatorWithBooleanType.errors.txt +++ b/tests/baselines/reference/typeofOperatorWithBooleanType.errors.txt @@ -3,7 +3,7 @@ typeofOperatorWithBooleanType.ts(36,1): error TS2695: Left side of comma operato ==== typeofOperatorWithBooleanType.ts (1 errors) ==== // typeof operator on boolean type - var BOOLEAN: boolean; + declare var BOOLEAN: boolean; function foo(): boolean { return true; } @@ -12,7 +12,7 @@ typeofOperatorWithBooleanType.ts(36,1): error TS2695: Left side of comma operato static foo() { return false; } } namespace M { - export var n: boolean; + export var n!: boolean; } var objA = new A(); @@ -44,9 +44,9 @@ typeofOperatorWithBooleanType.ts(36,1): error TS2695: Left side of comma operato typeof M.n; // use typeof in type query - var z: boolean; - var x: boolean[]; - var r: () => boolean; + declare var z: boolean; + declare var x: boolean[]; + declare var r: () => boolean; z: typeof BOOLEAN; r: typeof foo; var y = { a: true, b: false}; diff --git a/tests/baselines/reference/typeofOperatorWithBooleanType.js b/tests/baselines/reference/typeofOperatorWithBooleanType.js index 01766d4d3487c..a4f9f05a176ee 100644 --- a/tests/baselines/reference/typeofOperatorWithBooleanType.js +++ b/tests/baselines/reference/typeofOperatorWithBooleanType.js @@ -2,7 +2,7 @@ //// [typeofOperatorWithBooleanType.ts] // typeof operator on boolean type -var BOOLEAN: boolean; +declare var BOOLEAN: boolean; function foo(): boolean { return true; } @@ -11,7 +11,7 @@ class A { static foo() { return false; } } namespace M { - export var n: boolean; + export var n!: boolean; } var objA = new A(); @@ -41,9 +41,9 @@ typeof objA.a; typeof M.n; // use typeof in type query -var z: boolean; -var x: boolean[]; -var r: () => boolean; +declare var z: boolean; +declare var x: boolean[]; +declare var r: () => boolean; z: typeof BOOLEAN; r: typeof foo; var y = { a: true, b: false}; @@ -53,8 +53,6 @@ z: typeof A.foo; z: typeof M.n; //// [typeofOperatorWithBooleanType.js] -// typeof operator on boolean type -var BOOLEAN; function foo() { return true; } var A = /** @class */ (function () { function A() { @@ -85,10 +83,6 @@ typeof foo(); typeof true, false; typeof objA.a; typeof M.n; -// use typeof in type query -var z; -var x; -var r; z: typeof BOOLEAN; r: typeof foo; var y = { a: true, b: false }; diff --git a/tests/baselines/reference/typeofOperatorWithBooleanType.symbols b/tests/baselines/reference/typeofOperatorWithBooleanType.symbols index bfd6d4c5fe0c9..b02139ba983ff 100644 --- a/tests/baselines/reference/typeofOperatorWithBooleanType.symbols +++ b/tests/baselines/reference/typeofOperatorWithBooleanType.symbols @@ -2,11 +2,11 @@ === typeofOperatorWithBooleanType.ts === // typeof operator on boolean type -var BOOLEAN: boolean; ->BOOLEAN : Symbol(BOOLEAN, Decl(typeofOperatorWithBooleanType.ts, 1, 3)) +declare var BOOLEAN: boolean; +>BOOLEAN : Symbol(BOOLEAN, Decl(typeofOperatorWithBooleanType.ts, 1, 11)) function foo(): boolean { return true; } ->foo : Symbol(foo, Decl(typeofOperatorWithBooleanType.ts, 1, 21)) +>foo : Symbol(foo, Decl(typeofOperatorWithBooleanType.ts, 1, 29)) class A { >A : Symbol(A, Decl(typeofOperatorWithBooleanType.ts, 3, 40)) @@ -20,7 +20,7 @@ class A { namespace M { >M : Symbol(M, Decl(typeofOperatorWithBooleanType.ts, 8, 1)) - export var n: boolean; + export var n!: boolean; >n : Symbol(n, Decl(typeofOperatorWithBooleanType.ts, 10, 14)) } @@ -31,7 +31,7 @@ var objA = new A(); // boolean type var var ResultIsString1 = typeof BOOLEAN; >ResultIsString1 : Symbol(ResultIsString1, Decl(typeofOperatorWithBooleanType.ts, 16, 3)) ->BOOLEAN : Symbol(BOOLEAN, Decl(typeofOperatorWithBooleanType.ts, 1, 3)) +>BOOLEAN : Symbol(BOOLEAN, Decl(typeofOperatorWithBooleanType.ts, 1, 11)) // boolean type literal var ResultIsString2 = typeof true; @@ -57,7 +57,7 @@ var ResultIsString5 = typeof M.n; var ResultIsString6 = typeof foo(); >ResultIsString6 : Symbol(ResultIsString6, Decl(typeofOperatorWithBooleanType.ts, 25, 3)) ->foo : Symbol(foo, Decl(typeofOperatorWithBooleanType.ts, 1, 21)) +>foo : Symbol(foo, Decl(typeofOperatorWithBooleanType.ts, 1, 29)) var ResultIsString7 = typeof A.foo(); >ResultIsString7 : Symbol(ResultIsString7, Decl(typeofOperatorWithBooleanType.ts, 26, 3)) @@ -68,15 +68,15 @@ var ResultIsString7 = typeof A.foo(); // multiple typeof operator var ResultIsString8 = typeof typeof BOOLEAN; >ResultIsString8 : Symbol(ResultIsString8, Decl(typeofOperatorWithBooleanType.ts, 29, 3)) ->BOOLEAN : Symbol(BOOLEAN, Decl(typeofOperatorWithBooleanType.ts, 1, 3)) +>BOOLEAN : Symbol(BOOLEAN, Decl(typeofOperatorWithBooleanType.ts, 1, 11)) // miss assignment operators typeof true; typeof BOOLEAN; ->BOOLEAN : Symbol(BOOLEAN, Decl(typeofOperatorWithBooleanType.ts, 1, 3)) +>BOOLEAN : Symbol(BOOLEAN, Decl(typeofOperatorWithBooleanType.ts, 1, 11)) typeof foo(); ->foo : Symbol(foo, Decl(typeofOperatorWithBooleanType.ts, 1, 21)) +>foo : Symbol(foo, Decl(typeofOperatorWithBooleanType.ts, 1, 29)) typeof true, false; typeof objA.a; @@ -90,20 +90,20 @@ typeof M.n; >n : Symbol(M.n, Decl(typeofOperatorWithBooleanType.ts, 10, 14)) // use typeof in type query -var z: boolean; ->z : Symbol(z, Decl(typeofOperatorWithBooleanType.ts, 40, 3)) +declare var z: boolean; +>z : Symbol(z, Decl(typeofOperatorWithBooleanType.ts, 40, 11)) -var x: boolean[]; ->x : Symbol(x, Decl(typeofOperatorWithBooleanType.ts, 41, 3)) +declare var x: boolean[]; +>x : Symbol(x, Decl(typeofOperatorWithBooleanType.ts, 41, 11)) -var r: () => boolean; ->r : Symbol(r, Decl(typeofOperatorWithBooleanType.ts, 42, 3)) +declare var r: () => boolean; +>r : Symbol(r, Decl(typeofOperatorWithBooleanType.ts, 42, 11)) z: typeof BOOLEAN; ->BOOLEAN : Symbol(BOOLEAN, Decl(typeofOperatorWithBooleanType.ts, 1, 3)) +>BOOLEAN : Symbol(BOOLEAN, Decl(typeofOperatorWithBooleanType.ts, 1, 11)) r: typeof foo; ->foo : Symbol(foo, Decl(typeofOperatorWithBooleanType.ts, 1, 21)) +>foo : Symbol(foo, Decl(typeofOperatorWithBooleanType.ts, 1, 29)) var y = { a: true, b: false}; >y : Symbol(y, Decl(typeofOperatorWithBooleanType.ts, 45, 3)) diff --git a/tests/baselines/reference/typeofOperatorWithBooleanType.types b/tests/baselines/reference/typeofOperatorWithBooleanType.types index a5a0e80d6504b..da8108764b6e2 100644 --- a/tests/baselines/reference/typeofOperatorWithBooleanType.types +++ b/tests/baselines/reference/typeofOperatorWithBooleanType.types @@ -2,7 +2,7 @@ === typeofOperatorWithBooleanType.ts === // typeof operator on boolean type -var BOOLEAN: boolean; +declare var BOOLEAN: boolean; >BOOLEAN : boolean > : ^^^^^^^ @@ -30,7 +30,7 @@ namespace M { >M : typeof M > : ^^^^^^^^ - export var n: boolean; + export var n!: boolean; >n : boolean > : ^^^^^^^ } @@ -189,15 +189,15 @@ typeof M.n; > : ^^^^^^^ // use typeof in type query -var z: boolean; +declare var z: boolean; >z : boolean > : ^^^^^^^ -var x: boolean[]; +declare var x: boolean[]; >x : boolean[] > : ^^^^^^^^^ -var r: () => boolean; +declare var r: () => boolean; >r : () => boolean > : ^^^^^^ diff --git a/tests/baselines/reference/typeofOperatorWithNumberType.errors.txt b/tests/baselines/reference/typeofOperatorWithNumberType.errors.txt index d5e872341d8d8..834a4df423a0a 100644 --- a/tests/baselines/reference/typeofOperatorWithNumberType.errors.txt +++ b/tests/baselines/reference/typeofOperatorWithNumberType.errors.txt @@ -3,7 +3,7 @@ typeofOperatorWithNumberType.ts(45,1): error TS2695: Left side of comma operator ==== typeofOperatorWithNumberType.ts (1 errors) ==== // typeof operator on number type - var NUMBER: number; + declare var NUMBER: number; var NUMBER1: number[] = [1, 2]; function foo(): number { return 1; } @@ -13,7 +13,7 @@ typeofOperatorWithNumberType.ts(45,1): error TS2695: Left side of comma operator static foo() { return 1; } } namespace M { - export var n: number; + export var n!: number; } var objA = new A(); @@ -51,8 +51,9 @@ typeofOperatorWithNumberType.ts(45,1): error TS2695: Left side of comma operator !!! error TS2695: Left side of comma operator is unused and has no side effects. // use typeof in type query - var z: number; - var x: number[]; + declare var z: number; + declare var x: number[]; + declare var r: () => number; z: typeof NUMBER; x: typeof NUMBER1; r: typeof foo; diff --git a/tests/baselines/reference/typeofOperatorWithNumberType.js b/tests/baselines/reference/typeofOperatorWithNumberType.js index 7ceb527dd0d30..ddecf27d9cd2b 100644 --- a/tests/baselines/reference/typeofOperatorWithNumberType.js +++ b/tests/baselines/reference/typeofOperatorWithNumberType.js @@ -2,7 +2,7 @@ //// [typeofOperatorWithNumberType.ts] // typeof operator on number type -var NUMBER: number; +declare var NUMBER: number; var NUMBER1: number[] = [1, 2]; function foo(): number { return 1; } @@ -12,7 +12,7 @@ class A { static foo() { return 1; } } namespace M { - export var n: number; + export var n!: number; } var objA = new A(); @@ -48,8 +48,9 @@ typeof M.n; typeof objA.a, M.n; // use typeof in type query -var z: number; -var x: number[]; +declare var z: number; +declare var x: number[]; +declare var r: () => number; z: typeof NUMBER; x: typeof NUMBER1; r: typeof foo; @@ -60,8 +61,6 @@ z: typeof A.foo; z: typeof M.n; //// [typeofOperatorWithNumberType.js] -// typeof operator on number type -var NUMBER; var NUMBER1 = [1, 2]; function foo() { return 1; } var A = /** @class */ (function () { @@ -99,9 +98,6 @@ typeof foo(); typeof objA.a; typeof M.n; typeof objA.a, M.n; -// use typeof in type query -var z; -var x; z: typeof NUMBER; x: typeof NUMBER1; r: typeof foo; diff --git a/tests/baselines/reference/typeofOperatorWithNumberType.symbols b/tests/baselines/reference/typeofOperatorWithNumberType.symbols index e9f80d00de00d..0505c2b6225fb 100644 --- a/tests/baselines/reference/typeofOperatorWithNumberType.symbols +++ b/tests/baselines/reference/typeofOperatorWithNumberType.symbols @@ -2,8 +2,8 @@ === typeofOperatorWithNumberType.ts === // typeof operator on number type -var NUMBER: number; ->NUMBER : Symbol(NUMBER, Decl(typeofOperatorWithNumberType.ts, 1, 3)) +declare var NUMBER: number; +>NUMBER : Symbol(NUMBER, Decl(typeofOperatorWithNumberType.ts, 1, 11)) var NUMBER1: number[] = [1, 2]; >NUMBER1 : Symbol(NUMBER1, Decl(typeofOperatorWithNumberType.ts, 2, 3)) @@ -23,7 +23,7 @@ class A { namespace M { >M : Symbol(M, Decl(typeofOperatorWithNumberType.ts, 9, 1)) - export var n: number; + export var n!: number; >n : Symbol(n, Decl(typeofOperatorWithNumberType.ts, 11, 14)) } @@ -34,7 +34,7 @@ var objA = new A(); // number type var var ResultIsString1 = typeof NUMBER; >ResultIsString1 : Symbol(ResultIsString1, Decl(typeofOperatorWithNumberType.ts, 17, 3)) ->NUMBER : Symbol(NUMBER, Decl(typeofOperatorWithNumberType.ts, 1, 3)) +>NUMBER : Symbol(NUMBER, Decl(typeofOperatorWithNumberType.ts, 1, 11)) var ResultIsString2 = typeof NUMBER1; >ResultIsString2 : Symbol(ResultIsString2, Decl(typeofOperatorWithNumberType.ts, 18, 3)) @@ -85,23 +85,23 @@ var ResultIsString10 = typeof A.foo(); var ResultIsString11 = typeof (NUMBER + NUMBER); >ResultIsString11 : Symbol(ResultIsString11, Decl(typeofOperatorWithNumberType.ts, 31, 3)) ->NUMBER : Symbol(NUMBER, Decl(typeofOperatorWithNumberType.ts, 1, 3)) ->NUMBER : Symbol(NUMBER, Decl(typeofOperatorWithNumberType.ts, 1, 3)) +>NUMBER : Symbol(NUMBER, Decl(typeofOperatorWithNumberType.ts, 1, 11)) +>NUMBER : Symbol(NUMBER, Decl(typeofOperatorWithNumberType.ts, 1, 11)) // multiple typeof operators var ResultIsString12 = typeof typeof NUMBER; >ResultIsString12 : Symbol(ResultIsString12, Decl(typeofOperatorWithNumberType.ts, 34, 3)) ->NUMBER : Symbol(NUMBER, Decl(typeofOperatorWithNumberType.ts, 1, 3)) +>NUMBER : Symbol(NUMBER, Decl(typeofOperatorWithNumberType.ts, 1, 11)) var ResultIsString13 = typeof typeof typeof (NUMBER + NUMBER); >ResultIsString13 : Symbol(ResultIsString13, Decl(typeofOperatorWithNumberType.ts, 35, 3)) ->NUMBER : Symbol(NUMBER, Decl(typeofOperatorWithNumberType.ts, 1, 3)) ->NUMBER : Symbol(NUMBER, Decl(typeofOperatorWithNumberType.ts, 1, 3)) +>NUMBER : Symbol(NUMBER, Decl(typeofOperatorWithNumberType.ts, 1, 11)) +>NUMBER : Symbol(NUMBER, Decl(typeofOperatorWithNumberType.ts, 1, 11)) // miss assignment operators typeof 1; typeof NUMBER; ->NUMBER : Symbol(NUMBER, Decl(typeofOperatorWithNumberType.ts, 1, 3)) +>NUMBER : Symbol(NUMBER, Decl(typeofOperatorWithNumberType.ts, 1, 11)) typeof NUMBER1; >NUMBER1 : Symbol(NUMBER1, Decl(typeofOperatorWithNumberType.ts, 2, 3)) @@ -128,14 +128,17 @@ typeof objA.a, M.n; >n : Symbol(M.n, Decl(typeofOperatorWithNumberType.ts, 11, 14)) // use typeof in type query -var z: number; ->z : Symbol(z, Decl(typeofOperatorWithNumberType.ts, 47, 3)) +declare var z: number; +>z : Symbol(z, Decl(typeofOperatorWithNumberType.ts, 47, 11)) -var x: number[]; ->x : Symbol(x, Decl(typeofOperatorWithNumberType.ts, 48, 3)) +declare var x: number[]; +>x : Symbol(x, Decl(typeofOperatorWithNumberType.ts, 48, 11)) + +declare var r: () => number; +>r : Symbol(r, Decl(typeofOperatorWithNumberType.ts, 49, 11)) z: typeof NUMBER; ->NUMBER : Symbol(NUMBER, Decl(typeofOperatorWithNumberType.ts, 1, 3)) +>NUMBER : Symbol(NUMBER, Decl(typeofOperatorWithNumberType.ts, 1, 11)) x: typeof NUMBER1; >NUMBER1 : Symbol(NUMBER1, Decl(typeofOperatorWithNumberType.ts, 2, 3)) @@ -144,14 +147,14 @@ r: typeof foo; >foo : Symbol(foo, Decl(typeofOperatorWithNumberType.ts, 2, 31)) var y = { a: 1, b: 2 }; ->y : Symbol(y, Decl(typeofOperatorWithNumberType.ts, 52, 3)) ->a : Symbol(a, Decl(typeofOperatorWithNumberType.ts, 52, 9)) ->b : Symbol(b, Decl(typeofOperatorWithNumberType.ts, 52, 15)) +>y : Symbol(y, Decl(typeofOperatorWithNumberType.ts, 53, 3)) +>a : Symbol(a, Decl(typeofOperatorWithNumberType.ts, 53, 9)) +>b : Symbol(b, Decl(typeofOperatorWithNumberType.ts, 53, 15)) z: typeof y.a; ->y.a : Symbol(a, Decl(typeofOperatorWithNumberType.ts, 52, 9)) ->y : Symbol(y, Decl(typeofOperatorWithNumberType.ts, 52, 3)) ->a : Symbol(a, Decl(typeofOperatorWithNumberType.ts, 52, 9)) +>y.a : Symbol(a, Decl(typeofOperatorWithNumberType.ts, 53, 9)) +>y : Symbol(y, Decl(typeofOperatorWithNumberType.ts, 53, 3)) +>a : Symbol(a, Decl(typeofOperatorWithNumberType.ts, 53, 9)) z: typeof objA.a; >objA.a : Symbol(A.a, Decl(typeofOperatorWithNumberType.ts, 6, 9)) diff --git a/tests/baselines/reference/typeofOperatorWithNumberType.types b/tests/baselines/reference/typeofOperatorWithNumberType.types index 70dc7b60b4707..fd8ad494b5afd 100644 --- a/tests/baselines/reference/typeofOperatorWithNumberType.types +++ b/tests/baselines/reference/typeofOperatorWithNumberType.types @@ -2,7 +2,7 @@ === typeofOperatorWithNumberType.ts === // typeof operator on number type -var NUMBER: number; +declare var NUMBER: number; >NUMBER : number > : ^^^^^^ @@ -40,7 +40,7 @@ namespace M { >M : typeof M > : ^^^^^^^^ - export var n: number; + export var n!: number; >n : number > : ^^^^^^ } @@ -285,14 +285,18 @@ typeof objA.a, M.n; > : ^^^^^^ // use typeof in type query -var z: number; +declare var z: number; >z : number > : ^^^^^^ -var x: number[]; +declare var x: number[]; >x : number[] > : ^^^^^^^^ +declare var r: () => number; +>r : () => number +> : ^^^^^^ + z: typeof NUMBER; >z : any > : ^^^ diff --git a/tests/baselines/reference/typeofOperatorWithStringType.errors.txt b/tests/baselines/reference/typeofOperatorWithStringType.errors.txt index 68a51040a9853..24318020ff473 100644 --- a/tests/baselines/reference/typeofOperatorWithStringType.errors.txt +++ b/tests/baselines/reference/typeofOperatorWithStringType.errors.txt @@ -3,7 +3,7 @@ typeofOperatorWithStringType.ts(44,1): error TS2695: Left side of comma operator ==== typeofOperatorWithStringType.ts (1 errors) ==== // typeof operator on string type - var STRING: string; + declare var STRING: string; var STRING1: string[] = ["", "abc"]; function foo(): string { return "abc"; } @@ -13,7 +13,7 @@ typeofOperatorWithStringType.ts(44,1): error TS2695: Left side of comma operator static foo() { return ""; } } namespace M { - export var n: string; + export var n!: string; } var objA = new A(); @@ -50,9 +50,9 @@ typeofOperatorWithStringType.ts(44,1): error TS2695: Left side of comma operator !!! error TS2695: Left side of comma operator is unused and has no side effects. // use typeof in type query - var z: string; - var x: string[]; - var r: () => string; + declare var z: string; + declare var x: string[]; + declare var r: () => string; z: typeof STRING; x: typeof STRING1; r: typeof foo; diff --git a/tests/baselines/reference/typeofOperatorWithStringType.js b/tests/baselines/reference/typeofOperatorWithStringType.js index 2d350ea926f6a..9f911abf1129e 100644 --- a/tests/baselines/reference/typeofOperatorWithStringType.js +++ b/tests/baselines/reference/typeofOperatorWithStringType.js @@ -2,7 +2,7 @@ //// [typeofOperatorWithStringType.ts] // typeof operator on string type -var STRING: string; +declare var STRING: string; var STRING1: string[] = ["", "abc"]; function foo(): string { return "abc"; } @@ -12,7 +12,7 @@ class A { static foo() { return ""; } } namespace M { - export var n: string; + export var n!: string; } var objA = new A(); @@ -47,9 +47,9 @@ typeof foo(); typeof objA.a, M.n; // use typeof in type query -var z: string; -var x: string[]; -var r: () => string; +declare var z: string; +declare var x: string[]; +declare var r: () => string; z: typeof STRING; x: typeof STRING1; r: typeof foo; @@ -60,8 +60,6 @@ z: typeof A.foo; z: typeof M.n; //// [typeofOperatorWithStringType.js] -// typeof operator on string type -var STRING; var STRING1 = ["", "abc"]; function foo() { return "abc"; } var A = /** @class */ (function () { @@ -98,10 +96,6 @@ typeof STRING; typeof STRING1; typeof foo(); typeof objA.a, M.n; -// use typeof in type query -var z; -var x; -var r; z: typeof STRING; x: typeof STRING1; r: typeof foo; diff --git a/tests/baselines/reference/typeofOperatorWithStringType.symbols b/tests/baselines/reference/typeofOperatorWithStringType.symbols index 5bc71cf4d3cf8..2fdd456acbd02 100644 --- a/tests/baselines/reference/typeofOperatorWithStringType.symbols +++ b/tests/baselines/reference/typeofOperatorWithStringType.symbols @@ -2,8 +2,8 @@ === typeofOperatorWithStringType.ts === // typeof operator on string type -var STRING: string; ->STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 3)) +declare var STRING: string; +>STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 11)) var STRING1: string[] = ["", "abc"]; >STRING1 : Symbol(STRING1, Decl(typeofOperatorWithStringType.ts, 2, 3)) @@ -23,7 +23,7 @@ class A { namespace M { >M : Symbol(M, Decl(typeofOperatorWithStringType.ts, 9, 1)) - export var n: string; + export var n!: string; >n : Symbol(n, Decl(typeofOperatorWithStringType.ts, 11, 14)) } @@ -34,7 +34,7 @@ var objA = new A(); // string type var var ResultIsString1 = typeof STRING; >ResultIsString1 : Symbol(ResultIsString1, Decl(typeofOperatorWithStringType.ts, 17, 3)) ->STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 3)) +>STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 11)) var ResultIsString2 = typeof STRING1; >ResultIsString2 : Symbol(ResultIsString2, Decl(typeofOperatorWithStringType.ts, 18, 3)) @@ -85,29 +85,29 @@ var ResultIsString10 = typeof A.foo(); var ResultIsString11 = typeof (STRING + STRING); >ResultIsString11 : Symbol(ResultIsString11, Decl(typeofOperatorWithStringType.ts, 31, 3)) ->STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 3)) ->STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 3)) +>STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 11)) +>STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 11)) var ResultIsString12 = typeof STRING.charAt(0); >ResultIsString12 : Symbol(ResultIsString12, Decl(typeofOperatorWithStringType.ts, 32, 3)) >STRING.charAt : Symbol(String.charAt, Decl(lib.es5.d.ts, --, --)) ->STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 3)) +>STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 11)) >charAt : Symbol(String.charAt, Decl(lib.es5.d.ts, --, --)) // multiple typeof operators var ResultIsString13 = typeof typeof STRING; >ResultIsString13 : Symbol(ResultIsString13, Decl(typeofOperatorWithStringType.ts, 35, 3)) ->STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 3)) +>STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 11)) var ResultIsString14 = typeof typeof typeof (STRING + STRING); >ResultIsString14 : Symbol(ResultIsString14, Decl(typeofOperatorWithStringType.ts, 36, 3)) ->STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 3)) ->STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 3)) +>STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 11)) +>STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 11)) // miss assignment operators typeof ""; typeof STRING; ->STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 3)) +>STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 11)) typeof STRING1; >STRING1 : Symbol(STRING1, Decl(typeofOperatorWithStringType.ts, 2, 3)) @@ -124,17 +124,17 @@ typeof objA.a, M.n; >n : Symbol(M.n, Decl(typeofOperatorWithStringType.ts, 11, 14)) // use typeof in type query -var z: string; ->z : Symbol(z, Decl(typeofOperatorWithStringType.ts, 46, 3)) +declare var z: string; +>z : Symbol(z, Decl(typeofOperatorWithStringType.ts, 46, 11)) -var x: string[]; ->x : Symbol(x, Decl(typeofOperatorWithStringType.ts, 47, 3)) +declare var x: string[]; +>x : Symbol(x, Decl(typeofOperatorWithStringType.ts, 47, 11)) -var r: () => string; ->r : Symbol(r, Decl(typeofOperatorWithStringType.ts, 48, 3)) +declare var r: () => string; +>r : Symbol(r, Decl(typeofOperatorWithStringType.ts, 48, 11)) z: typeof STRING; ->STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 3)) +>STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 11)) x: typeof STRING1; >STRING1 : Symbol(STRING1, Decl(typeofOperatorWithStringType.ts, 2, 3)) diff --git a/tests/baselines/reference/typeofOperatorWithStringType.types b/tests/baselines/reference/typeofOperatorWithStringType.types index b8b780e367fa6..75a49f4543a96 100644 --- a/tests/baselines/reference/typeofOperatorWithStringType.types +++ b/tests/baselines/reference/typeofOperatorWithStringType.types @@ -2,7 +2,7 @@ === typeofOperatorWithStringType.ts === // typeof operator on string type -var STRING: string; +declare var STRING: string; >STRING : string > : ^^^^^^ @@ -40,7 +40,7 @@ namespace M { >M : typeof M > : ^^^^^^^^ - export var n: string; + export var n!: string; >n : string > : ^^^^^^ } @@ -281,15 +281,15 @@ typeof objA.a, M.n; > : ^^^^^^ // use typeof in type query -var z: string; +declare var z: string; >z : string > : ^^^^^^ -var x: string[]; +declare var x: string[]; >x : string[] > : ^^^^^^^^ -var r: () => string; +declare var r: () => string; >r : () => string > : ^^^^^^ diff --git a/tests/baselines/reference/typeofSimple.errors.txt b/tests/baselines/reference/typeofSimple.errors.txt index 7d904de8639b9..f2b55af210db5 100644 --- a/tests/baselines/reference/typeofSimple.errors.txt +++ b/tests/baselines/reference/typeofSimple.errors.txt @@ -1,10 +1,10 @@ typeofSimple.ts(3,5): error TS2322: Type 'number' is not assignable to type 'string'. -typeofSimple.ts(8,21): error TS2693: 'J' only refers to a type, but is being used as a value here. +typeofSimple.ts(8,29): error TS2693: 'J' only refers to a type, but is being used as a value here. ==== typeofSimple.ts (2 errors) ==== var v = 3; - var v2: typeof v; + var v2: typeof v = v; var v3: string = v2; // Not assignment compatible ~~ !!! error TS2322: Type 'number' is not assignable to type 'string'. @@ -12,10 +12,10 @@ typeofSimple.ts(8,21): error TS2693: 'J' only refers to a type, but is being use interface I { x: T; } interface J { } - var numberJ: typeof J; //Error, cannot reference type in typeof - ~ + declare var numberJ: typeof J; //Error, cannot reference type in typeof + ~ !!! error TS2693: 'J' only refers to a type, but is being used as a value here. - var numberI: I; + declare var numberI: I; - var fun: () => I; + declare var fun: () => I; numberI = fun(); \ No newline at end of file diff --git a/tests/baselines/reference/typeofSimple.js b/tests/baselines/reference/typeofSimple.js index 98cfa8f5916ab..9dec21f2bb1b0 100644 --- a/tests/baselines/reference/typeofSimple.js +++ b/tests/baselines/reference/typeofSimple.js @@ -2,23 +2,20 @@ //// [typeofSimple.ts] var v = 3; -var v2: typeof v; +var v2: typeof v = v; var v3: string = v2; // Not assignment compatible interface I { x: T; } interface J { } -var numberJ: typeof J; //Error, cannot reference type in typeof -var numberI: I; +declare var numberJ: typeof J; //Error, cannot reference type in typeof +declare var numberI: I; -var fun: () => I; +declare var fun: () => I; numberI = fun(); //// [typeofSimple.js] var v = 3; -var v2; +var v2 = v; var v3 = v2; // Not assignment compatible -var numberJ; //Error, cannot reference type in typeof -var numberI; -var fun; numberI = fun(); diff --git a/tests/baselines/reference/typeofSimple.symbols b/tests/baselines/reference/typeofSimple.symbols index 3e74fa4ac60f1..96012c5f7b9ce 100644 --- a/tests/baselines/reference/typeofSimple.symbols +++ b/tests/baselines/reference/typeofSimple.symbols @@ -4,9 +4,10 @@ var v = 3; >v : Symbol(v, Decl(typeofSimple.ts, 0, 3)) -var v2: typeof v; +var v2: typeof v = v; >v2 : Symbol(v2, Decl(typeofSimple.ts, 1, 3)) >v : Symbol(v, Decl(typeofSimple.ts, 0, 3)) +>v : Symbol(v, Decl(typeofSimple.ts, 0, 3)) var v3: string = v2; // Not assignment compatible >v3 : Symbol(v3, Decl(typeofSimple.ts, 2, 3)) @@ -21,19 +22,19 @@ interface I { x: T; } interface J { } >J : Symbol(J, Decl(typeofSimple.ts, 4, 24)) -var numberJ: typeof J; //Error, cannot reference type in typeof ->numberJ : Symbol(numberJ, Decl(typeofSimple.ts, 7, 3)) +declare var numberJ: typeof J; //Error, cannot reference type in typeof +>numberJ : Symbol(numberJ, Decl(typeofSimple.ts, 7, 11)) -var numberI: I; ->numberI : Symbol(numberI, Decl(typeofSimple.ts, 8, 3)) +declare var numberI: I; +>numberI : Symbol(numberI, Decl(typeofSimple.ts, 8, 11)) >I : Symbol(I, Decl(typeofSimple.ts, 2, 20)) >v2 : Symbol(v2, Decl(typeofSimple.ts, 1, 3)) -var fun: () => I; ->fun : Symbol(fun, Decl(typeofSimple.ts, 10, 3)) +declare var fun: () => I; +>fun : Symbol(fun, Decl(typeofSimple.ts, 10, 11)) >I : Symbol(I, Decl(typeofSimple.ts, 2, 20)) numberI = fun(); ->numberI : Symbol(numberI, Decl(typeofSimple.ts, 8, 3)) ->fun : Symbol(fun, Decl(typeofSimple.ts, 10, 3)) +>numberI : Symbol(numberI, Decl(typeofSimple.ts, 8, 11)) +>fun : Symbol(fun, Decl(typeofSimple.ts, 10, 11)) diff --git a/tests/baselines/reference/typeofSimple.types b/tests/baselines/reference/typeofSimple.types index d5091946e6ffc..5d4c19fe17b81 100644 --- a/tests/baselines/reference/typeofSimple.types +++ b/tests/baselines/reference/typeofSimple.types @@ -7,11 +7,13 @@ var v = 3; >3 : 3 > : ^ -var v2: typeof v; +var v2: typeof v = v; >v2 : number > : ^^^^^^ >v : number > : ^^^^^^ +>v : number +> : ^^^^^^ var v3: string = v2; // Not assignment compatible >v3 : string @@ -25,19 +27,19 @@ interface I { x: T; } interface J { } -var numberJ: typeof J; //Error, cannot reference type in typeof +declare var numberJ: typeof J; //Error, cannot reference type in typeof >numberJ : any > : ^^^ >J : any > : ^^^ -var numberI: I; +declare var numberI: I; >numberI : I > : ^^^^^^^^^ >v2 : number > : ^^^^^^ -var fun: () => I; +declare var fun: () => I; >fun : () => I > : ^^^^^^ diff --git a/tests/baselines/reference/typeofTypeParameter.errors.txt b/tests/baselines/reference/typeofTypeParameter.errors.txt index 467bca2396202..ce2acbef3bedf 100644 --- a/tests/baselines/reference/typeofTypeParameter.errors.txt +++ b/tests/baselines/reference/typeofTypeParameter.errors.txt @@ -1,11 +1,11 @@ -typeofTypeParameter.ts(3,19): error TS2693: 'T' only refers to a type, but is being used as a value here. +typeofTypeParameter.ts(3,20): error TS2693: 'T' only refers to a type, but is being used as a value here. ==== typeofTypeParameter.ts (1 errors) ==== function f(x: T): T { - var a: typeof x; - var y: typeof T; - ~ + var a!: typeof x; + var y!: typeof T; + ~ !!! error TS2693: 'T' only refers to a type, but is being used as a value here. return a; } \ No newline at end of file diff --git a/tests/baselines/reference/typeofTypeParameter.js b/tests/baselines/reference/typeofTypeParameter.js index bf74443df4d7e..a7e4b03b2e981 100644 --- a/tests/baselines/reference/typeofTypeParameter.js +++ b/tests/baselines/reference/typeofTypeParameter.js @@ -2,8 +2,8 @@ //// [typeofTypeParameter.ts] function f(x: T): T { - var a: typeof x; - var y: typeof T; + var a!: typeof x; + var y!: typeof T; return a; } diff --git a/tests/baselines/reference/typeofTypeParameter.symbols b/tests/baselines/reference/typeofTypeParameter.symbols index 8e41e27202463..cdedee3025b8b 100644 --- a/tests/baselines/reference/typeofTypeParameter.symbols +++ b/tests/baselines/reference/typeofTypeParameter.symbols @@ -8,11 +8,11 @@ function f(x: T): T { >T : Symbol(T, Decl(typeofTypeParameter.ts, 0, 11)) >T : Symbol(T, Decl(typeofTypeParameter.ts, 0, 11)) - var a: typeof x; + var a!: typeof x; >a : Symbol(a, Decl(typeofTypeParameter.ts, 1, 7)) >x : Symbol(x, Decl(typeofTypeParameter.ts, 0, 14)) - var y: typeof T; + var y!: typeof T; >y : Symbol(y, Decl(typeofTypeParameter.ts, 2, 7)) return a; diff --git a/tests/baselines/reference/typeofTypeParameter.types b/tests/baselines/reference/typeofTypeParameter.types index b226539695853..06fbc989850bb 100644 --- a/tests/baselines/reference/typeofTypeParameter.types +++ b/tests/baselines/reference/typeofTypeParameter.types @@ -7,13 +7,13 @@ function f(x: T): T { >x : T > : ^ - var a: typeof x; + var a!: typeof x; >a : T > : ^ >x : T > : ^ - var y: typeof T; + var y!: typeof T; >y : any > : ^^^ >T : any diff --git a/tests/baselines/reference/umd5.errors.txt b/tests/baselines/reference/umd5.errors.txt index 34108d4d75804..a68162069344a 100644 --- a/tests/baselines/reference/umd5.errors.txt +++ b/tests/baselines/reference/umd5.errors.txt @@ -4,7 +4,7 @@ a.ts(6,9): error TS2686: 'Foo' refers to a UMD global, but the current file is a ==== a.ts (1 errors) ==== import * as Bar from './foo'; Bar.fn(); - let x: Bar.Thing; + declare let x: Bar.Thing; let y: number = x.n; // should error let z = Foo; diff --git a/tests/baselines/reference/umd5.js b/tests/baselines/reference/umd5.js index 11057d45eb673..7bae36b1bdbbc 100644 --- a/tests/baselines/reference/umd5.js +++ b/tests/baselines/reference/umd5.js @@ -9,7 +9,7 @@ export as namespace Foo; //// [a.ts] import * as Bar from './foo'; Bar.fn(); -let x: Bar.Thing; +declare let x: Bar.Thing; let y: number = x.n; // should error let z = Foo; @@ -53,7 +53,6 @@ var __importStar = (this && this.__importStar) || (function () { Object.defineProperty(exports, "__esModule", { value: true }); var Bar = __importStar(require("./foo")); Bar.fn(); -var x; var y = x.n; // should error var z = Foo; diff --git a/tests/baselines/reference/umd5.symbols b/tests/baselines/reference/umd5.symbols index 41eba451b25cc..34ab80afb71b8 100644 --- a/tests/baselines/reference/umd5.symbols +++ b/tests/baselines/reference/umd5.symbols @@ -9,15 +9,15 @@ Bar.fn(); >Bar : Symbol(Bar, Decl(a.ts, 0, 6)) >fn : Symbol(Bar.fn, Decl(foo.d.ts, 0, 21)) -let x: Bar.Thing; ->x : Symbol(x, Decl(a.ts, 2, 3)) +declare let x: Bar.Thing; +>x : Symbol(x, Decl(a.ts, 2, 11)) >Bar : Symbol(Bar, Decl(a.ts, 0, 6)) >Thing : Symbol(Bar.Thing, Decl(foo.d.ts, 1, 27)) let y: number = x.n; >y : Symbol(y, Decl(a.ts, 3, 3)) >x.n : Symbol(Bar.Thing.n, Decl(foo.d.ts, 2, 24)) ->x : Symbol(x, Decl(a.ts, 2, 3)) +>x : Symbol(x, Decl(a.ts, 2, 11)) >n : Symbol(Bar.Thing.n, Decl(foo.d.ts, 2, 24)) // should error diff --git a/tests/baselines/reference/umd5.types b/tests/baselines/reference/umd5.types index 9add60c8b8c81..d256717500c57 100644 --- a/tests/baselines/reference/umd5.types +++ b/tests/baselines/reference/umd5.types @@ -15,7 +15,7 @@ Bar.fn(); >fn : () => void > : ^^^^^^ -let x: Bar.Thing; +declare let x: Bar.Thing; >x : Bar.Thing > : ^^^^^^^^^ >Bar : any diff --git a/tests/baselines/reference/umd8.errors.txt b/tests/baselines/reference/umd8.errors.txt index 79dc529f2d62c..50d40e9f0b421 100644 --- a/tests/baselines/reference/umd8.errors.txt +++ b/tests/baselines/reference/umd8.errors.txt @@ -5,9 +5,9 @@ a.ts(7,14): error TS2686: 'Foo' refers to a UMD global, but the current file is /// import * as ff from './foo'; - let y: Foo; // OK in type position + declare let y: Foo; // OK in type position y.foo(); - let z: Foo.SubThing; // OK in ns position + declare let z: Foo.SubThing; // OK in ns position let x: any = Foo; // Not OK in value position ~~~ !!! error TS2686: 'Foo' refers to a UMD global, but the current file is a module. Consider adding an import instead. diff --git a/tests/baselines/reference/umd8.js b/tests/baselines/reference/umd8.js index a6a501057b99c..e1938399bca14 100644 --- a/tests/baselines/reference/umd8.js +++ b/tests/baselines/reference/umd8.js @@ -14,16 +14,14 @@ export as namespace Foo; /// import * as ff from './foo'; -let y: Foo; // OK in type position +declare let y: Foo; // OK in type position y.foo(); -let z: Foo.SubThing; // OK in ns position +declare let z: Foo.SubThing; // OK in ns position let x: any = Foo; // Not OK in value position //// [a.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var y; // OK in type position y.foo(); -var z; // OK in ns position var x = Foo; // Not OK in value position diff --git a/tests/baselines/reference/umd8.symbols b/tests/baselines/reference/umd8.symbols index 0cb5bdf2f270f..2a8264365b7a7 100644 --- a/tests/baselines/reference/umd8.symbols +++ b/tests/baselines/reference/umd8.symbols @@ -5,17 +5,17 @@ import * as ff from './foo'; >ff : Symbol(ff, Decl(a.ts, 1, 6)) -let y: Foo; // OK in type position ->y : Symbol(y, Decl(a.ts, 3, 3)) +declare let y: Foo; // OK in type position +>y : Symbol(y, Decl(a.ts, 3, 11)) >Foo : Symbol(Foo, Decl(foo.d.ts, 6, 15)) y.foo(); >y.foo : Symbol(Thing.foo, Decl(foo.d.ts, 0, 21)) ->y : Symbol(y, Decl(a.ts, 3, 3)) +>y : Symbol(y, Decl(a.ts, 3, 11)) >foo : Symbol(Thing.foo, Decl(foo.d.ts, 0, 21)) -let z: Foo.SubThing; // OK in ns position ->z : Symbol(z, Decl(a.ts, 5, 3)) +declare let z: Foo.SubThing; // OK in ns position +>z : Symbol(z, Decl(a.ts, 5, 11)) >Foo : Symbol(Foo, Decl(foo.d.ts, 6, 15)) >SubThing : Symbol(ff.SubThing, Decl(foo.d.ts, 3, 25)) diff --git a/tests/baselines/reference/umd8.types b/tests/baselines/reference/umd8.types index 57d63c467b132..d7543561dc686 100644 --- a/tests/baselines/reference/umd8.types +++ b/tests/baselines/reference/umd8.types @@ -6,7 +6,7 @@ import * as ff from './foo'; >ff : typeof ff > : ^^^^^^^^^ -let y: Foo; // OK in type position +declare let y: Foo; // OK in type position >y : import("foo") > : ^^^^^^^^^^^^^ @@ -20,7 +20,7 @@ y.foo(); >foo : () => number > : ^^^^^^ -let z: Foo.SubThing; // OK in ns position +declare let z: Foo.SubThing; // OK in ns position >z : ff.SubThing > : ^^^^^^^^^^^ >Foo : any diff --git a/tests/baselines/reference/underscoreTest1.errors.txt b/tests/baselines/reference/underscoreTest1.errors.txt index ab14202e8fc98..ba91927c40b90 100644 --- a/tests/baselines/reference/underscoreTest1.errors.txt +++ b/tests/baselines/reference/underscoreTest1.errors.txt @@ -144,7 +144,7 @@ underscoreTest1_underscoreTests.ts(26,3): error TS2769: No overload matches this initialize(); initialize(); - var notes: any[]; + var notes: any[] = []; var render = () => alert("rendering..."); var renderNotes = _.after(notes.length, render); _.each(notes, (note) => note.asyncSave({ success: renderNotes })); diff --git a/tests/baselines/reference/underscoreTest1.js b/tests/baselines/reference/underscoreTest1.js index 6e81cdc454014..cf2db5f34c0e3 100644 --- a/tests/baselines/reference/underscoreTest1.js +++ b/tests/baselines/reference/underscoreTest1.js @@ -775,7 +775,7 @@ var initialize = _.once(createApplication); initialize(); initialize(); -var notes: any[]; +var notes: any[] = []; var render = () => alert("rendering..."); var renderNotes = _.after(notes.length, render); _.each(notes, (note) => note.asyncSave({ success: renderNotes })); @@ -996,7 +996,7 @@ var createApplication = function () { return alert('creating application...'); } var initialize = _.once(createApplication); initialize(); initialize(); -var notes; +var notes = []; var render = function () { return alert("rendering..."); }; var renderNotes = _.after(notes.length, render); _.each(notes, function (note) { return note.asyncSave({ success: renderNotes }); }); diff --git a/tests/baselines/reference/underscoreTest1.symbols b/tests/baselines/reference/underscoreTest1.symbols index be9548bdf6daa..c4e6d3ca27173 100644 --- a/tests/baselines/reference/underscoreTest1.symbols +++ b/tests/baselines/reference/underscoreTest1.symbols @@ -500,7 +500,7 @@ initialize(); initialize(); >initialize : Symbol(initialize, Decl(underscoreTest1_underscoreTests.ts, 122, 3)) -var notes: any[]; +var notes: any[] = []; >notes : Symbol(notes, Decl(underscoreTest1_underscoreTests.ts, 126, 3)) var render = () => alert("rendering..."); diff --git a/tests/baselines/reference/underscoreTest1.types b/tests/baselines/reference/underscoreTest1.types index 8ab77090fa52e..77de0efd1bcbf 100644 --- a/tests/baselines/reference/underscoreTest1.types +++ b/tests/baselines/reference/underscoreTest1.types @@ -1812,9 +1812,11 @@ initialize(); >initialize : () => void > : ^^^^^^^^^^ -var notes: any[]; +var notes: any[] = []; >notes : any[] > : ^^^^^ +>[] : undefined[] +> : ^^^^^^^^^^^ var render = () => alert("rendering..."); >render : () => void diff --git a/tests/baselines/reference/unicodeEscapesInJsxtags.errors.txt b/tests/baselines/reference/unicodeEscapesInJsxtags.errors.txt index cc664d0d2ece4..e70893f7d1bd0 100644 --- a/tests/baselines/reference/unicodeEscapesInJsxtags.errors.txt +++ b/tests/baselines/reference/unicodeEscapesInJsxtags.errors.txt @@ -1,17 +1,18 @@ -file.tsx(15,4): error TS17021: Unicode escape sequence cannot appear here. file.tsx(16,4): error TS17021: Unicode escape sequence cannot appear here. file.tsx(17,4): error TS17021: Unicode escape sequence cannot appear here. file.tsx(18,4): error TS17021: Unicode escape sequence cannot appear here. -file.tsx(19,6): error TS17021: Unicode escape sequence cannot appear here. -file.tsx(20,4): error TS17021: Unicode escape sequence cannot appear here. +file.tsx(19,4): error TS17021: Unicode escape sequence cannot appear here. +file.tsx(20,6): error TS17021: Unicode escape sequence cannot appear here. file.tsx(21,4): error TS17021: Unicode escape sequence cannot appear here. file.tsx(22,4): error TS17021: Unicode escape sequence cannot appear here. file.tsx(23,4): error TS17021: Unicode escape sequence cannot appear here. -file.tsx(26,9): error TS17021: Unicode escape sequence cannot appear here. +file.tsx(24,4): error TS17021: Unicode escape sequence cannot appear here. file.tsx(27,9): error TS17021: Unicode escape sequence cannot appear here. +file.tsx(28,9): error TS17021: Unicode escape sequence cannot appear here. ==== file.tsx (11 errors) ==== + /// import * as React from "react"; declare global { namespace JSX { diff --git a/tests/baselines/reference/unicodeEscapesInJsxtags.js b/tests/baselines/reference/unicodeEscapesInJsxtags.js index 19d083df09371..fb197640c40d5 100644 --- a/tests/baselines/reference/unicodeEscapesInJsxtags.js +++ b/tests/baselines/reference/unicodeEscapesInJsxtags.js @@ -1,6 +1,7 @@ //// [tests/cases/conformance/jsx/unicodeEscapesInJsxtags.tsx] //// //// [file.tsx] +/// import * as React from "react"; declare global { namespace JSX { @@ -31,6 +32,7 @@ const x = { video: () => null } //// [file.js] +/// import * as React from "react"; const Compa = (x) => React.createElement("div", null, "" + x); const x = { video: () => null }; diff --git a/tests/baselines/reference/unicodeEscapesInJsxtags.symbols b/tests/baselines/reference/unicodeEscapesInJsxtags.symbols index dc9acb394ab4a..af0fb11b547f9 100644 --- a/tests/baselines/reference/unicodeEscapesInJsxtags.symbols +++ b/tests/baselines/reference/unicodeEscapesInJsxtags.symbols @@ -1,37 +1,38 @@ //// [tests/cases/conformance/jsx/unicodeEscapesInJsxtags.tsx] //// === file.tsx === +/// import * as React from "react"; ->React : Symbol(React, Decl(file.tsx, 0, 6)) +>React : Symbol(React, Decl(file.tsx, 1, 6)) declare global { ->global : Symbol(global, Decl(file.tsx, 0, 31)) +>global : Symbol(global, Decl(file.tsx, 1, 31)) namespace JSX { ->JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1), Decl(file.tsx, 1, 16)) +>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1), Decl(file.tsx, 2, 16)) interface IntrinsicElements { ->IntrinsicElements : Symbol(IntrinsicElements, Decl(react.d.ts, 2368, 78), Decl(file.tsx, 2, 19)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(react.d.ts, 2368, 78), Decl(file.tsx, 3, 19)) "a-b": any; ->"a-b" : Symbol(IntrinsicElements["a-b"], Decl(file.tsx, 3, 37)) +>"a-b" : Symbol(IntrinsicElements["a-b"], Decl(file.tsx, 4, 37)) "a-c": any; ->"a-c" : Symbol(IntrinsicElements["a-c"], Decl(file.tsx, 4, 23)) +>"a-c" : Symbol(IntrinsicElements["a-c"], Decl(file.tsx, 5, 23)) } } } const Compa = (x: {x: number}) =>
{"" + x}
; ->Compa : Symbol(Compa, Decl(file.tsx, 9, 5)) ->x : Symbol(x, Decl(file.tsx, 9, 15)) ->x : Symbol(x, Decl(file.tsx, 9, 19)) +>Compa : Symbol(Compa, Decl(file.tsx, 10, 5)) +>x : Symbol(x, Decl(file.tsx, 10, 15)) +>x : Symbol(x, Decl(file.tsx, 10, 19)) >div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45)) ->x : Symbol(x, Decl(file.tsx, 9, 15)) +>x : Symbol(x, Decl(file.tsx, 10, 15)) >div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45)) const x = { video: () => null } ->x : Symbol(x, Decl(file.tsx, 10, 5)) ->video : Symbol(video, Decl(file.tsx, 10, 11)) +>x : Symbol(x, Decl(file.tsx, 11, 5)) +>video : Symbol(video, Decl(file.tsx, 11, 11)) // unicode escape sequence is not allowed in tag name or JSX attribute name. // tag name: @@ -40,44 +41,44 @@ const x = { video: () => null } >a : Symbol(JSX.IntrinsicElements.a, Decl(react.d.ts, 2370, 33)) ; <\u0061-b> ->\u0061-b : Symbol(JSX.IntrinsicElements["a-b"], Decl(file.tsx, 3, 37)) ->a-b : Symbol(JSX.IntrinsicElements["a-b"], Decl(file.tsx, 3, 37)) +>\u0061-b : Symbol(JSX.IntrinsicElements["a-b"], Decl(file.tsx, 4, 37)) +>a-b : Symbol(JSX.IntrinsicElements["a-b"], Decl(file.tsx, 4, 37)) ; ->a-\u0063 : Symbol(JSX.IntrinsicElements["a-c"], Decl(file.tsx, 4, 23)) ->a-c : Symbol(JSX.IntrinsicElements["a-c"], Decl(file.tsx, 4, 23)) +>a-\u0063 : Symbol(JSX.IntrinsicElements["a-c"], Decl(file.tsx, 5, 23)) +>a-c : Symbol(JSX.IntrinsicElements["a-c"], Decl(file.tsx, 5, 23)) ; ->Comp\u0061 : Symbol(Compa, Decl(file.tsx, 9, 5)) ->x : Symbol(x, Decl(file.tsx, 17, 13)) +>Comp\u0061 : Symbol(Compa, Decl(file.tsx, 10, 5)) +>x : Symbol(x, Decl(file.tsx, 18, 13)) ; ->x.\u0076ideo : Symbol(video, Decl(file.tsx, 10, 11)) ->x : Symbol(x, Decl(file.tsx, 10, 5)) ->\u0076ideo : Symbol(video, Decl(file.tsx, 10, 11)) +>x.\u0076ideo : Symbol(video, Decl(file.tsx, 11, 11)) +>x : Symbol(x, Decl(file.tsx, 11, 5)) +>\u0076ideo : Symbol(video, Decl(file.tsx, 11, 11)) ; <\u{0061}>
>\u{0061} : Symbol(JSX.IntrinsicElements.a, Decl(react.d.ts, 2370, 33)) >a : Symbol(JSX.IntrinsicElements.a, Decl(react.d.ts, 2370, 33)) ; <\u{0061}-b> ->\u{0061}-b : Symbol(JSX.IntrinsicElements["a-b"], Decl(file.tsx, 3, 37)) ->a-b : Symbol(JSX.IntrinsicElements["a-b"], Decl(file.tsx, 3, 37)) +>\u{0061}-b : Symbol(JSX.IntrinsicElements["a-b"], Decl(file.tsx, 4, 37)) +>a-b : Symbol(JSX.IntrinsicElements["a-b"], Decl(file.tsx, 4, 37)) ; ->a-\u{0063} : Symbol(JSX.IntrinsicElements["a-c"], Decl(file.tsx, 4, 23)) ->a-c : Symbol(JSX.IntrinsicElements["a-c"], Decl(file.tsx, 4, 23)) +>a-\u{0063} : Symbol(JSX.IntrinsicElements["a-c"], Decl(file.tsx, 5, 23)) +>a-c : Symbol(JSX.IntrinsicElements["a-c"], Decl(file.tsx, 5, 23)) ; ->Comp\u{0061} : Symbol(Compa, Decl(file.tsx, 9, 5)) ->x : Symbol(x, Decl(file.tsx, 22, 15)) +>Comp\u{0061} : Symbol(Compa, Decl(file.tsx, 10, 5)) +>x : Symbol(x, Decl(file.tsx, 23, 15)) // attribute name ;