diff --git a/.github/workflows/accept-baselines-fix-lints.yaml b/.github/workflows/accept-baselines-fix-lints.yaml
index 064652b0fdce2..333348156fbf1 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@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
+      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
         with:
           token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
-      - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
+      - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
         with:
           node-version: 'lts/*'
 
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index f5b8609ec3333..ac26e687fd0ed 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -49,9 +49,9 @@ jobs:
     name: Test Node ${{ matrix.node-version }} on ${{ matrix.os }}${{ (!matrix.bundle && ' with --no-bundle') || '' }}
 
     steps:
-      - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
+      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
       - name: Use node version ${{ matrix.node-version }}
-        uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
+        uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
         with:
           node-version: ${{ matrix.node-version }}
           check-latest: true
@@ -80,8 +80,8 @@ jobs:
       contents: read
 
     steps:
-      - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
-      - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
+      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+      - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
         with:
           node-version: 'lts/*'
       - run: npm ci
@@ -95,7 +95,7 @@ jobs:
           name: coverage
           path: coverage
 
-      - uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
+      - uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v5.0.7
         with:
           use_oidc: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) }}
           disable_search: true
@@ -105,8 +105,8 @@ jobs:
     runs-on: ubuntu-latest
 
     steps:
-      - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
-      - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
+      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+      - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
         with:
           node-version: 'lts/*'
       - run: npm ci
@@ -118,8 +118,8 @@ jobs:
     runs-on: ubuntu-latest
 
     steps:
-      - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
-      - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
+      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+      - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
         with:
           node-version: 'lts/*'
       - run: npm ci
@@ -131,13 +131,13 @@ jobs:
     runs-on: ubuntu-latest
 
     steps:
-      - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
-      - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
+      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+      - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
         with:
           node-version: 'lts/*'
       - run: npm ci
 
-      - uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
+      - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
         with:
           path: ~/.cache/dprint
           key: ${{ runner.os }}-dprint-${{ hashFiles('package-lock.json', '.dprint.jsonc') }}
@@ -151,8 +151,8 @@ jobs:
     runs-on: ubuntu-latest
 
     steps:
-      - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
-      - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
+      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+      - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
         with:
           node-version: 'lts/*'
       - run: npm ci
@@ -167,8 +167,8 @@ jobs:
     runs-on: ubuntu-latest
 
     steps:
-      - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
-      - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
+      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+      - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
         with:
           node-version: 'lts/*'
       - run: npm ci
@@ -180,9 +180,9 @@ jobs:
     runs-on: ubuntu-latest
 
     steps:
-      - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
+      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
 
-      - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
+      - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
         with:
           node-version: 'lts/*'
       - run: |
@@ -221,16 +221,16 @@ jobs:
     if: github.event_name == 'pull_request'
 
     steps:
-      - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
+      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
         with:
           path: pr
 
-      - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
+      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
         with:
           path: base
           ref: ${{ github.base_ref }}
 
-      - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
+      - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
         with:
           node-version: 'lts/*'
       - run: |
@@ -262,8 +262,8 @@ jobs:
     runs-on: ubuntu-latest
 
     steps:
-      - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
-      - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
+      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+      - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
         with:
           node-version: 'lts/*'
       - run: npm ci
@@ -278,8 +278,8 @@ jobs:
     runs-on: ubuntu-latest
 
     steps:
-      - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
-      - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
+      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+      - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
         with:
           node-version: 'lts/*'
       - run: npm ci
@@ -297,8 +297,8 @@ jobs:
     runs-on: ubuntu-latest
 
     steps:
-      - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
-      - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
+      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+      - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
         with:
           node-version: 'lts/*'
       - run: npm ci
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index f90653a57227e..9725306635461 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -42,11 +42,11 @@ jobs:
 
     steps:
       - name: Checkout repository
-        uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
+        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
 
       # Initializes the CodeQL tools for scanning.
       - name: Initialize CodeQL
-        uses: github/codeql-action/init@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
+        uses: github/codeql-action/init@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
         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@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
+        uses: github/codeql-action/autobuild@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
 
       # â„šī¸ 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@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
+        uses: github/codeql-action/analyze@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
diff --git a/.github/workflows/create-cherry-pick-pr.yml b/.github/workflows/create-cherry-pick-pr.yml
index 114966485203a..81090f3ecaf12 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@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
+      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
         with:
           filter: blob:none # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
           fetch-depth: 0 # Default is 1; need to set to 0 to get the benefits of blob:none.
diff --git a/.github/workflows/insiders.yaml b/.github/workflows/insiders.yaml
index 30ca2f3d17a0b..dc23cc43673b8 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@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
-      - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
+      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+      - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
         with:
           node-version: 'lts/*'
       - run: |
@@ -42,8 +42,8 @@ jobs:
     if: github.repository == 'microsoft/TypeScript'
 
     steps:
-      - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
-      - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
+      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+      - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
         with:
           node-version: 'lts/*'
           # Use NODE_AUTH_TOKEN environment variable to authenticate to this registry.
diff --git a/.github/workflows/lkg.yml b/.github/workflows/lkg.yml
index b95e90d22d1f2..26fe358473e22 100644
--- a/.github/workflows/lkg.yml
+++ b/.github/workflows/lkg.yml
@@ -27,11 +27,11 @@ jobs:
             exit 1
           fi
 
-      - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
+      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
         with:
           ref: ${{ inputs.branch_name }}
           token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
-      - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
+      - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
         with:
           node-version: 'lts/*'
       - run: |
diff --git a/.github/workflows/new-release-branch.yaml b/.github/workflows/new-release-branch.yaml
index ddb1a6dc4367f..17bffe12ee4c1 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@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
+      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
         with:
           filter: blob:none # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
           fetch-depth: 0 # Default is 1; need to set to 0 to get the benefits of blob:none.
           token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
-      - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
+      - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
         with:
           node-version: 'lts/*'
       - run: |
diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml
index a87b879191f85..375a8255ae67b 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@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
-      - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
+      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+      - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
         with:
           node-version: 'lts/*'
       - run: |
@@ -42,8 +42,8 @@ jobs:
     if: github.repository == 'microsoft/TypeScript'
 
     steps:
-      - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
-      - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
+      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+      - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
         with:
           node-version: 'lts/*'
           # Use NODE_AUTH_TOKEN environment variable to authenticate to this registry.
diff --git a/.github/workflows/release-branch-artifact.yaml b/.github/workflows/release-branch-artifact.yaml
index f1ec333027c53..8ccdfb282043a 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@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
-      - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
+      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+      - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
         with:
           node-version: 'lts/*'
       - run: |
diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml
index 3daa8c4894147..5e5ffeb2de92b 100644
--- a/.github/workflows/scorecard.yml
+++ b/.github/workflows/scorecard.yml
@@ -29,7 +29,7 @@ jobs:
 
     steps:
       - name: 'Checkout code'
-        uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
+        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.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@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
+        uses: github/codeql-action/upload-sarif@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
         with:
           sarif_file: results.sarif
diff --git a/.github/workflows/set-version.yaml b/.github/workflows/set-version.yaml
index 8bfc4f2e5a62b..145a717383d47 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@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
+      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
         with:
           ref: ${{ inputs.branch_name }}
           token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
-      - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
+      - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
         with:
           node-version: 'lts/*'
       - run: |
diff --git a/.github/workflows/sync-branch.yaml b/.github/workflows/sync-branch.yaml
index 25782cc74a26a..e5baa9b763142 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@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
+      - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
         with:
           node-version: 'lts/*'
-      - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
+      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
         with:
           ref: ${{ inputs.branch_name }}
           filter: blob:none # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
diff --git a/.github/workflows/sync-wiki.yml b/.github/workflows/sync-wiki.yml
index 8abea17b5b776..d96b1db60974f 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@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
+        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.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 54b39ea16ab75..08a9e42e3dd14 100644
--- a/.github/workflows/twoslash-repros.yaml
+++ b/.github/workflows/twoslash-repros.yaml
@@ -49,13 +49,13 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - if: ${{ github.event.inputs.bisect }}
-        uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
+        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
         with:
           filter: blob:none # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
           fetch-depth: 0 # Default is 1; need to set to 0 to get the benefits of blob:none.
       - if: ${{ !github.event.inputs.bisect }}
-        uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
-      - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
+        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+      - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
         with:
           node-version: 'lts/*'
       - uses: microsoft/TypeScript-Twoslash-Repro-Action@8680b5b290d48a7badbc7ba65971d526c61b86b8 # master
diff --git a/.github/workflows/update-package-lock.yaml b/.github/workflows/update-package-lock.yaml
index 7a28177b8bf0e..abf340d4f3360 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@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
+      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
         with:
           token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
-      - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
+      - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
         with:
           node-version: 'lts/*'
       - run: |
diff --git a/Herebyfile.mjs b/Herebyfile.mjs
index 402f7917cf34a..fd81046b52c26 100644
--- a/Herebyfile.mjs
+++ b/Herebyfile.mjs
@@ -604,14 +604,6 @@ export const knip = task({
     run: () => exec(process.execPath, ["node_modules/knip/bin/knip.js", "--tags=+internal,-knipignore", "--exclude=duplicates,enumMembers", ...(cmdLineOptions.fix ? ["--fix"] : [])]),
 });
 
-const { main: cancellationToken, watch: watchCancellationToken } = entrypointBuildTask({
-    name: "cancellation-token",
-    project: "src/cancellationToken",
-    srcEntrypoint: "./src/cancellationToken/cancellationToken.ts",
-    builtEntrypoint: "./built/local/cancellationToken/cancellationToken.js",
-    output: "./built/local/cancellationToken.js",
-});
-
 const { main: typingsInstaller, watch: watchTypingsInstaller } = entrypointBuildTask({
     name: "typings-installer",
     buildDeps: [generateDiagnostics],
@@ -661,14 +653,14 @@ const copyBuiltLocalDiagnosticMessages = task({
 export const otherOutputs = task({
     name: "other-outputs",
     description: "Builds miscelaneous scripts and documents distributed with the LKG",
-    dependencies: [cancellationToken, typingsInstaller, watchGuard, generateTypesMap, copyBuiltLocalDiagnosticMessages],
+    dependencies: [typingsInstaller, watchGuard, generateTypesMap, copyBuiltLocalDiagnosticMessages],
 });
 
 export const watchOtherOutputs = task({
     name: "watch-other-outputs",
     description: "Builds miscelaneous scripts and documents distributed with the LKG",
     hiddenFromTaskList: true,
-    dependencies: [watchCancellationToken, watchTypingsInstaller, watchWatchGuard, generateTypesMap, copyBuiltLocalDiagnosticMessages],
+    dependencies: [watchTypingsInstaller, watchWatchGuard, generateTypesMap, copyBuiltLocalDiagnosticMessages],
 });
 
 export const local = task({
@@ -916,7 +908,6 @@ export const produceLKG = task({
         }
 
         const expectedFiles = [
-            "built/local/cancellationToken.js",
             "built/local/tsc.js",
             "built/local/_tsc.js",
             "built/local/tsserver.js",
diff --git a/knip.jsonc b/knip.jsonc
index 9865bc39c165b..5b1fa410e15da 100644
--- a/knip.jsonc
+++ b/knip.jsonc
@@ -3,7 +3,6 @@
     "includeEntryExports": true,
     "entry": [
         "Herebyfile.mjs",
-        "src/cancellationToken/cancellationToken.ts",
         "src/testRunner/_namespaces/Harness.ts",
         "src/tsc/tsc.ts",
         "src/tsserver/server.ts",
diff --git a/package-lock.json b/package-lock.json
index 2cf0be87e9a06..b089dc3b035a7 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
 {
     "name": "typescript",
-    "version": "5.7.0",
+    "version": "5.8.0",
     "lockfileVersion": 2,
     "requires": true,
     "packages": {
         "": {
             "name": "typescript",
-            "version": "5.7.0",
+            "version": "5.8.0",
             "license": "Apache-2.0",
             "bin": {
                 "tsc": "bin/tsc",
diff --git a/package.json b/package.json
index a8a4f8420f14b..4ddb7a53a7146 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
     "name": "typescript",
     "author": "Microsoft Corp.",
     "homepage": "https://www.typescriptlang.org/",
-    "version": "5.7.0",
+    "version": "5.8.0",
     "license": "Apache-2.0",
     "description": "TypeScript is a language for application scale JavaScript development",
     "keywords": [
diff --git a/scripts/produceLKG.mjs b/scripts/produceLKG.mjs
index 2f654d668a0a5..4209a2b9b523b 100644
--- a/scripts/produceLKG.mjs
+++ b/scripts/produceLKG.mjs
@@ -48,7 +48,6 @@ async function copyTypesMap() {
 }
 
 async function copyScriptOutputs() {
-    await copyFromBuiltLocal("cancellationToken.js");
     await copyFromBuiltLocal("tsc.js");
     await copyFromBuiltLocal("_tsc.js");
     await copyFromBuiltLocal("tsserver.js");
diff --git a/src/cancellationToken/cancellationToken.ts b/src/cancellationToken/cancellationToken.ts
deleted file mode 100644
index 4676e9b14e0a3..0000000000000
--- a/src/cancellationToken/cancellationToken.ts
+++ /dev/null
@@ -1,69 +0,0 @@
-import * as fs from "fs";
-
-interface ServerCancellationToken {
-    isCancellationRequested(): boolean;
-    setRequest(requestId: number): void;
-    resetRequest(requestId: number): void;
-}
-
-function pipeExists(name: string): boolean {
-    // Unlike statSync, existsSync doesn't throw an exception if the target doesn't exist.
-    // A comment in the node code suggests they're stuck with that decision for back compat
-    // (https://github.com/nodejs/node/blob/9da241b600182a9ff400f6efc24f11a6303c27f7/lib/fs.js#L222).
-    // Caveat: If a named pipe does exist, the first call to existsSync will return true, as for
-    // statSync.  Subsequent calls will return false, whereas statSync would throw an exception
-    // indicating that the pipe was busy.  The difference is immaterial, since our statSync
-    // implementation returned false from its catch block.
-    return fs.existsSync(name);
-}
-
-function createCancellationToken(args: string[]): ServerCancellationToken {
-    let cancellationPipeName: string | undefined;
-    for (let i = 0; i < args.length - 1; i++) {
-        if (args[i] === "--cancellationPipeName") {
-            cancellationPipeName = args[i + 1];
-            break;
-        }
-    }
-    if (!cancellationPipeName) {
-        return {
-            isCancellationRequested: () => false,
-            setRequest: (_requestId: number): void => void 0,
-            resetRequest: (_requestId: number): void => void 0,
-        };
-    }
-    // cancellationPipeName is a string without '*' inside that can optionally end with '*'
-    // when client wants to signal cancellation it should create a named pipe with name=<cancellationPipeName>
-    // server will synchronously check the presence of the pipe and treat its existence as indicator that current request should be canceled.
-    // in case if client prefers to use more fine-grained schema than one name for all request it can add '*' to the end of cancellationPipeName.
-    // in this case pipe name will be build dynamically as <cancellationPipeName><request_seq>.
-    if (cancellationPipeName.charAt(cancellationPipeName.length - 1) === "*") {
-        const namePrefix = cancellationPipeName.slice(0, -1);
-        if (namePrefix.length === 0 || namePrefix.includes("*")) {
-            throw new Error("Invalid name for template cancellation pipe: it should have length greater than 2 characters and contain only one '*'.");
-        }
-        let perRequestPipeName: string | undefined;
-        let currentRequestId: number;
-        return {
-            isCancellationRequested: () => perRequestPipeName !== undefined && pipeExists(perRequestPipeName),
-            setRequest(requestId: number) {
-                currentRequestId = requestId;
-                perRequestPipeName = namePrefix + requestId;
-            },
-            resetRequest(requestId: number) {
-                if (currentRequestId !== requestId) {
-                    throw new Error(`Mismatched request id, expected ${currentRequestId}, actual ${requestId}`);
-                }
-                perRequestPipeName = undefined;
-            },
-        };
-    }
-    else {
-        return {
-            isCancellationRequested: () => pipeExists(cancellationPipeName),
-            setRequest: (_requestId: number): void => void 0,
-            resetRequest: (_requestId: number): void => void 0,
-        };
-    }
-}
-export = createCancellationToken;
diff --git a/src/cancellationToken/tsconfig.json b/src/cancellationToken/tsconfig.json
deleted file mode 100644
index 4a7c33276af13..0000000000000
--- a/src/cancellationToken/tsconfig.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
-    "extends": "../tsconfig-base",
-    "compilerOptions": {
-        "types": [
-            "node"
-        ]
-    },
-    "include": ["**/*"]
-}
diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts
index 7f61986a80fb8..b071f72b712c2 100644
--- a/src/compiler/binder.ts
+++ b/src/compiler/binder.ts
@@ -543,6 +543,7 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void {
     var preSwitchCaseFlow: FlowNode | undefined;
     var activeLabelList: ActiveLabel | undefined;
     var hasExplicitReturn: boolean;
+    var inReturnPosition: boolean;
     var hasFlowEffects: boolean;
 
     // state used for emit helpers
@@ -622,6 +623,7 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void {
         currentExceptionTarget = undefined;
         activeLabelList = undefined;
         hasExplicitReturn = false;
+        inReturnPosition = false;
         hasFlowEffects = false;
         inAssignmentPattern = false;
         emitFlags = NodeFlags.None;
@@ -967,7 +969,9 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void {
         const saveContainer = container;
         const saveThisParentContainer = thisParentContainer;
         const savedBlockScopeContainer = blockScopeContainer;
+        const savedInReturnPosition = inReturnPosition;
 
+        if (node.kind === SyntaxKind.ArrowFunction && node.body.kind !== SyntaxKind.Block) inReturnPosition = true;
         // Depending on what kind of node this is, we may have to adjust the current container
         // and block-container.   If the current node is a container, then it is automatically
         // considered the current block-container as well.  Also, for containers that we know
@@ -1071,6 +1075,7 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void {
             bindChildren(node);
         }
 
+        inReturnPosition = savedInReturnPosition;
         container = saveContainer;
         thisParentContainer = saveThisParentContainer;
         blockScopeContainer = savedBlockScopeContainer;
@@ -1571,7 +1576,10 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void {
     }
 
     function bindReturnOrThrow(node: ReturnStatement | ThrowStatement): void {
+        const savedInReturnPosition = inReturnPosition;
+        inReturnPosition = true;
         bind(node.expression);
+        inReturnPosition = savedInReturnPosition;
         if (node.kind === SyntaxKind.ReturnStatement) {
             hasExplicitReturn = true;
             if (currentReturnTarget) {
@@ -2016,10 +2024,16 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void {
         hasFlowEffects = false;
         bindCondition(node.condition, trueLabel, falseLabel);
         currentFlow = finishFlowLabel(trueLabel);
+        if (inReturnPosition) {
+            node.flowNodeWhenTrue = currentFlow;
+        }
         bind(node.questionToken);
         bind(node.whenTrue);
         addAntecedent(postExpressionLabel, currentFlow);
         currentFlow = finishFlowLabel(falseLabel);
+        if (inReturnPosition) {
+            node.flowNodeWhenFalse = currentFlow;
+        }
         bind(node.colonToken);
         bind(node.whenFalse);
         addAntecedent(postExpressionLabel, currentFlow);
diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts
index ce2f19bbca1fe..397a424ee7b27 100644
--- a/src/compiler/checker.ts
+++ b/src/compiler/checker.ts
@@ -171,6 +171,7 @@ import {
     EnumMember,
     EnumType,
     equateValues,
+    ErrorOutputContainer,
     escapeLeadingUnderscores,
     escapeString,
     EvaluatorResult,
@@ -512,6 +513,7 @@ import {
     isCompoundAssignment,
     isComputedNonLiteralName,
     isComputedPropertyName,
+    isConditionalExpression,
     isConditionalTypeNode,
     isConstAssertion,
     isConstructorDeclaration,
@@ -725,7 +727,6 @@ import {
     isRightSideOfQualifiedNameOrPropertyAccess,
     isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName,
     isSameEntityName,
-    isSatisfiesExpression,
     isSetAccessor,
     isSetAccessorDeclaration,
     isShorthandAmbientModuleSymbol,
@@ -1129,6 +1130,7 @@ import {
     WhileStatement,
     WideningContext,
     WithStatement,
+    WriterContextOut,
     YieldExpression,
 } from "./_namespaces/ts.js";
 import * as moduleSpecifiers from "./_namespaces/ts.moduleSpecifiers.js";
@@ -1716,8 +1718,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         writeSignature: (signature, enclosingDeclaration, flags, kind, writer) => {
             return signatureToString(signature, getParseTreeNode(enclosingDeclaration), flags, kind, writer);
         },
-        writeType: (type, enclosingDeclaration, flags, writer) => {
-            return typeToString(type, getParseTreeNode(enclosingDeclaration), flags, writer);
+        writeType: (type, enclosingDeclaration, flags, writer, verbosityLevel, out) => {
+            return typeToString(type, getParseTreeNode(enclosingDeclaration), flags, writer, verbosityLevel, out);
         },
         writeSymbol: (symbol, enclosingDeclaration, meaning, flags, writer) => {
             return symbolToString(symbol, getParseTreeNode(enclosingDeclaration), meaning, flags, writer);
@@ -2368,6 +2370,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         [".jsx", ".jsx"],
         [".json", ".json"],
     ];
+
+    var narrowableReturnTypeCache = new Map<string, boolean>();
     /* eslint-enable no-var */
 
     initializeTypeChecker();
@@ -3454,10 +3458,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
                     if (containerKind === SyntaxKind.InterfaceDeclaration && heritageKind === SyntaxKind.ExtendsKeyword) {
                         error(errorLocation, Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types, unescapeLeadingUnderscores(name));
                     }
-                    else if (containerKind === SyntaxKind.ClassDeclaration && heritageKind === SyntaxKind.ExtendsKeyword) {
+                    else if (isClassLike(grandparent.parent) && heritageKind === SyntaxKind.ExtendsKeyword) {
                         error(errorLocation, Diagnostics.A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values, unescapeLeadingUnderscores(name));
                     }
-                    else if (containerKind === SyntaxKind.ClassDeclaration && heritageKind === SyntaxKind.ImplementsKeyword) {
+                    else if (isClassLike(grandparent.parent) && heritageKind === SyntaxKind.ImplementsKeyword) {
                         error(errorLocation, Diagnostics.A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types, unescapeLeadingUnderscores(name));
                     }
                 }
@@ -5565,7 +5569,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         const cache = (links.accessibleChainCache ||= new Map());
         // Go from enclosingDeclaration to the first scope we check, so the cache is keyed off the scope and thus shared more
         const firstRelevantLocation = forEachSymbolTableInScope(enclosingDeclaration, (_, __, ___, node) => node);
-        const key = `${useOnlyExternalAliasing ? 0 : 1}|${firstRelevantLocation && getNodeId(firstRelevantLocation)}|${meaning}`;
+        const key = `${useOnlyExternalAliasing ? 0 : 1}|${firstRelevantLocation ? getNodeId(firstRelevantLocation) : 0}|${meaning}`;
         if (cache.has(key)) {
             return cache.get(key);
         }
@@ -6034,9 +6038,24 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         }
     }
 
-    function typeToString(type: Type, enclosingDeclaration?: Node, flags: TypeFormatFlags = TypeFormatFlags.AllowUniqueESSymbolType | TypeFormatFlags.UseAliasDefinedOutsideCurrentScope, writer: EmitTextWriter = createTextWriter("")): string {
-        const noTruncation = compilerOptions.noErrorTruncation || flags & TypeFormatFlags.NoTruncation;
-        const typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | NodeBuilderFlags.IgnoreErrors | (noTruncation ? NodeBuilderFlags.NoTruncation : NodeBuilderFlags.None), /*internalFlags*/ undefined);
+    function typeToString(
+        type: Type,
+        enclosingDeclaration?: Node,
+        flags: TypeFormatFlags = TypeFormatFlags.AllowUniqueESSymbolType | TypeFormatFlags.UseAliasDefinedOutsideCurrentScope,
+        writer: EmitTextWriter = createTextWriter(""),
+        verbosityLevel?: number,
+        out?: WriterContextOut,
+    ): string {
+        const noTruncation = compilerOptions.noErrorTruncation || flags & TypeFormatFlags.NoTruncation || verbosityLevel !== undefined;
+        const typeNode = nodeBuilder.typeToTypeNode(
+            type,
+            enclosingDeclaration,
+            toNodeBuilderFlags(flags) | NodeBuilderFlags.IgnoreErrors | (noTruncation ? NodeBuilderFlags.NoTruncation : 0),
+            /*internalFlags*/ undefined,
+            /*tracker*/ undefined,
+            verbosityLevel,
+            out,
+        );
         if (typeNode === undefined) return Debug.fail("should always get typenode");
         // The unresolved type gets a synthesized comment on `any` to hint to users that it's not a plain `any`.
         // Otherwise, we always strip comments out.
@@ -6174,8 +6193,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
             enterNewScope(context, node) {
                 if (isFunctionLike(node) || isJSDocSignature(node)) {
                     const signature = getSignatureFromDeclaration(node);
-                    const expandedParams = getExpandedParameters(signature, /*skipUnionExpanding*/ true)[0];
-                    return enterNewScope(context as NodeBuilderContext, node, expandedParams, signature.typeParameters);
+                    return enterNewScope(context as NodeBuilderContext, node, signature.parameters, signature.typeParameters);
                 }
                 else {
                     const typeParameters = isConditionalTypeNode(node) ? getInferTypeParameters(node) :
@@ -6254,20 +6272,20 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         };
         return {
             syntacticBuilderResolver,
-            typeToTypeNode: (type: Type, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => typeToTypeNodeHelper(type, context)),
-            typePredicateToTypePredicateNode: (typePredicate: TypePredicate, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => typePredicateToTypePredicateNodeHelper(typePredicate, context)),
-            serializeTypeForExpression: (expr: Expression, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => syntacticNodeBuilder.serializeTypeOfExpression(expr, context)),
-            serializeTypeForDeclaration: (declaration: HasInferredType, symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => syntacticNodeBuilder.serializeTypeOfDeclaration(declaration, symbol, context)),
-            serializeReturnTypeForSignature: (signature: SignatureDeclaration, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => syntacticNodeBuilder.serializeReturnTypeForSignature(signature, getSymbolOfDeclaration(signature), context)),
-            indexInfoToIndexSignatureDeclaration: (indexInfo: IndexInfo, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => indexInfoToIndexSignatureDeclarationHelper(indexInfo, context, /*typeNode*/ undefined)),
-            signatureToSignatureDeclaration: (signature: Signature, kind: SignatureDeclaration["kind"], enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => signatureToSignatureDeclarationHelper(signature, kind, context)),
-            symbolToEntityName: (symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => symbolToName(symbol, context, meaning, /*expectsIdentifier*/ false)),
-            symbolToExpression: (symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => symbolToExpression(symbol, context, meaning)),
-            symbolToTypeParameterDeclarations: (symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => typeParametersToTypeParameterDeclarations(symbol, context)),
-            symbolToParameterDeclaration: (symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => symbolToParameterDeclaration(symbol, context)),
-            typeParameterToDeclaration: (parameter: TypeParameter, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => typeParameterToDeclaration(parameter, context)),
-            symbolTableToDeclarationStatements: (symbolTable: SymbolTable, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => symbolTableToDeclarationStatements(symbolTable, context)),
-            symbolToNode: (symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => symbolToNode(symbol, context, meaning)),
+            typeToTypeNode: (type: Type, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker, verbosityLevel?: number, out?: { couldUnfoldMore: boolean; }) => withContext(enclosingDeclaration, flags, internalFlags, tracker, verbosityLevel, context => typeToTypeNodeHelper(type, context), out),
+            typePredicateToTypePredicateNode: (typePredicate: TypePredicate, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*verbosityLevel*/ undefined, context => typePredicateToTypePredicateNodeHelper(typePredicate, context)),
+            serializeTypeForDeclaration: (declaration: HasInferredType, symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*verbosityLevel*/ undefined, context => syntacticNodeBuilder.serializeTypeOfDeclaration(declaration, symbol, context)),
+            serializeReturnTypeForSignature: (signature: SignatureDeclaration, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*verbosityLevel*/ undefined, context => syntacticNodeBuilder.serializeReturnTypeForSignature(signature, getSymbolOfDeclaration(signature), context)),
+            serializeTypeForExpression: (expr: Expression, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*verbosityLevel*/ undefined, context => syntacticNodeBuilder.serializeTypeOfExpression(expr, context)),
+            indexInfoToIndexSignatureDeclaration: (indexInfo: IndexInfo, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*verbosityLevel*/ undefined, context => indexInfoToIndexSignatureDeclarationHelper(indexInfo, context, /*typeNode*/ undefined)),
+            signatureToSignatureDeclaration: (signature: Signature, kind: SignatureDeclaration["kind"], enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*verbosityLevel*/ undefined, context => signatureToSignatureDeclarationHelper(signature, kind, context)),
+            symbolToEntityName: (symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*verbosityLevel*/ undefined, context => symbolToName(symbol, context, meaning, /*expectsIdentifier*/ false)),
+            symbolToExpression: (symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*verbosityLevel*/ undefined, context => symbolToExpression(symbol, context, meaning)),
+            symbolToTypeParameterDeclarations: (symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*verbosityLevel*/ undefined, context => typeParametersToTypeParameterDeclarations(symbol, context)),
+            symbolToParameterDeclaration: (symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*verbosityLevel*/ undefined, context => symbolToParameterDeclaration(symbol, context)),
+            typeParameterToDeclaration: (parameter: TypeParameter, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker, verbosityLevel?: number) => withContext(enclosingDeclaration, flags, internalFlags, tracker, verbosityLevel, context => typeParameterToDeclaration(parameter, context)),
+            symbolTableToDeclarationStatements: (symbolTable: SymbolTable, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*verbosityLevel*/ undefined, context => symbolTableToDeclarationStatements(symbolTable, context)),
+            symbolToNode: (symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*verbosityLevel*/ undefined, context => symbolToNode(symbol, context, meaning)),
         };
 
         function getTypeFromTypeNode(context: NodeBuilderContext, node: TypeNode, noMappedTypes?: false): Type;
@@ -6327,7 +6345,15 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
             return symbolToExpression(symbol, context, meaning);
         }
 
-        function withContext<T>(enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined, internalFlags: InternalNodeBuilderFlags | undefined, tracker: SymbolTracker | undefined, cb: (context: NodeBuilderContext) => T): T | undefined {
+        function withContext<T>(
+            enclosingDeclaration: Node | undefined,
+            flags: NodeBuilderFlags | undefined,
+            internalFlags: InternalNodeBuilderFlags | undefined,
+            tracker: SymbolTracker | undefined,
+            verbosityLevel: number | undefined,
+            cb: (context: NodeBuilderContext) => T,
+            out?: WriterContextOut,
+        ): T | undefined {
             const moduleResolverHost = tracker?.trackSymbol ? tracker.moduleResolverHost :
                 (internalFlags || InternalNodeBuilderFlags.None) & InternalNodeBuilderFlags.DoNotIncludeSymbolChain ? createBasicNodeBuilderModuleSpecifierResolutionHost(host) :
                 undefined;
@@ -6337,6 +6363,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
                 flags: flags || NodeBuilderFlags.None,
                 internalFlags: internalFlags || InternalNodeBuilderFlags.None,
                 tracker: undefined!,
+                unfoldDepth: verbosityLevel ?? -1,
                 encounteredError: false,
                 suppressReportInferenceFallback: false,
                 reportedDiagnostic: false,
@@ -6359,12 +6386,17 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
                 typeParameterNamesByTextNextNameCount: undefined,
                 enclosingSymbolTypes: new Map(),
                 mapper: undefined,
+                depth: 0,
+                couldUnfoldMore: false,
             };
             context.tracker = new SymbolTrackerImpl(context, tracker, moduleResolverHost);
             const resultingNode = cb(context);
             if (context.truncating && context.flags & NodeBuilderFlags.NoTruncation) {
                 context.tracker.reportTruncationError();
             }
+            if (out) {
+                out.couldUnfoldMore = context.couldUnfoldMore;
+            }
             return context.encounteredError ? undefined : resultingNode;
         }
 
@@ -6385,12 +6417,14 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         function saveRestoreFlags(context: NodeBuilderContext) {
             const flags = context.flags;
             const internalFlags = context.internalFlags;
+            const depth = context.depth;
 
             return restore;
 
             function restore() {
                 context.flags = flags;
                 context.internalFlags = internalFlags;
+                context.depth = depth;
             }
         }
 
@@ -6399,6 +6433,25 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
             return context.truncating = context.approximateLength > ((context.flags & NodeBuilderFlags.NoTruncation) ? noTruncationMaximumTruncationLength : defaultMaximumTruncationLength);
         }
 
+        function couldUnfoldType(type: Type, context: NodeBuilderContext): boolean {
+            if (context.visitedTypes?.has(type.id)) {
+                return false;
+            }
+            return context.depth < context.unfoldDepth || context.depth === context.unfoldDepth && !context.couldUnfoldMore;
+        }
+
+        // Determines if a type can be unfolded, based on how many layers of type aliases we're allowed to unfold.
+        function canUnfoldType(type: Type, context: NodeBuilderContext): boolean {
+            if (context.visitedTypes?.has(type.id)) {
+                return false;
+            }
+            const result = context.depth < context.unfoldDepth;
+            if (!result) {
+                context.couldUnfoldMore = true;
+            }
+            return result;
+        }
+
         function typeToTypeNodeHelper(type: Type, context: NodeBuilderContext): TypeNode {
             const restoreFlags = saveRestoreFlags(context);
             const typeNode = typeToTypeNodeWorker(type, context);
@@ -6548,18 +6601,25 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
             }
 
             if (!inTypeAlias && type.aliasSymbol && (context.flags & NodeBuilderFlags.UseAliasDefinedOutsideCurrentScope || isTypeSymbolAccessible(type.aliasSymbol, context.enclosingDeclaration))) {
-                const typeArgumentNodes = mapToTypeNodes(type.aliasTypeArguments, context);
-                if (isReservedMemberName(type.aliasSymbol.escapedName) && !(type.aliasSymbol.flags & SymbolFlags.Class)) return factory.createTypeReferenceNode(factory.createIdentifier(""), typeArgumentNodes);
-                if (length(typeArgumentNodes) === 1 && type.aliasSymbol === globalArrayType.symbol) {
-                    return factory.createArrayTypeNode(typeArgumentNodes![0]);
+                if (!canUnfoldType(type, context)) {
+                    const typeArgumentNodes = mapToTypeNodes(type.aliasTypeArguments, context);
+                    if (isReservedMemberName(type.aliasSymbol.escapedName) && !(type.aliasSymbol.flags & SymbolFlags.Class)) return factory.createTypeReferenceNode(factory.createIdentifier(""), typeArgumentNodes);
+                    if (length(typeArgumentNodes) === 1 && type.aliasSymbol === globalArrayType.symbol) {
+                        return factory.createArrayTypeNode(typeArgumentNodes![0]);
+                    }
+                    return symbolToTypeNode(type.aliasSymbol, context, SymbolFlags.Type, typeArgumentNodes);
                 }
-                return symbolToTypeNode(type.aliasSymbol, context, SymbolFlags.Type, typeArgumentNodes);
+                context.depth += 1;
             }
 
             const objectFlags = getObjectFlags(type);
 
             if (objectFlags & ObjectFlags.Reference) {
                 Debug.assert(!!(type.flags & TypeFlags.Object));
+                if (canUnfoldType(type, context)) {
+                    context.depth += 1;
+                    return createAnonymousTypeNode(type as TypeReference, /*forceClassExpansion*/ true);
+                }
                 return (type as TypeReference).node ? visitAndTransformType(type as TypeReference, typeReferenceToTypeNode) : typeReferenceToTypeNode(type as TypeReference);
             }
             if (type.flags & TypeFlags.TypeParameter || objectFlags & ObjectFlags.ClassOrInterface) {
@@ -6588,6 +6648,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
                     context.approximateLength += idText(name).length;
                     return factory.createTypeReferenceNode(factory.createIdentifier(idText(name)), /*typeArguments*/ undefined);
                 }
+                if (objectFlags & ObjectFlags.ClassOrInterface && canUnfoldType(type, context)) {
+                    context.depth += 1;
+                    return createAnonymousTypeNode(type as InterfaceType, /*forceClassExpansion*/ true);
+                }
                 // Ignore constraint/default when creating a usage (as opposed to declaration) of a type parameter.
                 if (type.symbol) {
                     return symbolToTypeNode(type.symbol, context, SymbolFlags.Type);
@@ -6795,7 +6859,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
                 return result;
             }
 
-            function createAnonymousTypeNode(type: ObjectType): TypeNode {
+            function createAnonymousTypeNode(type: ObjectType, forceClassExpansion = false): TypeNode {
                 const typeId = type.id;
                 const symbol = type.symbol;
                 if (symbol) {
@@ -6829,10 +6893,15 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
                     // Always use 'typeof T' for type of class, enum, and module objects
                     else if (
                         symbol.flags & SymbolFlags.Class
+                            && !forceClassExpansion
                             && !getBaseTypeVariableOfClass(symbol)
-                            && !(symbol.valueDeclaration && isClassLike(symbol.valueDeclaration) && context.flags & NodeBuilderFlags.WriteClassExpressionAsTypeLiteral && (!isClassDeclaration(symbol.valueDeclaration) || isSymbolAccessible(symbol, context.enclosingDeclaration, isInstanceType, /*shouldComputeAliasesToMakeVisible*/ false).accessibility !== SymbolAccessibility.Accessible)) ||
-                        symbol.flags & (SymbolFlags.Enum | SymbolFlags.ValueModule) ||
-                        shouldWriteTypeOfFunctionSymbol()
+                            && !(symbol.valueDeclaration
+                                && isClassLike(symbol.valueDeclaration)
+                                && context.flags & NodeBuilderFlags.WriteClassExpressionAsTypeLiteral
+                                && (!isClassDeclaration(symbol.valueDeclaration)
+                                    || isSymbolAccessible(symbol, context.enclosingDeclaration, isInstanceType, /*shouldComputeAliasesToMakeVisible*/ false).accessibility !== SymbolAccessibility.Accessible))
+                        || symbol.flags & (SymbolFlags.Enum | SymbolFlags.ValueModule)
+                        || shouldWriteTypeOfFunctionSymbol()
                     ) {
                         return symbolToTypeNode(symbol, context, isInstanceType);
                     }
@@ -6885,7 +6954,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
                     context.symbolDepth = new Map();
                 }
 
-                const links = context.enclosingDeclaration && getNodeLinks(context.enclosingDeclaration);
+                // Don't rely on type cache if we're unfolding a type, because we need to compute `couldUnfoldMore`.
+                const links = context.unfoldDepth >= 0 ? undefined : context.enclosingDeclaration && getNodeLinks(context.enclosingDeclaration);
                 const key = `${getTypeId(type)}|${context.flags}|${context.internalFlags}`;
                 if (links) {
                     links.serializedTypes ||= new Map();
@@ -7368,7 +7438,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
                 const signatures = getSignaturesOfType(filterType(propertyType, t => !(t.flags & TypeFlags.Undefined)), SignatureKind.Call);
                 for (const signature of signatures) {
                     const methodDeclaration = signatureToSignatureDeclarationHelper(signature, SyntaxKind.MethodSignature, context, { name: propertyName, questionToken: optionalToken }) as MethodSignature;
-                    typeElements.push(preserveCommentsOn(methodDeclaration));
+                    typeElements.push(preserveCommentsOn(methodDeclaration, signature.declaration || propertySymbol.valueDeclaration));
                 }
                 if (signatures.length || !optionalToken) {
                     return;
@@ -7400,9 +7470,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
                 propertyTypeNode,
             );
 
-            typeElements.push(preserveCommentsOn(propertySignature));
+            typeElements.push(preserveCommentsOn(propertySignature, propertySymbol.valueDeclaration));
 
-            function preserveCommentsOn<T extends Node>(node: T) {
+            function preserveCommentsOn<T extends Node>(node: T, range: Node | undefined) {
                 const jsdocPropertyTag = propertySymbol.declarations?.find((d): d is JSDocPropertyTag => d.kind === SyntaxKind.JSDocPropertyTag);
                 if (jsdocPropertyTag) {
                     const commentText = getTextOfJSDocComment(jsdocPropertyTag.comment);
@@ -7410,9 +7480,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
                         setSyntheticLeadingComments(node, [{ kind: SyntaxKind.MultiLineCommentTrivia, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]);
                     }
                 }
-                else if (propertySymbol.valueDeclaration) {
+                else if (range) {
                     // Copy comments to node for declaration emit
-                    setCommentRange(context, node, propertySymbol.valueDeclaration);
+                    setCommentRange(context, node, range);
                 }
                 return node;
             }
@@ -7880,7 +7950,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         }
 
         function typeToTypeNodeHelperWithPossibleReusableTypeNode(type: Type, typeNode: TypeNode | undefined, context: NodeBuilderContext) {
-            return typeNode && getTypeFromTypeNode(context, typeNode) === type && syntacticNodeBuilder.tryReuseExistingTypeNode(context, typeNode)
+            return !couldUnfoldType(type, context) && typeNode && getTypeFromTypeNode(context, typeNode) === type && syntacticNodeBuilder.tryReuseExistingTypeNode(context, typeNode)
                 || typeToTypeNodeHelper(type, context);
         }
 
@@ -8612,7 +8682,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
             let result;
             const addUndefinedForParameter = declaration && (isParameter(declaration) || isJSDocParameterTag(declaration)) && requiresAddingImplicitUndefined(declaration, context.enclosingDeclaration);
             const decl = declaration ?? symbol.valueDeclaration ?? getDeclarationWithTypeAnnotation(symbol) ?? symbol.declarations?.[0];
-            if (decl) {
+            if (!couldUnfoldType(type, context) && decl) {
                 if (isAccessor(decl)) {
                     result = syntacticNodeBuilder.serializeTypeOfAccessor(decl, symbol, context);
                 }
@@ -11676,7 +11746,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
             const flags = SymbolFlags.Property | (e.initializer ? SymbolFlags.Optional : 0);
             const symbol = createSymbol(flags, text);
             symbol.links.type = getTypeFromBindingElement(e, includePatternInType, reportErrors);
-            symbol.links.bindingElement = e;
             members.set(symbol.escapedName, symbol);
         });
         const result = createAnonymousType(/*symbol*/ undefined, members, emptyArray, emptyArray, stringIndexInfo ? [stringIndexInfo] : emptyArray);
@@ -16513,14 +16582,18 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         return !!(type.flags & TypeFlags.Substitution && (type as SubstitutionType).constraint.flags & TypeFlags.Unknown);
     }
 
-    function getSubstitutionType(baseType: Type, constraint: Type) {
+    function isNarrowingSubstitutionType(type: Type): boolean {
+        return !!(type.flags & TypeFlags.Substitution && (type as SubstitutionType).objectFlags & ObjectFlags.IsNarrowingType);
+    }
+
+    function getSubstitutionType(baseType: Type, constraint: Type, isNarrowed?: boolean) {
         return constraint.flags & TypeFlags.AnyOrUnknown || constraint === baseType || baseType.flags & TypeFlags.Any ?
             baseType :
-            getOrCreateSubstitutionType(baseType, constraint);
+            getOrCreateSubstitutionType(baseType, constraint, isNarrowed);
     }
 
-    function getOrCreateSubstitutionType(baseType: Type, constraint: Type) {
-        const id = `${getTypeId(baseType)}>${getTypeId(constraint)}`;
+    function getOrCreateSubstitutionType(baseType: Type, constraint: Type, isNarrowed?: boolean) {
+        const id = `${getTypeId(baseType)}>${getTypeId(constraint)}${isNarrowed ? ">N" : ""}`;
         const cached = substitutionTypes.get(id);
         if (cached) {
             return cached;
@@ -16528,6 +16601,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         const result = createType(TypeFlags.Substitution) as SubstitutionType;
         result.baseType = baseType;
         result.constraint = constraint;
+        if (isNarrowed) {
+            result.objectFlags |= ObjectFlags.IsNarrowingType;
+        }
         substitutionTypes.set(id, result);
         return result;
     }
@@ -17588,7 +17664,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
     // types are known not to circularly reference themselves (as is the case with union types created by
     // expression constructs such as array literals and the || and ?: operators). Named types can
     // circularly reference themselves and therefore cannot be subtype reduced during their declaration.
-    // For example, "type Item = string | (() => Item" is a named type that circularly references itself.
+    // For example, "type Item = string | (() => Item)" is a named type that circularly references itself.
     function getUnionType(types: readonly Type[], unionReduction: UnionReduction = UnionReduction.Literal, aliasSymbol?: Symbol, aliasTypeArguments?: readonly Type[], origin?: Type): Type {
         if (types.length === 0) {
             return neverType;
@@ -19059,7 +19135,14 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         return isGenericType(type) || checkTuples && isTupleType(type) && some(getElementTypes(type), isGenericType);
     }
 
-    function getConditionalType(root: ConditionalRoot, mapper: TypeMapper | undefined, forConstraint: boolean, aliasSymbol?: Symbol, aliasTypeArguments?: readonly Type[]): Type {
+    function getConditionalType(
+        root: ConditionalRoot,
+        mapper: TypeMapper | undefined,
+        forConstraint: boolean,
+        aliasSymbol?: Symbol,
+        aliasTypeArguments?: readonly Type[],
+        forNarrowing?: boolean,
+    ): Type {
         let result;
         let extraTypes: Type[] | undefined;
         let tailCount = 0;
@@ -19081,6 +19164,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
             if (checkType === wildcardType || extendsType === wildcardType) {
                 return wildcardType;
             }
+            const effectiveCheckType = forNarrowing && isNarrowingSubstitutionType(checkType)
+                ? (checkType as SubstitutionType).constraint
+                : checkType;
             const checkTypeNode = skipTypeParentheses(root.node.checkType);
             const extendsTypeNode = skipTypeParentheses(root.node.extendsType);
             // When the check and extends types are simple tuple types of the same arity, we defer resolution of the
@@ -19088,7 +19174,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
             // types can be written `[X] extends [Y] ? ...` and be deferred similarly to `X extends Y ? ...`.
             const checkTuples = isSimpleTupleType(checkTypeNode) && isSimpleTupleType(extendsTypeNode) &&
                 length((checkTypeNode as TupleTypeNode).elements) === length((extendsTypeNode as TupleTypeNode).elements);
-            const checkTypeDeferred = isDeferredType(checkType, checkTuples);
+            const checkTypeDeferred = isDeferredType(effectiveCheckType, checkTuples);
             let combinedMapper: TypeMapper | undefined;
             if (root.inferTypeParameters) {
                 // When we're looking at making an inference for an infer type, when we get its constraint, it'll automagically be
@@ -19124,17 +19210,17 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
             const inferredExtendsType = combinedMapper ? instantiateType(root.extendsType, combinedMapper) : extendsType;
             // We attempt to resolve the conditional type only when the check and extends types are non-generic
             if (!checkTypeDeferred && !isDeferredType(inferredExtendsType, checkTuples)) {
-                // Return falseType for a definitely false extends check. We check an instantiations of the two
+                // Return falseType for a definitely false extends check. We check an instantiation of the two
                 // types with type parameters mapped to the wildcard type, the most permissive instantiations
                 // possible (the wildcard type is assignable to and from all types). If those are not related,
                 // then no instantiations will be and we can just return the false branch type.
-                if (!(inferredExtendsType.flags & TypeFlags.AnyOrUnknown) && (checkType.flags & TypeFlags.Any || !isTypeAssignableTo(getPermissiveInstantiation(checkType), getPermissiveInstantiation(inferredExtendsType)))) {
+                if (!(inferredExtendsType.flags & TypeFlags.AnyOrUnknown) && (effectiveCheckType.flags & TypeFlags.Any || !isTypeAssignableTo(getPermissiveInstantiation(effectiveCheckType), getPermissiveInstantiation(inferredExtendsType)))) {
                     // Return union of trueType and falseType for 'any' since it matches anything. Furthermore, for a
                     // distributive conditional type applied to the constraint of a type variable, include trueType if
                     // there are possible values of the check type that are also possible values of the extends type.
                     // We use a reverse assignability check as it is less expensive than the comparable relationship
                     // and avoids false positives of a non-empty intersection check.
-                    if (checkType.flags & TypeFlags.Any || forConstraint && !(inferredExtendsType.flags & TypeFlags.Never) && someType(getPermissiveInstantiation(inferredExtendsType), t => isTypeAssignableTo(t, getPermissiveInstantiation(checkType)))) {
+                    if (effectiveCheckType.flags & TypeFlags.Any || forConstraint && !(inferredExtendsType.flags & TypeFlags.Never) && someType(getPermissiveInstantiation(inferredExtendsType), t => isTypeAssignableTo(t, getPermissiveInstantiation(effectiveCheckType)))) {
                         (extraTypes || (extraTypes = [])).push(instantiateType(getTypeFromTypeNode(root.node.trueType), combinedMapper || mapper));
                     }
                     // If falseType is an immediately nested conditional type that isn't distributive or has an
@@ -19158,7 +19244,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
                 // that has no constraint. This ensures that, for example, the type
                 //   type Foo<T extends { x: any }> = T extends { x: string } ? string : number
                 // doesn't immediately resolve to 'string' instead of being deferred.
-                if (inferredExtendsType.flags & TypeFlags.AnyOrUnknown || isTypeAssignableTo(getRestrictiveInstantiation(checkType), getRestrictiveInstantiation(inferredExtendsType))) {
+                if (inferredExtendsType.flags & TypeFlags.AnyOrUnknown || isTypeAssignableTo(getRestrictiveInstantiation(effectiveCheckType), getRestrictiveInstantiation(inferredExtendsType))) {
                     const trueType = getTypeFromTypeNode(root.node.trueType);
                     const trueMapper = combinedMapper || mapper;
                     if (canTailRecurse(trueType, trueMapper)) {
@@ -19361,7 +19447,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         if (!links.resolvedType) {
             // Deferred resolution of members is handled by resolveObjectTypeMembers
             const aliasSymbol = getAliasSymbolForTypeNode(node);
-            if (getMembersOfSymbol(node.symbol).size === 0 && !aliasSymbol) {
+            if (!node.symbol || getMembersOfSymbol(node.symbol).size === 0 && !aliasSymbol) {
                 links.resolvedType = emptyTypeLiteralType;
             }
             else {
@@ -20284,13 +20370,38 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
             if (!result) {
                 const newMapper = createTypeMapper(root.outerTypeParameters, typeArguments);
                 const checkType = root.checkType;
-                const distributionType = root.isDistributive ? getReducedType(getMappedType(checkType, newMapper)) : undefined;
+                let distributionType = root.isDistributive ? getReducedType(getMappedType(checkType, newMapper)) : undefined;
+                let narrowingBaseType: Type | undefined;
+                const forNarrowing = distributionType && isNarrowingSubstitutionType(distributionType) && isNarrowableConditionalType(type, mapper);
+                if (forNarrowing) {
+                    narrowingBaseType = (distributionType as SubstitutionType).baseType;
+                    distributionType = getReducedType((distributionType as SubstitutionType).constraint);
+                }
                 // Distributive conditional types are distributed over union types. For example, when the
                 // distributive conditional type T extends U ? X : Y is instantiated with A | B for T, the
                 // result is (A extends U ? X : Y) | (B extends U ? X : Y).
-                result = distributionType && checkType !== distributionType && distributionType.flags & (TypeFlags.Union | TypeFlags.Never) ?
-                    mapTypeWithAlias(distributionType, t => getConditionalType(root, prependTypeMapping(checkType, t, newMapper), forConstraint), aliasSymbol, aliasTypeArguments) :
-                    getConditionalType(root, newMapper, forConstraint, aliasSymbol, aliasTypeArguments);
+                if (distributionType && checkType !== distributionType && distributionType.flags & (TypeFlags.Union | TypeFlags.Never)) {
+                    if (narrowingBaseType) {
+                        result = mapTypeToIntersection(
+                            distributionType,
+                            (t: Type) =>
+                                getConditionalType(
+                                    root,
+                                    prependTypeMapping(checkType, getSubstitutionType(narrowingBaseType, t, /*isNarrowed*/ true), newMapper),
+                                    forConstraint,
+                                    /*aliasSymbol*/ undefined,
+                                    /*aliasTypeArguments*/ undefined,
+                                    forNarrowing,
+                                ),
+                        );
+                    }
+                    else {
+                        result = mapTypeWithAlias(distributionType, (t: Type) => getConditionalType(root, prependTypeMapping(checkType, t, newMapper), forConstraint), aliasSymbol, aliasTypeArguments);
+                    }
+                }
+                else {
+                    result = getConditionalType(root, newMapper, forConstraint, aliasSymbol, aliasTypeArguments, forNarrowing);
+                }
                 root.instantiations!.set(id, result);
             }
             return result;
@@ -20372,7 +20483,13 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
             return getIndexedAccessType(instantiateType((type as IndexedAccessType).objectType, mapper), instantiateType((type as IndexedAccessType).indexType, mapper), (type as IndexedAccessType).accessFlags, /*accessNode*/ undefined, newAliasSymbol, newAliasTypeArguments);
         }
         if (flags & TypeFlags.Conditional) {
-            return getConditionalTypeInstantiation(type as ConditionalType, combineTypeMappers((type as ConditionalType).mapper, mapper), /*forConstraint*/ false, aliasSymbol, aliasTypeArguments);
+            return getConditionalTypeInstantiation(
+                type as ConditionalType,
+                combineTypeMappers((type as ConditionalType).mapper, mapper),
+                /*forConstraint*/ false,
+                aliasSymbol,
+                aliasTypeArguments,
+            );
         }
         if (flags & TypeFlags.Substitution) {
             const newBaseType = instantiateType((type as SubstitutionType).baseType, mapper);
@@ -20608,7 +20725,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         expr: Expression | undefined,
         headMessage: DiagnosticMessage | undefined,
         containingMessageChain: (() => DiagnosticMessageChain | undefined) | undefined,
-        errorOutputContainer: { errors?: Diagnostic[]; skipLogging?: boolean; } | undefined,
+        errorOutputContainer: ErrorOutputContainer | undefined,
     ): boolean {
         if (isTypeRelatedTo(source, target, relation)) return true;
         if (!errorNode || !elaborateError(expr, source, target, relation, headMessage, containingMessageChain, errorOutputContainer)) {
@@ -20628,7 +20745,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         relation: Map<string, RelationComparisonResult>,
         headMessage: DiagnosticMessage | undefined,
         containingMessageChain: (() => DiagnosticMessageChain | undefined) | undefined,
-        errorOutputContainer: { errors?: Diagnostic[]; skipLogging?: boolean; } | undefined,
+        errorOutputContainer: ErrorOutputContainer | undefined,
     ): boolean {
         if (!node || isOrHasGenericConditional(target)) return false;
         if (
@@ -20672,7 +20789,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         relation: Map<string, RelationComparisonResult>,
         headMessage: DiagnosticMessage | undefined,
         containingMessageChain: (() => DiagnosticMessageChain | undefined) | undefined,
-        errorOutputContainer: { errors?: Diagnostic[]; skipLogging?: boolean; } | undefined,
+        errorOutputContainer: ErrorOutputContainer | undefined,
     ): boolean {
         const callSignatures = getSignaturesOfType(source, SignatureKind.Call);
         const constructSignatures = getSignaturesOfType(source, SignatureKind.Construct);
@@ -20705,7 +20822,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         target: Type,
         relation: Map<string, RelationComparisonResult>,
         containingMessageChain: (() => DiagnosticMessageChain | undefined) | undefined,
-        errorOutputContainer: { errors?: Diagnostic[]; skipLogging?: boolean; } | undefined,
+        errorOutputContainer: ErrorOutputContainer | undefined,
     ): boolean {
         // Don't elaborate blocks
         if (isBlock(node.body)) {
@@ -20796,7 +20913,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         target: Type,
         relation: Map<string, RelationComparisonResult>,
         containingMessageChain: (() => DiagnosticMessageChain | undefined) | undefined,
-        errorOutputContainer: { errors?: Diagnostic[]; skipLogging?: boolean; } | undefined,
+        errorOutputContainer: ErrorOutputContainer | undefined,
     ) {
         // Assignability failure - check each prop individually, and if that fails, fall back on the bad error span
         let reportedError = false;
@@ -20876,7 +20993,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         target: Type,
         relation: Map<string, RelationComparisonResult>,
         containingMessageChain: (() => DiagnosticMessageChain | undefined) | undefined,
-        errorOutputContainer: { errors?: Diagnostic[]; skipLogging?: boolean; } | undefined,
+        errorOutputContainer: ErrorOutputContainer | undefined,
     ) {
         const tupleOrArrayLikeTargetParts = filterType(target, isArrayOrTupleLikeType);
         const nonTupleOrArrayLikeTargetParts = filterType(target, t => !isArrayOrTupleLikeType(t));
@@ -20978,7 +21095,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         target: Type,
         relation: Map<string, RelationComparisonResult>,
         containingMessageChain: (() => DiagnosticMessageChain | undefined) | undefined,
-        errorOutputContainer: { errors?: Diagnostic[]; skipLogging?: boolean; } | undefined,
+        errorOutputContainer: ErrorOutputContainer | undefined,
     ) {
         let result = elaborateElementwise(generateJsxAttributes(node), source, target, relation, containingMessageChain, errorOutputContainer);
         let invalidTextDiagnostic: DiagnosticMessage | undefined;
@@ -21092,7 +21209,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         target: Type,
         relation: Map<string, RelationComparisonResult>,
         containingMessageChain: (() => DiagnosticMessageChain | undefined) | undefined,
-        errorOutputContainer: { errors?: Diagnostic[]; skipLogging?: boolean; } | undefined,
+        errorOutputContainer: ErrorOutputContainer | undefined,
     ) {
         if (target.flags & (TypeFlags.Primitive | TypeFlags.Never)) return false;
         if (isTupleLikeType(source)) {
@@ -21139,7 +21256,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         target: Type,
         relation: Map<string, RelationComparisonResult>,
         containingMessageChain: (() => DiagnosticMessageChain | undefined) | undefined,
-        errorOutputContainer: { errors?: Diagnostic[]; skipLogging?: boolean; } | undefined,
+        errorOutputContainer: ErrorOutputContainer | undefined,
     ) {
         if (target.flags & (TypeFlags.Primitive | TypeFlags.Never)) return false;
         return elaborateElementwise(generateObjectLiteralElements(node), source, target, relation, containingMessageChain, errorOutputContainer);
@@ -21590,7 +21707,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         if (type.flags & TypeFlags.Intersection && shouldNormalizeIntersection(type as IntersectionType)) {
             // Normalization handles cases like
             // Partial<T>[K] & ({} | null) ==>
-            // Partial<T>[K] & {} | Partial<T>[K} & null ==>
+            // Partial<T>[K] & {} | Partial<T>[K] & null ==>
             // (T[K] | undefined) & {} | (T[K] | undefined) & null ==>
             // T[K] & {} | undefined & {} | T[K] & null | undefined & null ==>
             // T[K] & {} | T[K] & null
@@ -21605,10 +21722,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
     function shouldNormalizeIntersection(type: IntersectionType) {
         let hasInstantiable = false;
         let hasNullableOrEmpty = false;
+        let hasSubstitution = false;
         for (const t of type.types) {
             hasInstantiable ||= !!(t.flags & TypeFlags.Instantiable);
             hasNullableOrEmpty ||= !!(t.flags & TypeFlags.Nullable) || isEmptyAnonymousObjectType(t);
-            if (hasInstantiable && hasNullableOrEmpty) return true;
+            hasSubstitution ||= isNarrowingSubstitutionType(t); // This avoids displaying error messages with types like `T & T` when narrowing a return type
+            if (hasInstantiable && hasNullableOrEmpty || hasSubstitution) return true;
         }
         return false;
     }
@@ -21637,7 +21756,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         errorNode: Node | undefined,
         headMessage?: DiagnosticMessage,
         containingMessageChain?: () => DiagnosticMessageChain | undefined,
-        errorOutputContainer?: { errors?: Diagnostic[]; skipLogging?: boolean; },
+        errorOutputContainer?: ErrorOutputContainer,
     ): boolean {
         let errorInfo: DiagnosticMessageChain | undefined;
         let relatedInfo: [DiagnosticRelatedInformation, ...DiagnosticRelatedInformation[]] | undefined;
@@ -27792,6 +27911,23 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         return changed ? mappedTypes && getUnionType(mappedTypes, noReductions ? UnionReduction.None : UnionReduction.Literal) : type;
     }
 
+    /**
+     * Similar to {@link mapType}, but creates an intersection with the result of mapping over a union type.
+     */
+    function mapTypeToIntersection(type: Type, mapper: (t: Type) => Type): Type {
+        if (type.flags & TypeFlags.Never) {
+            return type;
+        }
+        if (!(type.flags & TypeFlags.Union)) {
+            return mapper(type);
+        }
+        const origin = (type as UnionType).origin;
+        const types = origin && origin.flags & TypeFlags.Union ? (origin as UnionType).types : (type as UnionType).types;
+        const mappedTypes = types.map(t => t.flags & TypeFlags.Union ? mapTypeToIntersection(t, mapper) : mapper(t));
+
+        return getIntersectionType(mappedTypes);
+    }
+
     function mapTypeWithAlias(type: Type, mapper: (t: Type) => Type, aliasSymbol: Symbol | undefined, aliasTypeArguments: readonly Type[] | undefined) {
         return type.flags & TypeFlags.Union && aliasSymbol ?
             getUnionType(map((type as UnionType).types, mapper), UnionReduction.Literal, aliasSymbol, aliasTypeArguments) :
@@ -29676,7 +29812,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         return contextualType && !isGenericType(contextualType);
     }
 
-    function getNarrowableTypeForReference(type: Type, reference: Node, checkMode?: CheckMode) {
+    function getNarrowableTypeForReference(type: Type, reference: Node, checkMode?: CheckMode, forReturnTypeNarrowing?: boolean) {
         if (isNoInferType(type)) {
             type = (type as SubstitutionType).baseType;
         }
@@ -29689,7 +29825,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         // 'string | undefined' to give control flow analysis the opportunity to narrow to type 'string'.
         const substituteConstraints = !(checkMode && checkMode & CheckMode.Inferential) &&
             someType(type, isGenericTypeWithUnionConstraint) &&
-            (isConstraintPosition(type, reference) || hasContextualTypeWithNoGenericTypes(reference, checkMode));
+            (forReturnTypeNarrowing || isConstraintPosition(type, reference) || hasContextualTypeWithNoGenericTypes(reference, checkMode));
         return substituteConstraints ? mapType(type, getBaseConstraintOrType) : type;
     }
 
@@ -29882,7 +30018,13 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
             // #38720/60122, allow null as jsxFragmentFactory
             let jsxFactorySym: Symbol | undefined;
             if (!(isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) {
-                jsxFactorySym = resolveName(jsxFactoryLocation, jsxFactoryNamespace, compilerOptions.jsx === JsxEmit.Preserve ? SymbolFlags.Value & ~SymbolFlags.Enum : SymbolFlags.Value, jsxFactoryRefErr, /*isUse*/ true);
+                jsxFactorySym = resolveName(
+                    jsxFactoryLocation,
+                    jsxFactoryNamespace,
+                    (compilerOptions.jsx === JsxEmit.Preserve || compilerOptions.jsx === JsxEmit.ReactNative) ? SymbolFlags.Value & ~SymbolFlags.Enum : SymbolFlags.Value,
+                    jsxFactoryRefErr,
+                    /*isUse*/ true,
+                );
             }
 
             if (jsxFactorySym) {
@@ -29901,7 +30043,13 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
                 const file = getSourceFileOfNode(node);
                 const localJsxNamespace = getLocalJsxNamespace(file);
                 if (localJsxNamespace) {
-                    resolveName(jsxFactoryLocation, localJsxNamespace, compilerOptions.jsx === JsxEmit.Preserve ? SymbolFlags.Value & ~SymbolFlags.Enum : SymbolFlags.Value, jsxFactoryRefErr, /*isUse*/ true);
+                    resolveName(
+                        jsxFactoryLocation,
+                        localJsxNamespace,
+                        (compilerOptions.jsx === JsxEmit.Preserve || compilerOptions.jsx === JsxEmit.ReactNative) ? SymbolFlags.Value & ~SymbolFlags.Enum : SymbolFlags.Value,
+                        jsxFactoryRefErr,
+                        /*isUse*/ true,
+                    );
                 }
             }
         }
@@ -31215,9 +31363,16 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
     function getContextualTypeForReturnExpression(node: Expression, contextFlags: ContextFlags | undefined): Type | undefined {
         const func = getContainingFunction(node);
         if (func) {
+            const functionFlags = getFunctionFlags(func);
+            const links = getNodeLinks(node);
+            if (links.contextualReturnType) {
+                if (functionFlags & FunctionFlags.Async) {
+                    return getUnionType([links.contextualReturnType, createPromiseLikeType(links.contextualReturnType)]);
+                }
+                return links.contextualReturnType;
+            }
             let contextualReturnType = getContextualReturnType(func, contextFlags);
             if (contextualReturnType) {
-                const functionFlags = getFunctionFlags(func);
                 if (functionFlags & FunctionFlags.Generator) { // Generator or AsyncGenerator function
                     const isAsyncGenerator = (functionFlags & FunctionFlags.Async) !== 0;
                     if (contextualReturnType.flags & TypeFlags.Union) {
@@ -31968,6 +32123,13 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         if (index >= 0) {
             return contextualTypes[index];
         }
+        const links = getNodeLinks(node);
+        if (links.contextualReturnType) {
+            if (node.flags & NodeFlags.AwaitContext) {
+                return getUnionType([links.contextualReturnType, createPromiseLikeType(links.contextualReturnType)]);
+            }
+            return links.contextualReturnType;
+        }
         const { parent } = node;
         switch (parent.kind) {
             case SyntaxKind.VariableDeclaration:
@@ -35186,7 +35348,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         checkMode: CheckMode,
         reportErrors: boolean,
         containingMessageChain: (() => DiagnosticMessageChain | undefined) | undefined,
-        errorOutputContainer: { errors?: Diagnostic[]; skipLogging?: boolean; },
+        errorOutputContainer: ErrorOutputContainer,
     ) {
         // Stateless function components can have maximum of three arguments: "props", "context", and "updater".
         // However "context" and "updater" are implicit and can't be specify by users. Only the first parameter, props,
@@ -35288,8 +35450,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
     }
 
     function getEffectiveCheckNode(argument: Expression): Expression {
-        argument = skipParentheses(argument);
-        return isSatisfiesExpression(argument) ? skipParentheses(argument.expression) : argument;
+        const flags = isInJSFile(argument)
+            ? OuterExpressionKinds.Parentheses | OuterExpressionKinds.Satisfies | OuterExpressionKinds.ExcludeJSDocTypeAssertion
+            : OuterExpressionKinds.Parentheses | OuterExpressionKinds.Satisfies;
+        return skipOuterExpressions(argument, flags);
     }
 
     function getSignatureApplicabilityError(
@@ -35302,7 +35466,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         containingMessageChain: (() => DiagnosticMessageChain | undefined) | undefined,
         inferenceContext: InferenceContext | undefined,
     ): readonly Diagnostic[] | undefined {
-        const errorOutputContainer: { errors?: Diagnostic[]; skipLogging?: boolean; } = { errors: undefined, skipLogging: true };
+        const errorOutputContainer: ErrorOutputContainer = { errors: undefined, skipLogging: true };
         if (isJsxCallLike(node)) {
             if (!checkApplicableSignatureForJsxCallLikeElement(node, signature, relation, checkMode, reportErrors, containingMessageChain, errorOutputContainer)) {
                 Debug.assert(!reportErrors || !!errorOutputContainer.errors, "jsx should have errors when reporting errors");
@@ -35777,10 +35941,28 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         if (!result) {
             result = chooseOverload(candidates, assignableRelation, isSingleNonGenericCandidate, signatureHelpTrailingComma);
         }
+        const links = getNodeLinks(node);
+        if (links.resolvedSignature !== resolvingSignature && !candidatesOutArray) {
+            // There are 2 situations in which it's good to preemptively return the cached result here:
+            //
+            // 1. if the signature resolution originated on a node that itself depends on the contextual type
+            // then it's possible that the resolved signature might not be the same as the one that would be computed in source order
+            // since resolving such signature leads to resolving the potential outer signature, its arguments and thus the very same signature
+            // it's possible that this inner resolution sets the resolvedSignature first.
+            // In such a case we ignore the local result and reuse the correct one that was cached.
+            //
+            // 2. In certain circular-like situations it's possible that the compiler reentries this function for the same node.
+            // It's possible to resolve the inner call against preemptively set empty members (for example in `resolveAnonymousTypeMembers`) of some type.
+            // When that happens the compiler might report an error for that inner call but at the same time it might end up resolving the actual members of the other type.
+            // This in turn creates a situation in which the outer call fails in `getSignatureApplicabilityError` due to a cached `RelationComparisonResult.Failed`
+            // but when the compiler tries to report that error (in the code below) it also tries to elaborate it and that can succeed as types would be related against the *resolved* members of the other type.
+            // This can hit `No error for last overload signature` assert but since that error was already reported when the inner call failed we can skip this step altogether here by returning the cached signature early.
+            Debug.assert(links.resolvedSignature);
+            return links.resolvedSignature;
+        }
         if (result) {
             return result;
         }
-
         result = getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray, checkMode);
         // Preemptively cache the result; getResolvedSignature will do this after we return, but
         // we need to ensure that the result is present for the error checks below so that if
@@ -35789,7 +35971,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         // don't hit this issue because they only observe this result after it's had a chance to
         // be cached, but the error reporting code below executes before getResolvedSignature sets
         // resolvedSignature.
-        getNodeLinks(node).resolvedSignature = result;
+        links.resolvedSignature = result;
 
         // No signatures were applicable. Now report errors based on the last applicable signature with
         // no arguments excluded from assignability checks.
@@ -36655,7 +36837,13 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
 
         const jsxFactoryRefErr = diagnostics ? Diagnostics.Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found : undefined;
         const jsxFactorySymbol = getJsxNamespaceContainerForImplicitImport(node) ??
-            resolveName(node, jsxFragmentFactoryName, compilerOptions.jsx === JsxEmit.Preserve ? SymbolFlags.Value & ~SymbolFlags.Enum : SymbolFlags.Value, /*nameNotFoundMessage*/ jsxFactoryRefErr, /*isUse*/ true);
+            resolveName(
+                node,
+                jsxFragmentFactoryName,
+                (compilerOptions.jsx === JsxEmit.Preserve || compilerOptions.jsx === JsxEmit.ReactNative) ? SymbolFlags.Value & ~SymbolFlags.Enum : SymbolFlags.Value,
+                /*nameNotFoundMessage*/ jsxFactoryRefErr,
+                /*isUse*/ true,
+            );
 
         if (jsxFactorySymbol === undefined) return sourceFileLinks.jsxFragmentType = errorType;
         if (jsxFactorySymbol.escapedName === ReactNames.Fragment) return sourceFileLinks.jsxFragmentType = getTypeOfSymbol(jsxFactorySymbol);
@@ -36802,19 +36990,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
             resolutionStart = resolutionTargets.length;
         }
         links.resolvedSignature = resolvingSignature;
-        let result = resolveSignature(node, candidatesOutArray, checkMode || CheckMode.Normal);
+        const result = resolveSignature(node, candidatesOutArray, checkMode || CheckMode.Normal);
         resolutionStart = saveResolutionStart;
         // When CheckMode.SkipGenericFunctions is set we use resolvingSignature to indicate that call
         // resolution should be deferred.
         if (result !== resolvingSignature) {
-            // if the signature resolution originated on a node that itself depends on the contextual type
-            // then it's possible that the resolved signature might not be the same as the one that would be computed in source order
-            // since resolving such signature leads to resolving the potential outer signature, its arguments and thus the very same signature
-            // it's possible that this inner resolution sets the resolvedSignature first.
-            // In such a case we ignore the local result and reuse the correct one that was cached.
-            if (links.resolvedSignature !== resolvingSignature) {
-                result = links.resolvedSignature;
-            }
             // If signature resolution originated in control flow type analysis (for example to compute the
             // assigned type in a flow assignment) we don't cache the result as it may be based on temporary
             // types from the control flow analysis.
@@ -38502,7 +38682,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
             // A missing not-equal flag indicates that the type wasn't handled by some case.
             return !someType(operandConstraint, t => getTypeFacts(t, notEqualFacts) === notEqualFacts);
         }
-        const type = checkExpressionCached(node.expression);
+        const type = getBaseConstraintOrType(checkExpressionCached(node.expression));
         if (!isLiteralType(type)) {
             return false;
         }
@@ -38627,7 +38807,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
     }
 
     function checkIfExpressionRefinesParameter(func: FunctionLikeDeclaration, expr: Expression, param: ParameterDeclaration, initType: Type): Type | undefined {
-        const antecedent = (expr as Expression & { flowNode?: FlowNode; }).flowNode ||
+        const antecedent = canHaveFlowNode(expr) && expr.flowNode ||
             expr.parent.kind === SyntaxKind.ReturnStatement && (expr.parent as ReturnStatement).flowNode ||
             createFlowNode(FlowFlags.Start, /*node*/ undefined, /*antecedent*/ undefined);
         const trueCondition = createFlowNode(FlowFlags.TrueCondition, expr, antecedent);
@@ -38823,14 +39003,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
                 const exprType = checkExpression(node.body);
                 const returnOrPromisedType = returnType && unwrapReturnType(returnType, functionFlags);
                 if (returnOrPromisedType) {
-                    const effectiveCheckNode = getEffectiveCheckNode(node.body);
-                    if ((functionFlags & FunctionFlags.AsyncGenerator) === FunctionFlags.Async) { // Async function
-                        const awaitedType = checkAwaitedType(exprType, /*withAlias*/ false, effectiveCheckNode, Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
-                        checkTypeAssignableToAndOptionallyElaborate(awaitedType, returnOrPromisedType, effectiveCheckNode, effectiveCheckNode);
-                    }
-                    else { // Normal function
-                        checkTypeAssignableToAndOptionallyElaborate(exprType, returnOrPromisedType, effectiveCheckNode, effectiveCheckNode);
-                    }
+                    checkReturnExpression(node, returnOrPromisedType, node.body, node.body, exprType);
                 }
             }
         }
@@ -38909,7 +39082,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
                 expr.expression.kind === SyntaxKind.ThisKeyword
             ) {
                 // Look for if this is the constructor for the class that `symbol` is a property of.
-                const ctor = getContainingFunction(expr);
+                const ctor = getControlFlowContainer(expr);
                 if (!(ctor && (ctor.kind === SyntaxKind.Constructor || isJSConstructor(ctor)))) {
                     return true;
                 }
@@ -39754,7 +39927,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         switch (node.kind) {
             case SyntaxKind.AwaitExpression:
             case SyntaxKind.CallExpression:
+            case SyntaxKind.TaggedTemplateExpression:
             case SyntaxKind.ElementAccessExpression:
+            case SyntaxKind.MetaProperty:
             case SyntaxKind.NewExpression:
             case SyntaxKind.PropertyAccessExpression:
             case SyntaxKind.YieldExpression:
@@ -39772,6 +39947,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
                     case SyntaxKind.AmpersandAmpersandToken:
                     case SyntaxKind.AmpersandAmpersandEqualsToken:
                         return PredicateSemantics.Sometimes;
+                    case SyntaxKind.CommaToken:
+                        return getSyntacticNullishnessSemantics((node as BinaryExpression).right);
                 }
                 return PredicateSemantics.Never;
             case SyntaxKind.ConditionalExpression:
@@ -44934,7 +45111,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         }
 
         if (!(type.flags & TypeFlags.Union)) {
-            const errorOutputContainer: { errors: Diagnostic[] | undefined; } | undefined = errorNode ? { errors: undefined } : undefined;
+            const errorOutputContainer: ErrorOutputContainer | undefined = errorNode ? { errors: undefined, skipLogging: true } : undefined;
             const iterationTypes = getIterationTypesOfIterableWorker(type, use, errorNode, errorOutputContainer);
             if (iterationTypes === noIterationTypes) {
                 if (errorNode) {
@@ -44959,7 +45136,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
 
         let allIterationTypes: IterationTypes[] | undefined;
         for (const constituent of (type as UnionType).types) {
-            const errorOutputContainer: { errors: Diagnostic[] | undefined; } | undefined = errorNode ? { errors: undefined } : undefined;
+            const errorOutputContainer: ErrorOutputContainer | undefined = errorNode ? { errors: undefined } : undefined;
             const iterationTypes = getIterationTypesOfIterableWorker(constituent, use, errorNode, errorOutputContainer);
             if (iterationTypes === noIterationTypes) {
                 if (errorNode) {
@@ -45010,7 +45187,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
      * NOTE: You probably don't want to call this directly and should be calling
      * `getIterationTypesOfIterable` instead.
      */
-    function getIterationTypesOfIterableWorker(type: Type, use: IterationUse, errorNode: Node | undefined, errorOutputContainer: { errors: Diagnostic[] | undefined; } | undefined) {
+    function getIterationTypesOfIterableWorker(type: Type, use: IterationUse, errorNode: Node | undefined, errorOutputContainer: ErrorOutputContainer | undefined) {
         if (isTypeAny(type)) {
             return anyIterationTypes;
         }
@@ -45152,19 +45329,23 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
      * NOTE: You probably don't want to call this directly and should be calling
      * `getIterationTypesOfIterable` instead.
      */
-    function getIterationTypesOfIterableSlow(type: Type, resolver: IterationTypesResolver, errorNode: Node | undefined, errorOutputContainer: { errors: Diagnostic[] | undefined; } | undefined, noCache: boolean) {
+    function getIterationTypesOfIterableSlow(type: Type, resolver: IterationTypesResolver, errorNode: Node | undefined, errorOutputContainer: ErrorOutputContainer | undefined, noCache: boolean) {
         const method = getPropertyOfType(type, getPropertyNameForKnownSymbolName(resolver.iteratorSymbolName));
         const methodType = method && !(method.flags & SymbolFlags.Optional) ? getTypeOfSymbol(method) : undefined;
         if (isTypeAny(methodType)) {
             return noCache ? anyIterationTypes : setCachedIterationTypes(type, resolver.iterableCacheKey, anyIterationTypes);
         }
 
-        const signatures = methodType ? getSignaturesOfType(methodType, SignatureKind.Call) : undefined;
-        if (!some(signatures)) {
+        const allSignatures = methodType ? getSignaturesOfType(methodType, SignatureKind.Call) : undefined;
+        const validSignatures = filter(allSignatures, sig => getMinArgumentCount(sig) === 0);
+        if (!some(validSignatures)) {
+            if (errorNode && some(allSignatures)) {
+                checkTypeAssignableTo(type, resolver.getGlobalIterableType(/*reportErrors*/ true), errorNode, /*headMessage*/ undefined, /*containingMessageChain*/ undefined, errorOutputContainer);
+            }
             return noCache ? noIterationTypes : setCachedIterationTypes(type, resolver.iterableCacheKey, noIterationTypes);
         }
 
-        const iteratorType = getIntersectionType(map(signatures, getReturnTypeOfSignature));
+        const iteratorType = getIntersectionType(map(validSignatures, getReturnTypeOfSignature));
         const iterationTypes = getIterationTypesOfIteratorWorker(iteratorType, resolver, errorNode, errorOutputContainer, noCache) ?? noIterationTypes;
         return noCache ? iterationTypes : setCachedIterationTypes(type, resolver.iterableCacheKey, iterationTypes);
     }
@@ -45193,7 +45374,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
      * If we successfully found the *yield*, *return*, and *next* types, an `IterationTypes`
      * record is returned. Otherwise, `undefined` is returned.
      */
-    function getIterationTypesOfIterator(type: Type, resolver: IterationTypesResolver, errorNode: Node | undefined, errorOutputContainer: { errors: Diagnostic[] | undefined; } | undefined) {
+    function getIterationTypesOfIterator(type: Type, resolver: IterationTypesResolver, errorNode: Node | undefined, errorOutputContainer: ErrorOutputContainer | undefined) {
         return getIterationTypesOfIteratorWorker(type, resolver, errorNode, errorOutputContainer, /*noCache*/ false);
     }
 
@@ -45206,7 +45387,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
      * NOTE: You probably don't want to call this directly and should be calling
      * `getIterationTypesOfIterator` instead.
      */
-    function getIterationTypesOfIteratorWorker(type: Type, resolver: IterationTypesResolver, errorNode: Node | undefined, errorOutputContainer: { errors: Diagnostic[] | undefined; } | undefined, noCache: boolean) {
+    function getIterationTypesOfIteratorWorker(type: Type, resolver: IterationTypesResolver, errorNode: Node | undefined, errorOutputContainer: ErrorOutputContainer | undefined, noCache: boolean) {
         if (isTypeAny(type)) {
             return anyIterationTypes;
         }
@@ -45348,7 +45529,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
      * If we successfully found the *yield*, *return*, and *next* types, an `IterationTypes`
      * record is returned. Otherwise, we return `undefined`.
      */
-    function getIterationTypesOfMethod(type: Type, resolver: IterationTypesResolver, methodName: "next" | "return" | "throw", errorNode: Node | undefined, errorOutputContainer: { errors: Diagnostic[] | undefined; } | undefined): IterationTypes | undefined {
+    function getIterationTypesOfMethod(type: Type, resolver: IterationTypesResolver, methodName: "next" | "return" | "throw", errorNode: Node | undefined, errorOutputContainer: ErrorOutputContainer | undefined): IterationTypes | undefined {
         const method = getPropertyOfType(type, methodName as __String);
 
         // Ignore 'return' or 'throw' if they are missing.
@@ -45468,7 +45649,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
      * NOTE: You probably don't want to call this directly and should be calling
      * `getIterationTypesOfIterator` instead.
      */
-    function getIterationTypesOfIteratorSlow(type: Type, resolver: IterationTypesResolver, errorNode: Node | undefined, errorOutputContainer: { errors: Diagnostic[] | undefined; } | undefined, noCache: boolean) {
+    function getIterationTypesOfIteratorSlow(type: Type, resolver: IterationTypesResolver, errorNode: Node | undefined, errorOutputContainer: ErrorOutputContainer | undefined, noCache: boolean) {
         const iterationTypes = combineIterationTypes([
             getIterationTypesOfMethod(type, resolver, "next", errorNode, errorOutputContainer),
             getIterationTypesOfMethod(type, resolver, "return", errorNode, errorOutputContainer),
@@ -45546,7 +45727,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
 
         const signature = getSignatureFromDeclaration(container);
         const returnType = getReturnTypeOfSignature(signature);
-        const functionFlags = getFunctionFlags(container);
         if (strictNullChecks || node.expression || returnType.flags & TypeFlags.Never) {
             const exprType = node.expression ? checkExpressionCached(node.expression) : undefinedType;
             if (container.kind === SyntaxKind.SetAccessor) {
@@ -45555,21 +45735,14 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
                 }
             }
             else if (container.kind === SyntaxKind.Constructor) {
+                const exprType = node.expression ? checkExpressionCached(node.expression) : undefinedType;
                 if (node.expression && !checkTypeAssignableToAndOptionallyElaborate(exprType, returnType, node, node.expression)) {
                     error(node, Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class);
                 }
             }
             else if (getReturnTypeFromAnnotation(container)) {
-                const unwrappedReturnType = unwrapReturnType(returnType, functionFlags) ?? returnType;
-                const unwrappedExprType = functionFlags & FunctionFlags.Async
-                    ? checkAwaitedType(exprType, /*withAlias*/ false, node, Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)
-                    : exprType;
-                if (unwrappedReturnType) {
-                    // If the function has a return type, but promisedType is
-                    // undefined, an error will be reported in checkAsyncFunctionReturnType
-                    // so we don't need to report one here.
-                    checkTypeAssignableToAndOptionallyElaborate(unwrappedExprType, unwrappedReturnType, node, node.expression);
-                }
+                const unwrappedReturnType = unwrapReturnType(returnType, getFunctionFlags(container)) ?? returnType;
+                checkReturnExpression(container, unwrappedReturnType, node, node.expression, exprType);
             }
         }
         else if (container.kind !== SyntaxKind.Constructor && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeUndefinedVoidOrAny(container, returnType)) {
@@ -45578,6 +45751,306 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         }
     }
 
+    // When checking an arrow expression such as `(x) => exp`, then `node` is the expression `exp`.
+    // Otherwise, `node` is a return statement.
+    function checkReturnExpression(
+        container: SignatureDeclaration,
+        unwrappedReturnType: Type,
+        node: ReturnStatement | Expression,
+        expr: Expression | undefined,
+        exprType: Type,
+        inConditionalExpression = false,
+    ): void {
+        const excludeJSDocTypeAssertions = isInJSFile(node);
+        const functionFlags = getFunctionFlags(container);
+        if (expr) {
+            const unwrappedExpr = skipParentheses(expr, excludeJSDocTypeAssertions);
+            if (isConditionalExpression(unwrappedExpr)) {
+                checkReturnExpression(container, unwrappedReturnType, node, unwrappedExpr.whenTrue, checkExpression(unwrappedExpr.whenTrue), /*inConditionalExpression*/ true);
+                checkReturnExpression(container, unwrappedReturnType, node, unwrappedExpr.whenFalse, checkExpression(unwrappedExpr.whenFalse), /*inConditionalExpression*/ true);
+                return;
+            }
+        }
+
+        const inReturnStatement = node.kind === SyntaxKind.ReturnStatement;
+        const unwrappedExprType = functionFlags & FunctionFlags.Async
+            ? checkAwaitedType(
+                exprType,
+                /*withAlias*/ false,
+                node,
+                Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member,
+            )
+            : exprType;
+
+        const effectiveExpr = expr && getEffectiveCheckNode(expr); // The effective expression for diagnostics purposes.
+        const errorNode = inReturnStatement && !inConditionalExpression ? node : effectiveExpr;
+
+        // If the return type is not narrowable, we simply check if the return expression type is assignable to the return type.
+        if (!(unwrappedReturnType.flags & (TypeFlags.IndexedAccess | TypeFlags.Conditional)) || !couldContainTypeVariables(unwrappedReturnType)) {
+            checkTypeAssignableToAndOptionallyElaborate(unwrappedExprType, unwrappedReturnType, errorNode, effectiveExpr);
+            return;
+        }
+
+        // If type of return expression is assignable to original return type, we don't need to narrow the return type.
+        if (checkTypeAssignableTo(unwrappedExprType, unwrappedReturnType, /*errorNode*/ undefined)) {
+            return;
+        }
+
+        // There are two cases for obtaining a position in the control-flow graph on which references will be analyzed:
+        // - When the return expression is defined, and it is one of the two branches of a conditional expression, then the position is the expression itself:
+        // `function foo(...) {
+        //       return cond ? |expr| : ...
+        // }`
+        // - When the return expression is undefined, or it is defined and it is not one of the branches of a conditional expression, then the position is the return statement itself:
+        // `function foo(...) {
+        //       |return expr;|
+        // }`
+        // or
+        // `function foo(...) {
+        //       |return;|
+        // }`
+        let narrowPosition: Node = node;
+        let narrowFlowNode = inReturnStatement && (node as ReturnStatement).flowNode;
+        if (expr && isConditionalExpression(expr.parent)) {
+            narrowFlowNode = expr.parent.whenTrue === expr ? expr.parent.flowNodeWhenTrue : expr.parent.flowNodeWhenFalse;
+            narrowPosition = expr;
+        }
+
+        if (!narrowFlowNode) {
+            checkTypeAssignableToAndOptionallyElaborate(unwrappedExprType, unwrappedReturnType, errorNode, effectiveExpr);
+            return;
+        }
+
+        const allTypeParameters = appendTypeParameters(getOuterTypeParameters(container, /*includeThisTypes*/ false), getEffectiveTypeParameterDeclarations(container as DeclarationWithTypeParameters));
+        const narrowableTypeParameters = allTypeParameters && getNarrowableTypeParameters(allTypeParameters);
+
+        if (
+            !narrowableTypeParameters ||
+            !narrowableTypeParameters.length ||
+            !isNarrowableReturnType(unwrappedReturnType as ConditionalType | IndexedAccessType)
+        ) {
+            checkTypeAssignableToAndOptionallyElaborate(unwrappedExprType, unwrappedReturnType, errorNode, effectiveExpr);
+            return;
+        }
+
+        const narrowedTypeParameters: TypeParameter[] = [];
+        const narrowedTypes: Type[] = [];
+        for (const [typeParam, symbol, reference] of narrowableTypeParameters) {
+            const narrowReference = factory.cloneNode(reference); // Construct a reference that can be narrowed.
+            // Don't reuse the original reference's node id,
+            // because that could cause us to get a type that was cached for the original reference.
+            narrowReference.id = undefined;
+            // Set the symbol of the synthetic reference.
+            // This allows us to get the type of the reference at a location where the reference is possibly shadowed.
+            getNodeLinks(narrowReference).resolvedSymbol = symbol;
+            setParent(narrowReference, narrowPosition.parent);
+            narrowReference.flowNode = narrowFlowNode;
+            const initialType = getNarrowableTypeForReference(typeParam, narrowReference, /*checkMode*/ undefined, /*forReturnTypeNarrowing*/ true);
+            if (initialType === typeParam) {
+                continue;
+            }
+            const flowType = getFlowTypeOfReference(narrowReference, initialType);
+            const exprType = getTypeFromFlowType(flowType);
+            // If attempting to narrow the expression type did not produce a narrower type,
+            // then discard this type parameter from narrowing.
+            if (
+                exprType.flags & TypeFlags.AnyOrUnknown
+                || isErrorType(exprType)
+                || exprType === typeParam
+                || exprType === mapType(typeParam, getBaseConstraintOrType)
+            ) {
+                continue;
+            }
+            const narrowedType = getSubstitutionType(typeParam, exprType, /*isNarrowed*/ true);
+            narrowedTypeParameters.push(typeParam);
+            narrowedTypes.push(narrowedType);
+        }
+
+        const narrowMapper = createTypeMapper(narrowedTypeParameters, narrowedTypes);
+        const narrowedReturnType = instantiateType(
+            unwrappedReturnType,
+            narrowMapper,
+        );
+
+        if (expr) {
+            const links = getNodeLinks(expr);
+            if (!links.contextualReturnType) {
+                links.contextualReturnType = narrowedReturnType;
+            }
+        }
+
+        const narrowedExprType = expr ? checkExpression(expr) : undefinedType;
+        const narrowedUnwrappedExprType = functionFlags & FunctionFlags.Async
+            ? checkAwaitedType(
+                narrowedExprType,
+                /*withAlias*/ false,
+                node,
+                Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member,
+            )
+            : narrowedExprType;
+        checkTypeAssignableToAndOptionallyElaborate(narrowedUnwrappedExprType, narrowedReturnType, errorNode, effectiveExpr);
+    }
+
+    /**
+     * Narrowable type parameters are type parameters that:
+     * (1) have a union type constraint;
+     * (2) are used as the type of a single parameter in the function, and nothing else
+     */
+    function getNarrowableTypeParameters(candidates: TypeParameter[]): [TypeParameter, Symbol, Identifier][] {
+        const narrowableParams: [TypeParameter, Symbol, Identifier][] = [];
+        for (const typeParam of candidates) {
+            const constraint = getConstraintOfTypeParameter(typeParam);
+            if (!constraint || !(constraint.flags & TypeFlags.Union)) continue;
+            if (typeParam.symbol && typeParam.symbol.declarations && typeParam.symbol.declarations.length === 1) {
+                const declaration = typeParam.symbol.declarations[0];
+                const container = isJSDocTemplateTag(declaration.parent) ? getJSDocHost(declaration.parent) : declaration.parent;
+                if (!isFunctionLike(container)) continue;
+                let reference: Identifier | undefined;
+                let hasInvalidReference = false;
+                for (const paramDecl of container.parameters) {
+                    const typeNode = getEffectiveTypeAnnotationNode(paramDecl);
+                    if (!typeNode) continue;
+                    if (isTypeParameterReferenced(typeParam, typeNode)) {
+                        let candidateReference;
+                        if (
+                            isTypeReferenceNode(typeNode) &&
+                            isReferenceToTypeParameter(typeParam, typeNode) &&
+                            (candidateReference = getValidParameterReference(paramDecl, constraint))
+                        ) {
+                            // Type parameter has more than one valid reference.
+                            if (reference) {
+                                hasInvalidReference = true;
+                                break;
+                            }
+                            reference = candidateReference;
+                        }
+                        else { // Type parameter has invalid reference.
+                            hasInvalidReference = true;
+                            break;
+                        }
+                    }
+                }
+                if (!hasInvalidReference && reference) {
+                    const symbol = getResolvedSymbol(reference);
+                    if (symbol !== unknownSymbol) narrowableParams.push([typeParam, symbol, reference]);
+                }
+            }
+        }
+
+        return narrowableParams;
+        // For a parameter of declared type `T` to be a valid reference for narrowing, it must satisfy:
+        // - the parameter name is an identifier
+        // - if the parameter is optional, then `T`'s constraint must allow for undefined
+        function getValidParameterReference(paramDecl: ParameterDeclaration, constraint: Type): Identifier | undefined {
+            if (!isIdentifier(paramDecl.name)) return;
+            const isOptional = !!paramDecl.questionToken || isJSDocOptionalParameter(paramDecl);
+            if (isOptional && !containsUndefinedType(constraint)) return;
+            return paramDecl.name;
+        }
+
+        function isReferenceToTypeParameter(typeParam: TypeParameter, node: TypeReferenceNode) {
+            return getTypeFromTypeReference(node) === typeParam;
+        }
+
+        function isTypeParameterReferenced(typeParam: TypeParameter, node: TypeNode) {
+            return isReferenced(node);
+
+            function isReferenced(node: Node): boolean {
+                if (isTypeReferenceNode(node)) {
+                    return isReferenceToTypeParameter(typeParam, node);
+                }
+                if (isTypeQueryNode(node)) {
+                    return isTypeParameterPossiblyReferenced(typeParam, node);
+                }
+                return !!forEachChild(node, isReferenced);
+            }
+        }
+    }
+
+    function isNarrowableReturnType(returnType: IndexedAccessType | ConditionalType): boolean {
+        return isConditionalType(returnType)
+            ? isNarrowableConditionalType(returnType)
+            : !!(returnType.indexType.flags & TypeFlags.TypeParameter);
+    }
+
+    function isNarrowableConditionalType(type: ConditionalType, mapper?: TypeMapper): boolean {
+        const typeArguments = mapper && map(type.root.outerTypeParameters, t => {
+            const mapped = getMappedType(t, mapper);
+            if (isNarrowingSubstitutionType(mapped)) {
+                return (mapped as SubstitutionType).baseType;
+            }
+            return mapped;
+        });
+        const id = `${type.id}:${getTypeListId(typeArguments)}`;
+        let result = narrowableReturnTypeCache.get(id);
+        if (result === undefined) {
+            const nonNarrowingMapper = type.root.outerTypeParameters
+                && typeArguments
+                && createTypeMapper(type.root.outerTypeParameters, typeArguments);
+            const instantiatedType = instantiateType(type, nonNarrowingMapper);
+            result = isConditionalType(instantiatedType) && isNarrowableConditionalTypeWorker(instantiatedType);
+            narrowableReturnTypeCache.set(id, result);
+        }
+        return result;
+    }
+
+    // A narrowable conditional type is one that has the following shape:
+    // `T extends A ? TrueBranch<T> : FalseBranch<T>`, in other words:
+    // (0) The conditional type is distributive;
+    // (1) The conditional type has no `infer` type parameters;
+    // (2) The conditional type's check type is a narrowable type parameter (i.e. a type parameter with a union constraint);
+    // (3) The extends type `A` is a type or a union of types belonging to the union constraint of the type parameter;
+    // (4) `TrueBranch<T>` and `FalseBranch<T>` must be valid, recursively.
+    //      In particular, the false-most branch of the conditional type must be `never`.
+    function isNarrowableConditionalTypeWorker(type: ConditionalType): boolean {
+        // (0)
+        if (!type.root.isDistributive) {
+            return false;
+        }
+        // (1)
+        if (type.root.inferTypeParameters) {
+            return false;
+        }
+
+        // (2)
+        if (!(type.checkType.flags & TypeFlags.TypeParameter)) {
+            return false;
+        }
+
+        // (2)
+        const constraintType = getConstraintOfTypeParameter(type.checkType as TypeParameter);
+        if (!constraintType || !(constraintType.flags & TypeFlags.Union)) {
+            return false;
+        }
+
+        // (3)
+        if (
+            !everyType(type.extendsType, extendsType =>
+                some(
+                    (constraintType as UnionType).types,
+                    constraintType => isTypeIdenticalTo(constraintType, extendsType),
+                ))
+        ) {
+            return false;
+        }
+
+        // (4)
+        const trueType = getTrueTypeFromConditionalType(type);
+        const isValidTrueType = isConditionalType(trueType)
+            ? isNarrowableConditionalType(trueType)
+            : true;
+        if (!isValidTrueType) return false;
+        const falseType = getFalseTypeFromConditionalType(type);
+        const isValidFalseType = isConditionalType(falseType)
+            ? isNarrowableConditionalType(falseType)
+            : falseType === neverType;
+        return isValidFalseType;
+    }
+
+    function isConditionalType(type: Type): type is ConditionalType {
+        return !!(type.flags & TypeFlags.Conditional);
+    }
+
     function checkWithStatement(node: WithStatement) {
         // Grammar checking for withStatement
         if (!checkGrammarStatementInAmbientContext(node)) {
@@ -46774,6 +47247,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
     function checkInterfaceDeclaration(node: InterfaceDeclaration) {
         // Grammar checking
         if (!checkGrammarModifiers(node)) checkGrammarInterfaceDeclaration(node);
+        if (!allowBlockDeclarations(node.parent)) {
+            grammarErrorOnNode(node, Diagnostics._0_declarations_can_only_be_declared_inside_a_block, "interface");
+        }
 
         checkTypeParameters(node.typeParameters);
         addLazyDiagnostic(() => {
@@ -46817,6 +47293,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         // Grammar checking
         checkGrammarModifiers(node);
         checkTypeNameIsReserved(node.name, Diagnostics.Type_alias_name_cannot_be_0);
+        if (!allowBlockDeclarations(node.parent)) {
+            grammarErrorOnNode(node, Diagnostics._0_declarations_can_only_be_declared_inside_a_block, "type");
+        }
         checkExportsOnMergedDeclarations(node);
         checkTypeParameters(node.typeParameters);
         if (node.type.kind === SyntaxKind.IntrinsicKeyword) {
@@ -52051,7 +52530,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
         return false;
     }
 
-    function allowLetAndConstDeclarations(parent: Node): boolean {
+    function allowBlockDeclarations(parent: Node): boolean {
         switch (parent.kind) {
             case SyntaxKind.IfStatement:
             case SyntaxKind.DoStatement:
@@ -52062,14 +52541,14 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
             case SyntaxKind.ForOfStatement:
                 return false;
             case SyntaxKind.LabeledStatement:
-                return allowLetAndConstDeclarations(parent.parent);
+                return allowBlockDeclarations(parent.parent);
         }
 
         return true;
     }
 
     function checkGrammarForDisallowedBlockScopedVariableStatement(node: VariableStatement) {
-        if (!allowLetAndConstDeclarations(node.parent)) {
+        if (!allowBlockDeclarations(node.parent)) {
             const blockScopeKind = getCombinedNodeFlagsCached(node.declarationList) & NodeFlags.BlockScoped;
             if (blockScopeKind) {
                 const keyword = blockScopeKind === NodeFlags.Let ? "let" :
@@ -52644,6 +53123,7 @@ interface NodeBuilderContext extends SyntacticTypeNodeBuilderContext {
     flags: NodeBuilderFlags;
     internalFlags: InternalNodeBuilderFlags;
     tracker: SymbolTrackerImpl;
+    readonly unfoldDepth: number;
 
     // State
     encounteredError: boolean;
@@ -52667,7 +53147,11 @@ interface NodeBuilderContext extends SyntacticTypeNodeBuilderContext {
     reverseMappedStack: ReverseMappedSymbol[] | undefined;
     bundled: boolean;
     mapper: TypeMapper | undefined;
+    depth: number; // How many levels of nested type aliases we have unfolded so far
     suppressReportInferenceFallback: boolean;
+
+    // Output
+    couldUnfoldMore: boolean; // Whether we found a type alias that we could unfold but didn't
 }
 
 class SymbolTrackerImpl implements SymbolTracker {
diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts
index 5f7cac24b3804..28f84a1d614b9 100644
--- a/src/compiler/commandLineParser.ts
+++ b/src/compiler/commandLineParser.ts
@@ -247,6 +247,7 @@ const libEntries: [string, string][] = [
     ["esnext.regexp", "lib.es2024.regexp.d.ts"],
     ["esnext.string", "lib.es2024.string.d.ts"],
     ["esnext.iterator", "lib.esnext.iterator.d.ts"],
+    ["esnext.promise", "lib.esnext.promise.d.ts"],
     ["decorators", "lib.decorators.d.ts"],
     ["decorators.legacy", "lib.decorators.legacy.d.ts"],
 ];
diff --git a/src/compiler/corePublic.ts b/src/compiler/corePublic.ts
index 2693eb0e1eb28..532d2bb55c3e7 100644
--- a/src/compiler/corePublic.ts
+++ b/src/compiler/corePublic.ts
@@ -1,6 +1,6 @@
 // WARNING: The script `configurePrerelease.ts` uses a regexp to parse out these values.
 // If changing the text in this section, be sure to test `configurePrerelease` too.
-export const versionMajorMinor = "5.7";
+export const versionMajorMinor = "5.8";
 // The following is baselined as a literal template type without intervention
 /** The version of the TypeScript compiler release */
 export const version: string = `${versionMajorMinor}.0-dev`;
diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts
index 417ed4c2470f4..01a96579861f4 100644
--- a/src/compiler/emitter.ts
+++ b/src/compiler/emitter.ts
@@ -3226,17 +3226,90 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
      * Wraps an expression in parens if we would emit a leading comment that would introduce a line separator
      * between the node and its parent.
      */
-    function parenthesizeExpressionForNoAsi(node: Expression) {
-        if (!commentsDisabled && isPartiallyEmittedExpression(node) && willEmitLeadingNewLine(node)) {
-            const parseNode = getParseTreeNode(node);
-            if (parseNode && isParenthesizedExpression(parseNode)) {
-                // If the original node was a parenthesized expression, restore it to preserve comment and source map emit
-                const parens = factory.createParenthesizedExpression(node.expression);
-                setOriginalNode(parens, node);
-                setTextRange(parens, parseNode);
-                return parens;
+    function parenthesizeExpressionForNoAsi(node: Expression): Expression {
+        if (!commentsDisabled) {
+            switch (node.kind) {
+                case SyntaxKind.PartiallyEmittedExpression:
+                    if (willEmitLeadingNewLine(node)) {
+                        const parseNode = getParseTreeNode(node);
+                        if (parseNode && isParenthesizedExpression(parseNode)) {
+                            // If the original node was a parenthesized expression, restore it to preserve comment and source map emit
+                            const parens = factory.createParenthesizedExpression((node as PartiallyEmittedExpression).expression);
+                            setOriginalNode(parens, node);
+                            setTextRange(parens, parseNode);
+                            return parens;
+                        }
+                        return factory.createParenthesizedExpression(node);
+                    }
+                    return factory.updatePartiallyEmittedExpression(
+                        node as PartiallyEmittedExpression,
+                        parenthesizeExpressionForNoAsi((node as PartiallyEmittedExpression).expression),
+                    );
+                case SyntaxKind.PropertyAccessExpression:
+                    return factory.updatePropertyAccessExpression(
+                        node as PropertyAccessExpression,
+                        parenthesizeExpressionForNoAsi((node as PropertyAccessExpression).expression),
+                        (node as PropertyAccessExpression).name,
+                    );
+                case SyntaxKind.ElementAccessExpression:
+                    return factory.updateElementAccessExpression(
+                        node as ElementAccessExpression,
+                        parenthesizeExpressionForNoAsi((node as ElementAccessExpression).expression),
+                        (node as ElementAccessExpression).argumentExpression,
+                    );
+                case SyntaxKind.CallExpression:
+                    return factory.updateCallExpression(
+                        node as CallExpression,
+                        parenthesizeExpressionForNoAsi((node as CallExpression).expression),
+                        (node as CallExpression).typeArguments,
+                        (node as CallExpression).arguments,
+                    );
+                case SyntaxKind.TaggedTemplateExpression:
+                    return factory.updateTaggedTemplateExpression(
+                        node as TaggedTemplateExpression,
+                        parenthesizeExpressionForNoAsi((node as TaggedTemplateExpression).tag),
+                        (node as TaggedTemplateExpression).typeArguments,
+                        (node as TaggedTemplateExpression).template,
+                    );
+                case SyntaxKind.PostfixUnaryExpression:
+                    return factory.updatePostfixUnaryExpression(
+                        node as PostfixUnaryExpression,
+                        parenthesizeExpressionForNoAsi((node as PostfixUnaryExpression).operand),
+                    );
+                case SyntaxKind.BinaryExpression:
+                    return factory.updateBinaryExpression(
+                        node as BinaryExpression,
+                        parenthesizeExpressionForNoAsi((node as BinaryExpression).left),
+                        (node as BinaryExpression).operatorToken,
+                        (node as BinaryExpression).right,
+                    );
+                case SyntaxKind.ConditionalExpression:
+                    return factory.updateConditionalExpression(
+                        node as ConditionalExpression,
+                        parenthesizeExpressionForNoAsi((node as ConditionalExpression).condition),
+                        (node as ConditionalExpression).questionToken,
+                        (node as ConditionalExpression).whenTrue,
+                        (node as ConditionalExpression).colonToken,
+                        (node as ConditionalExpression).whenFalse,
+                    );
+                case SyntaxKind.AsExpression:
+                    return factory.updateAsExpression(
+                        node as AsExpression,
+                        parenthesizeExpressionForNoAsi((node as AsExpression).expression),
+                        (node as AsExpression).type,
+                    );
+                case SyntaxKind.SatisfiesExpression:
+                    return factory.updateSatisfiesExpression(
+                        node as SatisfiesExpression,
+                        parenthesizeExpressionForNoAsi((node as SatisfiesExpression).expression),
+                        (node as SatisfiesExpression).type,
+                    );
+                case SyntaxKind.NonNullExpression:
+                    return factory.updateNonNullExpression(
+                        node as NonNullExpression,
+                        parenthesizeExpressionForNoAsi((node as NonNullExpression).expression),
+                    );
             }
-            return factory.createParenthesizedExpression(node);
         }
         return node;
     }
diff --git a/src/compiler/expressionToTypeNode.ts b/src/compiler/expressionToTypeNode.ts
index 30a154f636960..7f54ab49406c5 100644
--- a/src/compiler/expressionToTypeNode.ts
+++ b/src/compiler/expressionToTypeNode.ts
@@ -969,14 +969,16 @@ export function createSyntacticTypeNodeBuilder(
         return failed;
     }
     function typeFromFunctionLikeExpression(fnNode: FunctionExpression | ArrowFunction, context: SyntacticTypeNodeBuilderContext) {
-        // Disable any inference fallback since we won't actually use the resulting type and we don't want to generate errors
-        const oldNoInferenceFallback = context.noInferenceFallback;
-        context.noInferenceFallback = true;
-        createReturnFromSignature(fnNode, /*symbol*/ undefined, context);
-        reuseTypeParameters(fnNode.typeParameters, context);
-        fnNode.parameters.map(p => ensureParameter(p, context));
-        context.noInferenceFallback = oldNoInferenceFallback;
-        return notImplemented;
+        const returnType = createReturnFromSignature(fnNode, /*symbol*/ undefined, context);
+        const typeParameters = reuseTypeParameters(fnNode.typeParameters, context);
+        const parameters = fnNode.parameters.map(p => ensureParameter(p, context));
+        return syntacticResult(
+            factory.createFunctionTypeNode(
+                typeParameters,
+                parameters,
+                returnType,
+            ),
+        );
     }
     function canGetTypeFromArrayLiteral(arrayLiteral: ArrayLiteralExpression, context: SyntacticTypeNodeBuilderContext, isConstContext: boolean) {
         if (!isConstContext) {
diff --git a/src/compiler/factory/emitHelpers.ts b/src/compiler/factory/emitHelpers.ts
index 2dc6a55441e8b..255518a2842cf 100644
--- a/src/compiler/factory/emitHelpers.ts
+++ b/src/compiler/factory/emitHelpers.ts
@@ -1188,13 +1188,23 @@ const importStarHelper: UnscopedEmitHelper = {
     dependencies: [createBindingHelper, setModuleDefaultHelper],
     priority: 2,
     text: `
-            var __importStar = (this && this.__importStar) || function (mod) {
-                if (mod && mod.__esModule) return mod;
-                var result = {};
-                if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-                __setModuleDefault(result, mod);
-                return result;
-            };`,
+            var __importStar = (this && this.__importStar) || (function () {
+                var ownKeys = function(o) {
+                    ownKeys = Object.getOwnPropertyNames || function (o) {
+                        var ar = [];
+                        for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+                        return ar;
+                    };
+                    return ownKeys(o);
+                };
+                return function (mod) {
+                    if (mod && mod.__esModule) return mod;
+                    var result = {};
+                    if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+                    __setModuleDefault(result, mod);
+                    return result;
+                };
+            })();`,
 };
 
 // emit helper for `import Name from "foo"`
diff --git a/src/compiler/factory/nodeFactory.ts b/src/compiler/factory/nodeFactory.ts
index fbc97d9aa4d9c..694262eeeb54a 100644
--- a/src/compiler/factory/nodeFactory.ts
+++ b/src/compiler/factory/nodeFactory.ts
@@ -3481,6 +3481,8 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode
             propagateChildFlags(node.whenTrue) |
             propagateChildFlags(node.colonToken) |
             propagateChildFlags(node.whenFalse);
+        node.flowNodeWhenFalse = undefined;
+        node.flowNodeWhenTrue = undefined;
         return node;
     }
 
diff --git a/src/compiler/factory/utilities.ts b/src/compiler/factory/utilities.ts
index 92bd582bb16e2..80df86fd3ceae 100644
--- a/src/compiler/factory/utilities.ts
+++ b/src/compiler/factory/utilities.ts
@@ -637,8 +637,9 @@ export function isOuterExpression(node: Node, kinds: OuterExpressionKinds = Oute
             return (kinds & OuterExpressionKinds.Parentheses) !== 0;
         case SyntaxKind.TypeAssertionExpression:
         case SyntaxKind.AsExpression:
-        case SyntaxKind.SatisfiesExpression:
             return (kinds & OuterExpressionKinds.TypeAssertions) !== 0;
+        case SyntaxKind.SatisfiesExpression:
+            return (kinds & (OuterExpressionKinds.TypeAssertions | OuterExpressionKinds.Satisfies)) !== 0;
         case SyntaxKind.ExpressionWithTypeArguments:
             return (kinds & OuterExpressionKinds.ExpressionsWithTypeArguments) !== 0;
         case SyntaxKind.NonNullExpression:
diff --git a/src/compiler/moduleNameResolver.ts b/src/compiler/moduleNameResolver.ts
index 2b0b37d5878ff..bf68c9d57ad22 100644
--- a/src/compiler/moduleNameResolver.ts
+++ b/src/compiler/moduleNameResolver.ts
@@ -2624,8 +2624,8 @@ function loadModuleFromExports(scope: PackageJsonInfo, extensions: Extensions, s
             mainExport = (scope.contents.packageJsonContent.exports as MapLike<unknown>)["."];
         }
         if (mainExport) {
-            const loadModuleFromTargetImportOrExport = getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, subpath, scope, /*isImports*/ false);
-            return loadModuleFromTargetImportOrExport(mainExport, "", /*pattern*/ false, ".");
+            const loadModuleFromTargetExportOrImport = getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirectedReference, subpath, scope, /*isImports*/ false);
+            return loadModuleFromTargetExportOrImport(mainExport, "", /*pattern*/ false, ".");
         }
     }
     else if (allKeysStartWithDot(scope.contents.packageJsonContent.exports as MapLike<unknown>)) {
@@ -2635,7 +2635,7 @@ function loadModuleFromExports(scope: PackageJsonInfo, extensions: Extensions, s
             }
             return toSearchResult(/*value*/ undefined);
         }
-        const result = loadModuleFromImportsOrExports(extensions, state, cache, redirectedReference, subpath, scope.contents.packageJsonContent.exports, scope, /*isImports*/ false);
+        const result = loadModuleFromExportsOrImports(extensions, state, cache, redirectedReference, subpath, scope.contents.packageJsonContent.exports, scope, /*isImports*/ false);
         if (result) {
             return result;
         }
@@ -2669,7 +2669,7 @@ function loadModuleFromImports(extensions: Extensions, moduleName: string, direc
         return toSearchResult(/*value*/ undefined);
     }
 
-    const result = loadModuleFromImportsOrExports(extensions, state, cache, redirectedReference, moduleName, scope.contents.packageJsonContent.imports, scope, /*isImports*/ true);
+    const result = loadModuleFromExportsOrImports(extensions, state, cache, redirectedReference, moduleName, scope.contents.packageJsonContent.imports, scope, /*isImports*/ true);
     if (result) {
         return result;
     }
@@ -2699,30 +2699,30 @@ export function comparePatternKeys(a: string, b: string): Comparison {
     return Comparison.EqualTo;
 }
 
-function loadModuleFromImportsOrExports(extensions: Extensions, state: ModuleResolutionState, cache: ModuleResolutionCache | undefined, redirectedReference: ResolvedProjectReference | undefined, moduleName: string, lookupTable: object, scope: PackageJsonInfo, isImports: boolean): SearchResult<Resolved> | undefined {
-    const loadModuleFromTargetImportOrExport = getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, moduleName, scope, isImports);
+function loadModuleFromExportsOrImports(extensions: Extensions, state: ModuleResolutionState, cache: ModuleResolutionCache | undefined, redirectedReference: ResolvedProjectReference | undefined, moduleName: string, lookupTable: object, scope: PackageJsonInfo, isImports: boolean): SearchResult<Resolved> | undefined {
+    const loadModuleFromTargetExportOrImport = getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirectedReference, moduleName, scope, isImports);
 
     if (!endsWith(moduleName, directorySeparator) && !moduleName.includes("*") && hasProperty(lookupTable, moduleName)) {
-        const target = (lookupTable as { [idx: string]: unknown; })[moduleName];
-        return loadModuleFromTargetImportOrExport(target, /*subpath*/ "", /*pattern*/ false, moduleName);
+        const target = (lookupTable as MapLike<unknown>)[moduleName];
+        return loadModuleFromTargetExportOrImport(target, /*subpath*/ "", /*pattern*/ false, moduleName);
     }
     const expandingKeys = toSorted(filter(getOwnKeys(lookupTable as MapLike<unknown>), k => hasOneAsterisk(k) || endsWith(k, "/")), comparePatternKeys);
     for (const potentialTarget of expandingKeys) {
         if (state.features & NodeResolutionFeatures.ExportsPatternTrailers && matchesPatternWithTrailer(potentialTarget, moduleName)) {
-            const target = (lookupTable as { [idx: string]: unknown; })[potentialTarget];
+            const target = (lookupTable as MapLike<unknown>)[potentialTarget];
             const starPos = potentialTarget.indexOf("*");
             const subpath = moduleName.substring(potentialTarget.substring(0, starPos).length, moduleName.length - (potentialTarget.length - 1 - starPos));
-            return loadModuleFromTargetImportOrExport(target, subpath, /*pattern*/ true, potentialTarget);
+            return loadModuleFromTargetExportOrImport(target, subpath, /*pattern*/ true, potentialTarget);
         }
         else if (endsWith(potentialTarget, "*") && startsWith(moduleName, potentialTarget.substring(0, potentialTarget.length - 1))) {
-            const target = (lookupTable as { [idx: string]: unknown; })[potentialTarget];
+            const target = (lookupTable as MapLike<unknown>)[potentialTarget];
             const subpath = moduleName.substring(potentialTarget.length - 1);
-            return loadModuleFromTargetImportOrExport(target, subpath, /*pattern*/ true, potentialTarget);
+            return loadModuleFromTargetExportOrImport(target, subpath, /*pattern*/ true, potentialTarget);
         }
         else if (startsWith(moduleName, potentialTarget)) {
-            const target = (lookupTable as { [idx: string]: unknown; })[potentialTarget];
+            const target = (lookupTable as MapLike<unknown>)[potentialTarget];
             const subpath = moduleName.substring(potentialTarget.length);
-            return loadModuleFromTargetImportOrExport(target, subpath, /*pattern*/ false, potentialTarget);
+            return loadModuleFromTargetExportOrImport(target, subpath, /*pattern*/ false, potentialTarget);
         }
     }
 
@@ -2742,9 +2742,9 @@ function hasOneAsterisk(patternKey: string): boolean {
 /**
  * Gets the self-recursive function specialized to retrieving the targeted import/export element for the given resolution configuration
  */
-function getLoadModuleFromTargetImportOrExport(extensions: Extensions, state: ModuleResolutionState, cache: ModuleResolutionCache | undefined, redirectedReference: ResolvedProjectReference | undefined, moduleName: string, scope: PackageJsonInfo, isImports: boolean) {
-    return loadModuleFromTargetImportOrExport;
-    function loadModuleFromTargetImportOrExport(target: unknown, subpath: string, pattern: boolean, key: string): SearchResult<Resolved> | undefined {
+function getLoadModuleFromTargetExportOrImport(extensions: Extensions, state: ModuleResolutionState, cache: ModuleResolutionCache | undefined, redirectedReference: ResolvedProjectReference | undefined, moduleName: string, scope: PackageJsonInfo, isImports: boolean) {
+    return loadModuleFromTargetExportOrImport;
+    function loadModuleFromTargetExportOrImport(target: unknown, subpath: string, pattern: boolean, key: string): SearchResult<Resolved> | undefined {
         if (typeof target === "string") {
             if (!pattern && subpath.length > 0 && !endsWith(target, "/")) {
                 if (state.traceEnabled) {
@@ -2807,7 +2807,7 @@ function getLoadModuleFromTargetImportOrExport(extensions: Extensions, state: Mo
                     if (condition === "default" || state.conditions.includes(condition) || isApplicableVersionedTypesKey(state.conditions, condition)) {
                         traceIfEnabled(state, Diagnostics.Matched_0_condition_1, isImports ? "imports" : "exports", condition);
                         const subTarget = (target as MapLike<unknown>)[condition];
-                        const result = loadModuleFromTargetImportOrExport(subTarget, subpath, pattern, key);
+                        const result = loadModuleFromTargetExportOrImport(subTarget, subpath, pattern, key);
                         if (result) {
                             traceIfEnabled(state, Diagnostics.Resolved_under_condition_0, condition);
                             traceIfEnabled(state, Diagnostics.Exiting_conditional_exports);
@@ -2832,7 +2832,7 @@ function getLoadModuleFromTargetImportOrExport(extensions: Extensions, state: Mo
                     return toSearchResult(/*value*/ undefined);
                 }
                 for (const elem of target) {
-                    const result = loadModuleFromTargetImportOrExport(elem, subpath, pattern, key);
+                    const result = loadModuleFromTargetExportOrImport(elem, subpath, pattern, key);
                     if (result) {
                         return result;
                     }
diff --git a/src/compiler/moduleSpecifiers.ts b/src/compiler/moduleSpecifiers.ts
index 5af3aab7d0fa1..eacba122e496c 100644
--- a/src/compiler/moduleSpecifiers.ts
+++ b/src/compiler/moduleSpecifiers.ts
@@ -508,46 +508,44 @@ function computeModuleSpecifiers(
             }
         }
 
-        if (!specifier) {
-            const local = getLocalModuleSpecifier(
-                modulePath.path,
-                info,
-                compilerOptions,
-                host,
-                options.overrideImportMode || importingSourceFile.impliedNodeFormat,
-                preferences,
-                /*pathsOnly*/ modulePath.isRedirect,
-            );
-            if (!local || forAutoImport && isExcludedByRegex(local, preferences.excludeRegexes)) {
-                continue;
-            }
-            if (modulePath.isRedirect) {
-                redirectPathsSpecifiers = append(redirectPathsSpecifiers, local);
-            }
-            else if (pathIsBareSpecifier(local)) {
-                if (pathContainsNodeModules(local)) {
-                    // We could be in this branch due to inappropriate use of `baseUrl`, not intentional `paths`
-                    // usage. It's impossible to reason about where to prioritize baseUrl-generated module
-                    // specifiers, but if they contain `/node_modules/`, they're going to trigger a portability
-                    // error, so *at least* don't prioritize those.
-                    relativeSpecifiers = append(relativeSpecifiers, local);
-                }
-                else {
-                    pathsSpecifiers = append(pathsSpecifiers, local);
-                }
-            }
-            else if (forAutoImport || !importedFileIsInNodeModules || modulePath.isInNodeModules) {
-                // Why this extra conditional, not just an `else`? If some path to the file contained
-                // 'node_modules', but we can't create a non-relative specifier (e.g. "@foo/bar/path/to/file"),
-                // that means we had to go through a *sibling's* node_modules, not one we can access directly.
-                // If some path to the file was in node_modules but another was not, this likely indicates that
-                // we have a monorepo structure with symlinks. In this case, the non-node_modules path is
-                // probably the realpath, e.g. "../bar/path/to/file", but a relative path to another package
-                // in a monorepo is probably not portable. So, the module specifier we actually go with will be
-                // the relative path through node_modules, so that the declaration emitter can produce a
-                // portability error. (See declarationEmitReexportedSymlinkReference3)
+        const local = getLocalModuleSpecifier(
+            modulePath.path,
+            info,
+            compilerOptions,
+            host,
+            options.overrideImportMode || importingSourceFile.impliedNodeFormat,
+            preferences,
+            /*pathsOnly*/ modulePath.isRedirect || !!specifier,
+        );
+        if (!local || forAutoImport && isExcludedByRegex(local, preferences.excludeRegexes)) {
+            continue;
+        }
+        if (modulePath.isRedirect) {
+            redirectPathsSpecifiers = append(redirectPathsSpecifiers, local);
+        }
+        else if (pathIsBareSpecifier(local)) {
+            if (pathContainsNodeModules(local)) {
+                // We could be in this branch due to inappropriate use of `baseUrl`, not intentional `paths`
+                // usage. It's impossible to reason about where to prioritize baseUrl-generated module
+                // specifiers, but if they contain `/node_modules/`, they're going to trigger a portability
+                // error, so *at least* don't prioritize those.
                 relativeSpecifiers = append(relativeSpecifiers, local);
             }
+            else {
+                pathsSpecifiers = append(pathsSpecifiers, local);
+            }
+        }
+        else if (forAutoImport || !importedFileIsInNodeModules || modulePath.isInNodeModules) {
+            // Why this extra conditional, not just an `else`? If some path to the file contained
+            // 'node_modules', but we can't create a non-relative specifier (e.g. "@foo/bar/path/to/file"),
+            // that means we had to go through a *sibling's* node_modules, not one we can access directly.
+            // If some path to the file was in node_modules but another was not, this likely indicates that
+            // we have a monorepo structure with symlinks. In this case, the non-node_modules path is
+            // probably the realpath, e.g. "../bar/path/to/file", but a relative path to another package
+            // in a monorepo is probably not portable. So, the module specifier we actually go with will be
+            // the relative path through node_modules, so that the declaration emitter can produce a
+            // portability error. (See declarationEmitReexportedSymlinkReference3)
+            relativeSpecifiers = append(relativeSpecifiers, local);
         }
     }
 
diff --git a/src/compiler/types.ts b/src/compiler/types.ts
index b9987ca1dafd7..c0b35f9b2fa03 100644
--- a/src/compiler/types.ts
+++ b/src/compiler/types.ts
@@ -2735,6 +2735,10 @@ export interface ConditionalExpression extends Expression {
     readonly whenTrue: Expression;
     readonly colonToken: ColonToken;
     readonly whenFalse: Expression;
+    /** @internal*/
+    flowNodeWhenTrue: FlowNode | undefined;
+    /** @internal */
+    flowNodeWhenFalse: FlowNode | undefined;
 }
 
 export type FunctionBody = Block;
@@ -5035,6 +5039,11 @@ export interface TypeCheckerHost extends ModuleSpecifierResolutionHost, SourceFi
     packageBundlesTypes(packageName: string): boolean;
 }
 
+/** @internal */
+export interface WriterContextOut {
+    couldUnfoldMore: boolean;
+}
+
 export interface TypeChecker {
     getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type;
     getTypeOfSymbol(symbol: Symbol): Type;
@@ -5121,6 +5130,7 @@ export interface TypeChecker {
     symbolToParameterDeclaration(symbol: Symbol, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): ParameterDeclaration | undefined;
     /** Note that the resulting nodes cannot be checked. */
     typeParameterToDeclaration(parameter: TypeParameter, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): TypeParameterDeclaration | undefined;
+    /** @internal */ typeParameterToDeclaration(parameter: TypeParameter, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker, verbosityLevel?: number): TypeParameterDeclaration | undefined; // eslint-disable-line @typescript-eslint/unified-signatures
 
     getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[];
     getSymbolAtLocation(node: Node): Symbol | undefined;
@@ -5153,7 +5163,7 @@ export interface TypeChecker {
     typePredicateToString(predicate: TypePredicate, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string;
 
     /** @internal */ writeSignature(signature: Signature, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind, writer?: EmitTextWriter): string;
-    /** @internal */ writeType(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags, writer?: EmitTextWriter): string;
+    /** @internal */ writeType(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags, writer?: EmitTextWriter, verbosityLevel?: number, out?: WriterContextOut): string;
     /** @internal */ writeSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags, writer?: EmitTextWriter): string;
     /** @internal */ writeTypePredicate(predicate: TypePredicate, enclosingDeclaration?: Node, flags?: TypeFormatFlags, writer?: EmitTextWriter): string;
 
@@ -6009,7 +6019,6 @@ export interface SymbolLinks {
     exportsChecked?: boolean;                   // True if exports of external module have been checked
     typeParametersChecked?: boolean;            // True if type parameters of merged class and interface declarations have been checked.
     isDeclarationWithCollidingName?: boolean;   // True if symbol is block scoped redeclaration
-    bindingElement?: BindingElement;            // Binding element associated with property symbol
     originatingImport?: ImportDeclaration | ImportCall; // Import declaration which produced the symbol, present if the symbol is marked as uncallable but had call signatures in `resolveESModuleSymbol`
     lateSymbol?: Symbol;                        // Late-bound symbol for a computed property
     specifierCache?: Map<ModeAwareCacheKey, string>; // For symbols corresponding to external modules, a cache of incoming path -> module specifier name mappings
@@ -6228,6 +6237,7 @@ export interface NodeLinks {
     decoratorSignature?: Signature;     // Signature for decorator as if invoked by the runtime.
     spreadIndices?: { first: number | undefined, last: number | undefined }; // Indices of first and last spread elements in array literal
     parameterInitializerContainsUndefined?: boolean; // True if this is a parameter declaration whose type annotation contains "undefined".
+    contextualReturnType?: Type;        // If the node is a return statement's expression, then this is the contextual return type.
     fakeScopeForSignatureDeclaration?: "params" | "typeParams"; // If present, this is a fake scope injected into an enclosing declaration chain.
     assertionExpressionType?: Type;     // Cached type of the expression of a type assertion
     potentialThisCollisions?: Node[];
@@ -6494,6 +6504,8 @@ export const enum ObjectFlags {
     IsGenericIndexType = 1 << 23, // Union or intersection contains generic index type
     /** @internal */
     IsGenericType = IsGenericObjectType | IsGenericIndexType,
+    /** @internal */
+    IsNarrowingType = 1 << 24, // Substitution type that comes from type narrowing
 
     // Flags that require TypeFlags.Union
     /** @internal */
@@ -6893,12 +6905,16 @@ export interface StringMappingType extends InstantiableType {
 }
 
 // Type parameter substitution (TypeFlags.Substitution)
-// Substitution types are created for type parameters or indexed access types that occur in the
+// - Substitution types are created for type parameters or indexed access types that occur in the
 // true branch of a conditional type. For example, in 'T extends string ? Foo<T> : Bar<T>', the
 // reference to T in Foo<T> is resolved as a substitution type that substitutes 'string & T' for T.
 // Thus, if Foo has a 'string' constraint on its type parameter, T will satisfy it.
-// Substitution type are also created for NoInfer<T> types. Those are represented as substitution
+// - Substitution types are also created for NoInfer<T> types. Those are represented as substitution
 // types where the constraint is type 'unknown' (which is never generated for the case above).
+// - Substitution types are also created for return type narrowing:
+// if a type parameter `T` is linked to a parameter `x` and `x`'s narrowed type is `S`,
+// we represent that with a substitution type with base `T` and constraint `S`.
+// The resulting substitution type has `ObjectFlags.IsNarrowedType` set.
 export interface SubstitutionType extends InstantiableType {
     objectFlags: ObjectFlags;
     baseType: Type; // Target type
@@ -8545,8 +8561,9 @@ export const enum OuterExpressionKinds {
     NonNullAssertions = 1 << 2,
     PartiallyEmittedExpressions = 1 << 3,
     ExpressionsWithTypeArguments = 1 << 4,
+    Satisfies = 1 << 5,
 
-    Assertions = TypeAssertions | NonNullAssertions,
+    Assertions = TypeAssertions | NonNullAssertions | Satisfies,
     All = Parentheses | Assertions | PartiallyEmittedExpressions | ExpressionsWithTypeArguments,
 
     ExcludeJSDocTypeAssertion = 1 << 31,
@@ -9974,6 +9991,12 @@ export interface TextChangeRange {
     newLength: number;
 }
 
+/** @internal */
+export interface ErrorOutputContainer {
+    errors?: Diagnostic[];
+    skipLogging?: boolean;
+}
+
 /** @internal */
 export interface DiagnosticCollection {
     // Adds a diagnostic to this diagnostic collection.
diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts
index 64be5c4f7eba9..d12ae297b81ad 100644
--- a/src/compiler/utilities.ts
+++ b/src/compiler/utilities.ts
@@ -201,6 +201,7 @@ import {
     getParseTreeNode,
     getPathComponents,
     getPathFromPathComponents,
+    getRelativePathFromDirectory,
     getRelativePathToDirectoryOrUrl,
     getResolutionModeOverride,
     getRootLength,
@@ -498,6 +499,7 @@ import {
     ResolvedModuleWithFailedLookupLocations,
     ResolvedTypeReferenceDirective,
     ResolvedTypeReferenceDirectiveWithFailedLookupLocations,
+    resolvePath,
     returnFalse,
     ReturnStatement,
     returnUndefined,
@@ -4304,7 +4306,7 @@ export function tryGetImportFromModuleSpecifier(node: StringLiteralLike): AnyVal
 
 /** @internal */
 export function shouldRewriteModuleSpecifier(specifier: string, compilerOptions: CompilerOptions): boolean {
-    return !!compilerOptions.rewriteRelativeImportExtensions && pathIsRelative(specifier) && !isDeclarationFileName(specifier);
+    return !!compilerOptions.rewriteRelativeImportExtensions && pathIsRelative(specifier) && !isDeclarationFileName(specifier) && hasTSFileExtension(specifier);
 }
 
 /** @internal */
@@ -6064,7 +6066,7 @@ export function hasInvalidEscape(template: TemplateLiteral): boolean {
 const doubleQuoteEscapedCharsRegExp = /[\\"\u0000-\u001f\u2028\u2029\u0085]/g;
 const singleQuoteEscapedCharsRegExp = /[\\'\u0000-\u001f\u2028\u2029\u0085]/g;
 // Template strings preserve simple LF newlines, still encode CRLF (or CR)
-const backtickQuoteEscapedCharsRegExp = /\r\n|[\\`\u0000-\u001f\u2028\u2029\u0085]/g;
+const backtickQuoteEscapedCharsRegExp = /\r\n|[\\`\u0000-\u0009\u000b-\u001f\u2028\u2029\u0085]/g;
 const escapedCharsMap = new Map(Object.entries({
     "\t": "\\t",
     "\v": "\\v",
@@ -6490,6 +6492,21 @@ export function getPossibleOriginalInputExtensionForExtension(path: string): Ext
         [Extension.Tsx, Extension.Ts, Extension.Jsx, Extension.Js];
 }
 
+/** @internal */
+export function getPossibleOriginalInputPathWithoutChangingExt(
+    filePath: string,
+    ignoreCase: boolean,
+    outputDir: string | undefined,
+    getCommonSourceDirectory: () => string,
+): string {
+    return outputDir ?
+        resolvePath(
+            getCommonSourceDirectory(),
+            getRelativePathFromDirectory(outputDir, filePath, ignoreCase),
+        ) :
+        filePath;
+}
+
 /**
  * Returns 'undefined' if and only if 'options.paths' is undefined.
  *
diff --git a/src/harness/client.ts b/src/harness/client.ts
index 88458aa197d13..c735ffa7f3e34 100644
--- a/src/harness/client.ts
+++ b/src/harness/client.ts
@@ -254,8 +254,8 @@ export class SessionClient implements LanguageService {
         return { line, character: offset };
     }
 
-    getQuickInfoAtPosition(fileName: string, position: number): QuickInfo {
-        const args = this.createFileLocationRequestArgs(fileName, position);
+    getQuickInfoAtPosition(fileName: string, position: number, verbosityLevel?: number | undefined): QuickInfo {
+        const args = { ...this.createFileLocationRequestArgs(fileName, position), verbosityLevel };
 
         const request = this.processRequest<protocol.QuickInfoRequest>(protocol.CommandTypes.Quickinfo, args);
         const response = this.processResponse<protocol.QuickInfoResponse>(request);
@@ -268,6 +268,7 @@ export class SessionClient implements LanguageService {
             displayParts: [{ kind: "text", text: body.displayString }],
             documentation: typeof body.documentation === "string" ? [{ kind: "text", text: body.documentation }] : body.documentation,
             tags: this.decodeLinkDisplayParts(body.tags),
+            canIncreaseVerbosityLevel: body.canIncreaseVerbosityLevel,
         };
     }
 
@@ -800,7 +801,6 @@ export class SessionClient implements LanguageService {
     }
 
     mapCode: typeof notImplemented = notImplemented;
-    getImports: typeof notImplemented = notImplemented;
 
     private createFileLocationOrRangeRequestArgs(positionOrRange: number | TextRange, fileName: string): protocol.FileLocationOrRangeRequestArgs {
         return typeof positionOrRange === "number"
diff --git a/src/harness/fourslashImpl.ts b/src/harness/fourslashImpl.ts
index e83d4bf1d5124..81ffed9cd698f 100644
--- a/src/harness/fourslashImpl.ts
+++ b/src/harness/fourslashImpl.ts
@@ -86,6 +86,10 @@ export interface TextSpan {
     end: number;
 }
 
+export interface VerbosityLevels {
+    [markerName: string]: number | number[] | undefined;
+}
+
 // Name of testcase metadata including ts.CompilerOptions properties that will be used by globalOptions
 // To add additional option, add property into the testOptMetadataNames, refer the property in either globalMetadataNames or fileMetadataNames
 // Add cases into convertGlobalOptionsToCompilationsSettings function for the compiler to acknowledge such option from meta data
@@ -2451,19 +2455,28 @@ export class TestState {
         return result;
     }
 
-    public baselineQuickInfo(): void {
-        const result = ts.arrayFrom(this.testData.markerPositions.entries(), ([name, marker]) => ({
-            marker: { ...marker, name },
-            item: this.languageService.getQuickInfoAtPosition(marker.fileName, marker.position),
-        }));
+    public baselineQuickInfo(verbosityLevels?: VerbosityLevels): void {
+        const result = ts.arrayFrom(this.testData.markerPositions.entries(), ([name, marker]) => {
+            const verbosityLevel = toArray(verbosityLevels?.[name]);
+            const items = verbosityLevel.map(verbosityLevel => {
+                const item: ts.QuickInfo & { verbosityLevel?: number; } | undefined = this.languageService.getQuickInfoAtPosition(marker.fileName, marker.position, verbosityLevel);
+                if (item) item.verbosityLevel = verbosityLevel;
+                return {
+                    marker: { ...marker, name },
+                    item,
+                };
+            });
+            return items;
+        }).flat();
         const annotations = this.annotateContentWithTooltips(
             result,
             "quickinfo",
             item => item.textSpan,
-            ({ displayParts, documentation, tags }) => [
+            ({ displayParts, documentation, tags, verbosityLevel }) => [
                 ...(displayParts ? displayParts.map(p => p.text).join("").split("\n") : []),
                 ...(documentation?.length ? documentation.map(p => p.text).join("").split("\n") : []),
                 ...(tags?.length ? tags.map(p => `@${p.name} ${p.text?.map(dp => dp.text).join("") ?? ""}`).join("\n").split("\n") : []),
+                ...(verbosityLevel !== undefined ? [`(verbosity level: ${verbosityLevel})`] : []),
             ],
         );
         this.baseline("QuickInfo", annotations + "\n\n" + stringify(result));
@@ -4639,28 +4652,6 @@ ${changes.join("\n// ---\n")}
 ${after}`;
         this.baseline("mapCode", baseline, ".mapCode.ts");
     }
-
-    public verifyGetImports(fileName: string, expectedImports: string[]): void {
-        const actualImports = this.languageService.getImports(fileName);
-        if (actualImports.length !== expectedImports.length) {
-            throw new Error(`Expected ${expectedImports.length} imports for ${fileName}, got ${actualImports.length}
-    Expected:
-${expectedImports}
-    Actual:
-${actualImports}
-`);
-        }
-        for (let i = 0; i < expectedImports.length; i++) {
-            if (actualImports[i] !== expectedImports[i]) {
-                throw new Error(`Expected at ${fileName} index ${i}: ${expectedImports[i]}, got ${actualImports[i]}
-    Expected:
-${expectedImports}
-    Actual:
-${actualImports}
-`);
-            }
-        }
-    }
 }
 
 function updateTextRangeForTextChanges({ pos, end }: ts.TextRange, textChanges: readonly ts.TextChange[]): ts.TextRange {
diff --git a/src/harness/fourslashInterfaceImpl.ts b/src/harness/fourslashInterfaceImpl.ts
index 0dd8236f94b75..bb10cbf744a99 100644
--- a/src/harness/fourslashInterfaceImpl.ts
+++ b/src/harness/fourslashInterfaceImpl.ts
@@ -257,10 +257,6 @@ export class VerifyNegatable {
     public baselineMapCode(ranges: FourSlash.Range[][], changes: string[] = []): void {
         this.state.baselineMapCode(ranges, changes);
     }
-
-    public getImports(fileName: string, imports: string[]): void {
-        return this.state.verifyGetImports(fileName, imports);
-    }
 }
 
 export interface CompletionsResult {
@@ -453,8 +449,8 @@ export class Verify extends VerifyNegatable {
         this.state.baselineGetEmitOutput();
     }
 
-    public baselineQuickInfo(): void {
-        this.state.baselineQuickInfo();
+    public baselineQuickInfo(verbosityLevels?: FourSlash.VerbosityLevels): void {
+        this.state.baselineQuickInfo(verbosityLevels);
     }
 
     public baselineSignatureHelp(): void {
@@ -2051,8 +2047,3 @@ export interface RenameOptions {
     readonly providePrefixAndSuffixTextForRename?: boolean;
     readonly quotePreference?: "auto" | "double" | "single";
 }
-
-export interface VerifyGetImportsOptions {
-    fileName: string;
-    imports: string[];
-}
diff --git a/src/harness/vfsUtil.ts b/src/harness/vfsUtil.ts
index 1995d79ab6da0..4799927a70a14 100644
--- a/src/harness/vfsUtil.ts
+++ b/src/harness/vfsUtil.ts
@@ -1148,7 +1148,7 @@ export class FileSystem {
         for (const key of Object.keys(files)) {
             const value = normalizeFileSetEntry(files[key]);
             const path = dirname ? vpath.resolve(dirname, key) : key;
-            vpath.validate(path, vpath.ValidationFlags.Absolute);
+            vpath.validate(path, vpath.ValidationFlags.Absolute | vpath.ValidationFlags.AllowWildcard);
 
             // eslint-disable-next-line no-restricted-syntax
             if (value === null || value === undefined || value instanceof Rmdir || value instanceof Unlink) {
diff --git a/src/lib/decorators.d.ts b/src/lib/decorators.d.ts
index 69b2d9ec3d970..f417f8909778c 100644
--- a/src/lib/decorators.d.ts
+++ b/src/lib/decorators.d.ts
@@ -92,9 +92,9 @@ interface ClassMethodDecoratorContext<
     };
 
     /**
-     * Adds a callback to be invoked either before static initializers are run (when
-     * decorating a `static` element), or before instance initializers are run (when
-     * decorating a non-`static` element).
+     * Adds a callback to be invoked either after static methods are defined but before
+     * static initializers are run (when decorating a `static` element), or before instance
+     * initializers are run (when decorating a non-`static` element).
      *
      * @example
      * ```ts
@@ -158,9 +158,9 @@ interface ClassGetterDecoratorContext<
     };
 
     /**
-     * Adds a callback to be invoked either before static initializers are run (when
-     * decorating a `static` element), or before instance initializers are run (when
-     * decorating a non-`static` element).
+     * Adds a callback to be invoked either after static methods are defined but before
+     * static initializers are run (when decorating a `static` element), or before instance
+     * initializers are run (when decorating a non-`static` element).
      */
     addInitializer(initializer: (this: This) => void): void;
 
@@ -205,9 +205,9 @@ interface ClassSetterDecoratorContext<
     };
 
     /**
-     * Adds a callback to be invoked either before static initializers are run (when
-     * decorating a `static` element), or before instance initializers are run (when
-     * decorating a non-`static` element).
+     * Adds a callback to be invoked either after static methods are defined but before
+     * static initializers are run (when decorating a `static` element), or before instance
+     * initializers are run (when decorating a non-`static` element).
      */
     addInitializer(initializer: (this: This) => void): void;
 
@@ -261,9 +261,8 @@ interface ClassAccessorDecoratorContext<
     };
 
     /**
-     * Adds a callback to be invoked either before static initializers are run (when
-     * decorating a `static` element), or before instance initializers are run (when
-     * decorating a non-`static` element).
+     * Adds a callback to be invoked immediately after the auto `accessor` being
+     * decorated is initialized (regardless if the `accessor` is `static` or not).
      */
     addInitializer(initializer: (this: This) => void): void;
 
@@ -358,9 +357,8 @@ interface ClassFieldDecoratorContext<
     };
 
     /**
-     * Adds a callback to be invoked either before static initializers are run (when
-     * decorating a `static` element), or before instance initializers are run (when
-     * decorating a non-`static` element).
+     * Adds a callback to be invoked immediately after the field being decorated
+     * is initialized (regardless if the field is `static` or not).
      */
     addInitializer(initializer: (this: This) => void): void;
 
diff --git a/src/lib/es2020.bigint.d.ts b/src/lib/es2020.bigint.d.ts
index c964eed79fa08..05fbbf12ce146 100644
--- a/src/lib/es2020.bigint.d.ts
+++ b/src/lib/es2020.bigint.d.ts
@@ -373,6 +373,7 @@ interface BigInt64ArrayConstructor {
     new (length?: number): BigInt64Array<ArrayBuffer>;
     new (array: ArrayLike<bigint> | Iterable<bigint>): BigInt64Array<ArrayBuffer>;
     new <TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer, byteOffset?: number, length?: number): BigInt64Array<TArrayBuffer>;
+    new (array: ArrayLike<bigint> | ArrayBuffer): BigInt64Array<ArrayBuffer>;
 
     /** The size in bytes of each element in the array. */
     readonly BYTES_PER_ELEMENT: number;
@@ -649,6 +650,7 @@ interface BigUint64ArrayConstructor {
     new (length?: number): BigUint64Array<ArrayBuffer>;
     new (array: ArrayLike<bigint> | Iterable<bigint>): BigUint64Array<ArrayBuffer>;
     new <TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer, byteOffset?: number, length?: number): BigUint64Array<TArrayBuffer>;
+    new (array: ArrayLike<bigint> | ArrayBuffer): BigUint64Array<ArrayBuffer>;
 
     /** The size in bytes of each element in the array. */
     readonly BYTES_PER_ELEMENT: number;
diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts
index ab484e1812e7b..963f6ad24f1a7 100644
--- a/src/lib/es5.d.ts
+++ b/src/lib/es5.d.ts
@@ -678,7 +678,7 @@ interface Math {
      */
     atan(x: number): number;
     /**
-     * Returns the angle (in radians) from the X axis to a point.
+     * Returns the angle (in radians) between the X axis and the line going through both the origin and the given point.
      * @param y A numeric expression representing the cartesian y-coordinate.
      * @param x A numeric expression representing the cartesian x-coordinate.
      */
diff --git a/src/lib/esnext.d.ts b/src/lib/esnext.d.ts
index e55fc8a50b124..4df67e5814b29 100644
--- a/src/lib/esnext.d.ts
+++ b/src/lib/esnext.d.ts
@@ -5,3 +5,4 @@
 /// <reference lib="esnext.collection" />
 /// <reference lib="esnext.array" />
 /// <reference lib="esnext.iterator" />
+/// <reference lib="esnext.promise" />
diff --git a/src/lib/esnext.promise.d.ts b/src/lib/esnext.promise.d.ts
new file mode 100644
index 0000000000000..4e520e4d305f7
--- /dev/null
+++ b/src/lib/esnext.promise.d.ts
@@ -0,0 +1,16 @@
+interface PromiseConstructor {
+    /**
+     * Takes a callback of any kind (returns or throws, synchronously or asynchronously) and wraps its result
+     * in a Promise.
+     *
+     * @param callbackFn A function that is called synchronously. It can do anything: either return
+     * a value, throw an error, or return a promise.
+     * @param args Additional arguments, that will be passed to the callback.
+     *
+     * @returns A Promise that is:
+     * - Already fulfilled, if the callback synchronously returns a value.
+     * - Already rejected, if the callback synchronously throws an error.
+     * - Asynchronously fulfilled or rejected, if the callback returns a promise.
+     */
+    try<T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U): Promise<Awaited<T>>;
+}
diff --git a/src/lib/libs.json b/src/lib/libs.json
index 40542f1967f55..9de28e8add550 100644
--- a/src/lib/libs.json
+++ b/src/lib/libs.json
@@ -85,6 +85,7 @@
         "esnext.collection",
         "esnext.array",
         "esnext.iterator",
+        "esnext.promise",
         "decorators",
         "decorators.legacy",
         // Default libraries
diff --git a/src/server/protocol.ts b/src/server/protocol.ts
index 8c2948de7f242..232b224786e43 100644
--- a/src/server/protocol.ts
+++ b/src/server/protocol.ts
@@ -202,6 +202,7 @@ export const enum CommandTypes {
     ProvideInlayHints = "provideInlayHints",
     WatchChange = "watchChange",
     MapCode = "mapCode",
+    /** @internal */
     CopilotRelated = "copilotRelated",
 }
 
@@ -2004,6 +2005,11 @@ export interface QuickInfoRequest extends FileLocationRequest {
     arguments: FileLocationRequestArgs;
 }
 
+export interface QuickInfoRequestArgs extends FileLocationRequestArgs {
+    /** TODO */
+    verbosityLevel?: number;
+}
+
 /**
  * Body of QuickInfoResponse.
  */
@@ -2043,6 +2049,11 @@ export interface QuickInfoResponseBody {
      * JSDoc tags associated with symbol.
      */
     tags: JSDocTagInfo[];
+
+    /**
+     * TODO
+     */
+    canIncreaseVerbosityLevel?: boolean;
 }
 
 /**
@@ -2407,18 +2418,6 @@ export interface MapCodeResponse extends Response {
     body: readonly FileCodeEdits[];
 }
 
-export interface CopilotRelatedRequest extends FileRequest {
-    command: CommandTypes.CopilotRelated;
-    arguments: FileRequestArgs;
-}
-
-export interface CopilotRelatedItems {
-    relatedFiles: readonly string[];
-}
-
-export interface CopilotRelatedResponse extends Response {
-    body: CopilotRelatedItems;
-}
 /**
  * Synchronous request for semantic diagnostics of one file.
  */
diff --git a/src/server/scriptVersionCache.ts b/src/server/scriptVersionCache.ts
index 55a957928a1ae..1a0c8713db2fb 100644
--- a/src/server/scriptVersionCache.ts
+++ b/src/server/scriptVersionCache.ts
@@ -632,6 +632,7 @@ export class LineNode implements LineCollection {
 
     walk(rangeStart: number, rangeLength: number, walkFns: LineIndexWalker): void {
         // assume (rangeStart < this.totalChars) && (rangeLength <= this.totalChars)
+        if (this.children.length === 0) return;
         let childIndex = 0;
         let childCharCount = this.children[childIndex].charCount();
         // find sub-tree containing start
diff --git a/src/server/session.ts b/src/server/session.ts
index 2c2f2895f01a4..1019a44d85642 100644
--- a/src/server/session.ts
+++ b/src/server/session.ts
@@ -156,6 +156,7 @@ import {
     indent,
     isConfigFile,
     isConfiguredProject,
+    isDynamicFileName,
     isExternalProject,
     isInferredProject,
     ITypingsInstaller,
@@ -2051,11 +2052,9 @@ export class Session<TMessage = string> implements EventSender {
         return this.mapTextChangesToCodeEdits(changes);
     }
 
-    private getCopilotRelatedInfo(args: protocol.FileRequestArgs): protocol.CopilotRelatedItems {
-        const { file, project } = this.getFileAndProject(args);
-
+    private getCopilotRelatedInfo(): { relatedFiles: never[]; } {
         return {
-            relatedFiles: project.getLanguageService().getImports(file),
+            relatedFiles: [],
         };
     }
 
@@ -2393,10 +2392,10 @@ export class Session<TMessage = string> implements EventSender {
         return languageService.isValidBraceCompletionAtPosition(file, position, args.openingBrace.charCodeAt(0));
     }
 
-    private getQuickInfoWorker(args: protocol.FileLocationRequestArgs, simplifiedResult: boolean): protocol.QuickInfoResponseBody | QuickInfo | undefined {
+    private getQuickInfoWorker(args: protocol.QuickInfoRequestArgs, simplifiedResult: boolean): protocol.QuickInfoResponseBody | QuickInfo | undefined {
         const { file, project } = this.getFileAndProject(args);
         const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file)!;
-        const quickInfo = project.getLanguageService().getQuickInfoAtPosition(file, this.getPosition(args, scriptInfo));
+        const quickInfo = project.getLanguageService().getQuickInfoAtPosition(file, this.getPosition(args, scriptInfo), args.verbosityLevel);
         if (!quickInfo) {
             return undefined;
         }
@@ -2412,6 +2411,7 @@ export class Session<TMessage = string> implements EventSender {
                 displayString,
                 documentation: useDisplayParts ? this.mapDisplayParts(quickInfo.documentation, project) : displayPartsToString(quickInfo.documentation),
                 tags: this.mapJSDocTagInfo(quickInfo.tags, project, useDisplayParts),
+                canIncreaseVerbosityLevel: quickInfo.canIncreaseVerbosityLevel,
             };
         }
         else {
@@ -2981,6 +2981,7 @@ export class Session<TMessage = string> implements EventSender {
     }
     private getPasteEdits(args: protocol.GetPasteEditsRequestArgs): protocol.PasteEditsAction | undefined {
         const { file, project } = this.getFileAndProject(args);
+        if (isDynamicFileName(file)) return undefined;
         const copiedFrom = args.copiedFrom
             ? { file: args.copiedFrom.file, range: args.copiedFrom.spans.map(copies => this.getRange({ file: args.copiedFrom!.file, startLine: copies.start.line, startOffset: copies.start.offset, endLine: copies.end.line, endOffset: copies.end.offset }, project.getScriptInfoForNormalizedPath(toNormalizedPath(args.copiedFrom!.file))!)) }
             : undefined;
@@ -3799,8 +3800,8 @@ export class Session<TMessage = string> implements EventSender {
         [protocol.CommandTypes.MapCode]: (request: protocol.MapCodeRequest) => {
             return this.requiredResponse(this.mapCode(request.arguments));
         },
-        [protocol.CommandTypes.CopilotRelated]: (request: protocol.CopilotRelatedRequest) => {
-            return this.requiredResponse(this.getCopilotRelatedInfo(request.arguments));
+        [protocol.CommandTypes.CopilotRelated]: () => {
+            return this.requiredResponse(this.getCopilotRelatedInfo());
         },
     }));
 
diff --git a/src/services/codefixes/fixAddMissingMember.ts b/src/services/codefixes/fixAddMissingMember.ts
index f448482e4ed9a..471cbab82c6c9 100644
--- a/src/services/codefixes/fixAddMissingMember.ts
+++ b/src/services/codefixes/fixAddMissingMember.ts
@@ -79,11 +79,13 @@ import {
     isPropertyAccessExpression,
     isPropertyDeclaration,
     isReturnStatement,
+    isSatisfiesExpression,
     isSourceFile,
     isSourceFileFromLibrary,
     isSourceFileJS,
     isTransientSymbol,
     isTypeLiteralNode,
+    isYieldExpression,
     JsxOpeningLikeElement,
     LanguageVariant,
     lastOrUndefined,
@@ -141,6 +143,7 @@ const errorCodes = [
     Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more.code,
     Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,
     Diagnostics.Cannot_find_name_0.code,
+    Diagnostics.Type_0_does_not_satisfy_the_expected_type_1.code,
 ];
 
 enum InfoKind {
@@ -188,9 +191,11 @@ registerCodeFix({
         return createCombinedCodeActions(textChanges.ChangeTracker.with(context, changes => {
             eachDiagnostic(context, errorCodes, diag => {
                 const info = getInfo(diag.file, diag.start, diag.code, checker, context.program);
-                if (!info || !addToSeen(seen, getNodeId(info.parentDeclaration) + "#" + (info.kind === InfoKind.ObjectLiteral ? info.identifier : info.token.text))) {
-                    return;
-                }
+                if (info === undefined) return;
+
+                const nodeId = getNodeId(info.parentDeclaration) + "#" + (info.kind === InfoKind.ObjectLiteral ? info.identifier || getNodeId(info.token) : info.token.text);
+                if (!addToSeen(seen, nodeId)) return;
+
                 if (fixId === fixMissingFunctionDeclaration && (info.kind === InfoKind.Function || info.kind === InfoKind.Signature)) {
                     addFunctionDeclaration(changes, context, info);
                 }
@@ -275,7 +280,7 @@ interface FunctionInfo {
 interface ObjectLiteralInfo {
     readonly kind: InfoKind.ObjectLiteral;
     readonly token: Node;
-    readonly identifier: string;
+    readonly identifier: string | undefined;
     readonly properties: Symbol[];
     readonly parentDeclaration: ObjectLiteralExpression;
     readonly indentation?: number;
@@ -315,26 +320,27 @@ function getInfo(sourceFile: SourceFile, tokenPos: number, errorCode: number, ch
         const param = signature.parameters[argIndex].valueDeclaration;
         if (!(param && isParameter(param) && isIdentifier(param.name))) return undefined;
 
-        const properties = arrayFrom(checker.getUnmatchedProperties(checker.getTypeAtLocation(parent), checker.getParameterType(signature, argIndex), /*requireOptionalProperties*/ false, /*matchDiscriminantProperties*/ false));
+        const properties = arrayFrom(checker.getUnmatchedProperties(checker.getTypeAtLocation(parent), checker.getParameterType(signature, argIndex).getNonNullableType(), /*requireOptionalProperties*/ false, /*matchDiscriminantProperties*/ false));
         if (!length(properties)) return undefined;
         return { kind: InfoKind.ObjectLiteral, token: param.name, identifier: param.name.text, properties, parentDeclaration: parent };
     }
 
-    if (token.kind === SyntaxKind.OpenBraceToken && isObjectLiteralExpression(parent)) {
-        const targetType = checker.getContextualType(parent) || checker.getTypeAtLocation(parent);
-        const properties = arrayFrom(checker.getUnmatchedProperties(checker.getTypeAtLocation(parent), targetType, /*requireOptionalProperties*/ false, /*matchDiscriminantProperties*/ false));
-        if (!length(properties)) return undefined;
-
-        // no identifier needed because the whole parentDeclaration has the error
-        const identifier = "";
+    if (token.kind === SyntaxKind.OpenBraceToken || isSatisfiesExpression(parent) || isReturnStatement(parent)) {
+        const expression = (isSatisfiesExpression(parent) || isReturnStatement(parent)) && parent.expression ? parent.expression : parent;
+        if (isObjectLiteralExpression(expression)) {
+            const targetType = isSatisfiesExpression(parent) ? checker.getTypeFromTypeNode(parent.type) :
+                checker.getContextualType(expression) || checker.getTypeAtLocation(expression);
+            const properties = arrayFrom(checker.getUnmatchedProperties(checker.getTypeAtLocation(parent), targetType.getNonNullableType(), /*requireOptionalProperties*/ false, /*matchDiscriminantProperties*/ false));
+            if (!length(properties)) return undefined;
 
-        return { kind: InfoKind.ObjectLiteral, token: parent, identifier, properties, parentDeclaration: parent };
+            return { kind: InfoKind.ObjectLiteral, token: parent, identifier: undefined, properties, parentDeclaration: expression, indentation: isReturnStatement(expression.parent) || isYieldExpression(expression.parent) ? 0 : undefined };
+        }
     }
 
     if (!isMemberName(token)) return undefined;
 
     if (isIdentifier(token) && hasInitializer(parent) && parent.initializer && isObjectLiteralExpression(parent.initializer)) {
-        const targetType = checker.getContextualType(token) || checker.getTypeAtLocation(token);
+        const targetType = (checker.getContextualType(token) || checker.getTypeAtLocation(token))?.getNonNullableType();
         const properties = arrayFrom(checker.getUnmatchedProperties(checker.getTypeAtLocation(parent.initializer), targetType, /*requireOptionalProperties*/ false, /*matchDiscriminantProperties*/ false));
         if (!length(properties)) return undefined;
 
diff --git a/src/services/codefixes/helpers.ts b/src/services/codefixes/helpers.ts
index 7957b28b110f5..107f954def412 100644
--- a/src/services/codefixes/helpers.ts
+++ b/src/services/codefixes/helpers.ts
@@ -606,12 +606,10 @@ export function typeToAutoImportableTypeNode(checker: TypeChecker, importAdder:
 
 /** @internal */
 export function typeNodeToAutoImportableTypeNode(typeNode: TypeNode, importAdder: ImportAdder, scriptTarget: ScriptTarget): TypeNode | undefined {
-    if (typeNode && isImportTypeNode(typeNode)) {
-        const importableReference = tryGetAutoImportableReferenceFromTypeNode(typeNode, scriptTarget);
-        if (importableReference) {
-            importSymbols(importAdder, importableReference.symbols);
-            typeNode = importableReference.typeNode;
-        }
+    const importableReference = tryGetAutoImportableReferenceFromTypeNode(typeNode, scriptTarget);
+    if (importableReference) {
+        importSymbols(importAdder, importableReference.symbols);
+        typeNode = importableReference.typeNode;
     }
 
     // Ensure nodes are fresh so they can have different positions when going through formatting.
diff --git a/src/services/codefixes/importFixes.ts b/src/services/codefixes/importFixes.ts
index 0387702de5eef..b23b7c127e872 100644
--- a/src/services/codefixes/importFixes.ts
+++ b/src/services/codefixes/importFixes.ts
@@ -80,12 +80,15 @@ import {
     ImportSpecifier,
     insertImports,
     InternalSymbolName,
+    isDefaultImport,
     isExternalModuleReference,
     isFullSourceFile,
     isIdentifier,
     isImportable,
+    isImportClause,
     isImportDeclaration,
     isImportEqualsDeclaration,
+    isImportSpecifier,
     isIntrinsicJsxName,
     isJSDocImportTag,
     isJsxClosingElement,
@@ -228,6 +231,7 @@ export interface ImportAdder {
     addImportFromDiagnostic: (diagnostic: DiagnosticWithLocation, context: CodeFixContextBase) => void;
     addImportFromExportedSymbol: (exportedSymbol: Symbol, isValidTypeOnlyUseSite?: boolean, referenceImport?: ImportOrRequireAliasDeclaration) => void;
     addImportForNonExistentExport: (exportName: string, exportingFileName: string, exportKind: ExportKind, exportedMeanings: SymbolFlags, isImportUsageValidAsTypeOnly: boolean) => void;
+    addImportForModuleSymbol: (symbolAlias: Symbol, isValidTypeOnlyUseSite: boolean, referenceImport: ImportOrRequireAliasDeclaration) => void;
     addImportForUnresolvedIdentifier: (context: CodeFixContextBase, symbolToken: Identifier, useAutoImportProvider: boolean) => void;
     addVerbatimImport: (declaration: AnyImportOrRequireStatement | ImportOrRequireAliasDeclaration) => void;
     removeExistingImport: (declaration: ImportOrRequireAliasDeclaration) => void;
@@ -257,7 +261,7 @@ function createImportAdderWorker(sourceFile: SourceFile | FutureSourceFile, prog
     type NewImportsKey = `${0 | 1}|${string}`;
     /** Use `getNewImportEntry` for access */
     const newImports = new Map<NewImportsKey, Mutable<ImportsCollection & { useRequire: boolean; }>>();
-    return { addImportFromDiagnostic, addImportFromExportedSymbol, writeFixes, hasFixes, addImportForUnresolvedIdentifier, addImportForNonExistentExport, removeExistingImport, addVerbatimImport };
+    return { addImportFromDiagnostic, addImportFromExportedSymbol, addImportForModuleSymbol, writeFixes, hasFixes, addImportForUnresolvedIdentifier, addImportForNonExistentExport, removeExistingImport, addVerbatimImport };
 
     function addVerbatimImport(declaration: AnyImportOrRequireStatement | ImportOrRequireAliasDeclaration) {
         verbatimImports.add(declaration);
@@ -276,7 +280,7 @@ function createImportAdderWorker(sourceFile: SourceFile | FutureSourceFile, prog
     }
 
     function addImportFromExportedSymbol(exportedSymbol: Symbol, isValidTypeOnlyUseSite?: boolean, referenceImport?: ImportOrRequireAliasDeclaration) {
-        const moduleSymbol = Debug.checkDefined(exportedSymbol.parent);
+        const moduleSymbol = Debug.checkDefined(exportedSymbol.parent, "Expected exported symbol to have module symbol as parent");
         const symbolName = getNameForExportedSymbol(exportedSymbol, getEmitScriptTarget(compilerOptions));
         const checker = program.getTypeChecker();
         const symbol = checker.getMergedSymbol(skipAlias(exportedSymbol, checker));
@@ -317,6 +321,74 @@ function createImportAdderWorker(sourceFile: SourceFile | FutureSourceFile, prog
         }
     }
 
+    function addImportForModuleSymbol(symbolAlias: Symbol, isValidTypeOnlyUseSite: boolean, referenceImport: ImportOrRequireAliasDeclaration) {
+        // Adds import for module, import alias will be symbolAlias.name
+        const checker = program.getTypeChecker();
+        const moduleSymbol = checker.getAliasedSymbol(symbolAlias);
+        Debug.assert(moduleSymbol.flags & SymbolFlags.Module, "Expected symbol to be a module");
+        const moduleSpecifierResolutionHost = createModuleSpecifierResolutionHost(program, host);
+        const moduleSpecifierResult = moduleSpecifiers.getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, sourceFile, moduleSpecifierResolutionHost, preferences, /*options*/ undefined, /*forAutoImport*/ true);
+
+        const useRequire = shouldUseRequire(sourceFile, program);
+
+        // Copy the type-only status from the reference import
+        let addAsTypeOnly = getAddAsTypeOnly(
+            isValidTypeOnlyUseSite,
+            /*isForNewImportDeclaration*/ true,
+            /*symbol*/ undefined,
+            symbolAlias.flags,
+            program.getTypeChecker(),
+            compilerOptions,
+        );
+        addAsTypeOnly = addAsTypeOnly === AddAsTypeOnly.Allowed && isTypeOnlyImportDeclaration(referenceImport) ? AddAsTypeOnly.Required : AddAsTypeOnly.Allowed;
+
+        // Copy the kind of import
+        const importKind = isImportDeclaration(referenceImport) ?
+            isDefaultImport(referenceImport) ? ImportKind.Default : ImportKind.Namespace :
+            isImportSpecifier(referenceImport) ? ImportKind.Named :
+            isImportClause(referenceImport) && !!referenceImport.name ? ImportKind.Default : ImportKind.Namespace;
+
+        const exportInfo = [{
+            symbol: symbolAlias,
+            moduleSymbol,
+            moduleFileName: moduleSymbol.declarations?.[0]?.getSourceFile()?.fileName,
+            exportKind: ExportKind.Module,
+            targetFlags: symbolAlias.flags,
+            isFromPackageJson: false,
+        }];
+
+        const existingFix = getImportFixForSymbol(
+            sourceFile,
+            exportInfo,
+            program,
+            /*position*/ undefined,
+            !!isValidTypeOnlyUseSite,
+            useRequire,
+            host,
+            preferences,
+        );
+
+        let fix: FixAddNewImport | ImportFixWithModuleSpecifier;
+        if (existingFix && importKind !== ImportKind.Namespace) {
+            fix = {
+                ...existingFix,
+                addAsTypeOnly,
+                importKind,
+            };
+        }
+        else {
+            fix = {
+                kind: ImportFixKind.AddNew,
+                moduleSpecifierKind: existingFix !== undefined ? existingFix.moduleSpecifierKind : moduleSpecifierResult.kind,
+                moduleSpecifier: existingFix !== undefined ? existingFix.moduleSpecifier : first(moduleSpecifierResult.moduleSpecifiers),
+                importKind,
+                addAsTypeOnly,
+                useRequire,
+            };
+        }
+        addImport({ fix, symbolName: symbolAlias.name, errorIdentifierText: undefined });
+    }
+
     function addImportForNonExistentExport(exportName: string, exportingFileName: string, exportKind: ExportKind, exportedMeanings: SymbolFlags, isImportUsageValidAsTypeOnly: boolean) {
         const exportingSourceFile = program.getSourceFile(exportingFileName);
         const useRequire = shouldUseRequire(sourceFile, program);
@@ -891,9 +963,10 @@ function getAllExportInfoForSymbol(importingFile: SourceFile | FutureSourceFile,
     const moduleSymbolExcluded = moduleSourceFile && isFileExcluded(moduleSourceFile as SourceFile);
     return getExportInfoMap(importingFile, host, program, preferences, cancellationToken)
         .search(importingFile.path, preferCapitalized, name => name === symbolName, info => {
+            const checker = getChecker(info[0].isFromPackageJson);
             if (
-                getChecker(info[0].isFromPackageJson).getMergedSymbol(skipAlias(info[0].symbol, getChecker(info[0].isFromPackageJson))) === symbol
-                && (moduleSymbolExcluded || info.some(i => i.moduleSymbol === moduleSymbol || i.symbol.parent === moduleSymbol))
+                checker.getMergedSymbol(skipAlias(info[0].symbol, checker)) === symbol
+                && (moduleSymbolExcluded || info.some(i => checker.getMergedSymbol(i.moduleSymbol) === moduleSymbol || i.symbol.parent === moduleSymbol))
             ) {
                 return info;
             }
@@ -1451,6 +1524,8 @@ export function getImportKind(importingFile: SourceFile | FutureSourceFile, expo
             return getExportEqualsImportKind(importingFile, program.getCompilerOptions(), !!forceImportKeyword);
         case ExportKind.UMD:
             return getUmdImportKind(importingFile, program, !!forceImportKeyword);
+        case ExportKind.Module:
+            return ImportKind.Namespace;
         default:
             return Debug.assertNever(exportKind);
     }
diff --git a/src/services/exportInfoMap.ts b/src/services/exportInfoMap.ts
index f1f88c6ad42ef..dfd00ce2e9170 100644
--- a/src/services/exportInfoMap.ts
+++ b/src/services/exportInfoMap.ts
@@ -74,6 +74,7 @@ export const enum ExportKind {
     Default,
     ExportEquals,
     UMD,
+    Module,
 }
 
 /** @internal */
diff --git a/src/services/formatting/rules.ts b/src/services/formatting/rules.ts
index 806dc6003f510..45d80841d1894 100644
--- a/src/services/formatting/rules.ts
+++ b/src/services/formatting/rules.ts
@@ -933,6 +933,13 @@ function isSemicolonDeletionContext(context: FormattingContext): boolean {
             || nextTokenKind === SyntaxKind.EndOfFileToken;
     }
 
+    if (
+        nextTokenKind === SyntaxKind.SemicolonToken &&
+        context.currentTokenSpan.kind === SyntaxKind.SemicolonToken
+    ) {
+        return true;
+    }
+
     if (
         nextTokenKind === SyntaxKind.SemicolonClassElement ||
         nextTokenKind === SyntaxKind.SemicolonToken
diff --git a/src/services/inlayHints.ts b/src/services/inlayHints.ts
index a3e54cf237896..f5a29b332b595 100644
--- a/src/services/inlayHints.ts
+++ b/src/services/inlayHints.ts
@@ -106,7 +106,6 @@ import {
     PrefixUnaryExpression,
     PropertyDeclaration,
     QuotePreference,
-    Signature,
     SignatureDeclarationBase,
     skipParentheses,
     some,
@@ -296,11 +295,8 @@ export function provideInlayHints(context: InlayHintsContext): InlayHint[] {
             return;
         }
 
-        const candidates: Signature[] = [];
-        const signature = checker.getResolvedSignatureForSignatureHelp(expr, candidates);
-        if (!signature || !candidates.length) {
-            return;
-        }
+        const signature = checker.getResolvedSignature(expr);
+        if (signature === undefined) return;
 
         let signatureParamPos = 0;
         for (const originalArg of args) {
diff --git a/src/services/pasteEdits.ts b/src/services/pasteEdits.ts
index d3c84b118aa8e..3fffc8c5a1403 100644
--- a/src/services/pasteEdits.ts
+++ b/src/services/pasteEdits.ts
@@ -5,6 +5,7 @@ import {
     fileShouldUseJavaScriptRequire,
     findAncestor,
     findIndex,
+    findTokenOnLeftOfPosition,
     forEachChild,
     formatting,
     getNewLineOrDefaultFromHost,
@@ -50,11 +51,16 @@ export function pasteEditsProvider(
     return { edits: changes, fixId };
 }
 
+interface CopiedFromInfo {
+    file: SourceFile;
+    range: TextRange[];
+}
+
 function pasteEdits(
     targetFile: SourceFile,
     pastedText: string[],
     pasteLocations: TextRange[],
-    copiedFrom: { file: SourceFile; range: TextRange[]; } | undefined,
+    copiedFrom: CopiedFromInfo | undefined,
     host: LanguageServiceHost,
     preferences: UserPreferences,
     formatContext: formatting.FormatContext,
@@ -93,11 +99,13 @@ function pasteEdits(
                 }
                 statements.push(...statementsInSourceFile.slice(startNodeIndex, endNodeIndex === -1 ? statementsInSourceFile.length : endNodeIndex + 1));
             });
-            const usage = getUsageInfo(copiedFrom.file, statements, originalProgram!.getTypeChecker(), getExistingLocals(updatedFile, statements, originalProgram!.getTypeChecker()), { pos: copiedFrom.range[0].pos, end: copiedFrom.range[copiedFrom.range.length - 1].end });
-            Debug.assertIsDefined(originalProgram);
+            Debug.assertIsDefined(originalProgram, "no original program found");
+            const originalProgramTypeChecker = originalProgram.getTypeChecker();
+            const usageInfoRange = getUsageInfoRangeForPasteEdits(copiedFrom);
+            const usage = getUsageInfo(copiedFrom.file, statements, originalProgramTypeChecker, getExistingLocals(updatedFile, statements, originalProgramTypeChecker), usageInfoRange);
             const useEsModuleSyntax = !fileShouldUseJavaScriptRequire(targetFile.fileName, originalProgram, host, !!copiedFrom.file.commonJsModuleIndicator);
             addExportsInOldFile(copiedFrom.file, usage.targetFileImportsFromOldFile, changes, useEsModuleSyntax);
-            addTargetFileImports(copiedFrom.file, usage.oldImportsNeededByTargetFile, usage.targetFileImportsFromOldFile, originalProgram.getTypeChecker(), updatedProgram, importAdder);
+            addTargetFileImports(copiedFrom.file, usage.oldImportsNeededByTargetFile, usage.targetFileImportsFromOldFile, originalProgramTypeChecker, updatedProgram, importAdder);
         }
         else {
             const context: CodeFixContextBase = {
@@ -167,3 +175,18 @@ function pasteEdits(
         );
     });
 }
+
+/**
+ * Adjusts the range for `getUsageInfo` to correctly include identifiers at the edges of the copied text.
+ */
+function getUsageInfoRangeForPasteEdits({ file: sourceFile, range }: CopiedFromInfo) {
+    const pos = range[0].pos;
+    const end = range[range.length - 1].end;
+    const startToken = getTokenAtPosition(sourceFile, pos);
+    const endToken = findTokenOnLeftOfPosition(sourceFile, pos) ?? getTokenAtPosition(sourceFile, end);
+    // Since the range is only used to check identifiers, we do not need to adjust range when the tokens at the edges are not identifiers.
+    return {
+        pos: isIdentifier(startToken) && pos <= startToken.getStart(sourceFile) ? startToken.getFullStart() : pos,
+        end: isIdentifier(endToken) && end === endToken.getEnd() ? textChanges.getAdjustedEndPosition(sourceFile, endToken, {}) : end,
+    };
+}
diff --git a/src/services/refactors/helpers.ts b/src/services/refactors/helpers.ts
index 38fc8b965f4b9..9779b8559f89b 100644
--- a/src/services/refactors/helpers.ts
+++ b/src/services/refactors/helpers.ts
@@ -80,6 +80,10 @@ export function addTargetFileImports(
         if (checker.isUnknownSymbol(targetSymbol)) {
             importAdder.addVerbatimImport(Debug.checkDefined(declaration ?? findAncestor(symbol.declarations?.[0], isAnyImportOrRequireStatement)));
         }
+        else if (targetSymbol.parent === undefined) {
+            Debug.assert(declaration !== undefined, "expected module symbol to have a declaration");
+            importAdder.addImportForModuleSymbol(symbol, isValidTypeOnlyUseSite, declaration);
+        }
         else {
             importAdder.addImportFromExportedSymbol(targetSymbol, isValidTypeOnlyUseSite, declaration);
         }
diff --git a/src/services/refactors/moveToFile.ts b/src/services/refactors/moveToFile.ts
index 241e9adf2ad2f..6245fe4903dcc 100644
--- a/src/services/refactors/moveToFile.ts
+++ b/src/services/refactors/moveToFile.ts
@@ -26,6 +26,7 @@ import {
     emptyArray,
     EnumDeclaration,
     escapeLeadingUnderscores,
+    every,
     ExportDeclaration,
     ExportKind,
     Expression,
@@ -885,24 +886,23 @@ export function getUsageInfo(oldFile: SourceFile, toMove: readonly Statement[],
     const unusedImportsFromOldFile = new Set<Symbol>();
     for (const statement of toMove) {
         forEachReference(statement, checker, enclosingRange, (symbol, isValidTypeOnlyUseSite) => {
-            if (!symbol.declarations || isGlobalType(checker, symbol)) {
+            if (!symbol.declarations) {
                 return;
             }
             if (existingTargetLocals.has(skipAlias(symbol, checker))) {
                 unusedImportsFromOldFile.add(symbol);
                 return;
             }
-            for (const decl of symbol.declarations) {
-                if (isInImport(decl)) {
-                    const prevIsTypeOnly = oldImportsNeededByTargetFile.get(symbol);
-                    oldImportsNeededByTargetFile.set(symbol, [
-                        prevIsTypeOnly === undefined ? isValidTypeOnlyUseSite : prevIsTypeOnly && isValidTypeOnlyUseSite,
-                        tryCast(decl, (d): d is codefix.ImportOrRequireAliasDeclaration => isImportSpecifier(d) || isImportClause(d) || isNamespaceImport(d) || isImportEqualsDeclaration(d) || isBindingElement(d) || isVariableDeclaration(d)),
-                    ]);
-                }
-                else if (isTopLevelDeclaration(decl) && sourceFileOfTopLevelDeclaration(decl) === oldFile && !movedSymbols.has(symbol)) {
-                    targetFileImportsFromOldFile.set(symbol, isValidTypeOnlyUseSite);
-                }
+            const importedDeclaration = find(symbol.declarations, isInImport);
+            if (importedDeclaration) {
+                const prevIsTypeOnly = oldImportsNeededByTargetFile.get(symbol);
+                oldImportsNeededByTargetFile.set(symbol, [
+                    prevIsTypeOnly === undefined ? isValidTypeOnlyUseSite : prevIsTypeOnly && isValidTypeOnlyUseSite,
+                    tryCast(importedDeclaration, (d): d is codefix.ImportOrRequireAliasDeclaration => isImportSpecifier(d) || isImportClause(d) || isNamespaceImport(d) || isImportEqualsDeclaration(d) || isBindingElement(d) || isVariableDeclaration(d)),
+                ]);
+            }
+            else if (!movedSymbols.has(symbol) && every(symbol.declarations, decl => isTopLevelDeclaration(decl) && sourceFileOfTopLevelDeclaration(decl) === oldFile)) {
+                targetFileImportsFromOldFile.set(symbol, isValidTypeOnlyUseSite);
             }
         });
     }
@@ -946,10 +946,6 @@ export function getUsageInfo(oldFile: SourceFile, toMove: readonly Statement[],
     }
 }
 
-function isGlobalType(checker: TypeChecker, symbol: Symbol) {
-    return !!checker.resolveName(symbol.name, /*location*/ undefined, SymbolFlags.Type, /*excludeGlobals*/ false);
-}
-
 function makeUniqueFilename(proposedFilename: string, extension: string, inDirectory: string, host: LanguageServiceHost): string {
     let newFilename = proposedFilename;
     for (let i = 1;; i++) {
diff --git a/src/services/services.ts b/src/services/services.ts
index 8f749a3217ff4..fb5e9a0857929 100644
--- a/src/services/services.ts
+++ b/src/services/services.ts
@@ -2,7 +2,6 @@ import {
     __String,
     ApplicableRefactorInfo,
     ApplyCodeActionCommandResult,
-    arrayFrom,
     AssignmentDeclarationKind,
     BaseType,
     BinaryExpression,
@@ -234,7 +233,6 @@ import {
     Node,
     NodeArray,
     NodeFlags,
-    nodeIsSynthesized,
     noop,
     normalizePath,
     normalizeSpans,
@@ -1604,7 +1602,6 @@ const invalidOperationsInPartialSemanticMode: readonly (keyof LanguageService)[]
     "provideInlayHints",
     "getSupportedCodeFixes",
     "getPasteEdits",
-    "getImports",
 ];
 
 const invalidOperationsInSyntacticMode: readonly (keyof LanguageService)[] = [
@@ -2277,7 +2274,7 @@ export function createLanguageService(
         return Completions.getCompletionEntrySymbol(program, log, getValidSourceFile(fileName), position, { name, source }, host, preferences);
     }
 
-    function getQuickInfoAtPosition(fileName: string, position: number): QuickInfo | undefined {
+    function getQuickInfoAtPosition(fileName: string, position: number, verbosityLevel?: number): QuickInfo | undefined {
         synchronizeHostData();
 
         const sourceFile = getValidSourceFile(fileName);
@@ -2296,13 +2293,26 @@ export function createLanguageService(
                 kind: ScriptElementKind.unknown,
                 kindModifiers: ScriptElementKindModifier.none,
                 textSpan: createTextSpanFromNode(nodeForQuickInfo, sourceFile),
-                displayParts: typeChecker.runWithCancellationToken(cancellationToken, typeChecker => typeToDisplayParts(typeChecker, type, getContainerNode(nodeForQuickInfo))),
+                displayParts: typeChecker.runWithCancellationToken(cancellationToken, typeChecker => typeToDisplayParts(typeChecker, type, getContainerNode(nodeForQuickInfo), /*flags*/ undefined, verbosityLevel)),
                 documentation: type.symbol ? type.symbol.getDocumentationComment(typeChecker) : undefined,
                 tags: type.symbol ? type.symbol.getJsDocTags(typeChecker) : undefined,
             };
         }
 
-        const { symbolKind, displayParts, documentation, tags } = typeChecker.runWithCancellationToken(cancellationToken, typeChecker => SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, getContainerNode(nodeForQuickInfo), nodeForQuickInfo));
+        const { symbolKind, displayParts, documentation, tags, canIncreaseVerbosityLevel } = typeChecker.runWithCancellationToken(
+            cancellationToken,
+            typeChecker =>
+                SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(
+                    typeChecker,
+                    symbol,
+                    sourceFile,
+                    getContainerNode(nodeForQuickInfo),
+                    nodeForQuickInfo,
+                    /*semanticMeaning*/ undefined,
+                    /*alias*/ undefined,
+                    verbosityLevel,
+                ),
+        );
         return {
             kind: symbolKind,
             kindModifiers: SymbolDisplay.getSymbolModifiers(typeChecker, symbol),
@@ -2310,6 +2320,7 @@ export function createLanguageService(
             displayParts,
             documentation,
             tags,
+            canIncreaseVerbosityLevel,
         };
     }
 
@@ -3367,18 +3378,6 @@ export function createLanguageService(
         );
     }
 
-    function getImports(fileName: string): readonly string[] {
-        synchronizeHostData();
-        const file = getValidSourceFile(fileName);
-        let imports: Set<string> | undefined;
-        for (const specifier of file.imports) {
-            if (nodeIsSynthesized(specifier)) continue;
-            const name = program.getResolvedModuleFromModuleSpecifier(specifier, file)?.resolvedModule?.resolvedFileName;
-            if (name) (imports ??= new Set()).add(name);
-        }
-        return imports ? arrayFrom(imports) : emptyArray;
-    }
-
     const ls: LanguageService = {
         dispose,
         cleanupSemanticCache,
@@ -3453,7 +3452,6 @@ export function createLanguageService(
         preparePasteEditsForFile,
         getPasteEdits,
         mapCode,
-        getImports,
     };
 
     switch (languageServiceMode) {
diff --git a/src/services/stringCompletions.ts b/src/services/stringCompletions.ts
index b5cf950c337ae..63cac4d49cca2 100644
--- a/src/services/stringCompletions.ts
+++ b/src/services/stringCompletions.ts
@@ -27,9 +27,11 @@ import {
     CompletionEntry,
     CompletionEntryDetails,
     CompletionInfo,
+    concatenate,
     contains,
     containsPath,
     ContextFlags,
+    createModuleSpecifierResolutionHost,
     createSortedArray,
     createTextSpan,
     createTextSpanFromStringLiteralLikeContent,
@@ -66,8 +68,11 @@ import {
     getPackageJsonTypesVersionsPaths,
     getPathComponents,
     getPathsBasePath,
+    getPossibleOriginalInputExtensionForExtension,
+    getPossibleOriginalInputPathWithoutChangingExt,
     getReplacementSpanForContextToken,
     getResolvePackageJsonExports,
+    getResolvePackageJsonImports,
     getSupportedExtensions,
     getSupportedExtensionsWithJsonIfResolveJsonModule,
     getTextOfJsxAttributeName,
@@ -77,6 +82,7 @@ import {
     hasProperty,
     hasTrailingDirectorySeparator,
     hostGetCanonicalFileName,
+    hostUsesCaseSensitiveFileNames,
     ImportOrExportSpecifier,
     IndexedAccessTypeNode,
     InternalSymbolName,
@@ -109,6 +115,7 @@ import {
     moduleExportNameTextEscaped,
     moduleResolutionUsesNodeModules,
     ModuleSpecifierEnding,
+    ModuleSpecifierResolutionHost,
     moduleSpecifiers,
     newCaseClauseTracker,
     Node,
@@ -200,7 +207,7 @@ export function getStringLiteralCompletions(
     includeSymbol: boolean,
 ): CompletionInfo | undefined {
     if (isInReferenceComment(sourceFile, position)) {
-        const entries = getTripleSlashReferenceCompletion(sourceFile, position, program, host);
+        const entries = getTripleSlashReferenceCompletion(sourceFile, position, program, host, createModuleSpecifierResolutionHost(program, host));
         return entries && convertPathCompletions(entries);
     }
     if (isInString(sourceFile, position, contextToken)) {
@@ -641,11 +648,12 @@ function getStringLiteralCompletionsFromModuleNamesWorker(sourceFile: SourceFile
     const scriptDirectory = getDirectoryPath(scriptPath);
     const compilerOptions = program.getCompilerOptions();
     const typeChecker = program.getTypeChecker();
+    const moduleSpecifierResolutionHost = createModuleSpecifierResolutionHost(program, host);
     const extensionOptions = getExtensionOptions(compilerOptions, ReferenceKind.ModuleSpecifier, sourceFile, typeChecker, preferences, mode);
 
     return isPathRelativeToScript(literalValue) || !compilerOptions.baseUrl && !compilerOptions.paths && (isRootedDiskPath(literalValue) || isUrl(literalValue))
-        ? getCompletionEntriesForRelativeModules(literalValue, scriptDirectory, program, host, scriptPath, extensionOptions)
-        : getCompletionEntriesForNonRelativeModules(literalValue, scriptDirectory, mode, program, host, extensionOptions);
+        ? getCompletionEntriesForRelativeModules(literalValue, scriptDirectory, program, host, moduleSpecifierResolutionHost, scriptPath, extensionOptions)
+        : getCompletionEntriesForNonRelativeModules(literalValue, scriptDirectory, mode, program, host, moduleSpecifierResolutionHost, extensionOptions);
 }
 
 interface ExtensionOptions {
@@ -665,7 +673,7 @@ function getExtensionOptions(compilerOptions: CompilerOptions, referenceKind: Re
         resolutionMode,
     };
 }
-function getCompletionEntriesForRelativeModules(literalValue: string, scriptDirectory: string, program: Program, host: LanguageServiceHost, scriptPath: Path, extensionOptions: ExtensionOptions) {
+function getCompletionEntriesForRelativeModules(literalValue: string, scriptDirectory: string, program: Program, host: LanguageServiceHost, moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost, scriptPath: Path, extensionOptions: ExtensionOptions) {
     const compilerOptions = program.getCompilerOptions();
     if (compilerOptions.rootDirs) {
         return getCompletionEntriesForDirectoryFragmentWithRootDirs(
@@ -675,11 +683,12 @@ function getCompletionEntriesForRelativeModules(literalValue: string, scriptDire
             extensionOptions,
             program,
             host,
+            moduleSpecifierResolutionHost,
             scriptPath,
         );
     }
     else {
-        return arrayFrom(getCompletionEntriesForDirectoryFragment(literalValue, scriptDirectory, extensionOptions, program, host, /*moduleSpecifierIsRelative*/ true, scriptPath).values());
+        return arrayFrom(getCompletionEntriesForDirectoryFragment(literalValue, scriptDirectory, extensionOptions, program, host, moduleSpecifierResolutionHost, /*moduleSpecifierIsRelative*/ true, scriptPath).values());
     }
 }
 
@@ -717,13 +726,13 @@ function getBaseDirectoriesFromRootDirs(rootDirs: string[], basePath: string, sc
     );
 }
 
-function getCompletionEntriesForDirectoryFragmentWithRootDirs(rootDirs: string[], fragment: string, scriptDirectory: string, extensionOptions: ExtensionOptions, program: Program, host: LanguageServiceHost, exclude: string): readonly NameAndKind[] {
+function getCompletionEntriesForDirectoryFragmentWithRootDirs(rootDirs: string[], fragment: string, scriptDirectory: string, extensionOptions: ExtensionOptions, program: Program, host: LanguageServiceHost, moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost, exclude: string): readonly NameAndKind[] {
     const compilerOptions = program.getCompilerOptions();
     const basePath = compilerOptions.project || host.getCurrentDirectory();
     const ignoreCase = !(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames());
     const baseDirectories = getBaseDirectoriesFromRootDirs(rootDirs, basePath, scriptDirectory, ignoreCase);
     return deduplicate<NameAndKind>(
-        flatMap(baseDirectories, baseDirectory => arrayFrom(getCompletionEntriesForDirectoryFragment(fragment, baseDirectory, extensionOptions, program, host, /*moduleSpecifierIsRelative*/ true, exclude).values())),
+        flatMap(baseDirectories, baseDirectory => arrayFrom(getCompletionEntriesForDirectoryFragment(fragment, baseDirectory, extensionOptions, program, host, moduleSpecifierResolutionHost, /*moduleSpecifierIsRelative*/ true, exclude).values())),
         (itemA, itemB) => itemA.name === itemB.name && itemA.kind === itemB.kind && itemA.extension === itemB.extension,
     );
 }
@@ -741,6 +750,7 @@ function getCompletionEntriesForDirectoryFragment(
     extensionOptions: ExtensionOptions,
     program: Program,
     host: LanguageServiceHost,
+    moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost,
     moduleSpecifierIsRelative: boolean,
     exclude?: string,
     result = createNameAndKindSet(),
@@ -779,7 +789,7 @@ function getCompletionEntriesForDirectoryFragment(
                 if (versionPaths) {
                     const packageDirectory = getDirectoryPath(packageJsonPath);
                     const pathInPackage = absolutePath.slice(ensureTrailingDirectorySeparator(packageDirectory).length);
-                    if (addCompletionEntriesFromPaths(result, pathInPackage, packageDirectory, extensionOptions, program, host, versionPaths)) {
+                    if (addCompletionEntriesFromPaths(result, pathInPackage, packageDirectory, extensionOptions, program, host, moduleSpecifierResolutionHost, versionPaths)) {
                         // A true result means one of the `versionPaths` was matched, which will block relative resolution
                         // to files and folders from here. All reachable paths given the pattern match are already added.
                         return result;
@@ -802,7 +812,7 @@ function getCompletionEntriesForDirectoryFragment(
                 continue;
             }
 
-            const { name, extension } = getFilenameWithExtensionOption(getBaseFileName(filePath), program, extensionOptions, /*isExportsWildcard*/ false);
+            const { name, extension } = getFilenameWithExtensionOption(getBaseFileName(filePath), program, extensionOptions, /*isExportsOrImportsWildcard*/ false);
             result.add(nameAndKind(name, ScriptElementKind.scriptElement, extension));
         }
     }
@@ -822,7 +832,7 @@ function getCompletionEntriesForDirectoryFragment(
     return result;
 }
 
-function getFilenameWithExtensionOption(name: string, program: Program, extensionOptions: ExtensionOptions, isExportsWildcard: boolean): { name: string; extension: Extension | undefined; } {
+function getFilenameWithExtensionOption(name: string, program: Program, extensionOptions: ExtensionOptions, isExportsOrImportsWildcard: boolean): { name: string; extension: Extension | undefined; } {
     const nonJsResult = moduleSpecifiers.tryGetRealFileNameForNonJsDeclarationFileName(name);
     if (nonJsResult) {
         return { name: nonJsResult, extension: tryGetExtensionFromPath(nonJsResult) };
@@ -838,7 +848,7 @@ function getFilenameWithExtensionOption(name: string, program: Program, extensio
         extensionOptions.importingSourceFile,
     ).getAllowedEndingsInPreferredOrder(extensionOptions.resolutionMode);
 
-    if (isExportsWildcard) {
+    if (isExportsOrImportsWildcard) {
         // If we're completing `import {} from "foo/|"` and subpaths are available via `"exports": { "./*": "./src/*" }`,
         // the completion must be a (potentially extension-swapped) file name. Dropping extensions and index files is not allowed.
         allowedEndings = allowedEndings.filter(e => e !== ModuleSpecifierEnding.Minimal && e !== ModuleSpecifierEnding.Index);
@@ -855,7 +865,7 @@ function getFilenameWithExtensionOption(name: string, program: Program, extensio
     }
 
     if (
-        !isExportsWildcard &&
+        !isExportsOrImportsWildcard &&
         (allowedEndings[0] === ModuleSpecifierEnding.Minimal || allowedEndings[0] === ModuleSpecifierEnding.Index) &&
         fileExtensionIsOneOf(name, [Extension.Js, Extension.Jsx, Extension.Ts, Extension.Tsx, Extension.Dts])
     ) {
@@ -876,6 +886,7 @@ function addCompletionEntriesFromPaths(
     extensionOptions: ExtensionOptions,
     program: Program,
     host: LanguageServiceHost,
+    moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost,
     paths: MapLike<string[]>,
 ) {
     const getPatternsForKey = (key: string) => paths[key];
@@ -886,18 +897,20 @@ function addCompletionEntriesFromPaths(
         const lengthB = typeof patternB === "object" ? patternB.prefix.length : b.length;
         return compareValues(lengthB, lengthA);
     };
-    return addCompletionEntriesFromPathsOrExports(result, /*isExports*/ false, fragment, baseDirectory, extensionOptions, program, host, getOwnKeys(paths), getPatternsForKey, comparePaths);
+    return addCompletionEntriesFromPathsOrExportsOrImports(result, /*isExports*/ false, /*isImports*/ false, fragment, baseDirectory, extensionOptions, program, host, moduleSpecifierResolutionHost, getOwnKeys(paths), getPatternsForKey, comparePaths);
 }
 
 /** @returns whether `fragment` was a match for any `paths` (which should indicate whether any other path completions should be offered) */
-function addCompletionEntriesFromPathsOrExports(
+function addCompletionEntriesFromPathsOrExportsOrImports(
     result: NameAndKindSet,
     isExports: boolean,
+    isImports: boolean,
     fragment: string,
     baseDirectory: string,
     extensionOptions: ExtensionOptions,
     program: Program,
     host: LanguageServiceHost,
+    moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost,
     keys: readonly string[],
     getPatternsForKey: (key: string) => string[] | undefined,
     comparePaths: (a: string, b: string) => Comparison,
@@ -906,13 +919,15 @@ function addCompletionEntriesFromPathsOrExports(
     let matchedPath: string | undefined;
     for (const key of keys) {
         if (key === ".") continue;
-        const keyWithoutLeadingDotSlash = key.replace(/^\.\//, ""); // remove leading "./"
+        const keyWithoutLeadingDotSlash = key
+            .replace(/^\.\//, "") // remove leading "./"
+            + ((isExports || isImports) && endsWith(key, "/") ? "*" : ""); // normalize trailing `/` to `/*`
         const patterns = getPatternsForKey(key);
         if (patterns) {
             const pathPattern = tryParsePattern(keyWithoutLeadingDotSlash);
             if (!pathPattern) continue;
             const isMatch = typeof pathPattern === "object" && isPatternMatch(pathPattern, fragment);
-            const isLongestMatch = isMatch && (matchedPath === undefined || comparePaths(key, matchedPath) === Comparison.LessThan);
+            const isLongestMatch = isMatch && (matchedPath === undefined || comparePaths(keyWithoutLeadingDotSlash, matchedPath) === Comparison.LessThan);
             if (isLongestMatch) {
                 // If this is a higher priority match than anything we've seen so far, previous results from matches are invalid, e.g.
                 // for `import {} from "some-package/|"` with a typesVersions:
@@ -925,13 +940,13 @@ function addCompletionEntriesFromPathsOrExports(
                 //                                 added by the '*' match, after typing `"some-package/foo/|"` we would get file results from both
                 //                                 ./dist/foo and ./foo, when only the latter will actually be resolvable.
                 //                                 See pathCompletionsTypesVersionsWildcard6.ts.
-                matchedPath = key;
+                matchedPath = keyWithoutLeadingDotSlash;
                 pathResults = pathResults.filter(r => !r.matchedPattern);
             }
-            if (typeof pathPattern === "string" || matchedPath === undefined || comparePaths(key, matchedPath) !== Comparison.GreaterThan) {
+            if (typeof pathPattern === "string" || matchedPath === undefined || comparePaths(keyWithoutLeadingDotSlash, matchedPath) !== Comparison.GreaterThan) {
                 pathResults.push({
                     matchedPattern: isMatch,
-                    results: getCompletionsForPathMapping(keyWithoutLeadingDotSlash, patterns, fragment, baseDirectory, extensionOptions, isExports && isMatch, program, host)
+                    results: getCompletionsForPathMapping(keyWithoutLeadingDotSlash, patterns, fragment, baseDirectory, extensionOptions, isExports, isImports, program, host, moduleSpecifierResolutionHost)
                         .map(({ name, kind, extension }) => nameAndKind(name, kind, extension)),
                 });
             }
@@ -955,6 +970,7 @@ function getCompletionEntriesForNonRelativeModules(
     mode: ResolutionMode,
     program: Program,
     host: LanguageServiceHost,
+    moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost,
     extensionOptions: ExtensionOptions,
 ): readonly NameAndKind[] {
     const typeChecker = program.getTypeChecker();
@@ -966,12 +982,12 @@ function getCompletionEntriesForNonRelativeModules(
 
     if (baseUrl) {
         const absolute = normalizePath(combinePaths(host.getCurrentDirectory(), baseUrl));
-        getCompletionEntriesForDirectoryFragment(fragment, absolute, extensionOptions, program, host, /*moduleSpecifierIsRelative*/ false, /*exclude*/ undefined, result);
+        getCompletionEntriesForDirectoryFragment(fragment, absolute, extensionOptions, program, host, moduleSpecifierResolutionHost, /*moduleSpecifierIsRelative*/ false, /*exclude*/ undefined, result);
     }
 
     if (paths) {
         const absolute = getPathsBasePath(compilerOptions, host)!;
-        addCompletionEntriesFromPaths(result, fragment, absolute, extensionOptions, program, host, paths);
+        addCompletionEntriesFromPaths(result, fragment, absolute, extensionOptions, program, host, moduleSpecifierResolutionHost, paths);
     }
 
     const fragmentDirectory = getFragmentDirectory(fragment);
@@ -979,7 +995,7 @@ function getCompletionEntriesForNonRelativeModules(
         result.add(nameAndKind(ambientName, ScriptElementKind.externalModuleName, /*extension*/ undefined));
     }
 
-    getCompletionEntriesFromTypings(host, program, scriptPath, fragmentDirectory, extensionOptions, result);
+    getCompletionEntriesFromTypings(program, host, moduleSpecifierResolutionHost, scriptPath, fragmentDirectory, extensionOptions, result);
 
     if (moduleResolutionUsesNodeModules(moduleResolution)) {
         // If looking for a global package name, don't just include everything in `node_modules` because that includes dependencies' own dependencies.
@@ -995,56 +1011,55 @@ function getCompletionEntriesForNonRelativeModules(
             }
         }
         if (!foundGlobal) {
+            const resolvePackageJsonExports = getResolvePackageJsonExports(compilerOptions);
+            const resolvePackageJsonImports = getResolvePackageJsonImports(compilerOptions);
+            let seenPackageScope = false;
+
+            const importsLookup = (directory: string) => {
+                if (resolvePackageJsonImports && !seenPackageScope) {
+                    const packageFile = combinePaths(directory, "package.json");
+                    if (seenPackageScope = tryFileExists(host, packageFile)) {
+                        const packageJson = readJson(packageFile, host);
+                        exportsOrImportsLookup((packageJson as MapLike<unknown>).imports, fragment, directory, /*isExports*/ false, /*isImports*/ true);
+                    }
+                }
+            };
+
             let ancestorLookup: (directory: string) => void | undefined = ancestor => {
                 const nodeModules = combinePaths(ancestor, "node_modules");
                 if (tryDirectoryExists(host, nodeModules)) {
-                    getCompletionEntriesForDirectoryFragment(fragment, nodeModules, extensionOptions, program, host, /*moduleSpecifierIsRelative*/ false, /*exclude*/ undefined, result);
+                    getCompletionEntriesForDirectoryFragment(fragment, nodeModules, extensionOptions, program, host, moduleSpecifierResolutionHost, /*moduleSpecifierIsRelative*/ false, /*exclude*/ undefined, result);
                 }
+                importsLookup(ancestor);
             };
-            if (fragmentDirectory && getResolvePackageJsonExports(compilerOptions)) {
-                const nodeModulesDirectoryLookup = ancestorLookup;
+            if (fragmentDirectory && resolvePackageJsonExports) {
+                const nodeModulesDirectoryOrImportsLookup = ancestorLookup;
                 ancestorLookup = ancestor => {
                     const components = getPathComponents(fragment);
                     components.shift(); // shift off empty root
                     let packagePath = components.shift();
                     if (!packagePath) {
-                        return nodeModulesDirectoryLookup(ancestor);
+                        return nodeModulesDirectoryOrImportsLookup(ancestor);
                     }
                     if (startsWith(packagePath, "@")) {
                         const subName = components.shift();
                         if (!subName) {
-                            return nodeModulesDirectoryLookup(ancestor);
+                            return nodeModulesDirectoryOrImportsLookup(ancestor);
                         }
                         packagePath = combinePaths(packagePath, subName);
                     }
+                    if (resolvePackageJsonImports && startsWith(packagePath, "#")) {
+                        return importsLookup(ancestor);
+                    }
                     const packageDirectory = combinePaths(ancestor, "node_modules", packagePath);
                     const packageFile = combinePaths(packageDirectory, "package.json");
                     if (tryFileExists(host, packageFile)) {
                         const packageJson = readJson(packageFile, host);
-                        const exports = (packageJson as any).exports;
-                        if (exports) {
-                            if (typeof exports !== "object" || exports === null) { // eslint-disable-line no-restricted-syntax
-                                return; // null exports or entrypoint only, no sub-modules available
-                            }
-                            const keys = getOwnKeys(exports);
-                            const fragmentSubpath = components.join("/") + (components.length && hasTrailingDirectorySeparator(fragment) ? "/" : "");
-                            const conditions = getConditions(compilerOptions, mode);
-                            addCompletionEntriesFromPathsOrExports(
-                                result,
-                                /*isExports*/ true,
-                                fragmentSubpath,
-                                packageDirectory,
-                                extensionOptions,
-                                program,
-                                host,
-                                keys,
-                                key => singleElementArray(getPatternFromFirstMatchingCondition(exports[key], conditions)),
-                                comparePatternKeys,
-                            );
-                            return;
-                        }
+                        const fragmentSubpath = components.join("/") + (components.length && hasTrailingDirectorySeparator(fragment) ? "/" : "");
+                        exportsOrImportsLookup((packageJson as MapLike<unknown>).exports, fragmentSubpath, packageDirectory, /*isExports*/ true, /*isImports*/ false);
+                        return;
                     }
-                    return nodeModulesDirectoryLookup(ancestor);
+                    return nodeModulesDirectoryOrImportsLookup(ancestor);
                 };
             }
             forEachAncestorDirectoryStoppingAtGlobalCache(host, scriptPath, ancestorLookup);
@@ -1052,6 +1067,34 @@ function getCompletionEntriesForNonRelativeModules(
     }
 
     return arrayFrom(result.values());
+
+    function exportsOrImportsLookup(lookupTable: unknown, fragment: string, baseDirectory: string, isExports: boolean, isImports: boolean) {
+        if (typeof lookupTable !== "object" || lookupTable === null) { // eslint-disable-line no-restricted-syntax
+            return; // null lookupTable or entrypoint only
+        }
+        const keys = getOwnKeys(lookupTable as MapLike<unknown>);
+        const conditions = getConditions(compilerOptions, mode);
+        addCompletionEntriesFromPathsOrExportsOrImports(
+            result,
+            isExports,
+            isImports,
+            fragment,
+            baseDirectory,
+            extensionOptions,
+            program,
+            host,
+            moduleSpecifierResolutionHost,
+            keys,
+            key => {
+                const pattern = getPatternFromFirstMatchingCondition((lookupTable as MapLike<unknown>)[key], conditions);
+                if (pattern === undefined) {
+                    return undefined;
+                }
+                return singleElementArray(endsWith(key, "/") && endsWith(pattern, "/") ? pattern + "*" : pattern);
+            },
+            comparePatternKeys,
+        );
+    }
 }
 
 function getPatternFromFirstMatchingCondition(target: unknown, conditions: readonly string[]): string | undefined {
@@ -1078,22 +1121,27 @@ function getCompletionsForPathMapping(
     fragment: string,
     packageDirectory: string,
     extensionOptions: ExtensionOptions,
-    isExportsWildcard: boolean,
+    isExports: boolean,
+    isImports: boolean,
     program: Program,
     host: LanguageServiceHost,
+    moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost,
 ): readonly NameAndKind[] {
-    if (!endsWith(path, "*")) {
+    const parsedPath = tryParsePattern(path);
+    if (!parsedPath) {
+        return emptyArray;
+    }
+    // no stars in the pattern
+    if (typeof parsedPath === "string") {
         // For a path mapping "foo": ["/x/y/z.ts"], add "foo" itself as a completion.
-        return !path.includes("*") ? justPathMappingName(path, ScriptElementKind.scriptElement) : emptyArray;
+        return justPathMappingName(path, ScriptElementKind.scriptElement);
     }
-
-    const pathPrefix = path.slice(0, path.length - 1);
-    const remainingFragment = tryRemovePrefix(fragment, pathPrefix);
+    const remainingFragment = tryRemovePrefix(fragment, parsedPath.prefix);
     if (remainingFragment === undefined) {
-        const starIsFullPathComponent = path[path.length - 2] === "/";
-        return starIsFullPathComponent ? justPathMappingName(pathPrefix, ScriptElementKind.directory) : flatMap(patterns, pattern => getModulesForPathsPattern("", packageDirectory, pattern, extensionOptions, isExportsWildcard, program, host)?.map(({ name, ...rest }) => ({ name: pathPrefix + name, ...rest })));
+        const starIsFullPathComponent = endsWith(path, "/*");
+        return starIsFullPathComponent ? justPathMappingName(parsedPath.prefix, ScriptElementKind.directory) : flatMap(patterns, pattern => getModulesForPathsPattern("", packageDirectory, pattern, extensionOptions, isExports, isImports, program, host, moduleSpecifierResolutionHost)?.map(({ name, ...rest }) => ({ name: parsedPath.prefix + name + parsedPath.suffix, ...rest })));
     }
-    return flatMap(patterns, pattern => getModulesForPathsPattern(remainingFragment, packageDirectory, pattern, extensionOptions, isExportsWildcard, program, host));
+    return flatMap(patterns, pattern => getModulesForPathsPattern(remainingFragment, packageDirectory, pattern, extensionOptions, isExports, isImports, program, host, moduleSpecifierResolutionHost));
 
     function justPathMappingName(name: string, kind: ScriptElementKind.directory | ScriptElementKind.scriptElement): readonly NameAndKind[] {
         return startsWith(name, fragment) ? [{ name: removeTrailingDirectorySeparator(name), kind, extension: undefined }] : emptyArray;
@@ -1105,9 +1153,11 @@ function getModulesForPathsPattern(
     packageDirectory: string,
     pattern: string,
     extensionOptions: ExtensionOptions,
-    isExportsWildcard: boolean,
+    isExports: boolean,
+    isImports: boolean,
     program: Program,
     host: LanguageServiceHost,
+    moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost,
 ): readonly NameAndKind[] | undefined {
     if (!host.readDirectory) {
         return undefined;
@@ -1127,15 +1177,25 @@ function getModulesForPathsPattern(
     const fragmentHasPath = containsSlash(fragment);
     const fragmentDirectory = fragmentHasPath ? hasTrailingDirectorySeparator(fragment) ? fragment : getDirectoryPath(fragment) : undefined;
 
+    const getCommonSourceDirectory = () => moduleSpecifierResolutionHost.getCommonSourceDirectory();
+    const ignoreCase = !hostUsesCaseSensitiveFileNames(moduleSpecifierResolutionHost);
+    const outDir = program.getCompilerOptions().outDir;
+    const declarationDir = program.getCompilerOptions().declarationDir;
+
     // Try and expand the prefix to include any path from the fragment so that we can limit the readDirectory call
     const expandedPrefixDirectory = fragmentHasPath ? combinePaths(normalizedPrefixDirectory, normalizedPrefixBase + fragmentDirectory) : normalizedPrefixDirectory;
-
-    const normalizedSuffix = normalizePath(parsed.suffix);
-    const declarationExtension = normalizedSuffix && getDeclarationEmitExtensionForPath("_" + normalizedSuffix);
-    const matchingSuffixes = declarationExtension ? [changeExtension(normalizedSuffix, declarationExtension), normalizedSuffix] : [normalizedSuffix];
     // Need to normalize after combining: If we combinePaths("a", "../b"), we want "b" and not "a/../b".
     const baseDirectory = normalizePath(combinePaths(packageDirectory, expandedPrefixDirectory));
-    const completePrefix = fragmentHasPath ? baseDirectory : ensureTrailingDirectorySeparator(baseDirectory) + normalizedPrefixBase;
+    const possibleInputBaseDirectoryForOutDir = isImports && outDir && getPossibleOriginalInputPathWithoutChangingExt(baseDirectory, ignoreCase, outDir, getCommonSourceDirectory);
+    const possibleInputBaseDirectoryForDeclarationDir = isImports && declarationDir && getPossibleOriginalInputPathWithoutChangingExt(baseDirectory, ignoreCase, declarationDir, getCommonSourceDirectory);
+    const normalizedSuffix = normalizePath(parsed.suffix);
+    const declarationExtension = normalizedSuffix && getDeclarationEmitExtensionForPath("_" + normalizedSuffix);
+    const inputExtension = normalizedSuffix ? getPossibleOriginalInputExtensionForExtension("_" + normalizedSuffix) : undefined;
+    const matchingSuffixes = [
+        declarationExtension && changeExtension(normalizedSuffix, declarationExtension),
+        ...(inputExtension ? inputExtension.map(ext => changeExtension(normalizedSuffix, ext)) : []),
+        normalizedSuffix,
+    ].filter(isString);
 
     // If we have a suffix, then we read the directory all the way down to avoid returning completions for
     // directories that don't contain files that would match the suffix. A previous comment here was concerned
@@ -1149,28 +1209,53 @@ function getModulesForPathsPattern(
         ? matchingSuffixes.map(suffix => "**/*" + suffix)
         : ["./*"];
 
-    const matches = mapDefined(tryReadDirectory(host, baseDirectory, extensionOptions.extensionsToSearch, /*exclude*/ undefined, includeGlobs), match => {
-        const trimmedWithPattern = trimPrefixAndSuffix(match);
-        if (trimmedWithPattern) {
-            if (containsSlash(trimmedWithPattern)) {
-                return directoryResult(getPathComponents(removeLeadingDirectorySeparator(trimmedWithPattern))[1]);
-            }
-            const { name, extension } = getFilenameWithExtensionOption(trimmedWithPattern, program, extensionOptions, isExportsWildcard);
-            return nameAndKind(name, ScriptElementKind.scriptElement, extension);
-        }
-    });
+    const isExportsOrImportsWildcard = (isExports || isImports) && endsWith(pattern, "/*");
+
+    let matches = getMatchesWithPrefix(baseDirectory);
+
+    if (possibleInputBaseDirectoryForOutDir) {
+        matches = concatenate(matches, getMatchesWithPrefix(possibleInputBaseDirectoryForOutDir));
+    }
+    if (possibleInputBaseDirectoryForDeclarationDir) {
+        matches = concatenate(matches, getMatchesWithPrefix(possibleInputBaseDirectoryForDeclarationDir));
+    }
 
     // If we had a suffix, we already recursively searched for all possible files that could match
     // it and returned the directories leading to those files. Otherwise, assume any directory could
     // have something valid to import.
-    const directories = normalizedSuffix
-        ? emptyArray
-        : mapDefined(tryGetDirectories(host, baseDirectory), dir => dir === "node_modules" ? undefined : directoryResult(dir));
-    return [...matches, ...directories];
+    if (!normalizedSuffix) {
+        matches = concatenate(matches, getDirectoryMatches(baseDirectory));
+        if (possibleInputBaseDirectoryForOutDir) {
+            matches = concatenate(matches, getDirectoryMatches(possibleInputBaseDirectoryForOutDir));
+        }
+        if (possibleInputBaseDirectoryForDeclarationDir) {
+            matches = concatenate(matches, getDirectoryMatches(possibleInputBaseDirectoryForDeclarationDir));
+        }
+    }
+
+    return matches;
+
+    function getMatchesWithPrefix(directory: string) {
+        const completePrefix = fragmentHasPath ? directory : ensureTrailingDirectorySeparator(directory) + normalizedPrefixBase;
+        return mapDefined(tryReadDirectory(host, directory, extensionOptions.extensionsToSearch, /*exclude*/ undefined, includeGlobs), match => {
+            const trimmedWithPattern = trimPrefixAndSuffix(match, completePrefix);
+            if (trimmedWithPattern) {
+                if (containsSlash(trimmedWithPattern)) {
+                    return directoryResult(getPathComponents(removeLeadingDirectorySeparator(trimmedWithPattern))[1]);
+                }
+                const { name, extension } = getFilenameWithExtensionOption(trimmedWithPattern, program, extensionOptions, isExportsOrImportsWildcard);
+                return nameAndKind(name, ScriptElementKind.scriptElement, extension);
+            }
+        });
+    }
+
+    function getDirectoryMatches(directoryName: string) {
+        return mapDefined(tryGetDirectories(host, directoryName), dir => dir === "node_modules" ? undefined : directoryResult(dir));
+    }
 
-    function trimPrefixAndSuffix(path: string): string | undefined {
+    function trimPrefixAndSuffix(path: string, prefix: string): string | undefined {
         return firstDefined(matchingSuffixes, suffix => {
-            const inner = withoutStartAndEnd(normalizePath(path), completePrefix, suffix);
+            const inner = withoutStartAndEnd(normalizePath(path), prefix, suffix);
             return inner === undefined ? undefined : removeLeadingDirectorySeparator(inner);
         });
     }
@@ -1199,7 +1284,7 @@ function getAmbientModuleCompletions(fragment: string, fragmentDirectory: string
     return nonRelativeModuleNames;
 }
 
-function getTripleSlashReferenceCompletion(sourceFile: SourceFile, position: number, program: Program, host: LanguageServiceHost): readonly PathCompletion[] | undefined {
+function getTripleSlashReferenceCompletion(sourceFile: SourceFile, position: number, program: Program, host: LanguageServiceHost, moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost): readonly PathCompletion[] | undefined {
     const compilerOptions = program.getCompilerOptions();
     const token = getTokenAtPosition(sourceFile, position);
     const commentRanges = getLeadingCommentRanges(sourceFile.text, token.pos);
@@ -1215,13 +1300,13 @@ function getTripleSlashReferenceCompletion(sourceFile: SourceFile, position: num
 
     const [, prefix, kind, toComplete] = match;
     const scriptPath = getDirectoryPath(sourceFile.path);
-    const names = kind === "path" ? getCompletionEntriesForDirectoryFragment(toComplete, scriptPath, getExtensionOptions(compilerOptions, ReferenceKind.Filename, sourceFile), program, host, /*moduleSpecifierIsRelative*/ true, sourceFile.path)
-        : kind === "types" ? getCompletionEntriesFromTypings(host, program, scriptPath, getFragmentDirectory(toComplete), getExtensionOptions(compilerOptions, ReferenceKind.ModuleSpecifier, sourceFile))
+    const names = kind === "path" ? getCompletionEntriesForDirectoryFragment(toComplete, scriptPath, getExtensionOptions(compilerOptions, ReferenceKind.Filename, sourceFile), program, host, moduleSpecifierResolutionHost, /*moduleSpecifierIsRelative*/ true, sourceFile.path)
+        : kind === "types" ? getCompletionEntriesFromTypings(program, host, moduleSpecifierResolutionHost, scriptPath, getFragmentDirectory(toComplete), getExtensionOptions(compilerOptions, ReferenceKind.ModuleSpecifier, sourceFile))
         : Debug.fail();
     return addReplacementSpans(toComplete, range.pos + prefix.length, arrayFrom(names.values()));
 }
 
-function getCompletionEntriesFromTypings(host: LanguageServiceHost, program: Program, scriptPath: string, fragmentDirectory: string | undefined, extensionOptions: ExtensionOptions, result = createNameAndKindSet()): NameAndKindSet {
+function getCompletionEntriesFromTypings(program: Program, host: LanguageServiceHost, moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost, scriptPath: string, fragmentDirectory: string | undefined, extensionOptions: ExtensionOptions, result = createNameAndKindSet()): NameAndKindSet {
     const options = program.getCompilerOptions();
     // Check for typings specified in compiler options
     const seen = new Map<string, true>();
@@ -1257,7 +1342,7 @@ function getCompletionEntriesFromTypings(host: LanguageServiceHost, program: Pro
                 const baseDirectory = combinePaths(directory, typeDirectoryName);
                 const remainingFragment = tryRemoveDirectoryPrefix(fragmentDirectory, packageName, hostGetCanonicalFileName(host));
                 if (remainingFragment !== undefined) {
-                    getCompletionEntriesForDirectoryFragment(remainingFragment, baseDirectory, extensionOptions, program, host, /*moduleSpecifierIsRelative*/ false, /*exclude*/ undefined, result);
+                    getCompletionEntriesForDirectoryFragment(remainingFragment, baseDirectory, extensionOptions, program, host, moduleSpecifierResolutionHost, /*moduleSpecifierIsRelative*/ false, /*exclude*/ undefined, result);
                 }
             }
         }
diff --git a/src/services/symbolDisplay.ts b/src/services/symbolDisplay.ts
index 6c49848435e70..0b6e220912921 100644
--- a/src/services/symbolDisplay.ts
+++ b/src/services/symbolDisplay.ts
@@ -108,6 +108,7 @@ import {
     TypeParameter,
     typeToDisplayParts,
     VariableDeclaration,
+    WriterContextOut,
 } from "./_namespaces/ts.js";
 
 const symbolDisplayNodeBuilderFlags = NodeBuilderFlags.OmitParameterModifiers | NodeBuilderFlags.IgnoreErrors | NodeBuilderFlags.UseAliasDefinedOutsideCurrentScope;
@@ -254,9 +255,20 @@ export interface SymbolDisplayPartsDocumentationAndSymbolKind {
     documentation: SymbolDisplayPart[];
     symbolKind: ScriptElementKind;
     tags: JSDocTagInfo[] | undefined;
+    canIncreaseVerbosityLevel?: boolean;
 }
 
-function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker: TypeChecker, symbol: Symbol, sourceFile: SourceFile, enclosingDeclaration: Node | undefined, location: Node, type: Type | undefined, semanticMeaning: SemanticMeaning, alias?: Symbol): SymbolDisplayPartsDocumentationAndSymbolKind {
+function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(
+    typeChecker: TypeChecker,
+    symbol: Symbol,
+    sourceFile: SourceFile,
+    enclosingDeclaration: Node | undefined,
+    location: Node,
+    type: Type | undefined,
+    semanticMeaning: SemanticMeaning,
+    alias?: Symbol,
+    verbosityLevel?: number,
+): SymbolDisplayPartsDocumentationAndSymbolKind {
     const displayParts: SymbolDisplayPart[] = [];
     let documentation: SymbolDisplayPart[] = [];
     let tags: JSDocTagInfo[] = [];
@@ -267,6 +279,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker: Type
     let documentationFromAlias: SymbolDisplayPart[] | undefined;
     let tagsFromAlias: JSDocTagInfo[] | undefined;
     let hasMultipleSignatures = false;
+    const typeWriterOut: WriterContextOut | undefined = verbosityLevel !== undefined ? { couldUnfoldMore: false } : undefined;
 
     if (location.kind === SyntaxKind.ThisKeyword && !isThisExpression) {
         return { displayParts: [keywordPart(SyntaxKind.ThisKeyword)], documentation: [], symbolKind: ScriptElementKind.primitiveType, tags: undefined };
@@ -462,7 +475,17 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker: Type
         displayParts.push(spacePart());
         displayParts.push(operatorPart(SyntaxKind.EqualsToken));
         displayParts.push(spacePart());
-        addRange(displayParts, typeToDisplayParts(typeChecker, location.parent && isConstTypeReference(location.parent) ? typeChecker.getTypeAtLocation(location.parent) : typeChecker.getDeclaredTypeOfSymbol(symbol), enclosingDeclaration, TypeFormatFlags.InTypeAlias));
+        addRange(
+            displayParts,
+            typeToDisplayParts(
+                typeChecker,
+                location.parent && isConstTypeReference(location.parent) ? typeChecker.getTypeAtLocation(location.parent) : typeChecker.getDeclaredTypeOfSymbol(symbol),
+                enclosingDeclaration,
+                TypeFormatFlags.InTypeAlias,
+                verbosityLevel,
+                typeWriterOut,
+            ),
+        );
     }
     if (symbolFlags & SymbolFlags.Enum) {
         prefixNextMeaning();
@@ -650,13 +673,30 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker: Type
                     // If the type is type parameter, format it specially
                     if (type.symbol && type.symbol.flags & SymbolFlags.TypeParameter && symbolKind !== ScriptElementKind.indexSignatureElement) {
                         const typeParameterParts = mapToDisplayParts(writer => {
-                            const param = typeChecker.typeParameterToDeclaration(type as TypeParameter, enclosingDeclaration, symbolDisplayNodeBuilderFlags)!;
+                            const param = typeChecker.typeParameterToDeclaration(
+                                type as TypeParameter,
+                                enclosingDeclaration,
+                                symbolDisplayNodeBuilderFlags,
+                                /*internalFlags*/ undefined,
+                                /*tracker*/ undefined,
+                                verbosityLevel,
+                            )!;
                             getPrinter().writeNode(EmitHint.Unspecified, param, getSourceFileOfNode(getParseTreeNode(enclosingDeclaration)), writer);
                         });
                         addRange(displayParts, typeParameterParts);
                     }
                     else {
-                        addRange(displayParts, typeToDisplayParts(typeChecker, type, enclosingDeclaration));
+                        addRange(
+                            displayParts,
+                            typeToDisplayParts(
+                                typeChecker,
+                                type,
+                                enclosingDeclaration,
+                                /*flags*/ undefined,
+                                verbosityLevel,
+                                typeWriterOut,
+                            ),
+                        );
                     }
                     if (isTransientSymbol(symbol) && symbol.links.target && isTransientSymbol(symbol.links.target) && symbol.links.target.links.tupleLabelDeclaration) {
                         const labelDecl = symbol.links.target.links.tupleLabelDeclaration;
@@ -742,7 +782,13 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker: Type
         tags = tagsFromAlias;
     }
 
-    return { displayParts, documentation, symbolKind, tags: tags.length === 0 ? undefined : tags };
+    return {
+        displayParts,
+        documentation,
+        symbolKind,
+        tags: tags.length === 0 ? undefined : tags,
+        canIncreaseVerbosityLevel: typeWriterOut?.couldUnfoldMore,
+    };
 
     function getPrinter() {
         return createPrinterWithRemoveComments();
@@ -874,8 +920,9 @@ export function getSymbolDisplayPartsDocumentationAndSymbolKind(
     location: Node,
     semanticMeaning: SemanticMeaning = getMeaningFromLocation(location),
     alias?: Symbol,
+    verbosityLevel?: number,
 ): SymbolDisplayPartsDocumentationAndSymbolKind {
-    return getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symbol, sourceFile, enclosingDeclaration, location, /*type*/ undefined, semanticMeaning, alias);
+    return getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symbol, sourceFile, enclosingDeclaration, location, /*type*/ undefined, semanticMeaning, alias, verbosityLevel);
 }
 
 function isLocalVariableOrFunction(symbol: Symbol) {
diff --git a/src/services/textChanges.ts b/src/services/textChanges.ts
index 196f5389555b6..cca568d1c872b 100644
--- a/src/services/textChanges.ts
+++ b/src/services/textChanges.ts
@@ -352,7 +352,7 @@ function getAdjustedRange(sourceFile: SourceFile, startNode: Node, endNode: Node
     return { pos: getAdjustedStartPosition(sourceFile, startNode, options), end: getAdjustedEndPosition(sourceFile, endNode, options) };
 }
 
-function getAdjustedStartPosition(sourceFile: SourceFile, node: Node, options: ConfigurableStartEnd, hasTrailingComment = false) {
+function getAdjustedStartPosition(sourceFile: SourceFile, node: Node, options: ConfigurableStartEnd, hasTrailingComment = false): number {
     const { leadingTriviaOption } = options;
     if (leadingTriviaOption === LeadingTriviaOption.Exclude) {
         return node.getStart(sourceFile);
@@ -436,7 +436,8 @@ function getEndPositionOfMultilineTrailingComment(sourceFile: SourceFile, node:
     return undefined;
 }
 
-function getAdjustedEndPosition(sourceFile: SourceFile, node: Node, options: ConfigurableEnd): number {
+/** @internal */
+export function getAdjustedEndPosition(sourceFile: SourceFile, node: Node, options: ConfigurableEnd): number {
     const { end } = node;
     const { trailingTriviaOption } = options;
     if (trailingTriviaOption === TrailingTriviaOption.Exclude) {
diff --git a/src/services/types.ts b/src/services/types.ts
index 69fdb42cf6926..39c1636fefcd1 100644
--- a/src/services/types.ts
+++ b/src/services/types.ts
@@ -583,6 +583,8 @@ export interface LanguageService {
      * @param position A zero-based index of the character where you want the quick info
      */
     getQuickInfoAtPosition(fileName: string, position: number): QuickInfo | undefined;
+    /** @internal */
+    getQuickInfoAtPosition(fileName: string, position: number, verbosityLevel: number | undefined): QuickInfo | undefined; // eslint-disable-line @typescript-eslint/unified-signatures
 
     getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan | undefined;
 
@@ -697,7 +699,6 @@ export interface LanguageService {
     getSupportedCodeFixes(fileName?: string): readonly string[];
 
     /** @internal */ mapCode(fileName: string, contents: string[], focusLocations: TextSpan[][] | undefined, formatOptions: FormatCodeSettings, preferences: UserPreferences): readonly FileTextChanges[];
-    /** @internal */ getImports(fileName: string): readonly string[];
 
     dispose(): void;
     preparePasteEditsForFile(fileName: string, copiedTextRanges: TextRange[]): boolean;
@@ -1325,6 +1326,7 @@ export interface QuickInfo {
     displayParts?: SymbolDisplayPart[];
     documentation?: SymbolDisplayPart[];
     tags?: JSDocTagInfo[];
+    canIncreaseVerbosityLevel?: boolean;
 }
 
 export type RenameInfo = RenameInfoSuccess | RenameInfoFailure;
diff --git a/src/services/utilities.ts b/src/services/utilities.ts
index 356c2878c90b8..0f7b99250111f 100644
--- a/src/services/utilities.ts
+++ b/src/services/utilities.ts
@@ -169,6 +169,7 @@ import {
     isExternalModule,
     isExternalModuleImportEqualsDeclaration,
     isExternalModuleReference,
+    isExternalModuleSymbol,
     isFileLevelUniqueName,
     isForInStatement,
     isForOfStatement,
@@ -389,6 +390,7 @@ import {
     visitEachChild,
     VoidExpression,
     walkUpParenthesizedExpressions,
+    WriterContextOut,
     YieldExpression,
 } from "./_namespaces/ts.js";
 
@@ -3054,9 +3056,9 @@ export function mapToDisplayParts(writeDisplayParts: (writer: DisplayPartsSymbol
 }
 
 /** @internal */
-export function typeToDisplayParts(typechecker: TypeChecker, type: Type, enclosingDeclaration?: Node, flags: TypeFormatFlags = TypeFormatFlags.None): SymbolDisplayPart[] {
+export function typeToDisplayParts(typechecker: TypeChecker, type: Type, enclosingDeclaration?: Node, flags: TypeFormatFlags = TypeFormatFlags.None, verbosityLevel?: number, out?: WriterContextOut): SymbolDisplayPart[] {
     return mapToDisplayParts(writer => {
-        typechecker.writeType(type, enclosingDeclaration, flags | TypeFormatFlags.MultilineObjectLiterals | TypeFormatFlags.UseAliasDefinedOutsideCurrentScope, writer);
+        typechecker.writeType(type, enclosingDeclaration, flags | TypeFormatFlags.MultilineObjectLiterals | TypeFormatFlags.UseAliasDefinedOutsideCurrentScope, writer, verbosityLevel, out);
     });
 }
 
@@ -4027,7 +4029,13 @@ export function getDefaultLikeExportNameFromDeclaration(symbol: Symbol): string
             return tryCast(d.propertyName, isIdentifier)?.text;
         }
         // GH#52694
-        return tryCast(getNameOfDeclaration(d), isIdentifier)?.text;
+        const name = tryCast(getNameOfDeclaration(d), isIdentifier)?.text;
+        if (name) {
+            return name;
+        }
+        if (symbol.parent && !isExternalModuleSymbol(symbol.parent)) {
+            return symbol.parent.getName();
+        }
     });
 }
 
@@ -4053,7 +4061,7 @@ export function moduleSymbolToValidIdentifier(moduleSymbol: Symbol, target: Scri
 
 /** @internal */
 export function moduleSpecifierToValidIdentifier(moduleSpecifier: string, target: ScriptTarget | undefined, forceCapitalize?: boolean): string {
-    const baseName = getBaseFileName(removeSuffix(moduleSpecifier, "/index"));
+    const baseName = getBaseFileName(removeSuffix(removeFileExtension(moduleSpecifier), "/index"));
     let res = "";
     let lastCharWasValid = true;
     const firstCharCode = baseName.charCodeAt(0);
diff --git a/src/testRunner/unittests/printer.ts b/src/testRunner/unittests/printer.ts
index 2e44c6cb73a3c..cff0ce2e47f3e 100644
--- a/src/testRunner/unittests/printer.ts
+++ b/src/testRunner/unittests/printer.ts
@@ -358,5 +358,13 @@ describe("unittests:: PrinterAPI", () => {
                 ),
                 ts.createSourceFile("source.ts", "", ts.ScriptTarget.ES2015),
             ));
+
+        // https://github.com/microsoft/TypeScript/issues/59150
+        printsCorrectly("template string", {}, printer =>
+            printer.printNode(
+                ts.EmitHint.Unspecified,
+                ts.factory.createNoSubstitutionTemplateLiteral("\n"),
+                ts.createSourceFile("source.ts", "", ts.ScriptTarget.ESNext),
+            ));
     });
 });
diff --git a/src/testRunner/unittests/tsserver/pasteEdits.ts b/src/testRunner/unittests/tsserver/pasteEdits.ts
index 252ceb46c5675..c722a772d40bb 100644
--- a/src/testRunner/unittests/tsserver/pasteEdits.ts
+++ b/src/testRunner/unittests/tsserver/pasteEdits.ts
@@ -46,4 +46,42 @@ const f = r + s;`;
         verifyGetErrRequest({ session, files: [target.path] });
         baselineTsserverLogs("pasteEdits", "adds paste edits", session);
     });
+    it("should not error", () => {
+        const file1: File = {
+            path: "/home/src/projects/project/file1.ts",
+            content: `export const r = 1;
+console.log(r);`,
+        };
+        const tsconfig: File = {
+            path: "/home/src/projects/project/tsconfig.json",
+            content: "{}",
+        };
+        const host = TestServerHost.createServerHost([file1, tsconfig]);
+        const session = new TestSession(host);
+        session.executeCommandSeq<ts.server.protocol.UpdateOpenRequest>({
+            command: ts.server.protocol.CommandTypes.UpdateOpen,
+            arguments: {
+                changedFiles: [],
+                closedFiles: [],
+                openFiles: [
+                    {
+                        file: "^/untitled/ts-nul-authority/Untitled-1",
+                        fileContent: "function foo(){}\r\n     \r\n",
+                        scriptKindName: "TS",
+                    },
+                ],
+            },
+        });
+        session.executeCommandSeq<ts.server.protocol.GetPasteEditsRequest>({
+            command: ts.server.protocol.CommandTypes.GetPasteEdits,
+            arguments: {
+                file: "^/untitled/ts-nul-authority/Untitled-1",
+                pastedText: ["console.log(r);"],
+                pasteLocations: [{ start: { line: 1, offset: 0 }, end: { line: 1, offset: 0 } }],
+                copiedFrom: { file: file1.path, spans: [{ start: { line: 2, offset: 0 }, end: { line: 2, offset: 13 } }] },
+            },
+        });
+        verifyGetErrRequest({ session, files: ["^/untitled/ts-nul-authority/Untitled-1"] });
+        baselineTsserverLogs("pasteEdits", "should not error", session);
+    });
 });
diff --git a/src/tsconfig.json b/src/tsconfig.json
index 0e422305f9d4d..7f4584f9d1d39 100644
--- a/src/tsconfig.json
+++ b/src/tsconfig.json
@@ -2,7 +2,6 @@
     "files": [],
     "include": [],
     "references": [
-        { "path": "./cancellationToken" },
         { "path": "./compiler" },
         { "path": "./deprecatedCompat" },
         { "path": "./harness" },
diff --git a/src/tsserver/nodeServer.ts b/src/tsserver/nodeServer.ts
index 376caaa0e6ae8..69ea459231c2b 100644
--- a/src/tsserver/nodeServer.ts
+++ b/src/tsserver/nodeServer.ts
@@ -275,14 +275,7 @@ export function initializeNodeSystem(): StartInput {
         sys.gc = () => global.gc?.();
     }
 
-    let cancellationToken: ts.server.ServerCancellationToken;
-    try {
-        const factory = require("./cancellationToken.js");
-        cancellationToken = factory(sys.args);
-    }
-    catch {
-        cancellationToken = ts.server.nullCancellationToken;
-    }
+    const cancellationToken = createCancellationToken(sys.args);
 
     const localeStr = ts.server.findArgument("--locale");
     if (localeStr) {
@@ -668,3 +661,60 @@ function startNodeSession(options: StartSessionOptions, logger: ts.server.Logger
         return combinePaths(normalizeSlashes(homePath), cacheFolder);
     }
 }
+
+function pipeExists(name: string): boolean {
+    // Unlike statSync, existsSync doesn't throw an exception if the target doesn't exist.
+    // A comment in the node code suggests they're stuck with that decision for back compat
+    // (https://github.com/nodejs/node/blob/9da241b600182a9ff400f6efc24f11a6303c27f7/lib/fs.js#L222).
+    // Caveat: If a named pipe does exist, the first call to existsSync will return true, as for
+    // statSync.  Subsequent calls will return false, whereas statSync would throw an exception
+    // indicating that the pipe was busy.  The difference is immaterial, since our statSync
+    // implementation returned false from its catch block.
+    return fs.existsSync(name);
+}
+
+function createCancellationToken(args: string[]): ts.server.ServerCancellationToken {
+    let cancellationPipeName: string | undefined;
+    for (let i = 0; i < args.length - 1; i++) {
+        if (args[i] === "--cancellationPipeName") {
+            cancellationPipeName = args[i + 1];
+            break;
+        }
+    }
+    if (!cancellationPipeName) {
+        return ts.server.nullCancellationToken;
+    }
+    // cancellationPipeName is a string without '*' inside that can optionally end with '*'
+    // when client wants to signal cancellation it should create a named pipe with name=<cancellationPipeName>
+    // server will synchronously check the presence of the pipe and treat its existence as indicator that current request should be canceled.
+    // in case if client prefers to use more fine-grained schema than one name for all request it can add '*' to the end of cancellationPipeName.
+    // in this case pipe name will be build dynamically as <cancellationPipeName><request_seq>.
+    if (cancellationPipeName.charAt(cancellationPipeName.length - 1) === "*") {
+        const namePrefix = cancellationPipeName.slice(0, -1);
+        if (namePrefix.length === 0 || namePrefix.includes("*")) {
+            throw new Error("Invalid name for template cancellation pipe: it should have length greater than 2 characters and contain only one '*'.");
+        }
+        let perRequestPipeName: string | undefined;
+        let currentRequestId: number;
+        return {
+            isCancellationRequested: () => perRequestPipeName !== undefined && pipeExists(perRequestPipeName),
+            setRequest(requestId: number) {
+                currentRequestId = requestId;
+                perRequestPipeName = namePrefix + requestId;
+            },
+            resetRequest(requestId: number) {
+                if (currentRequestId !== requestId) {
+                    throw new Error(`Mismatched request id, expected ${currentRequestId}, actual ${requestId}`);
+                }
+                perRequestPipeName = undefined;
+            },
+        };
+    }
+    else {
+        return {
+            isCancellationRequested: () => pipeExists(cancellationPipeName),
+            setRequest: (_requestId: number): void => void 0,
+            resetRequest: (_requestId: number): void => void 0,
+        };
+    }
+}
diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts
index a163c95334266..39acab07efe5c 100644
--- a/tests/baselines/reference/api/typescript.d.ts
+++ b/tests/baselines/reference/api/typescript.d.ts
@@ -123,7 +123,6 @@ declare namespace ts {
                 ProvideInlayHints = "provideInlayHints",
                 WatchChange = "watchChange",
                 MapCode = "mapCode",
-                CopilotRelated = "copilotRelated",
             }
             /**
              * A TypeScript Server message
@@ -1487,6 +1486,10 @@ declare namespace ts {
                 command: CommandTypes.Quickinfo;
                 arguments: FileLocationRequestArgs;
             }
+            export interface QuickInfoRequestArgs extends FileLocationRequestArgs {
+                /** TODO */
+                verbosityLevel?: number;
+            }
             /**
              * Body of QuickInfoResponse.
              */
@@ -1520,6 +1523,10 @@ declare namespace ts {
                  * JSDoc tags associated with symbol.
                  */
                 tags: JSDocTagInfo[];
+                /**
+                 * TODO
+                 */
+                canIncreaseVerbosityLevel?: boolean;
             }
             /**
              * Quickinfo response message.
@@ -1831,16 +1838,6 @@ declare namespace ts {
             export interface MapCodeResponse extends Response {
                 body: readonly FileCodeEdits[];
             }
-            export interface CopilotRelatedRequest extends FileRequest {
-                command: CommandTypes.CopilotRelated;
-                arguments: FileRequestArgs;
-            }
-            export interface CopilotRelatedItems {
-                relatedFiles: readonly string[];
-            }
-            export interface CopilotRelatedResponse extends Response {
-                body: CopilotRelatedItems;
-            }
             /**
              * Synchronous request for semantic diagnostics of one file.
              */
@@ -3644,7 +3641,7 @@ declare namespace ts {
             readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[] | undefined, depth?: number): string[];
         }
     }
-    const versionMajorMinor = "5.7";
+    const versionMajorMinor = "5.8";
     /** The version of the TypeScript compiler release */
     const version: string;
     /**
@@ -7419,8 +7416,9 @@ declare namespace ts {
         NonNullAssertions = 4,
         PartiallyEmittedExpressions = 8,
         ExpressionsWithTypeArguments = 16,
-        Assertions = 6,
-        All = 31,
+        Satisfies = 32,
+        Assertions = 38,
+        All = 63,
         ExcludeJSDocTypeAssertion = -2147483648,
     }
     type ImmediatelyInvokedFunctionExpression = CallExpression & {
@@ -10750,6 +10748,7 @@ declare namespace ts {
         displayParts?: SymbolDisplayPart[];
         documentation?: SymbolDisplayPart[];
         tags?: JSDocTagInfo[];
+        canIncreaseVerbosityLevel?: boolean;
     }
     type RenameInfo = RenameInfoSuccess | RenameInfoFailure;
     interface RenameInfoSuccess {
diff --git a/tests/baselines/reference/arbitraryModuleNamespaceIdentifiers_module(module=node16).js b/tests/baselines/reference/arbitraryModuleNamespaceIdentifiers_module(module=node16).js
index d209a96d665e4..311a983aea48a 100644
--- a/tests/baselines/reference/arbitraryModuleNamespaceIdentifiers_module(module=node16).js
+++ b/tests/baselines/reference/arbitraryModuleNamespaceIdentifiers_module(module=node16).js
@@ -50,13 +50,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 exports["<Z>"] = exports["<Y>"] = exports["<X>"] = void 0;
 const someValue = "someValue";
diff --git a/tests/baselines/reference/arbitraryModuleNamespaceIdentifiers_module(module=nodenext).js b/tests/baselines/reference/arbitraryModuleNamespaceIdentifiers_module(module=nodenext).js
index d209a96d665e4..311a983aea48a 100644
--- a/tests/baselines/reference/arbitraryModuleNamespaceIdentifiers_module(module=nodenext).js
+++ b/tests/baselines/reference/arbitraryModuleNamespaceIdentifiers_module(module=nodenext).js
@@ -50,13 +50,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 exports["<Z>"] = exports["<Y>"] = exports["<X>"] = void 0;
 const someValue = "someValue";
diff --git a/tests/baselines/reference/arrowExpressionBodyJSDoc.errors.txt b/tests/baselines/reference/arrowExpressionBodyJSDoc.errors.txt
new file mode 100644
index 0000000000000..d714c30f4d564
--- /dev/null
+++ b/tests/baselines/reference/arrowExpressionBodyJSDoc.errors.txt
@@ -0,0 +1,26 @@
+mytest.js(6,44): error TS2322: Type 'string' is not assignable to type 'T'.
+  'T' could be instantiated with an arbitrary type which could be unrelated to 'string'.
+mytest.js(13,44): error TS2322: Type 'string' is not assignable to type 'T'.
+  'T' could be instantiated with an arbitrary type which could be unrelated to 'string'.
+
+
+==== mytest.js (2 errors) ====
+    /**
+     * @template T
+     * @param {T|undefined} value value or not
+     * @returns {T} result value
+     */
+    const foo1 = value => /** @type {string} */({ ...value });
+                                               ~~~~~~~~~~~~~~
+!!! 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'.
+    
+    /**
+     * @template T
+     * @param {T|undefined} value value or not
+     * @returns {T} result value
+     */
+    const foo2 = value => /** @type {string} */(/** @type {T} */({ ...value }));
+                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!!! 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'.
\ No newline at end of file
diff --git a/tests/baselines/reference/arrowExpressionBodyJSDoc.symbols b/tests/baselines/reference/arrowExpressionBodyJSDoc.symbols
new file mode 100644
index 0000000000000..ee8c51392263b
--- /dev/null
+++ b/tests/baselines/reference/arrowExpressionBodyJSDoc.symbols
@@ -0,0 +1,23 @@
+//// [tests/cases/compiler/arrowExpressionBodyJSDoc.ts] ////
+
+=== mytest.js ===
+/**
+ * @template T
+ * @param {T|undefined} value value or not
+ * @returns {T} result value
+ */
+const foo1 = value => /** @type {string} */({ ...value });
+>foo1 : Symbol(foo1, Decl(mytest.js, 5, 5))
+>value : Symbol(value, Decl(mytest.js, 5, 12))
+>value : Symbol(value, Decl(mytest.js, 5, 12))
+
+/**
+ * @template T
+ * @param {T|undefined} value value or not
+ * @returns {T} result value
+ */
+const foo2 = value => /** @type {string} */(/** @type {T} */({ ...value }));
+>foo2 : Symbol(foo2, Decl(mytest.js, 12, 5))
+>value : Symbol(value, Decl(mytest.js, 12, 12))
+>value : Symbol(value, Decl(mytest.js, 12, 12))
+
diff --git a/tests/baselines/reference/arrowExpressionBodyJSDoc.types b/tests/baselines/reference/arrowExpressionBodyJSDoc.types
new file mode 100644
index 0000000000000..8e45774cbf4c2
--- /dev/null
+++ b/tests/baselines/reference/arrowExpressionBodyJSDoc.types
@@ -0,0 +1,43 @@
+//// [tests/cases/compiler/arrowExpressionBodyJSDoc.ts] ////
+
+=== mytest.js ===
+/**
+ * @template T
+ * @param {T|undefined} value value or not
+ * @returns {T} result value
+ */
+const foo1 = value => /** @type {string} */({ ...value });
+>foo1 : <T>(value: T | undefined) => T
+>     : ^ ^^     ^^             ^^^^^ 
+>value => /** @type {string} */({ ...value }) : <T>(value: T | undefined) => T
+>                                             : ^ ^^     ^^             ^^^^^ 
+>value : T | undefined
+>      : ^^^^^^^^^^^^^
+>({ ...value }) : string
+>               : ^^^^^^
+>{ ...value } : {}
+>             : ^^
+>value : T | undefined
+>      : ^^^^^^^^^^^^^
+
+/**
+ * @template T
+ * @param {T|undefined} value value or not
+ * @returns {T} result value
+ */
+const foo2 = value => /** @type {string} */(/** @type {T} */({ ...value }));
+>foo2 : <T>(value: T | undefined) => T
+>     : ^ ^^     ^^             ^^^^^ 
+>value => /** @type {string} */(/** @type {T} */({ ...value })) : <T>(value: T | undefined) => T
+>                                                               : ^ ^^     ^^             ^^^^^ 
+>value : T | undefined
+>      : ^^^^^^^^^^^^^
+>(/** @type {T} */({ ...value })) : string
+>                                 : ^^^^^^
+>({ ...value }) : T
+>               : ^
+>{ ...value } : {}
+>             : ^^
+>value : T | undefined
+>      : ^^^^^^^^^^^^^
+
diff --git a/tests/baselines/reference/arrowExpressionJs.symbols b/tests/baselines/reference/arrowExpressionJs.symbols
new file mode 100644
index 0000000000000..db7330acf0c1e
--- /dev/null
+++ b/tests/baselines/reference/arrowExpressionJs.symbols
@@ -0,0 +1,13 @@
+//// [tests/cases/compiler/arrowExpressionJs.ts] ////
+
+=== mytest.js ===
+/**
+ * @template T
+ * @param {T|undefined} value value or not
+ * @returns {T} result value
+ */
+const cloneObjectGood = value => /** @type {T} */({ ...value });
+>cloneObjectGood : Symbol(cloneObjectGood, Decl(mytest.js, 5, 5))
+>value : Symbol(value, Decl(mytest.js, 5, 23))
+>value : Symbol(value, Decl(mytest.js, 5, 23))
+
diff --git a/tests/baselines/reference/arrowExpressionJs.types b/tests/baselines/reference/arrowExpressionJs.types
new file mode 100644
index 0000000000000..33fae21b8bd53
--- /dev/null
+++ b/tests/baselines/reference/arrowExpressionJs.types
@@ -0,0 +1,22 @@
+//// [tests/cases/compiler/arrowExpressionJs.ts] ////
+
+=== mytest.js ===
+/**
+ * @template T
+ * @param {T|undefined} value value or not
+ * @returns {T} result value
+ */
+const cloneObjectGood = value => /** @type {T} */({ ...value });
+>cloneObjectGood : <T>(value: T | undefined) => T
+>                : ^ ^^     ^^             ^^^^^ 
+>value => /** @type {T} */({ ...value }) : <T>(value: T | undefined) => T
+>                                        : ^ ^^     ^^             ^^^^^ 
+>value : T | undefined
+>      : ^^^^^^^^^^^^^
+>({ ...value }) : T
+>               : ^
+>{ ...value } : {}
+>             : ^^
+>value : T | undefined
+>      : ^^^^^^^^^^^^^
+
diff --git a/tests/baselines/reference/arrowFunctionExpressions.types b/tests/baselines/reference/arrowFunctionExpressions.types
index 8bf8f07feb260..cf5973fc84e6f 100644
--- a/tests/baselines/reference/arrowFunctionExpressions.types
+++ b/tests/baselines/reference/arrowFunctionExpressions.types
@@ -245,15 +245,15 @@ class MyClass {
 // Arrow function used in arrow function
 var arrrr = () => (m: number) => () => (n: number) => m + n;
 >arrrr : () => (m: number) => () => (n: number) => number
->      : ^^^^^^^ ^^      ^^^^^^^^^^^^ ^^      ^^^^^^^^^^^
+>      : ^^^^^^^         ^^^^^^^^^^^^         ^^^^^^^^^^^
 >() => (m: number) => () => (n: number) => m + n : () => (m: number) => () => (n: number) => number
->                                                : ^^^^^^^ ^^      ^^^^^^^^^^^^ ^^      ^^^^^^^^^^^
+>                                                : ^^^^^^^         ^^^^^^^^^^^^         ^^^^^^^^^^^
 >(m: number) => () => (n: number) => m + n : (m: number) => () => (n: number) => number
->                                          : ^ ^^      ^^^^^^^^^^^^ ^^      ^^^^^^^^^^^
+>                                          : ^ ^^      ^^^^^^^^^^^^         ^^^^^^^^^^^
 >m : number
 >  : ^^^^^^
 >() => (n: number) => m + n : () => (n: number) => number
->                           : ^^^^^^^ ^^      ^^^^^^^^^^^
+>                           : ^^^^^^^         ^^^^^^^^^^^
 >(n: number) => m + n : (n: number) => number
 >                     : ^ ^^      ^^^^^^^^^^^
 >n : number
@@ -273,11 +273,11 @@ var e = arrrr()(3)()(4);
 >arrrr()(3)() : (n: number) => number
 >             : ^ ^^      ^^^^^^^^^^^
 >arrrr()(3) : () => (n: number) => number
->           : ^^^^^^^ ^^      ^^^^^^^^^^^
+>           : ^^^^^^^         ^^^^^^^^^^^
 >arrrr() : (m: number) => () => (n: number) => number
->        : ^ ^^      ^^^^^^^^^^^^ ^^      ^^^^^^^^^^^
+>        : ^ ^^      ^^^^^^^^^^^^         ^^^^^^^^^^^
 >arrrr : () => (m: number) => () => (n: number) => number
->      : ^^^^^^^ ^^      ^^^^^^^^^^^^ ^^      ^^^^^^^^^^^
+>      : ^^^^^^^         ^^^^^^^^^^^^         ^^^^^^^^^^^
 >3 : 3
 >  : ^
 >4 : 4
@@ -294,9 +294,9 @@ function someFn() {
 
     var arr = (n: number) => (p: number) => p * n;
 >arr : (n: number) => (p: number) => number
->    : ^ ^^      ^^^^^^ ^^      ^^^^^^^^^^^
+>    : ^ ^^      ^^^^^^         ^^^^^^^^^^^
 >(n: number) => (p: number) => p * n : (n: number) => (p: number) => number
->                                    : ^ ^^      ^^^^^^ ^^      ^^^^^^^^^^^
+>                                    : ^ ^^      ^^^^^^         ^^^^^^^^^^^
 >n : number
 >  : ^^^^^^
 >(p: number) => p * n : (p: number) => number
@@ -320,7 +320,7 @@ function someFn() {
 >arr(3) : (p: number) => number
 >       : ^ ^^      ^^^^^^^^^^^
 >arr : (n: number) => (p: number) => number
->    : ^ ^^      ^^^^^^ ^^      ^^^^^^^^^^^
+>    : ^ ^^      ^^^^^^         ^^^^^^^^^^^
 >3 : 3
 >  : ^
 >4 : 4
diff --git a/tests/baselines/reference/asyncIteratorExtraParameters.errors.txt b/tests/baselines/reference/asyncIteratorExtraParameters.errors.txt
new file mode 100644
index 0000000000000..9a2965d54afaf
--- /dev/null
+++ b/tests/baselines/reference/asyncIteratorExtraParameters.errors.txt
@@ -0,0 +1,32 @@
+asyncIteratorExtraParameters.ts(11,27): error TS2504: Type '{ [Symbol.asyncIterator](_: number): AsyncGenerator<number, void, unknown>; }' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
+asyncIteratorExtraParameters.ts(13,12): error TS2504: Type '{ [Symbol.asyncIterator](_: number): AsyncGenerator<number, void, unknown>; }' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
+
+
+==== asyncIteratorExtraParameters.ts (2 errors) ====
+    // https://github.com/microsoft/TypeScript/issues/57130
+    const iter = {
+        async *[Symbol.asyncIterator](_: number) {
+            yield 0;
+        }
+    };
+    
+    declare function g(...args: any): any;
+    
+    async function* f() {
+        for await (const _ of iter);
+                              ~~~~
+!!! error TS2504: Type '{ [Symbol.asyncIterator](_: number): AsyncGenerator<number, void, unknown>; }' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
+!!! related TS2322 asyncIteratorExtraParameters.ts:11:27: Type '{ [Symbol.asyncIterator](_: number): AsyncGenerator<number, void, unknown>; }' is not assignable to type 'AsyncIterable<T, TReturn, TNext>'.
+  Types of property '[Symbol.asyncIterator]' are incompatible.
+    Type '(_: number) => AsyncGenerator<number, void, unknown>' is not assignable to type '() => AsyncIterator<T, TReturn, TNext>'.
+      Target signature provides too few arguments. Expected 1 or more, but got 0.
+    
+        yield* iter;
+               ~~~~
+!!! error TS2504: Type '{ [Symbol.asyncIterator](_: number): AsyncGenerator<number, void, unknown>; }' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
+!!! related TS2322 asyncIteratorExtraParameters.ts:13:12: Type '{ [Symbol.asyncIterator](_: number): AsyncGenerator<number, void, unknown>; }' is not assignable to type 'AsyncIterable<T, TReturn, TNext>'.
+  Types of property '[Symbol.asyncIterator]' are incompatible.
+    Type '(_: number) => AsyncGenerator<number, void, unknown>' is not assignable to type '() => AsyncIterator<T, TReturn, TNext>'.
+      Target signature provides too few arguments. Expected 1 or more, but got 0.
+    }
+    
\ No newline at end of file
diff --git a/tests/baselines/reference/bigintWithLib.errors.txt b/tests/baselines/reference/bigintWithLib.errors.txt
index 4a3ec90cf09f9..be3aed49704a8 100644
--- a/tests/baselines/reference/bigintWithLib.errors.txt
+++ b/tests/baselines/reference/bigintWithLib.errors.txt
@@ -1,39 +1,41 @@
 bigintWithLib.ts(4,1): error TS2350: Only a void function can be called with the 'new' keyword.
-bigintWithLib.ts(19,33): error TS2769: No overload matches this call.
-  Overload 1 of 3, '(length?: number): BigInt64Array<ArrayBuffer>', gave the following error.
-    Argument of type 'number[]' is not assignable to parameter of type 'number'.
-  Overload 2 of 3, '(array: ArrayLike<bigint> | Iterable<bigint>): BigInt64Array<ArrayBuffer>', gave the following error.
-    Argument of type 'number[]' is not assignable to parameter of type 'ArrayLike<bigint> | Iterable<bigint>'.
-      Type 'number[]' is not assignable to type 'Iterable<bigint>'.
-        The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types.
-          Type 'IteratorResult<number, any>' is not assignable to type 'IteratorResult<bigint, any>'.
-            Type 'IteratorYieldResult<number>' is not assignable to type 'IteratorResult<bigint, any>'.
-              Type 'IteratorYieldResult<number>' is not assignable to type 'IteratorYieldResult<bigint>'.
-                Type 'number' is not assignable to type 'bigint'.
-  Overload 3 of 3, '(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigInt64Array<ArrayBufferLike>', gave the following error.
-    Argument of type 'number[]' is not assignable to parameter of type 'ArrayBufferLike'.
-      Type 'number[]' is missing the following properties from type 'SharedArrayBuffer': byteLength, [Symbol.species], [Symbol.toStringTag]
+bigintWithLib.ts(19,34): error TS2769: No overload matches this call.
+  The last overload gave the following error.
+    Type 'number' is not assignable to type 'bigint'.
+      Type 'number' is not assignable to type 'bigint'.
+        Type 'number' is not assignable to type 'bigint'.
+bigintWithLib.ts(19,37): error TS2769: No overload matches this call.
+  The last overload gave the following error.
+    Type 'number' is not assignable to type 'bigint'.
+      Type 'number' is not assignable to type 'bigint'.
+        Type 'number' is not assignable to type 'bigint'.
+bigintWithLib.ts(19,40): error TS2769: No overload matches this call.
+  The last overload gave the following error.
+    Type 'number' is not assignable to type 'bigint'.
+      Type 'number' is not assignable to type 'bigint'.
+        Type 'number' is not assignable to type 'bigint'.
 bigintWithLib.ts(24,13): error TS2540: Cannot assign to 'length' because it is a read-only property.
-bigintWithLib.ts(31,35): error TS2769: No overload matches this call.
-  Overload 1 of 3, '(length?: number): BigUint64Array<ArrayBuffer>', gave the following error.
-    Argument of type 'number[]' is not assignable to parameter of type 'number'.
-  Overload 2 of 3, '(array: ArrayLike<bigint> | Iterable<bigint>): BigUint64Array<ArrayBuffer>', gave the following error.
-    Argument of type 'number[]' is not assignable to parameter of type 'ArrayLike<bigint> | Iterable<bigint>'.
-      Type 'number[]' is not assignable to type 'Iterable<bigint>'.
-        The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types.
-          Type 'IteratorResult<number, any>' is not assignable to type 'IteratorResult<bigint, any>'.
-            Type 'IteratorYieldResult<number>' is not assignable to type 'IteratorResult<bigint, any>'.
-              Type 'IteratorYieldResult<number>' is not assignable to type 'IteratorYieldResult<bigint>'.
-                Type 'number' is not assignable to type 'bigint'.
-  Overload 3 of 3, '(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigUint64Array<ArrayBufferLike>', gave the following error.
-    Argument of type 'number[]' is not assignable to parameter of type 'ArrayBufferLike'.
-      Type 'number[]' is missing the following properties from type 'SharedArrayBuffer': byteLength, [Symbol.species], [Symbol.toStringTag]
+bigintWithLib.ts(31,36): error TS2769: No overload matches this call.
+  The last overload gave the following error.
+    Type 'number' is not assignable to type 'bigint'.
+      Type 'number' is not assignable to type 'bigint'.
+        Type 'number' is not assignable to type 'bigint'.
+bigintWithLib.ts(31,39): error TS2769: No overload matches this call.
+  The last overload gave the following error.
+    Type 'number' is not assignable to type 'bigint'.
+      Type 'number' is not assignable to type 'bigint'.
+        Type 'number' is not assignable to type 'bigint'.
+bigintWithLib.ts(31,42): error TS2769: No overload matches this call.
+  The last overload gave the following error.
+    Type 'number' is not assignable to type 'bigint'.
+      Type 'number' is not assignable to type 'bigint'.
+        Type 'number' is not assignable to type 'bigint'.
 bigintWithLib.ts(36,13): error TS2540: Cannot assign to 'length' because it is a read-only property.
 bigintWithLib.ts(43,25): error TS2345: Argument of type 'number' is not assignable to parameter of type 'bigint'.
 bigintWithLib.ts(46,26): error TS2345: Argument of type 'number' is not assignable to parameter of type 'bigint'.
 
 
-==== bigintWithLib.ts (7 errors) ====
+==== bigintWithLib.ts (11 errors) ====
     // Test BigInt functions
     let bigintVal: bigint = BigInt(123);
     bigintVal = BigInt("456");
@@ -55,21 +57,27 @@ bigintWithLib.ts(46,26): error TS2345: Argument of type 'number' is not assignab
     bigIntArray = new BigInt64Array(10);
     bigIntArray = new BigInt64Array([1n, 2n, 3n]);
     bigIntArray = new BigInt64Array([1, 2, 3]); // should error
-                                    ~~~~~~~~~
+                                     ~
 !!! error TS2769: No overload matches this call.
-!!! error TS2769:   Overload 1 of 3, '(length?: number): BigInt64Array<ArrayBuffer>', gave the following error.
-!!! error TS2769:     Argument of type 'number[]' is not assignable to parameter of type 'number'.
-!!! error TS2769:   Overload 2 of 3, '(array: ArrayLike<bigint> | Iterable<bigint>): BigInt64Array<ArrayBuffer>', gave the following error.
-!!! error TS2769:     Argument of type 'number[]' is not assignable to parameter of type 'ArrayLike<bigint> | Iterable<bigint>'.
-!!! error TS2769:       Type 'number[]' is not assignable to type 'Iterable<bigint>'.
-!!! error TS2769:         The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types.
-!!! error TS2769:           Type 'IteratorResult<number, any>' is not assignable to type 'IteratorResult<bigint, any>'.
-!!! error TS2769:             Type 'IteratorYieldResult<number>' is not assignable to type 'IteratorResult<bigint, any>'.
-!!! error TS2769:               Type 'IteratorYieldResult<number>' is not assignable to type 'IteratorYieldResult<bigint>'.
-!!! error TS2769:                 Type 'number' is not assignable to type 'bigint'.
-!!! error TS2769:   Overload 3 of 3, '(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigInt64Array<ArrayBufferLike>', gave the following error.
-!!! error TS2769:     Argument of type 'number[]' is not assignable to parameter of type 'ArrayBufferLike'.
-!!! error TS2769:       Type 'number[]' is missing the following properties from type 'SharedArrayBuffer': byteLength, [Symbol.species], [Symbol.toStringTag]
+!!! error TS2769:   The last overload gave the following error.
+!!! error TS2769:     Type 'number' is not assignable to type 'bigint'.
+!!! error TS2769:       Type 'number' is not assignable to type 'bigint'.
+!!! error TS2769:         Type 'number' is not assignable to type 'bigint'.
+!!! related TS2771 lib.es2020.bigint.d.ts:--:--: The last overload is declared here.
+                                        ~
+!!! error TS2769: No overload matches this call.
+!!! error TS2769:   The last overload gave the following error.
+!!! error TS2769:     Type 'number' is not assignable to type 'bigint'.
+!!! error TS2769:       Type 'number' is not assignable to type 'bigint'.
+!!! error TS2769:         Type 'number' is not assignable to type 'bigint'.
+!!! related TS2771 lib.es2020.bigint.d.ts:--:--: The last overload is declared here.
+                                           ~
+!!! error TS2769: No overload matches this call.
+!!! error TS2769:   The last overload gave the following error.
+!!! error TS2769:     Type 'number' is not assignable to type 'bigint'.
+!!! error TS2769:       Type 'number' is not assignable to type 'bigint'.
+!!! error TS2769:         Type 'number' is not assignable to type 'bigint'.
+!!! related TS2771 lib.es2020.bigint.d.ts:--:--: The last overload is declared here.
     bigIntArray = new BigInt64Array(new ArrayBuffer(80));
     bigIntArray = new BigInt64Array(new ArrayBuffer(80), 8);
     bigIntArray = new BigInt64Array(new ArrayBuffer(80), 8, 3);
@@ -84,21 +92,27 @@ bigintWithLib.ts(46,26): error TS2345: Argument of type 'number' is not assignab
     bigUintArray = new BigUint64Array(10);
     bigUintArray = new BigUint64Array([1n, 2n, 3n]);
     bigUintArray = new BigUint64Array([1, 2, 3]); // should error
-                                      ~~~~~~~~~
+                                       ~
+!!! error TS2769: No overload matches this call.
+!!! error TS2769:   The last overload gave the following error.
+!!! error TS2769:     Type 'number' is not assignable to type 'bigint'.
+!!! error TS2769:       Type 'number' is not assignable to type 'bigint'.
+!!! error TS2769:         Type 'number' is not assignable to type 'bigint'.
+!!! related TS2771 lib.es2020.bigint.d.ts:--:--: The last overload is declared here.
+                                          ~
+!!! error TS2769: No overload matches this call.
+!!! error TS2769:   The last overload gave the following error.
+!!! error TS2769:     Type 'number' is not assignable to type 'bigint'.
+!!! error TS2769:       Type 'number' is not assignable to type 'bigint'.
+!!! error TS2769:         Type 'number' is not assignable to type 'bigint'.
+!!! related TS2771 lib.es2020.bigint.d.ts:--:--: The last overload is declared here.
+                                             ~
 !!! error TS2769: No overload matches this call.
-!!! error TS2769:   Overload 1 of 3, '(length?: number): BigUint64Array<ArrayBuffer>', gave the following error.
-!!! error TS2769:     Argument of type 'number[]' is not assignable to parameter of type 'number'.
-!!! error TS2769:   Overload 2 of 3, '(array: ArrayLike<bigint> | Iterable<bigint>): BigUint64Array<ArrayBuffer>', gave the following error.
-!!! error TS2769:     Argument of type 'number[]' is not assignable to parameter of type 'ArrayLike<bigint> | Iterable<bigint>'.
-!!! error TS2769:       Type 'number[]' is not assignable to type 'Iterable<bigint>'.
-!!! error TS2769:         The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types.
-!!! error TS2769:           Type 'IteratorResult<number, any>' is not assignable to type 'IteratorResult<bigint, any>'.
-!!! error TS2769:             Type 'IteratorYieldResult<number>' is not assignable to type 'IteratorResult<bigint, any>'.
-!!! error TS2769:               Type 'IteratorYieldResult<number>' is not assignable to type 'IteratorYieldResult<bigint>'.
-!!! error TS2769:                 Type 'number' is not assignable to type 'bigint'.
-!!! error TS2769:   Overload 3 of 3, '(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigUint64Array<ArrayBufferLike>', gave the following error.
-!!! error TS2769:     Argument of type 'number[]' is not assignable to parameter of type 'ArrayBufferLike'.
-!!! error TS2769:       Type 'number[]' is missing the following properties from type 'SharedArrayBuffer': byteLength, [Symbol.species], [Symbol.toStringTag]
+!!! error TS2769:   The last overload gave the following error.
+!!! error TS2769:     Type 'number' is not assignable to type 'bigint'.
+!!! error TS2769:       Type 'number' is not assignable to type 'bigint'.
+!!! error TS2769:         Type 'number' is not assignable to type 'bigint'.
+!!! related TS2771 lib.es2020.bigint.d.ts:--:--: The last overload is declared here.
     bigUintArray = new BigUint64Array(new ArrayBuffer(80));
     bigUintArray = new BigUint64Array(new ArrayBuffer(80), 8);
     bigUintArray = new BigUint64Array(new ArrayBuffer(80), 8, 3);
diff --git a/tests/baselines/reference/bundlerDirectoryModule(moduleresolution=bundler).trace.json b/tests/baselines/reference/bundlerDirectoryModule(moduleresolution=bundler).trace.json
index 21141e3e7ca8d..e76e87c140120 100644
--- a/tests/baselines/reference/bundlerDirectoryModule(moduleresolution=bundler).trace.json
+++ b/tests/baselines/reference/bundlerDirectoryModule(moduleresolution=bundler).trace.json
@@ -1164,6 +1164,21 @@
     "======== Module name '@typescript/lib-esnext/iterator' was not resolved. ========",
     "File '/.ts/package.json' does not exist according to earlier cached lookups.",
     "File '/package.json' does not exist according to earlier cached lookups.",
+    "======== Resolving module '@typescript/lib-esnext/promise' from '/.src/__lib_node_modules_lookup_lib.esnext.promise.d.ts__.ts'. ========",
+    "Explicitly specified module resolution kind: 'Node10'.",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: TypeScript, Declaration.",
+    "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
+    "Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Directory '/node_modules' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: JavaScript.",
+    "Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
+    "Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
+    "Directory '/node_modules' does not exist, skipping all lookups in it.",
+    "======== Module name '@typescript/lib-esnext/promise' was not resolved. ========",
+    "File '/.ts/package.json' does not exist according to earlier cached lookups.",
+    "File '/package.json' does not exist according to earlier cached lookups.",
     "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========",
     "Explicitly specified module resolution kind: 'Node10'.",
     "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.",
diff --git a/tests/baselines/reference/bundlerDirectoryModule(moduleresolution=nodenext).trace.json b/tests/baselines/reference/bundlerDirectoryModule(moduleresolution=nodenext).trace.json
index 3c426eef08b6e..2ab1888dc3d68 100644
--- a/tests/baselines/reference/bundlerDirectoryModule(moduleresolution=nodenext).trace.json
+++ b/tests/baselines/reference/bundlerDirectoryModule(moduleresolution=nodenext).trace.json
@@ -1164,6 +1164,21 @@
     "======== Module name '@typescript/lib-esnext/iterator' was not resolved. ========",
     "File '/.ts/package.json' does not exist according to earlier cached lookups.",
     "File '/package.json' does not exist according to earlier cached lookups.",
+    "======== Resolving module '@typescript/lib-esnext/promise' from '/.src/__lib_node_modules_lookup_lib.esnext.promise.d.ts__.ts'. ========",
+    "Explicitly specified module resolution kind: 'Node10'.",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: TypeScript, Declaration.",
+    "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
+    "Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Directory '/node_modules' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: JavaScript.",
+    "Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
+    "Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
+    "Directory '/node_modules' does not exist, skipping all lookups in it.",
+    "======== Module name '@typescript/lib-esnext/promise' was not resolved. ========",
+    "File '/.ts/package.json' does not exist according to earlier cached lookups.",
+    "File '/package.json' does not exist according to earlier cached lookups.",
     "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========",
     "Explicitly specified module resolution kind: 'Node10'.",
     "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.",
diff --git a/tests/baselines/reference/capturedParametersInInitializers1.types b/tests/baselines/reference/capturedParametersInInitializers1.types
index 62ff31870c52f..ff287cc2aad01 100644
--- a/tests/baselines/reference/capturedParametersInInitializers1.types
+++ b/tests/baselines/reference/capturedParametersInInitializers1.types
@@ -32,7 +32,7 @@ function foo1(y = class {c = x}, x = 1) {
 // ok - used in file
 function foo2(y = function(x: typeof z) {}, z = 1) {
 >foo2 : (y?: (x: typeof z) => void, z?: number) => void
->     : ^ ^^^^ ^^        ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
+>     : ^ ^^^^           ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
 >y : (x: typeof z) => void
 >  : ^ ^^        ^^^^^^^^^
 >function(x: typeof z) {} : (x: typeof z) => void
diff --git a/tests/baselines/reference/classExtendingPrimitive.errors.txt b/tests/baselines/reference/classExtendingPrimitive.errors.txt
index 1dceab8bcd6a6..be4615ff35a26 100644
--- a/tests/baselines/reference/classExtendingPrimitive.errors.txt
+++ b/tests/baselines/reference/classExtendingPrimitive.errors.txt
@@ -7,9 +7,15 @@ classExtendingPrimitive.ts(8,18): error TS2304: Cannot find name 'Null'.
 classExtendingPrimitive.ts(10,18): error TS2507: Type 'undefined' is not a constructor function type.
 classExtendingPrimitive.ts(11,18): error TS2552: Cannot find name 'Undefined'. Did you mean 'undefined'?
 classExtendingPrimitive.ts(14,18): error TS2507: Type 'typeof E' is not a constructor function type.
+classExtendingPrimitive.ts(16,26): error TS2863: A class cannot extend a primitive type like 'number'. Classes can only extend constructable values.
+classExtendingPrimitive.ts(17,27): error TS2863: A class cannot extend a primitive type like 'string'. Classes can only extend constructable values.
+classExtendingPrimitive.ts(18,27): error TS2863: A class cannot extend a primitive type like 'boolean'. Classes can only extend constructable values.
+classExtendingPrimitive.ts(20,29): error TS2863: A class cannot extend a primitive type like 'number'. Classes can only extend constructable values.
+classExtendingPrimitive.ts(21,29): error TS2863: A class cannot extend a primitive type like 'string'. Classes can only extend constructable values.
+classExtendingPrimitive.ts(22,29): error TS2863: A class cannot extend a primitive type like 'boolean'. Classes can only extend constructable values.
 
 
-==== classExtendingPrimitive.ts (9 errors) ====
+==== classExtendingPrimitive.ts (15 errors) ====
     // classes cannot extend primitives
     
     class C extends number { }
@@ -41,4 +47,25 @@ classExtendingPrimitive.ts(14,18): error TS2507: Type 'typeof E' is not a constr
     enum E { A }
     class C8 extends E { }
                      ~
-!!! error TS2507: Type 'typeof E' is not a constructor function type.
\ No newline at end of file
+!!! error TS2507: Type 'typeof E' is not a constructor function type.
+    
+    const C9 = class extends number { }
+                             ~~~~~~
+!!! error TS2863: A class cannot extend a primitive type like 'number'. Classes can only extend constructable values.
+    const C10 = class extends string { }
+                              ~~~~~~
+!!! error TS2863: A class cannot extend a primitive type like 'string'. Classes can only extend constructable values.
+    const C11 = class extends boolean { }
+                              ~~~~~~~
+!!! error TS2863: A class cannot extend a primitive type like 'boolean'. Classes can only extend constructable values.
+    
+    const C12 = class A extends number { }
+                                ~~~~~~
+!!! error TS2863: A class cannot extend a primitive type like 'number'. Classes can only extend constructable values.
+    const C13 = class B extends string { }
+                                ~~~~~~
+!!! error TS2863: A class cannot extend a primitive type like 'string'. Classes can only extend constructable values.
+    const C14 = class C extends boolean { }
+                                ~~~~~~~
+!!! error TS2863: A class cannot extend a primitive type like 'boolean'. Classes can only extend constructable values.
+    
\ No newline at end of file
diff --git a/tests/baselines/reference/classExtendingPrimitive.js b/tests/baselines/reference/classExtendingPrimitive.js
index 86ff82bc42e23..5afe16d1bd274 100644
--- a/tests/baselines/reference/classExtendingPrimitive.js
+++ b/tests/baselines/reference/classExtendingPrimitive.js
@@ -14,7 +14,16 @@ class C6 extends undefined { }
 class C7 extends Undefined { }
 
 enum E { A }
-class C8 extends E { }
+class C8 extends E { }
+
+const C9 = class extends number { }
+const C10 = class extends string { }
+const C11 = class extends boolean { }
+
+const C12 = class A extends number { }
+const C13 = class B extends string { }
+const C14 = class C extends boolean { }
+
 
 //// [classExtendingPrimitive.js]
 // classes cannot extend primitives
@@ -105,3 +114,45 @@ var C8 = /** @class */ (function (_super) {
     }
     return C8;
 }(E));
+var C9 = /** @class */ (function (_super) {
+    __extends(C9, _super);
+    function C9() {
+        return _super !== null && _super.apply(this, arguments) || this;
+    }
+    return C9;
+}(number));
+var C10 = /** @class */ (function (_super) {
+    __extends(C10, _super);
+    function C10() {
+        return _super !== null && _super.apply(this, arguments) || this;
+    }
+    return C10;
+}(string));
+var C11 = /** @class */ (function (_super) {
+    __extends(C11, _super);
+    function C11() {
+        return _super !== null && _super.apply(this, arguments) || this;
+    }
+    return C11;
+}(boolean));
+var C12 = /** @class */ (function (_super) {
+    __extends(A, _super);
+    function A() {
+        return _super !== null && _super.apply(this, arguments) || this;
+    }
+    return A;
+}(number));
+var C13 = /** @class */ (function (_super) {
+    __extends(B, _super);
+    function B() {
+        return _super !== null && _super.apply(this, arguments) || this;
+    }
+    return B;
+}(string));
+var C14 = /** @class */ (function (_super) {
+    __extends(C, _super);
+    function C() {
+        return _super !== null && _super.apply(this, arguments) || this;
+    }
+    return C;
+}(boolean));
diff --git a/tests/baselines/reference/classExtendingPrimitive.symbols b/tests/baselines/reference/classExtendingPrimitive.symbols
index c9bcfad9c7b9c..0b6ccd61faea1 100644
--- a/tests/baselines/reference/classExtendingPrimitive.symbols
+++ b/tests/baselines/reference/classExtendingPrimitive.symbols
@@ -39,3 +39,24 @@ class C8 extends E { }
 >C8 : Symbol(C8, Decl(classExtendingPrimitive.ts, 12, 12))
 >E : Symbol(E, Decl(classExtendingPrimitive.ts, 10, 30))
 
+const C9 = class extends number { }
+>C9 : Symbol(C9, Decl(classExtendingPrimitive.ts, 15, 5))
+
+const C10 = class extends string { }
+>C10 : Symbol(C10, Decl(classExtendingPrimitive.ts, 16, 5))
+
+const C11 = class extends boolean { }
+>C11 : Symbol(C11, Decl(classExtendingPrimitive.ts, 17, 5))
+
+const C12 = class A extends number { }
+>C12 : Symbol(C12, Decl(classExtendingPrimitive.ts, 19, 5))
+>A : Symbol(A, Decl(classExtendingPrimitive.ts, 19, 11))
+
+const C13 = class B extends string { }
+>C13 : Symbol(C13, Decl(classExtendingPrimitive.ts, 20, 5))
+>B : Symbol(B, Decl(classExtendingPrimitive.ts, 20, 11))
+
+const C14 = class C extends boolean { }
+>C14 : Symbol(C14, Decl(classExtendingPrimitive.ts, 21, 5))
+>C : Symbol(C, Decl(classExtendingPrimitive.ts, 21, 11))
+
diff --git a/tests/baselines/reference/classExtendingPrimitive.types b/tests/baselines/reference/classExtendingPrimitive.types
index d3378fb79b2f0..e7d020fa99e88 100644
--- a/tests/baselines/reference/classExtendingPrimitive.types
+++ b/tests/baselines/reference/classExtendingPrimitive.types
@@ -69,3 +69,57 @@ class C8 extends E { }
 >E : typeof E
 >  : ^^^^^^^^
 
+const C9 = class extends number { }
+>C9 : typeof C9
+>   : ^^^^^^^^^
+>class extends number { } : typeof C9
+>                         : ^^^^^^^^^
+>number : any
+>       : ^^^
+
+const C10 = class extends string { }
+>C10 : typeof C10
+>    : ^^^^^^^^^^
+>class extends string { } : typeof C10
+>                         : ^^^^^^^^^^
+>string : any
+>       : ^^^
+
+const C11 = class extends boolean { }
+>C11 : typeof C11
+>    : ^^^^^^^^^^
+>class extends boolean { } : typeof C11
+>                          : ^^^^^^^^^^
+>boolean : any
+>        : ^^^
+
+const C12 = class A extends number { }
+>C12 : typeof A
+>    : ^^^^^^^^
+>class A extends number { } : typeof A
+>                           : ^^^^^^^^
+>A : typeof A
+>  : ^^^^^^^^
+>number : any
+>       : ^^^
+
+const C13 = class B extends string { }
+>C13 : typeof B
+>    : ^^^^^^^^
+>class B extends string { } : typeof B
+>                           : ^^^^^^^^
+>B : typeof B
+>  : ^^^^^^^^
+>string : any
+>       : ^^^
+
+const C14 = class C extends boolean { }
+>C14 : typeof C
+>    : ^^^^^^^^
+>class C extends boolean { } : typeof C
+>                            : ^^^^^^^^
+>C : typeof C
+>  : ^^^^^^^^
+>boolean : any
+>        : ^^^
+
diff --git a/tests/baselines/reference/classImplementsPrimitive.errors.txt b/tests/baselines/reference/classImplementsPrimitive.errors.txt
index 1ad273ca481a2..166053a24a367 100644
--- a/tests/baselines/reference/classImplementsPrimitive.errors.txt
+++ b/tests/baselines/reference/classImplementsPrimitive.errors.txt
@@ -1,9 +1,15 @@
 classImplementsPrimitive.ts(3,20): error TS2864: A class cannot implement a primitive type like 'number'. It can only implement other named object types.
 classImplementsPrimitive.ts(4,21): error TS2864: A class cannot implement a primitive type like 'string'. It can only implement other named object types.
 classImplementsPrimitive.ts(5,21): error TS2864: A class cannot implement a primitive type like 'boolean'. It can only implement other named object types.
+classImplementsPrimitive.ts(7,29): error TS2864: A class cannot implement a primitive type like 'number'. It can only implement other named object types.
+classImplementsPrimitive.ts(8,29): error TS2864: A class cannot implement a primitive type like 'string'. It can only implement other named object types.
+classImplementsPrimitive.ts(9,29): error TS2864: A class cannot implement a primitive type like 'boolean'. It can only implement other named object types.
+classImplementsPrimitive.ts(11,31): error TS2864: A class cannot implement a primitive type like 'number'. It can only implement other named object types.
+classImplementsPrimitive.ts(12,31): error TS2864: A class cannot implement a primitive type like 'string'. It can only implement other named object types.
+classImplementsPrimitive.ts(13,31): error TS2864: A class cannot implement a primitive type like 'boolean'. It can only implement other named object types.
 
 
-==== classImplementsPrimitive.ts (3 errors) ====
+==== classImplementsPrimitive.ts (9 errors) ====
     // classes cannot implement primitives
     
     class C implements number { }
@@ -14,4 +20,25 @@ classImplementsPrimitive.ts(5,21): error TS2864: A class cannot implement a prim
 !!! error TS2864: A class cannot implement a primitive type like 'string'. It can only implement other named object types.
     class C3 implements boolean { }
                         ~~~~~~~
-!!! error TS2864: A class cannot implement a primitive type like 'boolean'. It can only implement other named object types.
\ No newline at end of file
+!!! error TS2864: A class cannot implement a primitive type like 'boolean'. It can only implement other named object types.
+    
+    const C4 = class implements number {}
+                                ~~~~~~
+!!! error TS2864: A class cannot implement a primitive type like 'number'. It can only implement other named object types.
+    const C5 = class implements string {}
+                                ~~~~~~
+!!! error TS2864: A class cannot implement a primitive type like 'string'. It can only implement other named object types.
+    const C6 = class implements boolean {}
+                                ~~~~~~~
+!!! error TS2864: A class cannot implement a primitive type like 'boolean'. It can only implement other named object types.
+    
+    const C7 = class A implements number { }
+                                  ~~~~~~
+!!! error TS2864: A class cannot implement a primitive type like 'number'. It can only implement other named object types.
+    const C8 = class B implements string { }
+                                  ~~~~~~
+!!! error TS2864: A class cannot implement a primitive type like 'string'. It can only implement other named object types.
+    const C9 = class C implements boolean { }
+                                  ~~~~~~~
+!!! error TS2864: A class cannot implement a primitive type like 'boolean'. It can only implement other named object types.
+    
\ No newline at end of file
diff --git a/tests/baselines/reference/classImplementsPrimitive.js b/tests/baselines/reference/classImplementsPrimitive.js
index c8daf7b6d17eb..e99e0061bcdef 100644
--- a/tests/baselines/reference/classImplementsPrimitive.js
+++ b/tests/baselines/reference/classImplementsPrimitive.js
@@ -5,7 +5,16 @@
 
 class C implements number { }
 class C2 implements string { }
-class C3 implements boolean { }
+class C3 implements boolean { }
+
+const C4 = class implements number {}
+const C5 = class implements string {}
+const C6 = class implements boolean {}
+
+const C7 = class A implements number { }
+const C8 = class B implements string { }
+const C9 = class C implements boolean { }
+
 
 //// [classImplementsPrimitive.js]
 // classes cannot implement primitives
@@ -24,3 +33,33 @@ var C3 = /** @class */ (function () {
     }
     return C3;
 }());
+var C4 = /** @class */ (function () {
+    function class_1() {
+    }
+    return class_1;
+}());
+var C5 = /** @class */ (function () {
+    function class_2() {
+    }
+    return class_2;
+}());
+var C6 = /** @class */ (function () {
+    function class_3() {
+    }
+    return class_3;
+}());
+var C7 = /** @class */ (function () {
+    function A() {
+    }
+    return A;
+}());
+var C8 = /** @class */ (function () {
+    function B() {
+    }
+    return B;
+}());
+var C9 = /** @class */ (function () {
+    function C() {
+    }
+    return C;
+}());
diff --git a/tests/baselines/reference/classImplementsPrimitive.symbols b/tests/baselines/reference/classImplementsPrimitive.symbols
index b749f8423a134..b979d2b6eeb9d 100644
--- a/tests/baselines/reference/classImplementsPrimitive.symbols
+++ b/tests/baselines/reference/classImplementsPrimitive.symbols
@@ -12,3 +12,24 @@ class C2 implements string { }
 class C3 implements boolean { }
 >C3 : Symbol(C3, Decl(classImplementsPrimitive.ts, 3, 30))
 
+const C4 = class implements number {}
+>C4 : Symbol(C4, Decl(classImplementsPrimitive.ts, 6, 5))
+
+const C5 = class implements string {}
+>C5 : Symbol(C5, Decl(classImplementsPrimitive.ts, 7, 5))
+
+const C6 = class implements boolean {}
+>C6 : Symbol(C6, Decl(classImplementsPrimitive.ts, 8, 5))
+
+const C7 = class A implements number { }
+>C7 : Symbol(C7, Decl(classImplementsPrimitive.ts, 10, 5))
+>A : Symbol(A, Decl(classImplementsPrimitive.ts, 10, 10))
+
+const C8 = class B implements string { }
+>C8 : Symbol(C8, Decl(classImplementsPrimitive.ts, 11, 5))
+>B : Symbol(B, Decl(classImplementsPrimitive.ts, 11, 10))
+
+const C9 = class C implements boolean { }
+>C9 : Symbol(C9, Decl(classImplementsPrimitive.ts, 12, 5))
+>C : Symbol(C, Decl(classImplementsPrimitive.ts, 12, 10))
+
diff --git a/tests/baselines/reference/classImplementsPrimitive.types b/tests/baselines/reference/classImplementsPrimitive.types
index 7847e207a4cf2..f7bcaada228a5 100644
--- a/tests/baselines/reference/classImplementsPrimitive.types
+++ b/tests/baselines/reference/classImplementsPrimitive.types
@@ -15,3 +15,45 @@ class C3 implements boolean { }
 >C3 : C3
 >   : ^^
 
+const C4 = class implements number {}
+>C4 : typeof C4
+>   : ^^^^^^^^^
+>class implements number {} : typeof C4
+>                           : ^^^^^^^^^
+
+const C5 = class implements string {}
+>C5 : typeof C5
+>   : ^^^^^^^^^
+>class implements string {} : typeof C5
+>                           : ^^^^^^^^^
+
+const C6 = class implements boolean {}
+>C6 : typeof C6
+>   : ^^^^^^^^^
+>class implements boolean {} : typeof C6
+>                            : ^^^^^^^^^
+
+const C7 = class A implements number { }
+>C7 : typeof A
+>   : ^^^^^^^^
+>class A implements number { } : typeof A
+>                              : ^^^^^^^^
+>A : typeof A
+>  : ^^^^^^^^
+
+const C8 = class B implements string { }
+>C8 : typeof B
+>   : ^^^^^^^^
+>class B implements string { } : typeof B
+>                              : ^^^^^^^^
+>B : typeof B
+>  : ^^^^^^^^
+
+const C9 = class C implements boolean { }
+>C9 : typeof C
+>   : ^^^^^^^^
+>class C implements boolean { } : typeof C
+>                               : ^^^^^^^^
+>C : typeof C
+>  : ^^^^^^^^
+
diff --git a/tests/baselines/reference/collisionSuperAndParameter.types b/tests/baselines/reference/collisionSuperAndParameter.types
index 89a68d08615d5..5abe135cd301f 100644
--- a/tests/baselines/reference/collisionSuperAndParameter.types
+++ b/tests/baselines/reference/collisionSuperAndParameter.types
@@ -11,9 +11,9 @@ class Foo {
 
         var lamda = (_super: number) => { // No Error 
 >lamda : (_super: number) => (x: any) => this
->      : ^      ^^      ^^^^^^ ^^^^^^^^^^^^^^
+>      : ^      ^^      ^^^^^^   ^^^^^^^^^^^^
 >(_super: number) => { // No Error             return x => this;   // New scope.  So should inject new _this capture        } : (_super: number) => (x: any) => this
->                                                                                                                             : ^      ^^      ^^^^^^ ^^^^^^^^^^^^^^
+>                                                                                                                             : ^      ^^      ^^^^^^   ^^^^^^^^^^^^
 >_super : number
 >       : ^^^^^^
 
@@ -33,9 +33,9 @@ class Foo {
 
         var lambda = () => {
 >lambda : () => (x: any) => this
->       : ^^^^^^^ ^^^^^^^^^^^^^^
+>       : ^^^^^^^   ^^^^^^^^^^^^
 >() => {            return x => this;   // New scope.  So should inject new _this capture        } : () => (x: any) => this
->                                                                                                  : ^^^^^^^ ^^^^^^^^^^^^^^
+>                                                                                                  : ^^^^^^^   ^^^^^^^^^^^^
 
             return x => this;   // New scope.  So should inject new _this capture
 >x => this : (x: any) => this
@@ -64,9 +64,9 @@ class Foo2 extends Foo {
 
         var lamda = (_super: number) => { // Error 
 >lamda : (_super: number) => (x: any) => this
->      : ^      ^^      ^^^^^^ ^^^^^^^^^^^^^^
+>      : ^      ^^      ^^^^^^   ^^^^^^^^^^^^
 >(_super: number) => { // Error             return x => this;   // New scope.  So should inject new _this capture        } : (_super: number) => (x: any) => this
->                                                                                                                          : ^      ^^      ^^^^^^ ^^^^^^^^^^^^^^
+>                                                                                                                          : ^      ^^      ^^^^^^   ^^^^^^^^^^^^
 >_super : number
 >       : ^^^^^^
 
@@ -86,9 +86,9 @@ class Foo2 extends Foo {
 
         var lambda = () => {
 >lambda : () => (x: any) => this
->       : ^^^^^^^ ^^^^^^^^^^^^^^
+>       : ^^^^^^^   ^^^^^^^^^^^^
 >() => {            return x => this;   // New scope.  So should inject new _this capture        } : () => (x: any) => this
->                                                                                                  : ^^^^^^^ ^^^^^^^^^^^^^^
+>                                                                                                  : ^^^^^^^   ^^^^^^^^^^^^
 
             return x => this;   // New scope.  So should inject new _this capture
 >x => this : (x: any) => this
@@ -218,9 +218,9 @@ class Foo4 extends Foo {
 
         var lambda = () => {
 >lambda : () => (x: any) => this
->       : ^^^^^^^ ^^^^^^^^^^^^^^
+>       : ^^^^^^^   ^^^^^^^^^^^^
 >() => {            return x => this;   // New scope.  So should inject new _this capture        } : () => (x: any) => this
->                                                                                                  : ^^^^^^^ ^^^^^^^^^^^^^^
+>                                                                                                  : ^^^^^^^   ^^^^^^^^^^^^
 
             return x => this;   // New scope.  So should inject new _this capture
 >x => this : (x: any) => this
diff --git a/tests/baselines/reference/collisionThisExpressionAndNameResolution.types b/tests/baselines/reference/collisionThisExpressionAndNameResolution.types
index 0d19a7433a8f9..f5be0d8e65e03 100644
--- a/tests/baselines/reference/collisionThisExpressionAndNameResolution.types
+++ b/tests/baselines/reference/collisionThisExpressionAndNameResolution.types
@@ -26,7 +26,7 @@ class Foo {
 
         function inner() {
 >inner : () => (x: any) => any
->      : ^^^^^^^ ^^^^^^^^^^^^^
+>      : ^^^^^^^   ^^^^^^^^^^^
 
             console.log(_this); // Error as this doesnt not resolve to user defined _this
 >console.log(_this) : any
diff --git a/tests/baselines/reference/collisionThisExpressionAndParameter.types b/tests/baselines/reference/collisionThisExpressionAndParameter.types
index 2b2b0f1c9fe22..fe3d1066117b4 100644
--- a/tests/baselines/reference/collisionThisExpressionAndParameter.types
+++ b/tests/baselines/reference/collisionThisExpressionAndParameter.types
@@ -17,7 +17,7 @@ class Foo {
 
         function inner(_this: number) { // Error 
 >inner : (_this: number) => (x: any) => any
->      : ^     ^^      ^^^^^^ ^^^^^^^^^^^^^
+>      : ^     ^^      ^^^^^^   ^^^^^^^^^^^
 >_this : number
 >      : ^^^^^^
 
@@ -34,9 +34,9 @@ class Foo {
 
         var lamda = (_this: number) => { // Error 
 >lamda : (_this: number) => (x: any) => this
->      : ^     ^^      ^^^^^^ ^^^^^^^^^^^^^^
+>      : ^     ^^      ^^^^^^   ^^^^^^^^^^^^
 >(_this: number) => { // Error             return x => this;   // New scope.  So should inject new _this capture        } : (_this: number) => (x: any) => this
->                                                                                                                         : ^     ^^      ^^^^^^ ^^^^^^^^^^^^^^
+>                                                                                                                         : ^     ^^      ^^^^^^   ^^^^^^^^^^^^
 >_this : number
 >      : ^^^^^^
 
@@ -56,9 +56,9 @@ class Foo {
 
         var lambda = () => {
 >lambda : () => (x: any) => this
->       : ^^^^^^^ ^^^^^^^^^^^^^^
+>       : ^^^^^^^   ^^^^^^^^^^^^
 >() => {            return x => this;   // New scope.  So should inject new _this capture        } : () => (x: any) => this
->                                                                                                  : ^^^^^^^ ^^^^^^^^^^^^^^
+>                                                                                                  : ^^^^^^^   ^^^^^^^^^^^^
 
             return x => this;   // New scope.  So should inject new _this capture
 >x => this : (x: any) => this
@@ -257,9 +257,9 @@ class Foo3 {
 
         var lambda = () => {
 >lambda : () => (x: any) => this
->       : ^^^^^^^ ^^^^^^^^^^^^^^
+>       : ^^^^^^^   ^^^^^^^^^^^^
 >() => {            return x => this;   // New scope.  So should inject new _this capture        } : () => (x: any) => this
->                                                                                                  : ^^^^^^^ ^^^^^^^^^^^^^^
+>                                                                                                  : ^^^^^^^   ^^^^^^^^^^^^
 
             return x => this;   // New scope.  So should inject new _this capture
 >x => this : (x: any) => this
diff --git a/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.types b/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.types
index 42ef5b77e46e4..91479f0c4d34b 100644
--- a/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.types
+++ b/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.types
@@ -11,9 +11,9 @@ class Foo2 {
 
         var lambda = () => {
 >lambda : () => (x: any) => this
->       : ^^^^^^^ ^^^^^^^^^^^^^^
+>       : ^^^^^^^   ^^^^^^^^^^^^
 >() => {            return x => this;   // New scope.  So should inject new _this capture        } : () => (x: any) => this
->                                                                                                  : ^^^^^^^ ^^^^^^^^^^^^^^
+>                                                                                                  : ^^^^^^^   ^^^^^^^^^^^^
 
             return x => this;   // New scope.  So should inject new _this capture
 >x => this : (x: any) => this
@@ -35,9 +35,9 @@ class Foo3 {
 
         var lambda = () => {
 >lambda : () => (x: any) => this
->       : ^^^^^^^ ^^^^^^^^^^^^^^
+>       : ^^^^^^^   ^^^^^^^^^^^^
 >() => {            return x => this;   // New scope.  So should inject new _this capture        } : () => (x: any) => this
->                                                                                                  : ^^^^^^^ ^^^^^^^^^^^^^^
+>                                                                                                  : ^^^^^^^   ^^^^^^^^^^^^
 
             return x => this;   // New scope.  So should inject new _this capture
 >x => this : (x: any) => this
@@ -66,9 +66,9 @@ class Foo4 {
 
         var lambda = () => {
 >lambda : () => (x: any) => this
->       : ^^^^^^^ ^^^^^^^^^^^^^^
+>       : ^^^^^^^   ^^^^^^^^^^^^
 >() => {            return x => this;   // New scope.  So should inject new _this capture        } : () => (x: any) => this
->                                                                                                  : ^^^^^^^ ^^^^^^^^^^^^^^
+>                                                                                                  : ^^^^^^^   ^^^^^^^^^^^^
 
             return x => this;   // New scope.  So should inject new _this capture
 >x => this : (x: any) => this
@@ -97,9 +97,9 @@ class Foo5 {
 
         var lambda = () => {
 >lambda : () => (x: any) => this
->       : ^^^^^^^ ^^^^^^^^^^^^^^
+>       : ^^^^^^^   ^^^^^^^^^^^^
 >() => {            return x => this;   // New scope.  So should inject new _this capture        } : () => (x: any) => this
->                                                                                                  : ^^^^^^^ ^^^^^^^^^^^^^^
+>                                                                                                  : ^^^^^^^   ^^^^^^^^^^^^
 
             return x => this;   // New scope.  So should inject new _this capture
 >x => this : (x: any) => this
diff --git a/tests/baselines/reference/commentsFunction.js b/tests/baselines/reference/commentsFunction.js
index 852490d0d8330..bc1e901995cd9 100644
--- a/tests/baselines/reference/commentsFunction.js
+++ b/tests/baselines/reference/commentsFunction.js
@@ -111,9 +111,9 @@ b: number): void;
 /** fooFunc
  * comment
  */
-declare var fooFunc: (b: string) => string;
-declare var lambdaFoo: (a: number, b: number) => number;
-declare var lambddaNoVarComment: (a: number, b: number) => number;
+declare var fooFunc: (/** fooFunctionValue param */ b: string) => string;
+declare var lambdaFoo: (/**param a*/ a: number, /**param b*/ b: number) => number;
+declare var lambddaNoVarComment: (/**param a*/ a: number, /**param b*/ b: number) => number;
 declare function blah(a: string): void;
 declare function blah2(a: string): void;
 declare function blah3(a: string): void;
diff --git a/tests/baselines/reference/computedPropertiesWithSetterAssignment.js b/tests/baselines/reference/computedPropertiesWithSetterAssignment.js
new file mode 100644
index 0000000000000..6c61698aa026e
--- /dev/null
+++ b/tests/baselines/reference/computedPropertiesWithSetterAssignment.js
@@ -0,0 +1,32 @@
+//// [tests/cases/compiler/computedPropertiesWithSetterAssignment.ts] ////
+
+//// [a.ts]
+const k = Symbol();
+
+const enum Props {
+    k = 'k',
+}
+
+interface Foo {
+    get k(): Set<string>;
+    set k(v: Iterable<string>);
+
+    get [k](): Set<string>;
+    set [k](v: Iterable<string>);
+}
+
+declare const foo: Foo;
+
+foo.k = ['foo'];
+foo['k'] = ['foo'];
+foo[Props.k] = ['foo'];
+foo[k] = ['foo'];
+
+
+//// [a.js]
+"use strict";
+const k = Symbol();
+foo.k = ['foo'];
+foo['k'] = ['foo'];
+foo["k" /* Props.k */] = ['foo'];
+foo[k] = ['foo'];
diff --git a/tests/baselines/reference/computedPropertiesWithSetterAssignment.symbols b/tests/baselines/reference/computedPropertiesWithSetterAssignment.symbols
new file mode 100644
index 0000000000000..cc82a9dc99a58
--- /dev/null
+++ b/tests/baselines/reference/computedPropertiesWithSetterAssignment.symbols
@@ -0,0 +1,61 @@
+//// [tests/cases/compiler/computedPropertiesWithSetterAssignment.ts] ////
+
+=== /a.ts ===
+const k = Symbol();
+>k : Symbol(k, Decl(a.ts, 0, 5))
+>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2019.symbol.d.ts, --, --))
+
+const enum Props {
+>Props : Symbol(Props, Decl(a.ts, 0, 19))
+
+    k = 'k',
+>k : Symbol(Props.k, Decl(a.ts, 2, 18))
+}
+
+interface Foo {
+>Foo : Symbol(Foo, Decl(a.ts, 4, 1))
+
+    get k(): Set<string>;
+>k : Symbol(Foo.k, Decl(a.ts, 6, 15), Decl(a.ts, 7, 25))
+>Set : Symbol(Set, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.esnext.collection.d.ts, --, --))
+
+    set k(v: Iterable<string>);
+>k : Symbol(Foo.k, Decl(a.ts, 6, 15), Decl(a.ts, 7, 25))
+>v : Symbol(v, Decl(a.ts, 8, 10))
+>Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --))
+
+    get [k](): Set<string>;
+>[k] : Symbol(Foo[k], Decl(a.ts, 8, 31), Decl(a.ts, 10, 27))
+>k : Symbol(k, Decl(a.ts, 0, 5))
+>Set : Symbol(Set, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.esnext.collection.d.ts, --, --))
+
+    set [k](v: Iterable<string>);
+>[k] : Symbol(Foo[k], Decl(a.ts, 8, 31), Decl(a.ts, 10, 27))
+>k : Symbol(k, Decl(a.ts, 0, 5))
+>v : Symbol(v, Decl(a.ts, 11, 12))
+>Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --))
+}
+
+declare const foo: Foo;
+>foo : Symbol(foo, Decl(a.ts, 14, 13))
+>Foo : Symbol(Foo, Decl(a.ts, 4, 1))
+
+foo.k = ['foo'];
+>foo.k : Symbol(Foo.k, Decl(a.ts, 6, 15), Decl(a.ts, 7, 25))
+>foo : Symbol(foo, Decl(a.ts, 14, 13))
+>k : Symbol(Foo.k, Decl(a.ts, 6, 15), Decl(a.ts, 7, 25))
+
+foo['k'] = ['foo'];
+>foo : Symbol(foo, Decl(a.ts, 14, 13))
+>'k' : Symbol(Foo.k, Decl(a.ts, 6, 15), Decl(a.ts, 7, 25))
+
+foo[Props.k] = ['foo'];
+>foo : Symbol(foo, Decl(a.ts, 14, 13))
+>Props.k : Symbol(Props.k, Decl(a.ts, 2, 18))
+>Props : Symbol(Props, Decl(a.ts, 0, 19))
+>k : Symbol(Props.k, Decl(a.ts, 2, 18))
+
+foo[k] = ['foo'];
+>foo : Symbol(foo, Decl(a.ts, 14, 13))
+>k : Symbol(k, Decl(a.ts, 0, 5))
+
diff --git a/tests/baselines/reference/computedPropertiesWithSetterAssignment.types b/tests/baselines/reference/computedPropertiesWithSetterAssignment.types
new file mode 100644
index 0000000000000..92c0df4cfc46d
--- /dev/null
+++ b/tests/baselines/reference/computedPropertiesWithSetterAssignment.types
@@ -0,0 +1,112 @@
+//// [tests/cases/compiler/computedPropertiesWithSetterAssignment.ts] ////
+
+=== /a.ts ===
+const k = Symbol();
+>k : unique symbol
+>  : ^^^^^^^^^^^^^
+>Symbol() : unique symbol
+>         : ^^^^^^^^^^^^^
+>Symbol : SymbolConstructor
+>       : ^^^^^^^^^^^^^^^^^
+
+const enum Props {
+>Props : Props
+>      : ^^^^^
+
+    k = 'k',
+>k : Props.k
+>  : ^^^^^^^
+>'k' : "k"
+>    : ^^^
+}
+
+interface Foo {
+    get k(): Set<string>;
+>k : Set<string>
+>  : ^^^^^^^^^^^
+
+    set k(v: Iterable<string>);
+>k : Set<string>
+>  : ^^^^^^^^^^^
+>v : Iterable<string>
+>  : ^^^^^^^^^^^^^^^^
+
+    get [k](): Set<string>;
+>[k] : Set<string>
+>    : ^^^^^^^^^^^
+>k : unique symbol
+>  : ^^^^^^^^^^^^^
+
+    set [k](v: Iterable<string>);
+>[k] : Set<string>
+>    : ^^^^^^^^^^^
+>k : unique symbol
+>  : ^^^^^^^^^^^^^
+>v : Iterable<string>
+>  : ^^^^^^^^^^^^^^^^
+}
+
+declare const foo: Foo;
+>foo : Foo
+>    : ^^^
+
+foo.k = ['foo'];
+>foo.k = ['foo'] : string[]
+>                : ^^^^^^^^
+>foo.k : Iterable<string>
+>      : ^^^^^^^^^^^^^^^^
+>foo : Foo
+>    : ^^^
+>k : Iterable<string>
+>  : ^^^^^^^^^^^^^^^^
+>['foo'] : string[]
+>        : ^^^^^^^^
+>'foo' : "foo"
+>      : ^^^^^
+
+foo['k'] = ['foo'];
+>foo['k'] = ['foo'] : string[]
+>                   : ^^^^^^^^
+>foo['k'] : Iterable<string>
+>         : ^^^^^^^^^^^^^^^^
+>foo : Foo
+>    : ^^^
+>'k' : "k"
+>    : ^^^
+>['foo'] : string[]
+>        : ^^^^^^^^
+>'foo' : "foo"
+>      : ^^^^^
+
+foo[Props.k] = ['foo'];
+>foo[Props.k] = ['foo'] : string[]
+>                       : ^^^^^^^^
+>foo[Props.k] : Iterable<string>
+>             : ^^^^^^^^^^^^^^^^
+>foo : Foo
+>    : ^^^
+>Props.k : Props
+>        : ^^^^^
+>Props : typeof Props
+>      : ^^^^^^^^^^^^
+>k : Props
+>  : ^^^^^
+>['foo'] : string[]
+>        : ^^^^^^^^
+>'foo' : "foo"
+>      : ^^^^^
+
+foo[k] = ['foo'];
+>foo[k] = ['foo'] : string[]
+>                 : ^^^^^^^^
+>foo[k] : Iterable<string>
+>       : ^^^^^^^^^^^^^^^^
+>foo : Foo
+>    : ^^^
+>k : unique symbol
+>  : ^^^^^^^^^^^^^
+>['foo'] : string[]
+>        : ^^^^^^^^
+>'foo' : "foo"
+>      : ^^^^^
+
diff --git a/tests/baselines/reference/contextualSignatureInstantiation2.types b/tests/baselines/reference/contextualSignatureInstantiation2.types
index fac97d12fd2a1..234c4c03cf122 100644
--- a/tests/baselines/reference/contextualSignatureInstantiation2.types
+++ b/tests/baselines/reference/contextualSignatureInstantiation2.types
@@ -18,11 +18,11 @@ var dot: <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T) => (_: U) => S;
 
 dot = <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T): (r:U) => S => (x) => f(g(x));
 >dot = <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T): (r:U) => S => (x) => f(g(x)) : <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T) => (r: U) => S
->                                                                                  : ^ ^^ ^^ ^^           ^^^^^^ ^^ ^^           ^^^^^           
+>                                                                                  : ^ ^^ ^^ ^^           ^^^^^^ ^^              ^^^^^           
 >dot : <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T) => (_: U) => S
 >    : ^ ^^ ^^ ^^           ^^^^^                                  
 ><T, S>(f: (_: T) => S) => <U>(g: (_: U) => T): (r:U) => S => (x) => f(g(x)) : <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T) => (r: U) => S
->                                                                            : ^ ^^ ^^ ^^           ^^^^^^ ^^ ^^           ^^^^^           
+>                                                                            : ^ ^^ ^^ ^^           ^^^^^^ ^^              ^^^^^           
 >f : (_: T) => S
 >  : ^ ^^ ^^^^^ 
 >_ : T
diff --git a/tests/baselines/reference/contextualTypingOfAccessors.types b/tests/baselines/reference/contextualTypingOfAccessors.types
index fe8faed1bf275..6c0553f064c0f 100644
--- a/tests/baselines/reference/contextualTypingOfAccessors.types
+++ b/tests/baselines/reference/contextualTypingOfAccessors.types
@@ -16,11 +16,11 @@ var x: {
  
 x = {
 >x = {   get foo() {      return (n)=>n   },   set foo(x) {}} : { foo: (n: any) => any; }
->                                                             : ^^^^^^^^ ^^^^^^^^^^^^^^^^
+>                                                             : ^^^^^^^^   ^^^^^^^^^^^^^^
 >x : { foo: (x: number) => number; }
 >  : ^^^^^^^                     ^^^
 >{   get foo() {      return (n)=>n   },   set foo(x) {}} : { foo: (n: any) => any; }
->                                                         : ^^^^^^^^ ^^^^^^^^^^^^^^^^
+>                                                         : ^^^^^^^^   ^^^^^^^^^^^^^^
 
    get foo() {
 >foo : (n: any) => any
diff --git a/tests/baselines/reference/declFileTypeofFunction.js b/tests/baselines/reference/declFileTypeofFunction.js
index 18677389f33c8..bc2e82a5dfa41 100644
--- a/tests/baselines/reference/declFileTypeofFunction.js
+++ b/tests/baselines/reference/declFileTypeofFunction.js
@@ -70,6 +70,6 @@ declare function b1(): typeof b1;
 declare function foo(): typeof foo;
 declare var foo1: typeof foo;
 declare var foo2: typeof foo;
-declare var foo3: () => /*elided*/ any;
-declare var x: () => /*elided*/ any;
+declare var foo3: () => () => /*elided*/ any;
+declare var x: () => () => /*elided*/ any;
 declare function foo5(x: number): (x: number) => number;
diff --git a/tests/baselines/reference/declarationEmitArrowFunctionNoRenaming.types b/tests/baselines/reference/declarationEmitArrowFunctionNoRenaming.types
index e32387d3034e5..a2a24ee132d77 100644
--- a/tests/baselines/reference/declarationEmitArrowFunctionNoRenaming.types
+++ b/tests/baselines/reference/declarationEmitArrowFunctionNoRenaming.types
@@ -22,11 +22,11 @@ export type BoundedInteger<
 
 export const toBoundedInteger =
 >toBoundedInteger : <LowerBound extends number, UpperBound extends number>(bounds: { lowerBound: LowerBound; upperBound: UpperBound; }) => (n: number) => BoundedInteger<LowerBound, UpperBound>
->                 : ^          ^^^^^^^^^      ^^          ^^^^^^^^^      ^^      ^^                                                   ^^^^^^ ^^      ^^^^^                                      
+>                 : ^          ^^^^^^^^^      ^^          ^^^^^^^^^      ^^      ^^                                                   ^^^^^^         ^^^^^                                      
 
   <LowerBound extends number, UpperBound extends number>(bounds: {
 ><LowerBound extends number, UpperBound extends number>(bounds: {    lowerBound: LowerBound;    upperBound: UpperBound;  }) =>  (    n: number  ): BoundedInteger<LowerBound, UpperBound> =>  // Implementation doesn't matter here    ({} as any) : <LowerBound extends number, UpperBound extends number>(bounds: { lowerBound: LowerBound; upperBound: UpperBound; }) => (n: number) => BoundedInteger<LowerBound, UpperBound>
->                                                                                                                                                                                                                                                  : ^          ^^^^^^^^^      ^^          ^^^^^^^^^      ^^      ^^                                                   ^^^^^^ ^^      ^^^^^                                      
+>                                                                                                                                                                                                                                                  : ^          ^^^^^^^^^      ^^          ^^^^^^^^^      ^^      ^^                                                   ^^^^^^         ^^^^^                                      
 >bounds : { lowerBound: LowerBound; upperBound: UpperBound; }
 >       : ^^^^^^^^^^^^^^          ^^^^^^^^^^^^^^          ^^^
 
diff --git a/tests/baselines/reference/declarationEmitBindingPatternsUnused.types b/tests/baselines/reference/declarationEmitBindingPatternsUnused.types
index 69b207c307985..3f68149ee430a 100644
--- a/tests/baselines/reference/declarationEmitBindingPatternsUnused.types
+++ b/tests/baselines/reference/declarationEmitBindingPatternsUnused.types
@@ -169,7 +169,7 @@ function referencedInInferredType({ name: alias }: Named) {
 
 function referencedInNestedFunction({ name: alias }: Named) {
 >referencedInNestedFunction : ({ name: alias }: Named) => (p: typeof alias) => void
->                           : ^               ^^     ^^^^^^ ^^            ^^^^^^^^^
+>                           : ^               ^^     ^^^^^^               ^^^^^^^^^
 >name : any
 >     : ^^^
 >alias : string
diff --git a/tests/baselines/reference/declarationEmitClassMemberNameConflict.types b/tests/baselines/reference/declarationEmitClassMemberNameConflict.types
index 185a6f7838d06..5547bba484afb 100644
--- a/tests/baselines/reference/declarationEmitClassMemberNameConflict.types
+++ b/tests/baselines/reference/declarationEmitClassMemberNameConflict.types
@@ -11,7 +11,7 @@ export class C1 {
 
     bar() {
 >bar : () => (t: typeof C1) => void
->    : ^^^^^^^ ^^         ^^^^^^^^^
+>    : ^^^^^^^            ^^^^^^^^^
 
         return function (t: typeof C1) {
 >function (t: typeof C1) {        } : (t: typeof C1) => void
@@ -34,7 +34,7 @@ export class C2 {
 
     bar() {
 >bar : () => (t: typeof C2) => void
->    : ^^^^^^^ ^^         ^^^^^^^^^
+>    : ^^^^^^^            ^^^^^^^^^
 
         return function (t: typeof C2) {
 >function (t: typeof C2) {        } : (t: typeof C2) => void
@@ -60,7 +60,7 @@ export class C3 {
 
     bar() {
 >bar : () => (t: typeof C3) => void
->    : ^^^^^^^ ^^         ^^^^^^^^^
+>    : ^^^^^^^            ^^^^^^^^^
 
         return function (t: typeof C3) {
 >function (t: typeof C3) {        } : (t: typeof C3) => void
@@ -84,7 +84,7 @@ export class C4 {
 
     bar() {
 >bar : () => (t: typeof C4) => void
->    : ^^^^^^^ ^^         ^^^^^^^^^
+>    : ^^^^^^^            ^^^^^^^^^
 
         return function (t: typeof C4) {
 >function (t: typeof C4) {        } : (t: typeof C4) => void
diff --git a/tests/baselines/reference/declarationEmitExactOptionalPropertyTypesNodeNotReused(exactoptionalpropertytypes=false).types b/tests/baselines/reference/declarationEmitExactOptionalPropertyTypesNodeNotReused(exactoptionalpropertytypes=false).types
index 05a99feaa034b..920a55e8332e7 100644
--- a/tests/baselines/reference/declarationEmitExactOptionalPropertyTypesNodeNotReused(exactoptionalpropertytypes=false).types
+++ b/tests/baselines/reference/declarationEmitExactOptionalPropertyTypesNodeNotReused(exactoptionalpropertytypes=false).types
@@ -35,9 +35,9 @@ type Out = InexactOptionals<In>
 
 const foo = <A = {}>() => (x: Out & A) => null
 >foo : <A = {}>() => (x: Out & A) => null
->    : ^ ^^^^^^^^^^^^^ ^^       ^^^^^^^^^
+>    : ^ ^^^^^^^^^^^^^          ^^^^^^^^^
 ><A = {}>() => (x: Out & A) => null : <A = {}>() => (x: Out & A) => null
->                                   : ^ ^^^^^^^^^^^^^ ^^       ^^^^^^^^^
+>                                   : ^ ^^^^^^^^^^^^^          ^^^^^^^^^
 >(x: Out & A) => null : (x: Out & A) => null
 >                     : ^ ^^       ^^^^^^^^^
 >x : { foo?: string | undefined; baz?: undefined; } & { bar: number; } & A
@@ -49,5 +49,5 @@ export const baddts = foo()
 >foo() : (x: { foo?: string | undefined; baz?: undefined; } & { bar: number; }) => null
 >      : ^ ^^^^^^^^^^      ^^^^^^^^^^^^^^^^^^^^         ^^^^^^^^^^^^^      ^^^^^^^^^^^^
 >foo : <A = {}>() => (x: Out & A) => null
->    : ^ ^^^^^^^^^^^^^ ^^       ^^^^^^^^^
+>    : ^ ^^^^^^^^^^^^^          ^^^^^^^^^
 
diff --git a/tests/baselines/reference/declarationEmitExactOptionalPropertyTypesNodeNotReused(exactoptionalpropertytypes=true).types b/tests/baselines/reference/declarationEmitExactOptionalPropertyTypesNodeNotReused(exactoptionalpropertytypes=true).types
index 05a99feaa034b..920a55e8332e7 100644
--- a/tests/baselines/reference/declarationEmitExactOptionalPropertyTypesNodeNotReused(exactoptionalpropertytypes=true).types
+++ b/tests/baselines/reference/declarationEmitExactOptionalPropertyTypesNodeNotReused(exactoptionalpropertytypes=true).types
@@ -35,9 +35,9 @@ type Out = InexactOptionals<In>
 
 const foo = <A = {}>() => (x: Out & A) => null
 >foo : <A = {}>() => (x: Out & A) => null
->    : ^ ^^^^^^^^^^^^^ ^^       ^^^^^^^^^
+>    : ^ ^^^^^^^^^^^^^          ^^^^^^^^^
 ><A = {}>() => (x: Out & A) => null : <A = {}>() => (x: Out & A) => null
->                                   : ^ ^^^^^^^^^^^^^ ^^       ^^^^^^^^^
+>                                   : ^ ^^^^^^^^^^^^^          ^^^^^^^^^
 >(x: Out & A) => null : (x: Out & A) => null
 >                     : ^ ^^       ^^^^^^^^^
 >x : { foo?: string | undefined; baz?: undefined; } & { bar: number; } & A
@@ -49,5 +49,5 @@ export const baddts = foo()
 >foo() : (x: { foo?: string | undefined; baz?: undefined; } & { bar: number; }) => null
 >      : ^ ^^^^^^^^^^      ^^^^^^^^^^^^^^^^^^^^         ^^^^^^^^^^^^^      ^^^^^^^^^^^^
 >foo : <A = {}>() => (x: Out & A) => null
->    : ^ ^^^^^^^^^^^^^ ^^       ^^^^^^^^^
+>    : ^ ^^^^^^^^^^^^^          ^^^^^^^^^
 
diff --git a/tests/baselines/reference/declarationEmitResolveTypesIfNotReusable.types b/tests/baselines/reference/declarationEmitResolveTypesIfNotReusable.types
index 9df830887a44a..4579c067ade2f 100644
--- a/tests/baselines/reference/declarationEmitResolveTypesIfNotReusable.types
+++ b/tests/baselines/reference/declarationEmitResolveTypesIfNotReusable.types
@@ -79,9 +79,9 @@ import * as d  from './decl'
 
 export const f = {...d}
 >f : { o1: (o: "value of b") => void; o2: (o: "value of a") => void; o3: (o: "value of a") => void; o4: (o: "b" | "notNecessary") => void; }
->  : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>  : ^^^^^^^   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >{...d} : { o1: (o: "value of b") => void; o2: (o: "value of a") => void; o3: (o: "value of a") => void; o4: (o: "b" | "notNecessary") => void; }
->       : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>       : ^^^^^^^   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >d : typeof d
 >  : ^^^^^^^^
 
diff --git a/tests/baselines/reference/declarationEmitTypeofRest.errors.txt b/tests/baselines/reference/declarationEmitTypeofRest.errors.txt
deleted file mode 100644
index 671d90c009509..0000000000000
--- a/tests/baselines/reference/declarationEmitTypeofRest.errors.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-v2.ts(2,14): error TS2527: The inferred type of 'v2' references an inaccessible 'unique symbol' type. A type annotation is necessary.
-
-
-==== v1.ts (0 errors) ====
-    export const v1 = (...a: [n: "n", a: "a"]): {
-        /** r rest param */
-        a: typeof a,
-    } => {
-        return null!
-    }
-    
-==== v2.ts (1 errors) ====
-    const n = Symbol();
-    export const v2 = (...a: [n: "n", a: "a"]): {
-                 ~~
-!!! error TS2527: The inferred type of 'v2' references an inaccessible 'unique symbol' type. A type annotation is necessary.
-        /** r rest param */
-        a: typeof a,
-        /** module var */
-        n: typeof n,
-    } => {
-        return null!
-    }
\ No newline at end of file
diff --git a/tests/baselines/reference/declarationEmitTypeofRest.js b/tests/baselines/reference/declarationEmitTypeofRest.js
index 58fd7016fec89..a4d7a92dd6283 100644
--- a/tests/baselines/reference/declarationEmitTypeofRest.js
+++ b/tests/baselines/reference/declarationEmitTypeofRest.js
@@ -31,7 +31,16 @@ export const v2 = (...a) => {
 
 
 //// [v1.d.ts]
-export declare const v1: (n: "n", a: "a") => {
+export declare const v1: (...a: [n: "n", a: "a"]) => {
     /** r rest param */
-    a: [n: "n", a: "a"];
+    a: typeof a;
 };
+//// [v2.d.ts]
+declare const n: unique symbol;
+export declare const v2: (...a: [n: "n", a: "a"]) => {
+    /** r rest param */
+    a: typeof a;
+    /** module var */
+    n: typeof n;
+};
+export {};
diff --git a/tests/baselines/reference/decoratedBlockScopedClass1.types b/tests/baselines/reference/decoratedBlockScopedClass1.types
index 47a19bafffca6..641268c7bee86 100644
--- a/tests/baselines/reference/decoratedBlockScopedClass1.types
+++ b/tests/baselines/reference/decoratedBlockScopedClass1.types
@@ -3,7 +3,7 @@
 === a.ts ===
 function decorator() {
 >decorator : () => (target: new (...args: any[]) => any) => void
->          : ^^^^^^^      ^^                           ^^^^^^^^^
+>          : ^^^^^^^                                   ^^^^^^^^^
 
     return (target: new (...args: any[]) => any) => {}
 >(target: new (...args: any[]) => any) => {} : (target: new (...args: any[]) => any) => void
@@ -18,7 +18,7 @@ function decorator() {
 >decorator() : (target: new (...args: any[]) => any) => void
 >            : ^      ^^                           ^^^^^^^^^
 >decorator : () => (target: new (...args: any[]) => any) => void
->          : ^^^^^^^      ^^                           ^^^^^^^^^
+>          : ^^^^^^^                                   ^^^^^^^^^
 
 class Foo {
 >Foo : Foo
diff --git a/tests/baselines/reference/decoratedBlockScopedClass2.types b/tests/baselines/reference/decoratedBlockScopedClass2.types
index 70bf8dc0c7748..271242a6fa09e 100644
--- a/tests/baselines/reference/decoratedBlockScopedClass2.types
+++ b/tests/baselines/reference/decoratedBlockScopedClass2.types
@@ -3,7 +3,7 @@
 === a.ts ===
 function decorator() {
 >decorator : () => (target: new (...args: any[]) => any) => void
->          : ^^^^^^^      ^^                           ^^^^^^^^^
+>          : ^^^^^^^                                   ^^^^^^^^^
 
     return (target: new (...args: any[]) => any) => {}
 >(target: new (...args: any[]) => any) => {} : (target: new (...args: any[]) => any) => void
@@ -19,7 +19,7 @@ try {
 >decorator() : (target: new (...args: any[]) => any) => void
 >            : ^      ^^                           ^^^^^^^^^
 >decorator : () => (target: new (...args: any[]) => any) => void
->          : ^^^^^^^      ^^                           ^^^^^^^^^
+>          : ^^^^^^^                                   ^^^^^^^^^
 
     class Foo {
 >Foo : Foo
diff --git a/tests/baselines/reference/decoratedBlockScopedClass3.types b/tests/baselines/reference/decoratedBlockScopedClass3.types
index 278663628cbe3..5018dcd3677aa 100644
--- a/tests/baselines/reference/decoratedBlockScopedClass3.types
+++ b/tests/baselines/reference/decoratedBlockScopedClass3.types
@@ -3,7 +3,7 @@
 === a.ts ===
 function decorator() {
 >decorator : () => (target: new (...args: any[]) => any) => void
->          : ^^^^^^^      ^^                           ^^^^^^^^^
+>          : ^^^^^^^                                   ^^^^^^^^^
 
     return (target: new (...args: any[]) => any) => {}
 >(target: new (...args: any[]) => any) => {} : (target: new (...args: any[]) => any) => void
@@ -18,7 +18,7 @@ function decorator() {
 >decorator() : (target: new (...args: any[]) => any) => void
 >            : ^      ^^                           ^^^^^^^^^
 >decorator : () => (target: new (...args: any[]) => any) => void
->          : ^^^^^^^      ^^                           ^^^^^^^^^
+>          : ^^^^^^^                                   ^^^^^^^^^
 
 class Foo {
 >Foo : Foo
@@ -50,7 +50,7 @@ try {
 >decorator() : (target: new (...args: any[]) => any) => void
 >            : ^      ^^                           ^^^^^^^^^
 >decorator : () => (target: new (...args: any[]) => any) => void
->          : ^^^^^^^      ^^                           ^^^^^^^^^
+>          : ^^^^^^^                                   ^^^^^^^^^
 
     class Foo {
 >Foo : Foo
diff --git a/tests/baselines/reference/decoratorInstantiateModulesInFunctionBodies.types b/tests/baselines/reference/decoratorInstantiateModulesInFunctionBodies.types
index 6bc3ddc2675eb..a060963cd35b3 100644
--- a/tests/baselines/reference/decoratorInstantiateModulesInFunctionBodies.types
+++ b/tests/baselines/reference/decoratorInstantiateModulesInFunctionBodies.types
@@ -15,7 +15,7 @@ import { test } from './a';
 
 function filter(handler: any) {
 >filter : (handler: any) => (target: any, propertyKey: string) => void
->       : ^       ^^   ^^^^^^      ^^   ^^           ^^      ^^^^^^^^^
+>       : ^       ^^   ^^^^^^           ^^                   ^^^^^^^^^
 >handler : any
 
     return function (target: any, propertyKey: string) {
@@ -37,7 +37,7 @@ class Wat {
 >filter(() => test == 'abc') : (target: any, propertyKey: string) => void
 >                            : ^      ^^   ^^           ^^      ^^^^^^^^^
 >filter : (handler: any) => (target: any, propertyKey: string) => void
->       : ^       ^^   ^^^^^^      ^^   ^^           ^^      ^^^^^^^^^
+>       : ^       ^^   ^^^^^^           ^^                   ^^^^^^^^^
 >() => test == 'abc' : () => boolean
 >                    : ^^^^^^^^^^^^^
 >test == 'abc' : boolean
diff --git a/tests/baselines/reference/dependentReturnType1.errors.txt b/tests/baselines/reference/dependentReturnType1.errors.txt
new file mode 100644
index 0000000000000..4513ccb75cf29
--- /dev/null
+++ b/tests/baselines/reference/dependentReturnType1.errors.txt
@@ -0,0 +1,645 @@
+dependentReturnType1.ts(11,9): error TS2322: Type 'number' is not assignable to type 'A[T]'.
+  Type 'number' is not assignable to type 'string'.
+dependentReturnType1.ts(26,9): error TS2322: Type '""' is not assignable to type 'C[T]'.
+  Type '""' is not assignable to type 'never'.
+dependentReturnType1.ts(35,9): error TS2322: Type '""' is not assignable to type 'never'.
+dependentReturnType1.ts(69,9): error TS2322: Type '{ a: "a"; b: "b"; c: "c"; d: "d"; e: "e"; f: "f"; }' is not assignable to type 'T extends 1 ? One : T extends 2 ? Two : T extends 3 ? Three : Four'.
+dependentReturnType1.ts(71,5): error TS2322: Type '{ a: "a"; b: "b"; c: "c"; d: "d"; e: "e"; f: "f"; g: "g"; }' is not assignable to type 'T extends 1 ? One : T extends 2 ? Two : T extends 3 ? Three : Four'.
+dependentReturnType1.ts(80,22): error TS2353: Object literal may only specify known properties, and 'b' does not exist in type 'Three & Four'.
+dependentReturnType1.ts(96,9): error TS2322: Type 'LeftOut' is not assignable to type 'Arg extends LeftIn ? LeftOut : Arg extends RightIn ? RightOut : never'.
+dependentReturnType1.ts(98,9): error TS2322: Type 'RightOut' is not assignable to type 'Arg extends LeftIn ? LeftOut : Arg extends RightIn ? RightOut : never'.
+dependentReturnType1.ts(115,9): error TS2322: Type 'number' is not assignable to type 'T extends Dog ? number : string'.
+dependentReturnType1.ts(117,5): error TS2322: Type 'string' is not assignable to type 'T extends Dog ? number : string'.
+dependentReturnType1.ts(152,13): error TS2322: Type 'string' is not assignable to type 'T extends string ? this : T extends undefined ? string : never'.
+dependentReturnType1.ts(154,9): error TS2322: Type 'this' is not assignable to type 'T extends string ? this : T extends undefined ? string : never'.
+  Type 'Unnamed' is not assignable to type 'T extends string ? this : T extends undefined ? string : never'.
+dependentReturnType1.ts(169,13): error TS2322: Type 'this' is not assignable to type 'string'.
+  Type 'Unnamed' is not assignable to type 'string'.
+dependentReturnType1.ts(172,9): error TS2322: Type 'T & {}' is not assignable to type 'this'.
+  'this' could be instantiated with an arbitrary type which could be unrelated to 'T & {}'.
+dependentReturnType1.ts(206,24): error TS2322: Type 'string' is not assignable to type 'number'.
+dependentReturnType1.ts(206,28): error TS2322: Type 'number' is not assignable to type 'string'.
+dependentReturnType1.ts(243,9): error TS2322: Type '""' is not assignable to type 'T extends 1 | 2 ? T extends 1 ? string : T extends 2 ? boolean : never : T extends 3 ? number : never'.
+dependentReturnType1.ts(245,9): error TS2322: Type 'true' is not assignable to type 'T extends 1 | 2 ? T extends 1 ? string : T extends 2 ? boolean : never : T extends 3 ? number : never'.
+dependentReturnType1.ts(247,5): error TS2322: Type '3' is not assignable to type 'T extends 1 | 2 ? T extends 1 ? string : T extends 2 ? boolean : never : T extends 3 ? number : never'.
+dependentReturnType1.ts(275,9): error TS2322: Type '1' is not assignable to type 'HelperCond<{ x: U; y: V; }, { x: string; y: true; }, 1, { x: number; y: false; }, 2>'.
+dependentReturnType1.ts(278,9): error TS2322: Type '2' is not assignable to type 'HelperCond<{ x: U; y: V; }, { x: string; y: true; }, 1, { x: number; y: false; }, 2>'.
+dependentReturnType1.ts(280,5): error TS2322: Type '0' is not assignable to type 'HelperCond<{ x: U; y: V; }, { x: string; y: true; }, 1, { x: number; y: false; }, 2>'.
+dependentReturnType1.ts(302,9): error TS2322: Type 'string' is not assignable to type 'string[]'.
+dependentReturnType1.ts(311,9): error TS2322: Type 'undefined' is not assignable to type 'T extends {} ? void : T extends undefined ? number : never'.
+dependentReturnType1.ts(313,5): error TS2322: Type 'number' is not assignable to type 'T extends {} ? void : T extends undefined ? number : never'.
+dependentReturnType1.ts(334,9): error TS2322: Type '1' is not assignable to type '4'.
+dependentReturnType1.ts(367,13): error TS2322: Type 'number' is not assignable to type 'T extends 1 ? number : T extends 2 ? string : never'.
+dependentReturnType1.ts(369,9): error TS2322: Type 'string' is not assignable to type 'T extends 1 ? number : T extends 2 ? string : never'.
+dependentReturnType1.ts(392,9): error TS2322: Type '2' is not assignable to type 'T extends true ? 1 : T extends false ? 2 : never'.
+dependentReturnType1.ts(402,13): error TS2322: Type 'number' is not assignable to type 'string'.
+dependentReturnType1.ts(412,9): error TS2322: Type 'true' is not assignable to type 'T extends [infer R] ? R : T extends number ? boolean : never'.
+dependentReturnType1.ts(414,5): error TS2322: Type '""' is not assignable to type 'T extends [infer R] ? R : T extends number ? boolean : never'.
+dependentReturnType1.ts(439,15): error TS2322: Type '1' is not assignable to type 'T extends true ? 1 : T extends false ? 2 : never'.
+dependentReturnType1.ts(441,11): error TS2322: Type '2' is not assignable to type 'T extends true ? 1 : T extends false ? 2 : never'.
+dependentReturnType1.ts(470,13): error TS2322: Type 'R' is not assignable to type 'ConditionalReturnType<T, R, EOp>'.
+dependentReturnType1.ts(472,13): error TS2322: Type 'R' is not assignable to type 'ConditionalReturnType<T, R, EOp>'.
+dependentReturnType1.ts(474,13): error TS2322: Type 'T' is not assignable to type 'ConditionalReturnType<T, R, EOp>'.
+dependentReturnType1.ts(488,9): error TS2322: Type 'R' is not assignable to type 'ConditionalReturnType<T, R, EOp>'.
+dependentReturnType1.ts(514,5): error TS2322: Type '1' is not assignable to type 'never'.
+
+
+==== dependentReturnType1.ts (39 errors) ====
+    interface A {
+        1: number;
+        2: string;
+    }
+    
+    function f1<T extends 1 | 2>(x: T): A[T] {
+        if (x === 1) {
+            return 0; // Ok
+        }
+        else {
+            return 1; // Error
+            ~~~~~~
+!!! error TS2322: Type 'number' is not assignable to type 'A[T]'.
+!!! error TS2322:   Type 'number' is not assignable to type 'string'.
+        }
+    }
+    
+    interface C {
+        1: number;
+        2: string;
+        3: boolean;
+    }
+    
+    function f2<T extends 1 | 2 | 3>(x: T): C[T] {
+        if (x === 1) {
+            return 0; // Ok
+        }
+        else {
+            return ""; // Error, returned expression needs to have type string & boolean (= never)
+            ~~~~~~
+!!! error TS2322: Type '""' is not assignable to type 'C[T]'.
+!!! error TS2322:   Type '""' is not assignable to type 'never'.
+        }
+    }
+    
+    function f3<T extends 1 | 2 | 3>(x: T): T extends 1 ? number : T extends 2 ? string : T extends 3 ? boolean : never {
+        if (x === 1) {
+            return 0; // Ok
+        }
+        else {
+            return ""; // Error, returned expression needs to have type string & boolean (= never)
+            ~~~~~~
+!!! error TS2322: Type '""' is not assignable to type 'never'.
+        }
+    }
+    
+    interface One {
+        a: "a";
+        b: "b";
+        c: "c";
+        d: "d";
+    }
+    
+    interface Two {
+        a: "a";
+        b: "b";
+        e: "e";
+        f: "f";
+    }
+    
+    interface Three {
+        a: "a";
+        c: "c";
+        e: "e";
+        g: "g";
+    }
+    
+    interface Four {
+        a: "a";
+        d: "d";
+        f: "f";
+        g: "g";
+    }
+    // Badly written conditional return type, will not trigger narrowing
+    function f10<T extends 1 | 2 | 3 | 4>(x: T): T extends 1 ? One : T extends 2 ? Two : T extends 3 ? Three : Four {
+        if (x === 1 || x === 2) {
+            return { a: "a", b: "b", c: "c", d: "d", e: "e", f: "f" }; // Error
+            ~~~~~~
+!!! error TS2322: Type '{ a: "a"; b: "b"; c: "c"; d: "d"; e: "e"; f: "f"; }' is not assignable to type 'T extends 1 ? One : T extends 2 ? Two : T extends 3 ? Three : Four'.
+        }
+        return { a: "a", b: "b", c: "c", d: "d", e: "e", f: "f", g: "g" }; // Error
+        ~~~~~~
+!!! error TS2322: Type '{ a: "a"; b: "b"; c: "c"; d: "d"; e: "e"; f: "f"; g: "g"; }' is not assignable to type 'T extends 1 ? One : T extends 2 ? Two : T extends 3 ? Three : Four'.
+    }
+    // Well written conditional
+    function f101<T extends 1 | 2 | 3 | 4>(x: T): T extends 1 ? One : T extends 2 ? Two : T extends 3 ? Three : T extends 4 ? Four : never {
+        if (x === 1 || x === 2) {
+            return { a: "a", b: "b", c: "c", d: "d", e: "e", f: "f" }; // Ok
+        }
+        // Excess property becomes a problem with the change,
+        // because we now check assignability to a narrower type...
+        return { a: "a", b: "b", c: "c", d: "d", e: "e", f: "f", g: "g" }; // EPC Error
+                         ~
+!!! error TS2353: Object literal may only specify known properties, and 'b' does not exist in type 'Three & Four'.
+    }
+    
+    // This will not work for several reasons:
+    // - first because the constraint of type parameter `Arg` is generic,
+    //   so attempting to narrow the type of `arg` in the `if` would result in type `Arg & LeftIn`,
+    //   which when substituted in the conditional return type, would not further resolve that conditional type
+    // - second because the `else` branch would never work because we don't narrow the type of `arg` to `Arg & RightIn` 
+    function conditionalProducingIf<LeftIn, RightIn, LeftOut, RightOut, Arg extends LeftIn | RightIn>(
+        arg: Arg,
+        cond: (arg: LeftIn | RightIn) => arg is LeftIn,
+        produceLeftOut: (arg: LeftIn) => LeftOut,
+        produceRightOut: (arg: RightIn) => RightOut):
+        Arg extends LeftIn ? LeftOut : Arg extends RightIn ? RightOut : never
+    {
+        if (cond(arg)) {
+            return produceLeftOut(arg);
+            ~~~~~~
+!!! error TS2322: Type 'LeftOut' is not assignable to type 'Arg extends LeftIn ? LeftOut : Arg extends RightIn ? RightOut : never'.
+        } else {
+            return produceRightOut(arg as RightIn);
+            ~~~~~~
+!!! error TS2322: Type 'RightOut' is not assignable to type 'Arg extends LeftIn ? LeftOut : Arg extends RightIn ? RightOut : never'.
+        }
+    }
+    
+    interface Animal {
+        name: string;
+    }
+    
+    interface Dog extends Animal {
+        bark: () => string;
+    }
+    
+    // This would be unsafe to narrow.
+    declare function isDog(x: Animal): x is Dog;
+    declare function doggy(x: Dog): number;
+    function f12<T extends Animal>(x: T): T extends Dog ? number : string {
+        if (isDog(x)) { // `x` has type `T & Dog` here
+            return doggy(x);
+            ~~~~~~
+!!! error TS2322: Type 'number' is not assignable to type 'T extends Dog ? number : string'.
+        }
+        return ""; // Error: Should not work because we can't express "not a Dog" in the type system
+        ~~~~~~
+!!! error TS2322: Type 'string' is not assignable to type 'T extends Dog ? number : string'.
+    }
+    
+    // Cannot narrow `keyof` too eagerly or something like the below breaks
+    function f<Entry extends { [index: string]: number | boolean }, EntryId extends keyof Entry>(entry: EntryId): Entry[EntryId] {
+        const entries = {} as Entry;
+        return entries[entry];
+    }
+    
+    // Works the same as before
+    declare function takeA(val: 'A'): void;
+    export function bounceAndTakeIfA<AB extends 'A' | 'B'>(value: AB): AB {
+        if (value === 'A') {
+            takeA(value);
+            takeAB(value);
+            return value;
+        }
+    
+        return value;
+        function takeAB(val: AB): void {}
+    }
+    
+    // Works the same as before
+    export function bbb<AB extends "a" | "b">(value: AB): "a" {
+        if (value === "a") {
+            return value;
+        }
+        return "a";
+    }
+    
+    class Unnamed {
+        root!: { name: string };
+        // Error: No narrowing because parameter is optional but `T` doesn't allow for undefined
+        name<T extends string>(name?: T): T extends string ? this : T extends undefined ? string : never {
+            if (typeof name === 'undefined') {
+                return this.root.name;
+                ~~~~~~
+!!! error TS2322: Type 'string' is not assignable to type 'T extends string ? this : T extends undefined ? string : never'.
+            }
+            return this;
+            ~~~~~~
+!!! error TS2322: Type 'this' is not assignable to type 'T extends string ? this : T extends undefined ? string : never'.
+!!! error TS2322:   Type 'Unnamed' is not assignable to type 'T extends string ? this : T extends undefined ? string : never'.
+        }
+    
+        // Good conditional
+        name2<T extends string | undefined>(name?: T): T extends string ? this : T extends undefined ? string : never {
+            if (typeof name === 'undefined') {
+                return this.root.name; // Ok
+            }
+            this.root.name = name;
+            return this; // Ok
+        }
+    
+        // Good conditional, wrong return expressions
+        name3<T extends string | undefined>(name?: T): T extends string ? this : T extends undefined ? string : never {
+            if (typeof name === 'undefined') {
+                return this; // Error
+                ~~~~~~
+!!! error TS2322: Type 'this' is not assignable to type 'string'.
+!!! error TS2322:   Type 'Unnamed' is not assignable to type 'string'.
+            }
+            this.root.name = name;
+            return name; // Error
+            ~~~~~~
+!!! error TS2322: Type 'T & {}' is not assignable to type 'this'.
+!!! error TS2322:   'this' could be instantiated with an arbitrary type which could be unrelated to 'T & {}'.
+        }
+    }
+    
+    // Conditional expressions
+    interface Aa {
+        1: number;
+        2: string;
+        3: boolean;
+    }
+    
+    function trivialConditional<T extends 1 | 2 | 3>(x: T): Aa[T] {
+        if (x !== 1) {
+            return x === 2 ? "" : true;
+        }
+        else {
+            return 0;
+        }
+    }
+    
+    function conditional<T extends boolean>(x: T):
+     T extends true ? 1 : T extends false ? 2 : never {
+        return x ? 1 : 2; // Ok
+    }
+    
+    function contextualConditional<T extends "a" | "b">(
+        x: T
+    ): T extends "a" ? "a" : T extends "b" ? number : never {
+        return x === "a" ? x : parseInt(x); // Ok
+    }
+    
+    function conditionalWithError<T extends "a" | "b">(
+        x: T
+    ): T extends "a" ? number : T extends "b" ? string : never {
+        return x === "a" ? x : parseInt(x); // Error
+                           ~
+!!! error TS2322: Type 'string' is not assignable to type 'number'.
+                               ~~~~~~~~~~~
+!!! error TS2322: Type 'number' is not assignable to type 'string'.
+    }
+    
+    // Multiple indexed type reductions
+    interface BB {
+        "a": number;
+        [y: number]: string;
+    }
+    
+    interface AA<T extends keyof BB> {
+        "c": BB[T];
+        "d": boolean,
+    }
+    
+    function reduction<T extends keyof BB, U extends "c" | "d">(x: T, y: U): AA<T>[U] {
+        if (y === "c" && x === "a") {
+            // AA<T>[U='c'] -> BB[T]
+            // BB[T='a'] -> number
+            return 0; // Ok
+        }
+    
+        return undefined as never;
+    }
+    
+    // Substitution types are not narrowed
+    function subsCond<T extends 1 | 2 | 3>(
+        x: T,
+    ): T extends 1 | 2
+        ? T extends 1
+            ? string
+            : T extends 2
+              ? boolean
+              : never
+        : T extends 3
+          ? number
+          : never {
+        if (x === 1) {
+            return "";
+            ~~~~~~
+!!! error TS2322: Type '""' is not assignable to type 'T extends 1 | 2 ? T extends 1 ? string : T extends 2 ? boolean : never : T extends 3 ? number : never'.
+        } else if (x == 2) {
+            return true;
+            ~~~~~~
+!!! error TS2322: Type 'true' is not assignable to type 'T extends 1 | 2 ? T extends 1 ? string : T extends 2 ? boolean : never : T extends 3 ? number : never'.
+        }
+        return 3;
+        ~~~~~~
+!!! error TS2322: Type '3' is not assignable to type 'T extends 1 | 2 ? T extends 1 ? string : T extends 2 ? boolean : never : T extends 3 ? number : never'.
+    }
+    
+    
+    // Unsafe: check types overlap
+    declare function q(x: object): x is { b: number };
+    function foo<T extends { a: string } | { b: number }>(
+        x: T,
+    ): T extends { a: string } ? number : T extends { b: number } ? string : never {
+        if (q(x)) {
+            x.b;
+            return "";
+        }
+        x.a;
+        return 1;
+    }
+    
+    let y = { a: "", b: 1 }
+    const r = foo<{ a: string }>(y); // type says number but actually string
+    
+    type HelperCond<T, A, R1, B, R2> = T extends A ? R1 : T extends B ? R2 : never;
+    
+    // We don't narrow the return type because the conditionals are not distributive
+    function foo2<U extends string | number, V extends boolean>(x: U, y: V):
+        HelperCond<{ x: U, y: V },
+            { x: string, y: true }, 1,
+            { x: number, y: false }, 2> {
+        if (typeof x === "string" && y === true) {
+            return 1; // Error
+            ~~~~~~
+!!! error TS2322: Type '1' is not assignable to type 'HelperCond<{ x: U; y: V; }, { x: string; y: true; }, 1, { x: number; y: false; }, 2>'.
+        }
+        if (typeof x === "number" && y === false) {
+            return 2; // Error
+            ~~~~~~
+!!! error TS2322: Type '2' is not assignable to type 'HelperCond<{ x: U; y: V; }, { x: string; y: true; }, 1, { x: number; y: false; }, 2>'.
+        }
+        return 0; // Error
+        ~~~~~~
+!!! error TS2322: Type '0' is not assignable to type 'HelperCond<{ x: U; y: V; }, { x: string; y: true; }, 1, { x: number; y: false; }, 2>'.
+    }
+    
+    // From https://github.com/microsoft/TypeScript/issues/24929#issue-332087943
+    declare function isString(s: unknown): s is string;
+    // capitalize a string or each element of an array of strings
+    function capitalize<T extends string | string[]>(
+        input: T
+    ): T extends string[] ? string[] : T extends string ? string : never {
+        if (isString(input)) {
+            return input[0].toUpperCase() + input.slice(1); // Ok
+        } else {
+            return input.map(elt => capitalize(elt)); // Ok
+        }
+    }
+    
+    function badCapitalize<T extends string | string[]>(
+        input: T
+    ): T extends string[] ? string[] : T extends string ? string : never {
+        if (isString(input)) {
+            return input[0].toUpperCase() + input.slice(1); // Ok
+        } else {
+            return input[0].toUpperCase() + input.slice(1); // Bad, error
+            ~~~~~~
+!!! error TS2322: Type 'string' is not assignable to type 'string[]'.
+        }
+    }
+    
+    // No narrowing because conditional's extends type is different from type parameter constraint types
+    function voidRet<T extends { a: string } | undefined>(
+        x: T
+    ): T extends {} ? void : T extends undefined ? number : never {
+        if (x) {
+            return;
+            ~~~~~~
+!!! error TS2322: Type 'undefined' is not assignable to type 'T extends {} ? void : T extends undefined ? number : never'.
+        }
+        return 1;
+        ~~~~~~
+!!! error TS2322: Type 'number' is not assignable to type 'T extends {} ? void : T extends undefined ? number : never'.
+    }
+    
+    // Multiple type parameters at once
+    function woo<T extends string | number, U extends string | number>(
+        x: T,
+        y: U,
+    ): T extends string
+        ? U extends string
+            ? 1
+            : U extends number
+              ? 2
+              : never
+        : T extends number
+          ? U extends number
+              ? 3
+              : U extends string
+                ? 4
+                : never
+          : never {
+        if (typeof x === "number" && typeof y === "string") {
+            return 1; // Good error
+            ~~~~~~
+!!! error TS2322: Type '1' is not assignable to type '4'.
+        }
+        return undefined as any;
+    }
+    
+    function ttt<T extends string | number, U extends string | number>(
+        x: T,
+        y: U,
+    ): T extends string
+        ? U extends string
+            ? 1
+            : U extends number
+              ? 2
+              : never
+        : T extends number
+          ? U extends number
+              ? 3
+              : U extends string
+                ? 4
+                : never
+          : never {
+        if (typeof x === "number" && typeof y === "string") {
+            return 4; // Ok
+        }
+        
+        return undefined as any;
+    }
+    
+    // Shadowing of the narrowed reference
+    function shadowing<T extends 1 | 2>(x: T): T extends 1 ? number : T extends 2 ? string : never {
+        if (true) {
+            let x: number = Math.random() ? 1 : 2;
+            if (x === 1) {
+                return 1; // Error
+                ~~~~~~
+!!! error TS2322: Type 'number' is not assignable to type 'T extends 1 ? number : T extends 2 ? string : never'.
+            }
+            return ""; // Error
+            ~~~~~~
+!!! error TS2322: Type 'string' is not assignable to type 'T extends 1 ? number : T extends 2 ? string : never'.
+        }
+    }
+    
+    function noShadowing<T extends 1 | 2>(x: T): T extends 1 ? number : T extends 2 ? string : never {
+        if (true) {
+            if (x === 1) {
+                return 1; // Ok
+            }
+            return ""; // Ok
+        }
+    }
+    
+    // If the narrowing reference is out of scope, we simply won't narrow its type
+    declare let someX: boolean;
+    function scope2<T extends boolean>(a: T): T extends true ? 1 : T extends false ? 2 : never {
+        if ((true)) {
+            const someX = a;
+            if (someX) { // We narrow `someX` and the return type here
+                return 1;
+            }
+        }
+        if (!someX) { // This is a different `someX`, so we don't narrow here
+            return 2;
+            ~~~~~~
+!!! error TS2322: Type '2' is not assignable to type 'T extends true ? 1 : T extends false ? 2 : never'.
+        }
+    
+        return undefined as any;
+    }
+    
+    function moreShadowing<T extends 1 | 2>(x: T): T extends 1 ? number : T extends 2 ? string : never {
+        if (x === 2) {
+            let x: number = Math.random() ? 1 : 2;
+            if (x === 1) {
+                return 1; // Error
+                ~~~~~~
+!!! error TS2322: Type 'number' is not assignable to type 'string'.
+            }
+            return ""; // Ok
+        }
+        return 0; // Ok
+    }
+    
+    // This would be unsafe to narrow due to `infer` type.
+    function withInfer<T extends [string] | number>(x: T): T extends [infer R] ? R : T extends number ? boolean : never {
+        if (typeof x === "number") {
+            return true;
+            ~~~~~~
+!!! error TS2322: Type 'true' is not assignable to type 'T extends [infer R] ? R : T extends number ? boolean : never'.
+        }
+        return "";
+        ~~~~~~
+!!! error TS2322: Type '""' is not assignable to type 'T extends [infer R] ? R : T extends number ? boolean : never'.
+    }
+    
+    const withInferResult = withInfer(["a"] as const); // The type says it returns `"a"`, but the function actually returns `""`.
+    
+    // Ok
+    async function abool<T extends true | false>(x: T): Promise<T extends true ? 1 : T extends false ? 2 : never> {
+        if (x) {
+            return 1;
+        }
+        return 2;
+    }
+    
+    // Ok
+    function* bbool<T extends true | false>(x: T): Generator<number, T extends true ? 1 : T extends false ? 2 : never, unknown> {
+        yield 3;
+        if (x) {
+            return 1;
+        }
+        return 2;
+    }
+    
+    // We don't do the same type of narrowing for `yield` statements
+    function* cbool<T extends true | false>(x: T): Generator<T extends true ? 1 : T extends false ? 2 : never, number, unknown> {
+        if (x) {
+            yield 1;
+                  ~
+!!! error TS2322: Type '1' is not assignable to type 'T extends true ? 1 : T extends false ? 2 : never'.
+        }
+        yield 2;
+              ~
+!!! error TS2322: Type '2' is not assignable to type 'T extends true ? 1 : T extends false ? 2 : never'.
+        return 0;
+    }
+    
+    // From #33912
+    abstract class Operation<T, R> {
+        abstract perform(t: T): R;
+    }
+    
+    type ConditionalReturnType<T, R, EOp extends Operation<T, R> | undefined> =
+        EOp extends Operation<T, R> ? R : EOp extends undefined ? T | R : never;
+    
+    
+    class ConditionalOperation<
+        T,
+        R,
+        EOp extends Operation<T, R> | undefined,
+    > extends Operation<T, ConditionalReturnType<T, R, EOp>> {
+        constructor(
+            private predicate: (value: T) => boolean,
+            private thenOp: Operation<T, R>,
+            private elseOp?: EOp,
+        ) {
+            super();
+        }
+    
+        // We won't try to narrow the return type because `T` is declared on the class and we don't analyze this case.
+        perform(t: T): ConditionalReturnType<T, R, EOp> {
+            if (this.predicate(t)) {
+                return this.thenOp.perform(t); // Bad: this is assignable to all of the branches of the conditional, but we still can't return it
+                ~~~~~~
+!!! error TS2322: Type 'R' is not assignable to type 'ConditionalReturnType<T, R, EOp>'.
+            } else if (typeof this.elseOp !== "undefined") {
+                return this.elseOp.perform(t); // Would be ok
+                ~~~~~~
+!!! error TS2322: Type 'R' is not assignable to type 'ConditionalReturnType<T, R, EOp>'.
+            } else {
+                return t; // Would be ok
+                ~~~~~~
+!!! error TS2322: Type 'T' is not assignable to type 'ConditionalReturnType<T, R, EOp>'.
+            }
+        }
+    }
+    
+    // Like the version above, we will not attempt to narrow because there's more than one reference to `T`,
+    // because `T` shows up in the type of `predicate`.
+    function perform<T, R, EOp extends Operation<T, R> | undefined>(
+        t: T,
+        predicate: (value: T) => boolean,
+        thenOp: Operation<T, R>,
+        elseOp?: EOp,
+        ): ConditionalReturnType<T, R, EOp> {
+        if (predicate(t)) {
+            return thenOp.perform(t); // Bad: this is assignable to all of the branches of the conditional, but we still can't return it
+            ~~~~~~
+!!! error TS2322: Type 'R' is not assignable to type 'ConditionalReturnType<T, R, EOp>'.
+        } else if (elseOp !== undefined) {
+            return elseOp.perform(t); // Would be ok
+        } else {
+            return t; // Would be ok
+        }
+    }
+    
+    // Return conditional expressions with parentheses
+    function returnStuff1<T extends boolean>(x: T ): T extends true ? 1 : T extends false ? 2 : never {
+        return (x ? (1) : 2);
+    }
+    
+    function returnStuff2<T extends 1 | 2 | "a">(x: T ):
+        T extends 1 ? "one" : T extends 2 ? "two" : T extends "a" ? 0 : never {
+        return (typeof x === "string" ? 0 : (x === 1 ? ("one") : "two"));
+    }
+    
+    // If the conditional type's input is `never`, then it resolves to `never`:
+    function neverOk<T extends boolean>(x: T): T extends true ? 1 : T extends false ? 2 : never {
+        if (x === true) {
+            return 1;
+        }
+        if (x === false) {
+            return 2;
+        }
+        return 1;
+        ~~~~~~
+!!! error TS2322: Type '1' is not assignable to type 'never'.
+    }
\ No newline at end of file
diff --git a/tests/baselines/reference/dependentReturnType1.symbols b/tests/baselines/reference/dependentReturnType1.symbols
new file mode 100644
index 0000000000000..958dafbc6129f
--- /dev/null
+++ b/tests/baselines/reference/dependentReturnType1.symbols
@@ -0,0 +1,1386 @@
+//// [tests/cases/compiler/dependentReturnType1.ts] ////
+
+=== dependentReturnType1.ts ===
+interface A {
+>A : Symbol(A, Decl(dependentReturnType1.ts, 0, 0))
+
+    1: number;
+>1 : Symbol(A[1], Decl(dependentReturnType1.ts, 0, 13))
+
+    2: string;
+>2 : Symbol(A[2], Decl(dependentReturnType1.ts, 1, 14))
+}
+
+function f1<T extends 1 | 2>(x: T): A[T] {
+>f1 : Symbol(f1, Decl(dependentReturnType1.ts, 3, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 5, 12))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 5, 29))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 5, 12))
+>A : Symbol(A, Decl(dependentReturnType1.ts, 0, 0))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 5, 12))
+
+    if (x === 1) {
+>x : Symbol(x, Decl(dependentReturnType1.ts, 5, 29))
+
+        return 0; // Ok
+    }
+    else {
+        return 1; // Error
+    }
+}
+
+interface C {
+>C : Symbol(C, Decl(dependentReturnType1.ts, 12, 1))
+
+    1: number;
+>1 : Symbol(C[1], Decl(dependentReturnType1.ts, 14, 13))
+
+    2: string;
+>2 : Symbol(C[2], Decl(dependentReturnType1.ts, 15, 14))
+
+    3: boolean;
+>3 : Symbol(C[3], Decl(dependentReturnType1.ts, 16, 14))
+}
+
+function f2<T extends 1 | 2 | 3>(x: T): C[T] {
+>f2 : Symbol(f2, Decl(dependentReturnType1.ts, 18, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 20, 12))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 20, 33))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 20, 12))
+>C : Symbol(C, Decl(dependentReturnType1.ts, 12, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 20, 12))
+
+    if (x === 1) {
+>x : Symbol(x, Decl(dependentReturnType1.ts, 20, 33))
+
+        return 0; // Ok
+    }
+    else {
+        return ""; // Error, returned expression needs to have type string & boolean (= never)
+    }
+}
+
+function f3<T extends 1 | 2 | 3>(x: T): T extends 1 ? number : T extends 2 ? string : T extends 3 ? boolean : never {
+>f3 : Symbol(f3, Decl(dependentReturnType1.ts, 27, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 29, 12))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 29, 33))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 29, 12))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 29, 12))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 29, 12))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 29, 12))
+
+    if (x === 1) {
+>x : Symbol(x, Decl(dependentReturnType1.ts, 29, 33))
+
+        return 0; // Ok
+    }
+    else {
+        return ""; // Error, returned expression needs to have type string & boolean (= never)
+    }
+}
+
+interface One {
+>One : Symbol(One, Decl(dependentReturnType1.ts, 36, 1))
+
+    a: "a";
+>a : Symbol(One.a, Decl(dependentReturnType1.ts, 38, 15))
+
+    b: "b";
+>b : Symbol(One.b, Decl(dependentReturnType1.ts, 39, 11))
+
+    c: "c";
+>c : Symbol(One.c, Decl(dependentReturnType1.ts, 40, 11))
+
+    d: "d";
+>d : Symbol(One.d, Decl(dependentReturnType1.ts, 41, 11))
+}
+
+interface Two {
+>Two : Symbol(Two, Decl(dependentReturnType1.ts, 43, 1))
+
+    a: "a";
+>a : Symbol(Two.a, Decl(dependentReturnType1.ts, 45, 15))
+
+    b: "b";
+>b : Symbol(Two.b, Decl(dependentReturnType1.ts, 46, 11))
+
+    e: "e";
+>e : Symbol(Two.e, Decl(dependentReturnType1.ts, 47, 11))
+
+    f: "f";
+>f : Symbol(Two.f, Decl(dependentReturnType1.ts, 48, 11))
+}
+
+interface Three {
+>Three : Symbol(Three, Decl(dependentReturnType1.ts, 50, 1))
+
+    a: "a";
+>a : Symbol(Three.a, Decl(dependentReturnType1.ts, 52, 17))
+
+    c: "c";
+>c : Symbol(Three.c, Decl(dependentReturnType1.ts, 53, 11))
+
+    e: "e";
+>e : Symbol(Three.e, Decl(dependentReturnType1.ts, 54, 11))
+
+    g: "g";
+>g : Symbol(Three.g, Decl(dependentReturnType1.ts, 55, 11))
+}
+
+interface Four {
+>Four : Symbol(Four, Decl(dependentReturnType1.ts, 57, 1))
+
+    a: "a";
+>a : Symbol(Four.a, Decl(dependentReturnType1.ts, 59, 16))
+
+    d: "d";
+>d : Symbol(Four.d, Decl(dependentReturnType1.ts, 60, 11))
+
+    f: "f";
+>f : Symbol(Four.f, Decl(dependentReturnType1.ts, 61, 11))
+
+    g: "g";
+>g : Symbol(Four.g, Decl(dependentReturnType1.ts, 62, 11))
+}
+// Badly written conditional return type, will not trigger narrowing
+function f10<T extends 1 | 2 | 3 | 4>(x: T): T extends 1 ? One : T extends 2 ? Two : T extends 3 ? Three : Four {
+>f10 : Symbol(f10, Decl(dependentReturnType1.ts, 64, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 66, 13))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 66, 38))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 66, 13))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 66, 13))
+>One : Symbol(One, Decl(dependentReturnType1.ts, 36, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 66, 13))
+>Two : Symbol(Two, Decl(dependentReturnType1.ts, 43, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 66, 13))
+>Three : Symbol(Three, Decl(dependentReturnType1.ts, 50, 1))
+>Four : Symbol(Four, Decl(dependentReturnType1.ts, 57, 1))
+
+    if (x === 1 || x === 2) {
+>x : Symbol(x, Decl(dependentReturnType1.ts, 66, 38))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 66, 38))
+
+        return { a: "a", b: "b", c: "c", d: "d", e: "e", f: "f" }; // Error
+>a : Symbol(a, Decl(dependentReturnType1.ts, 68, 16))
+>b : Symbol(b, Decl(dependentReturnType1.ts, 68, 24))
+>c : Symbol(c, Decl(dependentReturnType1.ts, 68, 32))
+>d : Symbol(d, Decl(dependentReturnType1.ts, 68, 40))
+>e : Symbol(e, Decl(dependentReturnType1.ts, 68, 48))
+>f : Symbol(f, Decl(dependentReturnType1.ts, 68, 56))
+    }
+    return { a: "a", b: "b", c: "c", d: "d", e: "e", f: "f", g: "g" }; // Error
+>a : Symbol(a, Decl(dependentReturnType1.ts, 70, 12))
+>b : Symbol(b, Decl(dependentReturnType1.ts, 70, 20))
+>c : Symbol(c, Decl(dependentReturnType1.ts, 70, 28))
+>d : Symbol(d, Decl(dependentReturnType1.ts, 70, 36))
+>e : Symbol(e, Decl(dependentReturnType1.ts, 70, 44))
+>f : Symbol(f, Decl(dependentReturnType1.ts, 70, 52))
+>g : Symbol(g, Decl(dependentReturnType1.ts, 70, 60))
+}
+// Well written conditional
+function f101<T extends 1 | 2 | 3 | 4>(x: T): T extends 1 ? One : T extends 2 ? Two : T extends 3 ? Three : T extends 4 ? Four : never {
+>f101 : Symbol(f101, Decl(dependentReturnType1.ts, 71, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 73, 14))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 73, 39))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 73, 14))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 73, 14))
+>One : Symbol(One, Decl(dependentReturnType1.ts, 36, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 73, 14))
+>Two : Symbol(Two, Decl(dependentReturnType1.ts, 43, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 73, 14))
+>Three : Symbol(Three, Decl(dependentReturnType1.ts, 50, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 73, 14))
+>Four : Symbol(Four, Decl(dependentReturnType1.ts, 57, 1))
+
+    if (x === 1 || x === 2) {
+>x : Symbol(x, Decl(dependentReturnType1.ts, 73, 39))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 73, 39))
+
+        return { a: "a", b: "b", c: "c", d: "d", e: "e", f: "f" }; // Ok
+>a : Symbol(a, Decl(dependentReturnType1.ts, 75, 16))
+>b : Symbol(b, Decl(dependentReturnType1.ts, 75, 24))
+>c : Symbol(c, Decl(dependentReturnType1.ts, 75, 32))
+>d : Symbol(d, Decl(dependentReturnType1.ts, 75, 40))
+>e : Symbol(e, Decl(dependentReturnType1.ts, 75, 48))
+>f : Symbol(f, Decl(dependentReturnType1.ts, 75, 56))
+    }
+    // Excess property becomes a problem with the change,
+    // because we now check assignability to a narrower type...
+    return { a: "a", b: "b", c: "c", d: "d", e: "e", f: "f", g: "g" }; // EPC Error
+>a : Symbol(a, Decl(dependentReturnType1.ts, 79, 12))
+>b : Symbol(b, Decl(dependentReturnType1.ts, 79, 20))
+>c : Symbol(c, Decl(dependentReturnType1.ts, 79, 28))
+>d : Symbol(d, Decl(dependentReturnType1.ts, 79, 36))
+>e : Symbol(e, Decl(dependentReturnType1.ts, 79, 44))
+>f : Symbol(f, Decl(dependentReturnType1.ts, 79, 52))
+>g : Symbol(g, Decl(dependentReturnType1.ts, 79, 60))
+}
+
+// This will not work for several reasons:
+// - first because the constraint of type parameter `Arg` is generic,
+//   so attempting to narrow the type of `arg` in the `if` would result in type `Arg & LeftIn`,
+//   which when substituted in the conditional return type, would not further resolve that conditional type
+// - second because the `else` branch would never work because we don't narrow the type of `arg` to `Arg & RightIn` 
+function conditionalProducingIf<LeftIn, RightIn, LeftOut, RightOut, Arg extends LeftIn | RightIn>(
+>conditionalProducingIf : Symbol(conditionalProducingIf, Decl(dependentReturnType1.ts, 80, 1))
+>LeftIn : Symbol(LeftIn, Decl(dependentReturnType1.ts, 87, 32))
+>RightIn : Symbol(RightIn, Decl(dependentReturnType1.ts, 87, 39))
+>LeftOut : Symbol(LeftOut, Decl(dependentReturnType1.ts, 87, 48))
+>RightOut : Symbol(RightOut, Decl(dependentReturnType1.ts, 87, 57))
+>Arg : Symbol(Arg, Decl(dependentReturnType1.ts, 87, 67))
+>LeftIn : Symbol(LeftIn, Decl(dependentReturnType1.ts, 87, 32))
+>RightIn : Symbol(RightIn, Decl(dependentReturnType1.ts, 87, 39))
+
+    arg: Arg,
+>arg : Symbol(arg, Decl(dependentReturnType1.ts, 87, 98))
+>Arg : Symbol(Arg, Decl(dependentReturnType1.ts, 87, 67))
+
+    cond: (arg: LeftIn | RightIn) => arg is LeftIn,
+>cond : Symbol(cond, Decl(dependentReturnType1.ts, 88, 13))
+>arg : Symbol(arg, Decl(dependentReturnType1.ts, 89, 11))
+>LeftIn : Symbol(LeftIn, Decl(dependentReturnType1.ts, 87, 32))
+>RightIn : Symbol(RightIn, Decl(dependentReturnType1.ts, 87, 39))
+>arg : Symbol(arg, Decl(dependentReturnType1.ts, 89, 11))
+>LeftIn : Symbol(LeftIn, Decl(dependentReturnType1.ts, 87, 32))
+
+    produceLeftOut: (arg: LeftIn) => LeftOut,
+>produceLeftOut : Symbol(produceLeftOut, Decl(dependentReturnType1.ts, 89, 51))
+>arg : Symbol(arg, Decl(dependentReturnType1.ts, 90, 21))
+>LeftIn : Symbol(LeftIn, Decl(dependentReturnType1.ts, 87, 32))
+>LeftOut : Symbol(LeftOut, Decl(dependentReturnType1.ts, 87, 48))
+
+    produceRightOut: (arg: RightIn) => RightOut):
+>produceRightOut : Symbol(produceRightOut, Decl(dependentReturnType1.ts, 90, 45))
+>arg : Symbol(arg, Decl(dependentReturnType1.ts, 91, 22))
+>RightIn : Symbol(RightIn, Decl(dependentReturnType1.ts, 87, 39))
+>RightOut : Symbol(RightOut, Decl(dependentReturnType1.ts, 87, 57))
+
+    Arg extends LeftIn ? LeftOut : Arg extends RightIn ? RightOut : never
+>Arg : Symbol(Arg, Decl(dependentReturnType1.ts, 87, 67))
+>LeftIn : Symbol(LeftIn, Decl(dependentReturnType1.ts, 87, 32))
+>LeftOut : Symbol(LeftOut, Decl(dependentReturnType1.ts, 87, 48))
+>Arg : Symbol(Arg, Decl(dependentReturnType1.ts, 87, 67))
+>RightIn : Symbol(RightIn, Decl(dependentReturnType1.ts, 87, 39))
+>RightOut : Symbol(RightOut, Decl(dependentReturnType1.ts, 87, 57))
+{
+    if (cond(arg)) {
+>cond : Symbol(cond, Decl(dependentReturnType1.ts, 88, 13))
+>arg : Symbol(arg, Decl(dependentReturnType1.ts, 87, 98))
+
+        return produceLeftOut(arg);
+>produceLeftOut : Symbol(produceLeftOut, Decl(dependentReturnType1.ts, 89, 51))
+>arg : Symbol(arg, Decl(dependentReturnType1.ts, 87, 98))
+
+    } else {
+        return produceRightOut(arg as RightIn);
+>produceRightOut : Symbol(produceRightOut, Decl(dependentReturnType1.ts, 90, 45))
+>arg : Symbol(arg, Decl(dependentReturnType1.ts, 87, 98))
+>RightIn : Symbol(RightIn, Decl(dependentReturnType1.ts, 87, 39))
+    }
+}
+
+interface Animal {
+>Animal : Symbol(Animal, Decl(dependentReturnType1.ts, 99, 1))
+
+    name: string;
+>name : Symbol(Animal.name, Decl(dependentReturnType1.ts, 101, 18))
+}
+
+interface Dog extends Animal {
+>Dog : Symbol(Dog, Decl(dependentReturnType1.ts, 103, 1))
+>Animal : Symbol(Animal, Decl(dependentReturnType1.ts, 99, 1))
+
+    bark: () => string;
+>bark : Symbol(Dog.bark, Decl(dependentReturnType1.ts, 105, 30))
+}
+
+// This would be unsafe to narrow.
+declare function isDog(x: Animal): x is Dog;
+>isDog : Symbol(isDog, Decl(dependentReturnType1.ts, 107, 1))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 110, 23))
+>Animal : Symbol(Animal, Decl(dependentReturnType1.ts, 99, 1))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 110, 23))
+>Dog : Symbol(Dog, Decl(dependentReturnType1.ts, 103, 1))
+
+declare function doggy(x: Dog): number;
+>doggy : Symbol(doggy, Decl(dependentReturnType1.ts, 110, 44))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 111, 23))
+>Dog : Symbol(Dog, Decl(dependentReturnType1.ts, 103, 1))
+
+function f12<T extends Animal>(x: T): T extends Dog ? number : string {
+>f12 : Symbol(f12, Decl(dependentReturnType1.ts, 111, 39))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 112, 13))
+>Animal : Symbol(Animal, Decl(dependentReturnType1.ts, 99, 1))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 112, 31))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 112, 13))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 112, 13))
+>Dog : Symbol(Dog, Decl(dependentReturnType1.ts, 103, 1))
+
+    if (isDog(x)) { // `x` has type `T & Dog` here
+>isDog : Symbol(isDog, Decl(dependentReturnType1.ts, 107, 1))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 112, 31))
+
+        return doggy(x);
+>doggy : Symbol(doggy, Decl(dependentReturnType1.ts, 110, 44))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 112, 31))
+    }
+    return ""; // Error: Should not work because we can't express "not a Dog" in the type system
+}
+
+// Cannot narrow `keyof` too eagerly or something like the below breaks
+function f<Entry extends { [index: string]: number | boolean }, EntryId extends keyof Entry>(entry: EntryId): Entry[EntryId] {
+>f : Symbol(f, Decl(dependentReturnType1.ts, 117, 1))
+>Entry : Symbol(Entry, Decl(dependentReturnType1.ts, 120, 11))
+>index : Symbol(index, Decl(dependentReturnType1.ts, 120, 28))
+>EntryId : Symbol(EntryId, Decl(dependentReturnType1.ts, 120, 63))
+>Entry : Symbol(Entry, Decl(dependentReturnType1.ts, 120, 11))
+>entry : Symbol(entry, Decl(dependentReturnType1.ts, 120, 93))
+>EntryId : Symbol(EntryId, Decl(dependentReturnType1.ts, 120, 63))
+>Entry : Symbol(Entry, Decl(dependentReturnType1.ts, 120, 11))
+>EntryId : Symbol(EntryId, Decl(dependentReturnType1.ts, 120, 63))
+
+    const entries = {} as Entry;
+>entries : Symbol(entries, Decl(dependentReturnType1.ts, 121, 9))
+>Entry : Symbol(Entry, Decl(dependentReturnType1.ts, 120, 11))
+
+    return entries[entry];
+>entries : Symbol(entries, Decl(dependentReturnType1.ts, 121, 9))
+>entry : Symbol(entry, Decl(dependentReturnType1.ts, 120, 93))
+}
+
+// Works the same as before
+declare function takeA(val: 'A'): void;
+>takeA : Symbol(takeA, Decl(dependentReturnType1.ts, 123, 1))
+>val : Symbol(val, Decl(dependentReturnType1.ts, 126, 23))
+
+export function bounceAndTakeIfA<AB extends 'A' | 'B'>(value: AB): AB {
+>bounceAndTakeIfA : Symbol(bounceAndTakeIfA, Decl(dependentReturnType1.ts, 126, 39))
+>AB : Symbol(AB, Decl(dependentReturnType1.ts, 127, 33))
+>value : Symbol(value, Decl(dependentReturnType1.ts, 127, 55))
+>AB : Symbol(AB, Decl(dependentReturnType1.ts, 127, 33))
+>AB : Symbol(AB, Decl(dependentReturnType1.ts, 127, 33))
+
+    if (value === 'A') {
+>value : Symbol(value, Decl(dependentReturnType1.ts, 127, 55))
+
+        takeA(value);
+>takeA : Symbol(takeA, Decl(dependentReturnType1.ts, 123, 1))
+>value : Symbol(value, Decl(dependentReturnType1.ts, 127, 55))
+
+        takeAB(value);
+>takeAB : Symbol(takeAB, Decl(dependentReturnType1.ts, 134, 17))
+>value : Symbol(value, Decl(dependentReturnType1.ts, 127, 55))
+
+        return value;
+>value : Symbol(value, Decl(dependentReturnType1.ts, 127, 55))
+    }
+
+    return value;
+>value : Symbol(value, Decl(dependentReturnType1.ts, 127, 55))
+
+    function takeAB(val: AB): void {}
+>takeAB : Symbol(takeAB, Decl(dependentReturnType1.ts, 134, 17))
+>val : Symbol(val, Decl(dependentReturnType1.ts, 135, 20))
+>AB : Symbol(AB, Decl(dependentReturnType1.ts, 127, 33))
+}
+
+// Works the same as before
+export function bbb<AB extends "a" | "b">(value: AB): "a" {
+>bbb : Symbol(bbb, Decl(dependentReturnType1.ts, 136, 1))
+>AB : Symbol(AB, Decl(dependentReturnType1.ts, 139, 20))
+>value : Symbol(value, Decl(dependentReturnType1.ts, 139, 42))
+>AB : Symbol(AB, Decl(dependentReturnType1.ts, 139, 20))
+
+    if (value === "a") {
+>value : Symbol(value, Decl(dependentReturnType1.ts, 139, 42))
+
+        return value;
+>value : Symbol(value, Decl(dependentReturnType1.ts, 139, 42))
+    }
+    return "a";
+}
+
+class Unnamed {
+>Unnamed : Symbol(Unnamed, Decl(dependentReturnType1.ts, 144, 1))
+
+    root!: { name: string };
+>root : Symbol(Unnamed.root, Decl(dependentReturnType1.ts, 146, 15))
+>name : Symbol(name, Decl(dependentReturnType1.ts, 147, 12))
+
+    // Error: No narrowing because parameter is optional but `T` doesn't allow for undefined
+    name<T extends string>(name?: T): T extends string ? this : T extends undefined ? string : never {
+>name : Symbol(Unnamed.name, Decl(dependentReturnType1.ts, 147, 28))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 149, 9))
+>name : Symbol(name, Decl(dependentReturnType1.ts, 149, 27))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 149, 9))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 149, 9))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 149, 9))
+
+        if (typeof name === 'undefined') {
+>name : Symbol(name, Decl(dependentReturnType1.ts, 149, 27))
+
+            return this.root.name;
+>this.root.name : Symbol(name, Decl(dependentReturnType1.ts, 147, 12))
+>this.root : Symbol(Unnamed.root, Decl(dependentReturnType1.ts, 146, 15))
+>this : Symbol(Unnamed, Decl(dependentReturnType1.ts, 144, 1))
+>root : Symbol(Unnamed.root, Decl(dependentReturnType1.ts, 146, 15))
+>name : Symbol(name, Decl(dependentReturnType1.ts, 147, 12))
+        }
+        return this;
+>this : Symbol(Unnamed, Decl(dependentReturnType1.ts, 144, 1))
+    }
+
+    // Good conditional
+    name2<T extends string | undefined>(name?: T): T extends string ? this : T extends undefined ? string : never {
+>name2 : Symbol(Unnamed.name2, Decl(dependentReturnType1.ts, 154, 5))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 157, 10))
+>name : Symbol(name, Decl(dependentReturnType1.ts, 157, 40))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 157, 10))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 157, 10))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 157, 10))
+
+        if (typeof name === 'undefined') {
+>name : Symbol(name, Decl(dependentReturnType1.ts, 157, 40))
+
+            return this.root.name; // Ok
+>this.root.name : Symbol(name, Decl(dependentReturnType1.ts, 147, 12))
+>this.root : Symbol(Unnamed.root, Decl(dependentReturnType1.ts, 146, 15))
+>this : Symbol(Unnamed, Decl(dependentReturnType1.ts, 144, 1))
+>root : Symbol(Unnamed.root, Decl(dependentReturnType1.ts, 146, 15))
+>name : Symbol(name, Decl(dependentReturnType1.ts, 147, 12))
+        }
+        this.root.name = name;
+>this.root.name : Symbol(name, Decl(dependentReturnType1.ts, 147, 12))
+>this.root : Symbol(Unnamed.root, Decl(dependentReturnType1.ts, 146, 15))
+>this : Symbol(Unnamed, Decl(dependentReturnType1.ts, 144, 1))
+>root : Symbol(Unnamed.root, Decl(dependentReturnType1.ts, 146, 15))
+>name : Symbol(name, Decl(dependentReturnType1.ts, 147, 12))
+>name : Symbol(name, Decl(dependentReturnType1.ts, 157, 40))
+
+        return this; // Ok
+>this : Symbol(Unnamed, Decl(dependentReturnType1.ts, 144, 1))
+    }
+
+    // Good conditional, wrong return expressions
+    name3<T extends string | undefined>(name?: T): T extends string ? this : T extends undefined ? string : never {
+>name3 : Symbol(Unnamed.name3, Decl(dependentReturnType1.ts, 163, 5))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 166, 10))
+>name : Symbol(name, Decl(dependentReturnType1.ts, 166, 40))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 166, 10))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 166, 10))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 166, 10))
+
+        if (typeof name === 'undefined') {
+>name : Symbol(name, Decl(dependentReturnType1.ts, 166, 40))
+
+            return this; // Error
+>this : Symbol(Unnamed, Decl(dependentReturnType1.ts, 144, 1))
+        }
+        this.root.name = name;
+>this.root.name : Symbol(name, Decl(dependentReturnType1.ts, 147, 12))
+>this.root : Symbol(Unnamed.root, Decl(dependentReturnType1.ts, 146, 15))
+>this : Symbol(Unnamed, Decl(dependentReturnType1.ts, 144, 1))
+>root : Symbol(Unnamed.root, Decl(dependentReturnType1.ts, 146, 15))
+>name : Symbol(name, Decl(dependentReturnType1.ts, 147, 12))
+>name : Symbol(name, Decl(dependentReturnType1.ts, 166, 40))
+
+        return name; // Error
+>name : Symbol(name, Decl(dependentReturnType1.ts, 166, 40))
+    }
+}
+
+// Conditional expressions
+interface Aa {
+>Aa : Symbol(Aa, Decl(dependentReturnType1.ts, 173, 1))
+
+    1: number;
+>1 : Symbol(Aa[1], Decl(dependentReturnType1.ts, 176, 14))
+
+    2: string;
+>2 : Symbol(Aa[2], Decl(dependentReturnType1.ts, 177, 14))
+
+    3: boolean;
+>3 : Symbol(Aa[3], Decl(dependentReturnType1.ts, 178, 14))
+}
+
+function trivialConditional<T extends 1 | 2 | 3>(x: T): Aa[T] {
+>trivialConditional : Symbol(trivialConditional, Decl(dependentReturnType1.ts, 180, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 182, 28))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 182, 49))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 182, 28))
+>Aa : Symbol(Aa, Decl(dependentReturnType1.ts, 173, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 182, 28))
+
+    if (x !== 1) {
+>x : Symbol(x, Decl(dependentReturnType1.ts, 182, 49))
+
+        return x === 2 ? "" : true;
+>x : Symbol(x, Decl(dependentReturnType1.ts, 182, 49))
+    }
+    else {
+        return 0;
+    }
+}
+
+function conditional<T extends boolean>(x: T):
+>conditional : Symbol(conditional, Decl(dependentReturnType1.ts, 189, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 191, 21))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 191, 40))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 191, 21))
+
+ T extends true ? 1 : T extends false ? 2 : never {
+>T : Symbol(T, Decl(dependentReturnType1.ts, 191, 21))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 191, 21))
+
+    return x ? 1 : 2; // Ok
+>x : Symbol(x, Decl(dependentReturnType1.ts, 191, 40))
+}
+
+function contextualConditional<T extends "a" | "b">(
+>contextualConditional : Symbol(contextualConditional, Decl(dependentReturnType1.ts, 194, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 196, 31))
+
+    x: T
+>x : Symbol(x, Decl(dependentReturnType1.ts, 196, 52))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 196, 31))
+
+): T extends "a" ? "a" : T extends "b" ? number : never {
+>T : Symbol(T, Decl(dependentReturnType1.ts, 196, 31))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 196, 31))
+
+    return x === "a" ? x : parseInt(x); // Ok
+>x : Symbol(x, Decl(dependentReturnType1.ts, 196, 52))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 196, 52))
+>parseInt : Symbol(parseInt, Decl(lib.es5.d.ts, --, --))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 196, 52))
+}
+
+function conditionalWithError<T extends "a" | "b">(
+>conditionalWithError : Symbol(conditionalWithError, Decl(dependentReturnType1.ts, 200, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 202, 30))
+
+    x: T
+>x : Symbol(x, Decl(dependentReturnType1.ts, 202, 51))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 202, 30))
+
+): T extends "a" ? number : T extends "b" ? string : never {
+>T : Symbol(T, Decl(dependentReturnType1.ts, 202, 30))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 202, 30))
+
+    return x === "a" ? x : parseInt(x); // Error
+>x : Symbol(x, Decl(dependentReturnType1.ts, 202, 51))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 202, 51))
+>parseInt : Symbol(parseInt, Decl(lib.es5.d.ts, --, --))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 202, 51))
+}
+
+// Multiple indexed type reductions
+interface BB {
+>BB : Symbol(BB, Decl(dependentReturnType1.ts, 206, 1))
+
+    "a": number;
+>"a" : Symbol(BB["a"], Decl(dependentReturnType1.ts, 209, 14))
+
+    [y: number]: string;
+>y : Symbol(y, Decl(dependentReturnType1.ts, 211, 5))
+}
+
+interface AA<T extends keyof BB> {
+>AA : Symbol(AA, Decl(dependentReturnType1.ts, 212, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 214, 13))
+>BB : Symbol(BB, Decl(dependentReturnType1.ts, 206, 1))
+
+    "c": BB[T];
+>"c" : Symbol(AA["c"], Decl(dependentReturnType1.ts, 214, 34))
+>BB : Symbol(BB, Decl(dependentReturnType1.ts, 206, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 214, 13))
+
+    "d": boolean,
+>"d" : Symbol(AA["d"], Decl(dependentReturnType1.ts, 215, 15))
+}
+
+function reduction<T extends keyof BB, U extends "c" | "d">(x: T, y: U): AA<T>[U] {
+>reduction : Symbol(reduction, Decl(dependentReturnType1.ts, 217, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 219, 19))
+>BB : Symbol(BB, Decl(dependentReturnType1.ts, 206, 1))
+>U : Symbol(U, Decl(dependentReturnType1.ts, 219, 38))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 219, 60))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 219, 19))
+>y : Symbol(y, Decl(dependentReturnType1.ts, 219, 65))
+>U : Symbol(U, Decl(dependentReturnType1.ts, 219, 38))
+>AA : Symbol(AA, Decl(dependentReturnType1.ts, 212, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 219, 19))
+>U : Symbol(U, Decl(dependentReturnType1.ts, 219, 38))
+
+    if (y === "c" && x === "a") {
+>y : Symbol(y, Decl(dependentReturnType1.ts, 219, 65))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 219, 60))
+
+        // AA<T>[U='c'] -> BB[T]
+        // BB[T='a'] -> number
+        return 0; // Ok
+    }
+
+    return undefined as never;
+>undefined : Symbol(undefined)
+}
+
+// Substitution types are not narrowed
+function subsCond<T extends 1 | 2 | 3>(
+>subsCond : Symbol(subsCond, Decl(dependentReturnType1.ts, 227, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 230, 18))
+
+    x: T,
+>x : Symbol(x, Decl(dependentReturnType1.ts, 230, 39))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 230, 18))
+
+): T extends 1 | 2
+>T : Symbol(T, Decl(dependentReturnType1.ts, 230, 18))
+
+    ? T extends 1
+>T : Symbol(T, Decl(dependentReturnType1.ts, 230, 18))
+
+        ? string
+        : T extends 2
+>T : Symbol(T, Decl(dependentReturnType1.ts, 230, 18))
+
+          ? boolean
+          : never
+    : T extends 3
+>T : Symbol(T, Decl(dependentReturnType1.ts, 230, 18))
+
+      ? number
+      : never {
+    if (x === 1) {
+>x : Symbol(x, Decl(dependentReturnType1.ts, 230, 39))
+
+        return "";
+    } else if (x == 2) {
+>x : Symbol(x, Decl(dependentReturnType1.ts, 230, 39))
+
+        return true;
+    }
+    return 3;
+}
+
+
+// Unsafe: check types overlap
+declare function q(x: object): x is { b: number };
+>q : Symbol(q, Decl(dependentReturnType1.ts, 247, 1))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 251, 19))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 251, 19))
+>b : Symbol(b, Decl(dependentReturnType1.ts, 251, 37))
+
+function foo<T extends { a: string } | { b: number }>(
+>foo : Symbol(foo, Decl(dependentReturnType1.ts, 251, 50))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 252, 13))
+>a : Symbol(a, Decl(dependentReturnType1.ts, 252, 24))
+>b : Symbol(b, Decl(dependentReturnType1.ts, 252, 40))
+
+    x: T,
+>x : Symbol(x, Decl(dependentReturnType1.ts, 252, 54))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 252, 13))
+
+): T extends { a: string } ? number : T extends { b: number } ? string : never {
+>T : Symbol(T, Decl(dependentReturnType1.ts, 252, 13))
+>a : Symbol(a, Decl(dependentReturnType1.ts, 254, 14))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 252, 13))
+>b : Symbol(b, Decl(dependentReturnType1.ts, 254, 49))
+
+    if (q(x)) {
+>q : Symbol(q, Decl(dependentReturnType1.ts, 247, 1))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 252, 54))
+
+        x.b;
+>x.b : Symbol(b, Decl(dependentReturnType1.ts, 252, 40))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 252, 54))
+>b : Symbol(b, Decl(dependentReturnType1.ts, 252, 40))
+
+        return "";
+    }
+    x.a;
+>x.a : Symbol(a, Decl(dependentReturnType1.ts, 252, 24))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 252, 54))
+>a : Symbol(a, Decl(dependentReturnType1.ts, 252, 24))
+
+    return 1;
+}
+
+let y = { a: "", b: 1 }
+>y : Symbol(y, Decl(dependentReturnType1.ts, 263, 3))
+>a : Symbol(a, Decl(dependentReturnType1.ts, 263, 9))
+>b : Symbol(b, Decl(dependentReturnType1.ts, 263, 16))
+
+const r = foo<{ a: string }>(y); // type says number but actually string
+>r : Symbol(r, Decl(dependentReturnType1.ts, 264, 5))
+>foo : Symbol(foo, Decl(dependentReturnType1.ts, 251, 50))
+>a : Symbol(a, Decl(dependentReturnType1.ts, 264, 15))
+>y : Symbol(y, Decl(dependentReturnType1.ts, 263, 3))
+
+type HelperCond<T, A, R1, B, R2> = T extends A ? R1 : T extends B ? R2 : never;
+>HelperCond : Symbol(HelperCond, Decl(dependentReturnType1.ts, 264, 32))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 266, 16))
+>A : Symbol(A, Decl(dependentReturnType1.ts, 266, 18))
+>R1 : Symbol(R1, Decl(dependentReturnType1.ts, 266, 21))
+>B : Symbol(B, Decl(dependentReturnType1.ts, 266, 25))
+>R2 : Symbol(R2, Decl(dependentReturnType1.ts, 266, 28))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 266, 16))
+>A : Symbol(A, Decl(dependentReturnType1.ts, 266, 18))
+>R1 : Symbol(R1, Decl(dependentReturnType1.ts, 266, 21))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 266, 16))
+>B : Symbol(B, Decl(dependentReturnType1.ts, 266, 25))
+>R2 : Symbol(R2, Decl(dependentReturnType1.ts, 266, 28))
+
+// We don't narrow the return type because the conditionals are not distributive
+function foo2<U extends string | number, V extends boolean>(x: U, y: V):
+>foo2 : Symbol(foo2, Decl(dependentReturnType1.ts, 266, 79))
+>U : Symbol(U, Decl(dependentReturnType1.ts, 269, 14))
+>V : Symbol(V, Decl(dependentReturnType1.ts, 269, 40))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 269, 60))
+>U : Symbol(U, Decl(dependentReturnType1.ts, 269, 14))
+>y : Symbol(y, Decl(dependentReturnType1.ts, 269, 65))
+>V : Symbol(V, Decl(dependentReturnType1.ts, 269, 40))
+
+    HelperCond<{ x: U, y: V },
+>HelperCond : Symbol(HelperCond, Decl(dependentReturnType1.ts, 264, 32))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 270, 16))
+>U : Symbol(U, Decl(dependentReturnType1.ts, 269, 14))
+>y : Symbol(y, Decl(dependentReturnType1.ts, 270, 22))
+>V : Symbol(V, Decl(dependentReturnType1.ts, 269, 40))
+
+        { x: string, y: true }, 1,
+>x : Symbol(x, Decl(dependentReturnType1.ts, 271, 9))
+>y : Symbol(y, Decl(dependentReturnType1.ts, 271, 20))
+
+        { x: number, y: false }, 2> {
+>x : Symbol(x, Decl(dependentReturnType1.ts, 272, 9))
+>y : Symbol(y, Decl(dependentReturnType1.ts, 272, 20))
+
+    if (typeof x === "string" && y === true) {
+>x : Symbol(x, Decl(dependentReturnType1.ts, 269, 60))
+>y : Symbol(y, Decl(dependentReturnType1.ts, 269, 65))
+
+        return 1; // Error
+    }
+    if (typeof x === "number" && y === false) {
+>x : Symbol(x, Decl(dependentReturnType1.ts, 269, 60))
+>y : Symbol(y, Decl(dependentReturnType1.ts, 269, 65))
+
+        return 2; // Error
+    }
+    return 0; // Error
+}
+
+// From https://github.com/microsoft/TypeScript/issues/24929#issue-332087943
+declare function isString(s: unknown): s is string;
+>isString : Symbol(isString, Decl(dependentReturnType1.ts, 280, 1))
+>s : Symbol(s, Decl(dependentReturnType1.ts, 283, 26))
+>s : Symbol(s, Decl(dependentReturnType1.ts, 283, 26))
+
+// capitalize a string or each element of an array of strings
+function capitalize<T extends string | string[]>(
+>capitalize : Symbol(capitalize, Decl(dependentReturnType1.ts, 283, 51))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 285, 20))
+
+    input: T
+>input : Symbol(input, Decl(dependentReturnType1.ts, 285, 49))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 285, 20))
+
+): T extends string[] ? string[] : T extends string ? string : never {
+>T : Symbol(T, Decl(dependentReturnType1.ts, 285, 20))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 285, 20))
+
+    if (isString(input)) {
+>isString : Symbol(isString, Decl(dependentReturnType1.ts, 280, 1))
+>input : Symbol(input, Decl(dependentReturnType1.ts, 285, 49))
+
+        return input[0].toUpperCase() + input.slice(1); // Ok
+>input[0].toUpperCase : Symbol(String.toUpperCase, Decl(lib.es5.d.ts, --, --))
+>input : Symbol(input, Decl(dependentReturnType1.ts, 285, 49))
+>toUpperCase : Symbol(String.toUpperCase, Decl(lib.es5.d.ts, --, --))
+>input.slice : Symbol(String.slice, Decl(lib.es5.d.ts, --, --))
+>input : Symbol(input, Decl(dependentReturnType1.ts, 285, 49))
+>slice : Symbol(String.slice, Decl(lib.es5.d.ts, --, --))
+
+    } else {
+        return input.map(elt => capitalize(elt)); // Ok
+>input.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --))
+>input : Symbol(input, Decl(dependentReturnType1.ts, 285, 49))
+>map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --))
+>elt : Symbol(elt, Decl(dependentReturnType1.ts, 291, 25))
+>capitalize : Symbol(capitalize, Decl(dependentReturnType1.ts, 283, 51))
+>elt : Symbol(elt, Decl(dependentReturnType1.ts, 291, 25))
+    }
+}
+
+function badCapitalize<T extends string | string[]>(
+>badCapitalize : Symbol(badCapitalize, Decl(dependentReturnType1.ts, 293, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 295, 23))
+
+    input: T
+>input : Symbol(input, Decl(dependentReturnType1.ts, 295, 52))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 295, 23))
+
+): T extends string[] ? string[] : T extends string ? string : never {
+>T : Symbol(T, Decl(dependentReturnType1.ts, 295, 23))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 295, 23))
+
+    if (isString(input)) {
+>isString : Symbol(isString, Decl(dependentReturnType1.ts, 280, 1))
+>input : Symbol(input, Decl(dependentReturnType1.ts, 295, 52))
+
+        return input[0].toUpperCase() + input.slice(1); // Ok
+>input[0].toUpperCase : Symbol(String.toUpperCase, Decl(lib.es5.d.ts, --, --))
+>input : Symbol(input, Decl(dependentReturnType1.ts, 295, 52))
+>toUpperCase : Symbol(String.toUpperCase, Decl(lib.es5.d.ts, --, --))
+>input.slice : Symbol(String.slice, Decl(lib.es5.d.ts, --, --))
+>input : Symbol(input, Decl(dependentReturnType1.ts, 295, 52))
+>slice : Symbol(String.slice, Decl(lib.es5.d.ts, --, --))
+
+    } else {
+        return input[0].toUpperCase() + input.slice(1); // Bad, error
+>input[0].toUpperCase : Symbol(String.toUpperCase, Decl(lib.es5.d.ts, --, --))
+>input : Symbol(input, Decl(dependentReturnType1.ts, 295, 52))
+>toUpperCase : Symbol(String.toUpperCase, Decl(lib.es5.d.ts, --, --))
+>input.slice : Symbol(Array.slice, Decl(lib.es5.d.ts, --, --))
+>input : Symbol(input, Decl(dependentReturnType1.ts, 295, 52))
+>slice : Symbol(Array.slice, Decl(lib.es5.d.ts, --, --))
+    }
+}
+
+// No narrowing because conditional's extends type is different from type parameter constraint types
+function voidRet<T extends { a: string } | undefined>(
+>voidRet : Symbol(voidRet, Decl(dependentReturnType1.ts, 303, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 306, 17))
+>a : Symbol(a, Decl(dependentReturnType1.ts, 306, 28))
+
+    x: T
+>x : Symbol(x, Decl(dependentReturnType1.ts, 306, 54))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 306, 17))
+
+): T extends {} ? void : T extends undefined ? number : never {
+>T : Symbol(T, Decl(dependentReturnType1.ts, 306, 17))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 306, 17))
+
+    if (x) {
+>x : Symbol(x, Decl(dependentReturnType1.ts, 306, 54))
+
+        return;
+    }
+    return 1;
+}
+
+// Multiple type parameters at once
+function woo<T extends string | number, U extends string | number>(
+>woo : Symbol(woo, Decl(dependentReturnType1.ts, 313, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 316, 13))
+>U : Symbol(U, Decl(dependentReturnType1.ts, 316, 39))
+
+    x: T,
+>x : Symbol(x, Decl(dependentReturnType1.ts, 316, 67))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 316, 13))
+
+    y: U,
+>y : Symbol(y, Decl(dependentReturnType1.ts, 317, 9))
+>U : Symbol(U, Decl(dependentReturnType1.ts, 316, 39))
+
+): T extends string
+>T : Symbol(T, Decl(dependentReturnType1.ts, 316, 13))
+
+    ? U extends string
+>U : Symbol(U, Decl(dependentReturnType1.ts, 316, 39))
+
+        ? 1
+        : U extends number
+>U : Symbol(U, Decl(dependentReturnType1.ts, 316, 39))
+
+          ? 2
+          : never
+    : T extends number
+>T : Symbol(T, Decl(dependentReturnType1.ts, 316, 13))
+
+      ? U extends number
+>U : Symbol(U, Decl(dependentReturnType1.ts, 316, 39))
+
+          ? 3
+          : U extends string
+>U : Symbol(U, Decl(dependentReturnType1.ts, 316, 39))
+
+            ? 4
+            : never
+      : never {
+    if (typeof x === "number" && typeof y === "string") {
+>x : Symbol(x, Decl(dependentReturnType1.ts, 316, 67))
+>y : Symbol(y, Decl(dependentReturnType1.ts, 317, 9))
+
+        return 1; // Good error
+    }
+    return undefined as any;
+>undefined : Symbol(undefined)
+}
+
+function ttt<T extends string | number, U extends string | number>(
+>ttt : Symbol(ttt, Decl(dependentReturnType1.ts, 336, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 338, 13))
+>U : Symbol(U, Decl(dependentReturnType1.ts, 338, 39))
+
+    x: T,
+>x : Symbol(x, Decl(dependentReturnType1.ts, 338, 67))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 338, 13))
+
+    y: U,
+>y : Symbol(y, Decl(dependentReturnType1.ts, 339, 9))
+>U : Symbol(U, Decl(dependentReturnType1.ts, 338, 39))
+
+): T extends string
+>T : Symbol(T, Decl(dependentReturnType1.ts, 338, 13))
+
+    ? U extends string
+>U : Symbol(U, Decl(dependentReturnType1.ts, 338, 39))
+
+        ? 1
+        : U extends number
+>U : Symbol(U, Decl(dependentReturnType1.ts, 338, 39))
+
+          ? 2
+          : never
+    : T extends number
+>T : Symbol(T, Decl(dependentReturnType1.ts, 338, 13))
+
+      ? U extends number
+>U : Symbol(U, Decl(dependentReturnType1.ts, 338, 39))
+
+          ? 3
+          : U extends string
+>U : Symbol(U, Decl(dependentReturnType1.ts, 338, 39))
+
+            ? 4
+            : never
+      : never {
+    if (typeof x === "number" && typeof y === "string") {
+>x : Symbol(x, Decl(dependentReturnType1.ts, 338, 67))
+>y : Symbol(y, Decl(dependentReturnType1.ts, 339, 9))
+
+        return 4; // Ok
+    }
+    
+    return undefined as any;
+>undefined : Symbol(undefined)
+}
+
+// Shadowing of the narrowed reference
+function shadowing<T extends 1 | 2>(x: T): T extends 1 ? number : T extends 2 ? string : never {
+>shadowing : Symbol(shadowing, Decl(dependentReturnType1.ts, 359, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 362, 19))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 362, 36))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 362, 19))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 362, 19))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 362, 19))
+
+    if (true) {
+        let x: number = Math.random() ? 1 : 2;
+>x : Symbol(x, Decl(dependentReturnType1.ts, 364, 11))
+>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, --, --))
+
+        if (x === 1) {
+>x : Symbol(x, Decl(dependentReturnType1.ts, 364, 11))
+
+            return 1; // Error
+        }
+        return ""; // Error
+    }
+}
+
+function noShadowing<T extends 1 | 2>(x: T): T extends 1 ? number : T extends 2 ? string : never {
+>noShadowing : Symbol(noShadowing, Decl(dependentReturnType1.ts, 370, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 372, 21))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 372, 38))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 372, 21))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 372, 21))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 372, 21))
+
+    if (true) {
+        if (x === 1) {
+>x : Symbol(x, Decl(dependentReturnType1.ts, 372, 38))
+
+            return 1; // Ok
+        }
+        return ""; // Ok
+    }
+}
+
+// If the narrowing reference is out of scope, we simply won't narrow its type
+declare let someX: boolean;
+>someX : Symbol(someX, Decl(dependentReturnType1.ts, 382, 11))
+
+function scope2<T extends boolean>(a: T): T extends true ? 1 : T extends false ? 2 : never {
+>scope2 : Symbol(scope2, Decl(dependentReturnType1.ts, 382, 27))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 383, 16))
+>a : Symbol(a, Decl(dependentReturnType1.ts, 383, 35))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 383, 16))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 383, 16))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 383, 16))
+
+    if ((true)) {
+        const someX = a;
+>someX : Symbol(someX, Decl(dependentReturnType1.ts, 385, 13))
+>a : Symbol(a, Decl(dependentReturnType1.ts, 383, 35))
+
+        if (someX) { // We narrow `someX` and the return type here
+>someX : Symbol(someX, Decl(dependentReturnType1.ts, 385, 13))
+
+            return 1;
+        }
+    }
+    if (!someX) { // This is a different `someX`, so we don't narrow here
+>someX : Symbol(someX, Decl(dependentReturnType1.ts, 382, 11))
+
+        return 2;
+    }
+
+    return undefined as any;
+>undefined : Symbol(undefined)
+}
+
+function moreShadowing<T extends 1 | 2>(x: T): T extends 1 ? number : T extends 2 ? string : never {
+>moreShadowing : Symbol(moreShadowing, Decl(dependentReturnType1.ts, 395, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 397, 23))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 397, 40))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 397, 23))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 397, 23))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 397, 23))
+
+    if (x === 2) {
+>x : Symbol(x, Decl(dependentReturnType1.ts, 397, 40))
+
+        let x: number = Math.random() ? 1 : 2;
+>x : Symbol(x, Decl(dependentReturnType1.ts, 399, 11))
+>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, --, --))
+
+        if (x === 1) {
+>x : Symbol(x, Decl(dependentReturnType1.ts, 399, 11))
+
+            return 1; // Error
+        }
+        return ""; // Ok
+    }
+    return 0; // Ok
+}
+
+// This would be unsafe to narrow due to `infer` type.
+function withInfer<T extends [string] | number>(x: T): T extends [infer R] ? R : T extends number ? boolean : never {
+>withInfer : Symbol(withInfer, Decl(dependentReturnType1.ts, 406, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 409, 19))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 409, 48))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 409, 19))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 409, 19))
+>R : Symbol(R, Decl(dependentReturnType1.ts, 409, 71))
+>R : Symbol(R, Decl(dependentReturnType1.ts, 409, 71))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 409, 19))
+
+    if (typeof x === "number") {
+>x : Symbol(x, Decl(dependentReturnType1.ts, 409, 48))
+
+        return true;
+    }
+    return "";
+}
+
+const withInferResult = withInfer(["a"] as const); // The type says it returns `"a"`, but the function actually returns `""`.
+>withInferResult : Symbol(withInferResult, Decl(dependentReturnType1.ts, 416, 5))
+>withInfer : Symbol(withInfer, Decl(dependentReturnType1.ts, 406, 1))
+>const : Symbol(const)
+
+// Ok
+async function abool<T extends true | false>(x: T): Promise<T extends true ? 1 : T extends false ? 2 : never> {
+>abool : Symbol(abool, Decl(dependentReturnType1.ts, 416, 50))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 419, 21))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 419, 45))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 419, 21))
+>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 419, 21))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 419, 21))
+
+    if (x) {
+>x : Symbol(x, Decl(dependentReturnType1.ts, 419, 45))
+
+        return 1;
+    }
+    return 2;
+}
+
+// Ok
+function* bbool<T extends true | false>(x: T): Generator<number, T extends true ? 1 : T extends false ? 2 : never, unknown> {
+>bbool : Symbol(bbool, Decl(dependentReturnType1.ts, 424, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 427, 16))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 427, 40))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 427, 16))
+>Generator : Symbol(Generator, Decl(lib.es2015.generator.d.ts, --, --))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 427, 16))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 427, 16))
+
+    yield 3;
+    if (x) {
+>x : Symbol(x, Decl(dependentReturnType1.ts, 427, 40))
+
+        return 1;
+    }
+    return 2;
+}
+
+// We don't do the same type of narrowing for `yield` statements
+function* cbool<T extends true | false>(x: T): Generator<T extends true ? 1 : T extends false ? 2 : never, number, unknown> {
+>cbool : Symbol(cbool, Decl(dependentReturnType1.ts, 433, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 436, 16))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 436, 40))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 436, 16))
+>Generator : Symbol(Generator, Decl(lib.es2015.generator.d.ts, --, --))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 436, 16))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 436, 16))
+
+    if (x) {
+>x : Symbol(x, Decl(dependentReturnType1.ts, 436, 40))
+
+        yield 1;
+    }
+    yield 2;
+    return 0;
+}
+
+// From #33912
+abstract class Operation<T, R> {
+>Operation : Symbol(Operation, Decl(dependentReturnType1.ts, 442, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 445, 25))
+>R : Symbol(R, Decl(dependentReturnType1.ts, 445, 27))
+
+    abstract perform(t: T): R;
+>perform : Symbol(Operation.perform, Decl(dependentReturnType1.ts, 445, 32))
+>t : Symbol(t, Decl(dependentReturnType1.ts, 446, 21))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 445, 25))
+>R : Symbol(R, Decl(dependentReturnType1.ts, 445, 27))
+}
+
+type ConditionalReturnType<T, R, EOp extends Operation<T, R> | undefined> =
+>ConditionalReturnType : Symbol(ConditionalReturnType, Decl(dependentReturnType1.ts, 447, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 449, 27))
+>R : Symbol(R, Decl(dependentReturnType1.ts, 449, 29))
+>EOp : Symbol(EOp, Decl(dependentReturnType1.ts, 449, 32))
+>Operation : Symbol(Operation, Decl(dependentReturnType1.ts, 442, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 449, 27))
+>R : Symbol(R, Decl(dependentReturnType1.ts, 449, 29))
+
+    EOp extends Operation<T, R> ? R : EOp extends undefined ? T | R : never;
+>EOp : Symbol(EOp, Decl(dependentReturnType1.ts, 449, 32))
+>Operation : Symbol(Operation, Decl(dependentReturnType1.ts, 442, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 449, 27))
+>R : Symbol(R, Decl(dependentReturnType1.ts, 449, 29))
+>R : Symbol(R, Decl(dependentReturnType1.ts, 449, 29))
+>EOp : Symbol(EOp, Decl(dependentReturnType1.ts, 449, 32))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 449, 27))
+>R : Symbol(R, Decl(dependentReturnType1.ts, 449, 29))
+
+
+class ConditionalOperation<
+>ConditionalOperation : Symbol(ConditionalOperation, Decl(dependentReturnType1.ts, 450, 76))
+
+    T,
+>T : Symbol(T, Decl(dependentReturnType1.ts, 453, 27))
+
+    R,
+>R : Symbol(R, Decl(dependentReturnType1.ts, 454, 6))
+
+    EOp extends Operation<T, R> | undefined,
+>EOp : Symbol(EOp, Decl(dependentReturnType1.ts, 455, 6))
+>Operation : Symbol(Operation, Decl(dependentReturnType1.ts, 442, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 453, 27))
+>R : Symbol(R, Decl(dependentReturnType1.ts, 454, 6))
+
+> extends Operation<T, ConditionalReturnType<T, R, EOp>> {
+>Operation : Symbol(Operation, Decl(dependentReturnType1.ts, 442, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 453, 27))
+>ConditionalReturnType : Symbol(ConditionalReturnType, Decl(dependentReturnType1.ts, 447, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 453, 27))
+>R : Symbol(R, Decl(dependentReturnType1.ts, 454, 6))
+>EOp : Symbol(EOp, Decl(dependentReturnType1.ts, 455, 6))
+
+    constructor(
+        private predicate: (value: T) => boolean,
+>predicate : Symbol(ConditionalOperation.predicate, Decl(dependentReturnType1.ts, 458, 16))
+>value : Symbol(value, Decl(dependentReturnType1.ts, 459, 28))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 453, 27))
+
+        private thenOp: Operation<T, R>,
+>thenOp : Symbol(ConditionalOperation.thenOp, Decl(dependentReturnType1.ts, 459, 49))
+>Operation : Symbol(Operation, Decl(dependentReturnType1.ts, 442, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 453, 27))
+>R : Symbol(R, Decl(dependentReturnType1.ts, 454, 6))
+
+        private elseOp?: EOp,
+>elseOp : Symbol(ConditionalOperation.elseOp, Decl(dependentReturnType1.ts, 460, 40))
+>EOp : Symbol(EOp, Decl(dependentReturnType1.ts, 455, 6))
+
+    ) {
+        super();
+>super : Symbol(Operation, Decl(dependentReturnType1.ts, 442, 1))
+    }
+
+    // We won't try to narrow the return type because `T` is declared on the class and we don't analyze this case.
+    perform(t: T): ConditionalReturnType<T, R, EOp> {
+>perform : Symbol(ConditionalOperation.perform, Decl(dependentReturnType1.ts, 464, 5))
+>t : Symbol(t, Decl(dependentReturnType1.ts, 467, 12))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 453, 27))
+>ConditionalReturnType : Symbol(ConditionalReturnType, Decl(dependentReturnType1.ts, 447, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 453, 27))
+>R : Symbol(R, Decl(dependentReturnType1.ts, 454, 6))
+>EOp : Symbol(EOp, Decl(dependentReturnType1.ts, 455, 6))
+
+        if (this.predicate(t)) {
+>this.predicate : Symbol(ConditionalOperation.predicate, Decl(dependentReturnType1.ts, 458, 16))
+>this : Symbol(ConditionalOperation, Decl(dependentReturnType1.ts, 450, 76))
+>predicate : Symbol(ConditionalOperation.predicate, Decl(dependentReturnType1.ts, 458, 16))
+>t : Symbol(t, Decl(dependentReturnType1.ts, 467, 12))
+
+            return this.thenOp.perform(t); // Bad: this is assignable to all of the branches of the conditional, but we still can't return it
+>this.thenOp.perform : Symbol(Operation.perform, Decl(dependentReturnType1.ts, 445, 32))
+>this.thenOp : Symbol(ConditionalOperation.thenOp, Decl(dependentReturnType1.ts, 459, 49))
+>this : Symbol(ConditionalOperation, Decl(dependentReturnType1.ts, 450, 76))
+>thenOp : Symbol(ConditionalOperation.thenOp, Decl(dependentReturnType1.ts, 459, 49))
+>perform : Symbol(Operation.perform, Decl(dependentReturnType1.ts, 445, 32))
+>t : Symbol(t, Decl(dependentReturnType1.ts, 467, 12))
+
+        } else if (typeof this.elseOp !== "undefined") {
+>this.elseOp : Symbol(ConditionalOperation.elseOp, Decl(dependentReturnType1.ts, 460, 40))
+>this : Symbol(ConditionalOperation, Decl(dependentReturnType1.ts, 450, 76))
+>elseOp : Symbol(ConditionalOperation.elseOp, Decl(dependentReturnType1.ts, 460, 40))
+
+            return this.elseOp.perform(t); // Would be ok
+>this.elseOp.perform : Symbol(Operation.perform, Decl(dependentReturnType1.ts, 445, 32))
+>this.elseOp : Symbol(ConditionalOperation.elseOp, Decl(dependentReturnType1.ts, 460, 40))
+>this : Symbol(ConditionalOperation, Decl(dependentReturnType1.ts, 450, 76))
+>elseOp : Symbol(ConditionalOperation.elseOp, Decl(dependentReturnType1.ts, 460, 40))
+>perform : Symbol(Operation.perform, Decl(dependentReturnType1.ts, 445, 32))
+>t : Symbol(t, Decl(dependentReturnType1.ts, 467, 12))
+
+        } else {
+            return t; // Would be ok
+>t : Symbol(t, Decl(dependentReturnType1.ts, 467, 12))
+        }
+    }
+}
+
+// Like the version above, we will not attempt to narrow because there's more than one reference to `T`,
+// because `T` shows up in the type of `predicate`.
+function perform<T, R, EOp extends Operation<T, R> | undefined>(
+>perform : Symbol(perform, Decl(dependentReturnType1.ts, 476, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 480, 17))
+>R : Symbol(R, Decl(dependentReturnType1.ts, 480, 19))
+>EOp : Symbol(EOp, Decl(dependentReturnType1.ts, 480, 22))
+>Operation : Symbol(Operation, Decl(dependentReturnType1.ts, 442, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 480, 17))
+>R : Symbol(R, Decl(dependentReturnType1.ts, 480, 19))
+
+    t: T,
+>t : Symbol(t, Decl(dependentReturnType1.ts, 480, 64))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 480, 17))
+
+    predicate: (value: T) => boolean,
+>predicate : Symbol(predicate, Decl(dependentReturnType1.ts, 481, 9))
+>value : Symbol(value, Decl(dependentReturnType1.ts, 482, 16))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 480, 17))
+
+    thenOp: Operation<T, R>,
+>thenOp : Symbol(thenOp, Decl(dependentReturnType1.ts, 482, 37))
+>Operation : Symbol(Operation, Decl(dependentReturnType1.ts, 442, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 480, 17))
+>R : Symbol(R, Decl(dependentReturnType1.ts, 480, 19))
+
+    elseOp?: EOp,
+>elseOp : Symbol(elseOp, Decl(dependentReturnType1.ts, 483, 28))
+>EOp : Symbol(EOp, Decl(dependentReturnType1.ts, 480, 22))
+
+    ): ConditionalReturnType<T, R, EOp> {
+>ConditionalReturnType : Symbol(ConditionalReturnType, Decl(dependentReturnType1.ts, 447, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 480, 17))
+>R : Symbol(R, Decl(dependentReturnType1.ts, 480, 19))
+>EOp : Symbol(EOp, Decl(dependentReturnType1.ts, 480, 22))
+
+    if (predicate(t)) {
+>predicate : Symbol(predicate, Decl(dependentReturnType1.ts, 481, 9))
+>t : Symbol(t, Decl(dependentReturnType1.ts, 480, 64))
+
+        return thenOp.perform(t); // Bad: this is assignable to all of the branches of the conditional, but we still can't return it
+>thenOp.perform : Symbol(Operation.perform, Decl(dependentReturnType1.ts, 445, 32))
+>thenOp : Symbol(thenOp, Decl(dependentReturnType1.ts, 482, 37))
+>perform : Symbol(Operation.perform, Decl(dependentReturnType1.ts, 445, 32))
+>t : Symbol(t, Decl(dependentReturnType1.ts, 480, 64))
+
+    } else if (elseOp !== undefined) {
+>elseOp : Symbol(elseOp, Decl(dependentReturnType1.ts, 483, 28))
+>undefined : Symbol(undefined)
+
+        return elseOp.perform(t); // Would be ok
+>elseOp.perform : Symbol(Operation.perform, Decl(dependentReturnType1.ts, 445, 32))
+>elseOp : Symbol(elseOp, Decl(dependentReturnType1.ts, 483, 28))
+>perform : Symbol(Operation.perform, Decl(dependentReturnType1.ts, 445, 32))
+>t : Symbol(t, Decl(dependentReturnType1.ts, 480, 64))
+
+    } else {
+        return t; // Would be ok
+>t : Symbol(t, Decl(dependentReturnType1.ts, 480, 64))
+    }
+}
+
+// Return conditional expressions with parentheses
+function returnStuff1<T extends boolean>(x: T ): T extends true ? 1 : T extends false ? 2 : never {
+>returnStuff1 : Symbol(returnStuff1, Decl(dependentReturnType1.ts, 493, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 496, 22))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 496, 41))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 496, 22))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 496, 22))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 496, 22))
+
+    return (x ? (1) : 2);
+>x : Symbol(x, Decl(dependentReturnType1.ts, 496, 41))
+}
+
+function returnStuff2<T extends 1 | 2 | "a">(x: T ):
+>returnStuff2 : Symbol(returnStuff2, Decl(dependentReturnType1.ts, 498, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 500, 22))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 500, 45))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 500, 22))
+
+    T extends 1 ? "one" : T extends 2 ? "two" : T extends "a" ? 0 : never {
+>T : Symbol(T, Decl(dependentReturnType1.ts, 500, 22))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 500, 22))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 500, 22))
+
+    return (typeof x === "string" ? 0 : (x === 1 ? ("one") : "two"));
+>x : Symbol(x, Decl(dependentReturnType1.ts, 500, 45))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 500, 45))
+}
+
+// If the conditional type's input is `never`, then it resolves to `never`:
+function neverOk<T extends boolean>(x: T): T extends true ? 1 : T extends false ? 2 : never {
+>neverOk : Symbol(neverOk, Decl(dependentReturnType1.ts, 503, 1))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 506, 17))
+>x : Symbol(x, Decl(dependentReturnType1.ts, 506, 36))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 506, 17))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 506, 17))
+>T : Symbol(T, Decl(dependentReturnType1.ts, 506, 17))
+
+    if (x === true) {
+>x : Symbol(x, Decl(dependentReturnType1.ts, 506, 36))
+
+        return 1;
+    }
+    if (x === false) {
+>x : Symbol(x, Decl(dependentReturnType1.ts, 506, 36))
+
+        return 2;
+    }
+    return 1;
+}
diff --git a/tests/baselines/reference/dependentReturnType1.types b/tests/baselines/reference/dependentReturnType1.types
new file mode 100644
index 0000000000000..96265db6b57be
--- /dev/null
+++ b/tests/baselines/reference/dependentReturnType1.types
@@ -0,0 +1,2008 @@
+//// [tests/cases/compiler/dependentReturnType1.ts] ////
+
+=== dependentReturnType1.ts ===
+interface A {
+    1: number;
+>1 : number
+>  : ^^^^^^
+
+    2: string;
+>2 : string
+>  : ^^^^^^
+}
+
+function f1<T extends 1 | 2>(x: T): A[T] {
+>f1 : <T extends 1 | 2>(x: T) => A[T]
+>   : ^ ^^^^^^^^^     ^^ ^^ ^^^^^    
+>x : T
+>  : ^
+
+    if (x === 1) {
+>x === 1 : boolean
+>        : ^^^^^^^
+>x : T
+>  : ^
+>1 : 1
+>  : ^
+
+        return 0; // Ok
+>0 : 0
+>  : ^
+    }
+    else {
+        return 1; // Error
+>1 : 1
+>  : ^
+    }
+}
+
+interface C {
+    1: number;
+>1 : number
+>  : ^^^^^^
+
+    2: string;
+>2 : string
+>  : ^^^^^^
+
+    3: boolean;
+>3 : boolean
+>  : ^^^^^^^
+}
+
+function f2<T extends 1 | 2 | 3>(x: T): C[T] {
+>f2 : <T extends 1 | 2 | 3>(x: T) => C[T]
+>   : ^ ^^^^^^^^^         ^^ ^^ ^^^^^    
+>x : T
+>  : ^
+
+    if (x === 1) {
+>x === 1 : boolean
+>        : ^^^^^^^
+>x : T
+>  : ^
+>1 : 1
+>  : ^
+
+        return 0; // Ok
+>0 : 0
+>  : ^
+    }
+    else {
+        return ""; // Error, returned expression needs to have type string & boolean (= never)
+>"" : ""
+>   : ^^
+    }
+}
+
+function f3<T extends 1 | 2 | 3>(x: T): T extends 1 ? number : T extends 2 ? string : T extends 3 ? boolean : never {
+>f3 : <T extends 1 | 2 | 3>(x: T) => T extends 1 ? number : T extends 2 ? string : T extends 3 ? boolean : never
+>   : ^ ^^^^^^^^^         ^^ ^^ ^^^^^                                                                           
+>x : T
+>  : ^
+
+    if (x === 1) {
+>x === 1 : boolean
+>        : ^^^^^^^
+>x : T
+>  : ^
+>1 : 1
+>  : ^
+
+        return 0; // Ok
+>0 : 0
+>  : ^
+    }
+    else {
+        return ""; // Error, returned expression needs to have type string & boolean (= never)
+>"" : ""
+>   : ^^
+    }
+}
+
+interface One {
+    a: "a";
+>a : "a"
+>  : ^^^
+
+    b: "b";
+>b : "b"
+>  : ^^^
+
+    c: "c";
+>c : "c"
+>  : ^^^
+
+    d: "d";
+>d : "d"
+>  : ^^^
+}
+
+interface Two {
+    a: "a";
+>a : "a"
+>  : ^^^
+
+    b: "b";
+>b : "b"
+>  : ^^^
+
+    e: "e";
+>e : "e"
+>  : ^^^
+
+    f: "f";
+>f : "f"
+>  : ^^^
+}
+
+interface Three {
+    a: "a";
+>a : "a"
+>  : ^^^
+
+    c: "c";
+>c : "c"
+>  : ^^^
+
+    e: "e";
+>e : "e"
+>  : ^^^
+
+    g: "g";
+>g : "g"
+>  : ^^^
+}
+
+interface Four {
+    a: "a";
+>a : "a"
+>  : ^^^
+
+    d: "d";
+>d : "d"
+>  : ^^^
+
+    f: "f";
+>f : "f"
+>  : ^^^
+
+    g: "g";
+>g : "g"
+>  : ^^^
+}
+// Badly written conditional return type, will not trigger narrowing
+function f10<T extends 1 | 2 | 3 | 4>(x: T): T extends 1 ? One : T extends 2 ? Two : T extends 3 ? Three : Four {
+>f10 : <T extends 1 | 2 | 3 | 4>(x: T) => T extends 1 ? One : T extends 2 ? Two : T extends 3 ? Three : Four
+>    : ^ ^^^^^^^^^             ^^ ^^ ^^^^^                                                                  
+>x : T
+>  : ^
+
+    if (x === 1 || x === 2) {
+>x === 1 || x === 2 : boolean
+>                   : ^^^^^^^
+>x === 1 : boolean
+>        : ^^^^^^^
+>x : T
+>  : ^
+>1 : 1
+>  : ^
+>x === 2 : boolean
+>        : ^^^^^^^
+>x : T
+>  : ^
+>2 : 2
+>  : ^
+
+        return { a: "a", b: "b", c: "c", d: "d", e: "e", f: "f" }; // Error
+>{ a: "a", b: "b", c: "c", d: "d", e: "e", f: "f" } : { a: "a"; b: "b"; c: "c"; d: "d"; e: "e"; f: "f"; }
+>                                                   : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>a : "a"
+>  : ^^^
+>"a" : "a"
+>    : ^^^
+>b : "b"
+>  : ^^^
+>"b" : "b"
+>    : ^^^
+>c : "c"
+>  : ^^^
+>"c" : "c"
+>    : ^^^
+>d : "d"
+>  : ^^^
+>"d" : "d"
+>    : ^^^
+>e : "e"
+>  : ^^^
+>"e" : "e"
+>    : ^^^
+>f : "f"
+>  : ^^^
+>"f" : "f"
+>    : ^^^
+    }
+    return { a: "a", b: "b", c: "c", d: "d", e: "e", f: "f", g: "g" }; // Error
+>{ a: "a", b: "b", c: "c", d: "d", e: "e", f: "f", g: "g" } : { a: "a"; b: "b"; c: "c"; d: "d"; e: "e"; f: "f"; g: "g"; }
+>                                                           : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>a : "a"
+>  : ^^^
+>"a" : "a"
+>    : ^^^
+>b : "b"
+>  : ^^^
+>"b" : "b"
+>    : ^^^
+>c : "c"
+>  : ^^^
+>"c" : "c"
+>    : ^^^
+>d : "d"
+>  : ^^^
+>"d" : "d"
+>    : ^^^
+>e : "e"
+>  : ^^^
+>"e" : "e"
+>    : ^^^
+>f : "f"
+>  : ^^^
+>"f" : "f"
+>    : ^^^
+>g : "g"
+>  : ^^^
+>"g" : "g"
+>    : ^^^
+}
+// Well written conditional
+function f101<T extends 1 | 2 | 3 | 4>(x: T): T extends 1 ? One : T extends 2 ? Two : T extends 3 ? Three : T extends 4 ? Four : never {
+>f101 : <T extends 1 | 2 | 3 | 4>(x: T) => T extends 1 ? One : T extends 2 ? Two : T extends 3 ? Three : T extends 4 ? Four : never
+>     : ^ ^^^^^^^^^             ^^ ^^ ^^^^^                                                                                        
+>x : T
+>  : ^
+
+    if (x === 1 || x === 2) {
+>x === 1 || x === 2 : boolean
+>                   : ^^^^^^^
+>x === 1 : boolean
+>        : ^^^^^^^
+>x : T
+>  : ^
+>1 : 1
+>  : ^
+>x === 2 : boolean
+>        : ^^^^^^^
+>x : T
+>  : ^
+>2 : 2
+>  : ^
+
+        return { a: "a", b: "b", c: "c", d: "d", e: "e", f: "f" }; // Ok
+>{ a: "a", b: "b", c: "c", d: "d", e: "e", f: "f" } : { a: "a"; b: "b"; c: "c"; d: "d"; e: "e"; f: "f"; }
+>                                                   : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>a : "a"
+>  : ^^^
+>"a" : "a"
+>    : ^^^
+>b : "b"
+>  : ^^^
+>"b" : "b"
+>    : ^^^
+>c : "c"
+>  : ^^^
+>"c" : "c"
+>    : ^^^
+>d : "d"
+>  : ^^^
+>"d" : "d"
+>    : ^^^
+>e : "e"
+>  : ^^^
+>"e" : "e"
+>    : ^^^
+>f : "f"
+>  : ^^^
+>"f" : "f"
+>    : ^^^
+    }
+    // Excess property becomes a problem with the change,
+    // because we now check assignability to a narrower type...
+    return { a: "a", b: "b", c: "c", d: "d", e: "e", f: "f", g: "g" }; // EPC Error
+>{ a: "a", b: "b", c: "c", d: "d", e: "e", f: "f", g: "g" } : { a: "a"; b: string; c: "c"; d: "d"; e: "e"; f: "f"; g: "g"; }
+>                                                           : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>a : "a"
+>  : ^^^
+>"a" : "a"
+>    : ^^^
+>b : string
+>  : ^^^^^^
+>"b" : "b"
+>    : ^^^
+>c : "c"
+>  : ^^^
+>"c" : "c"
+>    : ^^^
+>d : "d"
+>  : ^^^
+>"d" : "d"
+>    : ^^^
+>e : "e"
+>  : ^^^
+>"e" : "e"
+>    : ^^^
+>f : "f"
+>  : ^^^
+>"f" : "f"
+>    : ^^^
+>g : "g"
+>  : ^^^
+>"g" : "g"
+>    : ^^^
+}
+
+// This will not work for several reasons:
+// - first because the constraint of type parameter `Arg` is generic,
+//   so attempting to narrow the type of `arg` in the `if` would result in type `Arg & LeftIn`,
+//   which when substituted in the conditional return type, would not further resolve that conditional type
+// - second because the `else` branch would never work because we don't narrow the type of `arg` to `Arg & RightIn` 
+function conditionalProducingIf<LeftIn, RightIn, LeftOut, RightOut, Arg extends LeftIn | RightIn>(
+>conditionalProducingIf : <LeftIn, RightIn, LeftOut, RightOut, Arg extends LeftIn | RightIn>(arg: Arg, cond: (arg: LeftIn | RightIn) => arg is LeftIn, produceLeftOut: (arg: LeftIn) => LeftOut, produceRightOut: (arg: RightIn) => RightOut) => Arg extends LeftIn ? LeftOut : Arg extends RightIn ? RightOut : never
+>                       : ^      ^^       ^^       ^^        ^^   ^^^^^^^^^                ^^   ^^   ^^    ^^                                        ^^              ^^                        ^^               ^^                          ^^^^^                                                                     
+
+    arg: Arg,
+>arg : Arg
+>    : ^^^
+
+    cond: (arg: LeftIn | RightIn) => arg is LeftIn,
+>cond : (arg: LeftIn | RightIn) => arg is LeftIn
+>     : ^   ^^                ^^^^^             
+>arg : LeftIn | RightIn
+>    : ^^^^^^^^^^^^^^^^
+
+    produceLeftOut: (arg: LeftIn) => LeftOut,
+>produceLeftOut : (arg: LeftIn) => LeftOut
+>               : ^   ^^      ^^^^^       
+>arg : LeftIn
+>    : ^^^^^^
+
+    produceRightOut: (arg: RightIn) => RightOut):
+>produceRightOut : (arg: RightIn) => RightOut
+>                : ^   ^^       ^^^^^        
+>arg : RightIn
+>    : ^^^^^^^
+
+    Arg extends LeftIn ? LeftOut : Arg extends RightIn ? RightOut : never
+{
+    if (cond(arg)) {
+>cond(arg) : boolean
+>          : ^^^^^^^
+>cond : (arg: LeftIn | RightIn) => arg is LeftIn
+>     : ^   ^^                ^^^^^             
+>arg : Arg
+>    : ^^^
+
+        return produceLeftOut(arg);
+>produceLeftOut(arg) : LeftOut
+>                    : ^^^^^^^
+>produceLeftOut : (arg: LeftIn) => LeftOut
+>               : ^   ^^      ^^^^^       
+>arg : Arg & LeftIn
+>    : ^^^^^^^^^^^^
+
+    } else {
+        return produceRightOut(arg as RightIn);
+>produceRightOut(arg as RightIn) : RightOut
+>                                : ^^^^^^^^
+>produceRightOut : (arg: RightIn) => RightOut
+>                : ^   ^^       ^^^^^        
+>arg as RightIn : RightIn
+>               : ^^^^^^^
+>arg : Arg
+>    : ^^^
+    }
+}
+
+interface Animal {
+    name: string;
+>name : string
+>     : ^^^^^^
+}
+
+interface Dog extends Animal {
+    bark: () => string;
+>bark : () => string
+>     : ^^^^^^      
+}
+
+// This would be unsafe to narrow.
+declare function isDog(x: Animal): x is Dog;
+>isDog : (x: Animal) => x is Dog
+>      : ^ ^^      ^^^^^        
+>x : Animal
+>  : ^^^^^^
+
+declare function doggy(x: Dog): number;
+>doggy : (x: Dog) => number
+>      : ^ ^^   ^^^^^      
+>x : Dog
+>  : ^^^
+
+function f12<T extends Animal>(x: T): T extends Dog ? number : string {
+>f12 : <T extends Animal>(x: T) => T extends Dog ? number : string
+>    : ^ ^^^^^^^^^      ^^ ^^ ^^^^^                               
+>x : T
+>  : ^
+
+    if (isDog(x)) { // `x` has type `T & Dog` here
+>isDog(x) : boolean
+>         : ^^^^^^^
+>isDog : (x: Animal) => x is Dog
+>      : ^ ^^      ^^^^^        
+>x : T
+>  : ^
+
+        return doggy(x);
+>doggy(x) : number
+>         : ^^^^^^
+>doggy : (x: Dog) => number
+>      : ^ ^^   ^^^^^      
+>x : T & Dog
+>  : ^^^^^^^
+    }
+    return ""; // Error: Should not work because we can't express "not a Dog" in the type system
+>"" : ""
+>   : ^^
+}
+
+// Cannot narrow `keyof` too eagerly or something like the below breaks
+function f<Entry extends { [index: string]: number | boolean }, EntryId extends keyof Entry>(entry: EntryId): Entry[EntryId] {
+>f : <Entry extends { [index: string]: number | boolean; }, EntryId extends keyof Entry>(entry: EntryId) => Entry[EntryId]
+>  : ^     ^^^^^^^^^                                      ^^       ^^^^^^^^^           ^^     ^^       ^^^^^              
+>index : string
+>      : ^^^^^^
+>entry : EntryId
+>      : ^^^^^^^
+
+    const entries = {} as Entry;
+>entries : Entry
+>        : ^^^^^
+>{} as Entry : Entry
+>            : ^^^^^
+>{} : {}
+>   : ^^
+
+    return entries[entry];
+>entries[entry] : Entry[EntryId]
+>               : ^^^^^^^^^^^^^^
+>entries : Entry
+>        : ^^^^^
+>entry : EntryId
+>      : ^^^^^^^
+}
+
+// Works the same as before
+declare function takeA(val: 'A'): void;
+>takeA : (val: "A") => void
+>      : ^   ^^   ^^^^^    
+>val : "A"
+>    : ^^^
+
+export function bounceAndTakeIfA<AB extends 'A' | 'B'>(value: AB): AB {
+>bounceAndTakeIfA : <AB extends "A" | "B">(value: AB) => AB
+>                 : ^  ^^^^^^^^^         ^^     ^^  ^^^^^  
+>value : AB
+>      : ^^
+
+    if (value === 'A') {
+>value === 'A' : boolean
+>              : ^^^^^^^
+>value : AB
+>      : ^^
+>'A' : "A"
+>    : ^^^
+
+        takeA(value);
+>takeA(value) : void
+>             : ^^^^
+>takeA : (val: "A") => void
+>      : ^   ^^   ^^^^^    
+>value : "A"
+>      : ^^^
+
+        takeAB(value);
+>takeAB(value) : void
+>              : ^^^^
+>takeAB : (val: AB) => void
+>       : ^   ^^  ^^^^^    
+>value : AB
+>      : ^^
+
+        return value;
+>value : AB
+>      : ^^
+    }
+
+    return value;
+>value : AB
+>      : ^^
+
+    function takeAB(val: AB): void {}
+>takeAB : (val: AB) => void
+>       : ^   ^^  ^^^^^    
+>val : AB
+>    : ^^
+}
+
+// Works the same as before
+export function bbb<AB extends "a" | "b">(value: AB): "a" {
+>bbb : <AB extends "a" | "b">(value: AB) => "a"
+>    : ^  ^^^^^^^^^         ^^     ^^  ^^^^^   
+>value : AB
+>      : ^^
+
+    if (value === "a") {
+>value === "a" : boolean
+>              : ^^^^^^^
+>value : AB
+>      : ^^
+>"a" : "a"
+>    : ^^^
+
+        return value;
+>value : "a"
+>      : ^^^
+    }
+    return "a";
+>"a" : "a"
+>    : ^^^
+}
+
+class Unnamed {
+>Unnamed : Unnamed
+>        : ^^^^^^^
+
+    root!: { name: string };
+>root : { name: string; }
+>     : ^^^^^^^^      ^^^
+>name : string
+>     : ^^^^^^
+
+    // Error: No narrowing because parameter is optional but `T` doesn't allow for undefined
+    name<T extends string>(name?: T): T extends string ? this : T extends undefined ? string : never {
+>name : <T extends string>(name?: T) => T extends string ? this : T extends undefined ? string : never
+>     : ^ ^^^^^^^^^      ^^    ^^^ ^^^^^                                                              
+>name : T | undefined
+>     : ^^^^^^^^^^^^^
+
+        if (typeof name === 'undefined') {
+>typeof name === 'undefined' : boolean
+>                            : ^^^^^^^
+>typeof name : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
+>            : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>name : T | undefined
+>     : ^^^^^^^^^^^^^
+>'undefined' : "undefined"
+>            : ^^^^^^^^^^^
+
+            return this.root.name;
+>this.root.name : string
+>               : ^^^^^^
+>this.root : { name: string; }
+>          : ^^^^^^^^      ^^^
+>this : this
+>     : ^^^^
+>root : { name: string; }
+>     : ^^^^^^^^      ^^^
+>name : string
+>     : ^^^^^^
+        }
+        return this;
+>this : this
+>     : ^^^^
+    }
+
+    // Good conditional
+    name2<T extends string | undefined>(name?: T): T extends string ? this : T extends undefined ? string : never {
+>name2 : <T extends string | undefined>(name?: T) => T extends string ? this : T extends undefined ? string : never
+>      : ^ ^^^^^^^^^                  ^^    ^^^ ^^^^^                                                              
+>name : T | undefined
+>     : ^^^^^^^^^^^^^
+
+        if (typeof name === 'undefined') {
+>typeof name === 'undefined' : boolean
+>                            : ^^^^^^^
+>typeof name : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
+>            : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>name : T | undefined
+>     : ^^^^^^^^^^^^^
+>'undefined' : "undefined"
+>            : ^^^^^^^^^^^
+
+            return this.root.name; // Ok
+>this.root.name : string
+>               : ^^^^^^
+>this.root : { name: string; }
+>          : ^^^^^^^^      ^^^
+>this : this
+>     : ^^^^
+>root : { name: string; }
+>     : ^^^^^^^^      ^^^
+>name : string
+>     : ^^^^^^
+        }
+        this.root.name = name;
+>this.root.name = name : string
+>                      : ^^^^^^
+>this.root.name : string
+>               : ^^^^^^
+>this.root : { name: string; }
+>          : ^^^^^^^^      ^^^
+>this : this
+>     : ^^^^
+>root : { name: string; }
+>     : ^^^^^^^^      ^^^
+>name : string
+>     : ^^^^^^
+>name : string
+>     : ^^^^^^
+
+        return this; // Ok
+>this : this
+>     : ^^^^
+    }
+
+    // Good conditional, wrong return expressions
+    name3<T extends string | undefined>(name?: T): T extends string ? this : T extends undefined ? string : never {
+>name3 : <T extends string | undefined>(name?: T) => T extends string ? this : T extends undefined ? string : never
+>      : ^ ^^^^^^^^^                  ^^    ^^^ ^^^^^                                                              
+>name : T | undefined
+>     : ^^^^^^^^^^^^^
+
+        if (typeof name === 'undefined') {
+>typeof name === 'undefined' : boolean
+>                            : ^^^^^^^
+>typeof name : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
+>            : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>name : T | undefined
+>     : ^^^^^^^^^^^^^
+>'undefined' : "undefined"
+>            : ^^^^^^^^^^^
+
+            return this; // Error
+>this : this
+>     : ^^^^
+        }
+        this.root.name = name;
+>this.root.name = name : string
+>                      : ^^^^^^
+>this.root.name : string
+>               : ^^^^^^
+>this.root : { name: string; }
+>          : ^^^^^^^^      ^^^
+>this : this
+>     : ^^^^
+>root : { name: string; }
+>     : ^^^^^^^^      ^^^
+>name : string
+>     : ^^^^^^
+>name : string
+>     : ^^^^^^
+
+        return name; // Error
+>name : T & {}
+>     : ^^^^^^
+    }
+}
+
+// Conditional expressions
+interface Aa {
+    1: number;
+>1 : number
+>  : ^^^^^^
+
+    2: string;
+>2 : string
+>  : ^^^^^^
+
+    3: boolean;
+>3 : boolean
+>  : ^^^^^^^
+}
+
+function trivialConditional<T extends 1 | 2 | 3>(x: T): Aa[T] {
+>trivialConditional : <T extends 1 | 2 | 3>(x: T) => Aa[T]
+>                   : ^ ^^^^^^^^^         ^^ ^^ ^^^^^     
+>x : T
+>  : ^
+
+    if (x !== 1) {
+>x !== 1 : boolean
+>        : ^^^^^^^
+>x : T
+>  : ^
+>1 : 1
+>  : ^
+
+        return x === 2 ? "" : true;
+>x === 2 ? "" : true : true | ""
+>                    : ^^^^^^^^^
+>x === 2 : boolean
+>        : ^^^^^^^
+>x : T
+>  : ^
+>2 : 2
+>  : ^
+>"" : ""
+>   : ^^
+>true : true
+>     : ^^^^
+    }
+    else {
+        return 0;
+>0 : 0
+>  : ^
+    }
+}
+
+function conditional<T extends boolean>(x: T):
+>conditional : <T extends boolean>(x: T) => T extends true ? 1 : T extends false ? 2 : never
+>            : ^ ^^^^^^^^^       ^^ ^^ ^^^^^                                                
+>x : T
+>  : ^
+
+ T extends true ? 1 : T extends false ? 2 : never {
+>true : true
+>     : ^^^^
+>false : false
+>      : ^^^^^
+
+    return x ? 1 : 2; // Ok
+>x ? 1 : 2 : 1 | 2
+>          : ^^^^^
+>x : T
+>  : ^
+>1 : 1
+>  : ^
+>2 : 2
+>  : ^
+}
+
+function contextualConditional<T extends "a" | "b">(
+>contextualConditional : <T extends "a" | "b">(x: T) => T extends "a" ? "a" : T extends "b" ? number : never
+>                      : ^ ^^^^^^^^^         ^^ ^^ ^^^^^                                                    
+
+    x: T
+>x : T
+>  : ^
+
+): T extends "a" ? "a" : T extends "b" ? number : never {
+    return x === "a" ? x : parseInt(x); // Ok
+>x === "a" ? x : parseInt(x) : number | "a"
+>                            : ^^^^^^^^^^^^
+>x === "a" : boolean
+>          : ^^^^^^^
+>x : T
+>  : ^
+>"a" : "a"
+>    : ^^^
+>x : "a"
+>  : ^^^
+>parseInt(x) : number
+>            : ^^^^^^
+>parseInt : (string: string, radix?: number) => number
+>         : ^      ^^      ^^     ^^^      ^^^^^      
+>x : "b"
+>  : ^^^
+}
+
+function conditionalWithError<T extends "a" | "b">(
+>conditionalWithError : <T extends "a" | "b">(x: T) => T extends "a" ? number : T extends "b" ? string : never
+>                     : ^ ^^^^^^^^^         ^^ ^^ ^^^^^                                                       
+
+    x: T
+>x : T
+>  : ^
+
+): T extends "a" ? number : T extends "b" ? string : never {
+    return x === "a" ? x : parseInt(x); // Error
+>x === "a" ? x : parseInt(x) : number | "a"
+>                            : ^^^^^^^^^^^^
+>x === "a" : boolean
+>          : ^^^^^^^
+>x : T
+>  : ^
+>"a" : "a"
+>    : ^^^
+>x : "a"
+>  : ^^^
+>parseInt(x) : number
+>            : ^^^^^^
+>parseInt : (string: string, radix?: number) => number
+>         : ^      ^^      ^^     ^^^      ^^^^^      
+>x : "b"
+>  : ^^^
+}
+
+// Multiple indexed type reductions
+interface BB {
+    "a": number;
+>"a" : number
+>    : ^^^^^^
+
+    [y: number]: string;
+>y : number
+>  : ^^^^^^
+}
+
+interface AA<T extends keyof BB> {
+    "c": BB[T];
+>"c" : BB[T]
+>    : ^^^^^
+
+    "d": boolean,
+>"d" : boolean
+>    : ^^^^^^^
+}
+
+function reduction<T extends keyof BB, U extends "c" | "d">(x: T, y: U): AA<T>[U] {
+>reduction : <T extends keyof BB, U extends "c" | "d">(x: T, y: U) => AA<T>[U]
+>          : ^ ^^^^^^^^^        ^^ ^^^^^^^^^         ^^ ^^ ^^ ^^ ^^^^^        
+>x : T
+>  : ^
+>y : U
+>  : ^
+
+    if (y === "c" && x === "a") {
+>y === "c" && x === "a" : boolean
+>                       : ^^^^^^^
+>y === "c" : boolean
+>          : ^^^^^^^
+>y : U
+>  : ^
+>"c" : "c"
+>    : ^^^
+>x === "a" : boolean
+>          : ^^^^^^^
+>x : T
+>  : ^
+>"a" : "a"
+>    : ^^^
+
+        // AA<T>[U='c'] -> BB[T]
+        // BB[T='a'] -> number
+        return 0; // Ok
+>0 : 0
+>  : ^
+    }
+
+    return undefined as never;
+>undefined as never : never
+>                   : ^^^^^
+>undefined : undefined
+>          : ^^^^^^^^^
+}
+
+// Substitution types are not narrowed
+function subsCond<T extends 1 | 2 | 3>(
+>subsCond : <T extends 1 | 2 | 3>(x: T) => T extends 1 | 2 ? T extends 1 ? string : T extends 2 ? boolean : never : T extends 3 ? number : never
+>         : ^ ^^^^^^^^^         ^^ ^^ ^^^^^                                                                                                     
+
+    x: T,
+>x : T
+>  : ^
+
+): T extends 1 | 2
+    ? T extends 1
+        ? string
+        : T extends 2
+          ? boolean
+          : never
+    : T extends 3
+      ? number
+      : never {
+    if (x === 1) {
+>x === 1 : boolean
+>        : ^^^^^^^
+>x : T
+>  : ^
+>1 : 1
+>  : ^
+
+        return "";
+>"" : ""
+>   : ^^
+
+    } else if (x == 2) {
+>x == 2 : boolean
+>       : ^^^^^^^
+>x : T
+>  : ^
+>2 : 2
+>  : ^
+
+        return true;
+>true : true
+>     : ^^^^
+    }
+    return 3;
+>3 : 3
+>  : ^
+}
+
+
+// Unsafe: check types overlap
+declare function q(x: object): x is { b: number };
+>q : (x: object) => x is { b: number; }
+>  : ^ ^^      ^^^^^                   
+>x : object
+>  : ^^^^^^
+>b : number
+>  : ^^^^^^
+
+function foo<T extends { a: string } | { b: number }>(
+>foo : <T extends { a: string; } | { b: number; }>(x: T) => T extends { a: string; } ? number : T extends { b: number; } ? string : never
+>    : ^ ^^^^^^^^^                               ^^ ^^ ^^^^^                                                                             
+>a : string
+>  : ^^^^^^
+>b : number
+>  : ^^^^^^
+
+    x: T,
+>x : T
+>  : ^
+
+): T extends { a: string } ? number : T extends { b: number } ? string : never {
+>a : string
+>  : ^^^^^^
+>b : number
+>  : ^^^^^^
+
+    if (q(x)) {
+>q(x) : boolean
+>     : ^^^^^^^
+>q : (x: object) => x is { b: number; }
+>  : ^ ^^      ^^^^^                   
+>x : { a: string; } | { b: number; }
+>  : ^^^^^      ^^^^^^^^^^^      ^^^
+
+        x.b;
+>x.b : number
+>    : ^^^^^^
+>x : { b: number; }
+>  : ^^^^^      ^^^
+>b : number
+>  : ^^^^^^
+
+        return "";
+>"" : ""
+>   : ^^
+    }
+    x.a;
+>x.a : string
+>    : ^^^^^^
+>x : { a: string; }
+>  : ^^^^^      ^^^
+>a : string
+>  : ^^^^^^
+
+    return 1;
+>1 : 1
+>  : ^
+}
+
+let y = { a: "", b: 1 }
+>y : { a: string; b: number; }
+>  : ^^^^^^^^^^^^^^^^^^^^^^^^^
+>{ a: "", b: 1 } : { a: string; b: number; }
+>                : ^^^^^^^^^^^^^^^^^^^^^^^^^
+>a : string
+>  : ^^^^^^
+>"" : ""
+>   : ^^
+>b : number
+>  : ^^^^^^
+>1 : 1
+>  : ^
+
+const r = foo<{ a: string }>(y); // type says number but actually string
+>r : number
+>  : ^^^^^^
+>foo<{ a: string }>(y) : number
+>                      : ^^^^^^
+>foo : <T extends { a: string; } | { b: number; }>(x: T) => T extends { a: string; } ? number : T extends { b: number; } ? string : never
+>    : ^ ^^^^^^^^^                               ^^ ^^ ^^^^^                                                                             
+>a : string
+>  : ^^^^^^
+>y : { a: string; b: number; }
+>  : ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+type HelperCond<T, A, R1, B, R2> = T extends A ? R1 : T extends B ? R2 : never;
+>HelperCond : HelperCond<T, A, R1, B, R2>
+>           : ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+// We don't narrow the return type because the conditionals are not distributive
+function foo2<U extends string | number, V extends boolean>(x: U, y: V):
+>foo2 : <U extends string | number, V extends boolean>(x: U, y: V) => HelperCond<{ x: U; y: V; }, { x: string; y: true; }, 1, { x: number; y: false; }, 2>
+>     : ^ ^^^^^^^^^               ^^ ^^^^^^^^^       ^^ ^^ ^^ ^^ ^^^^^                                                                                    
+>x : U
+>  : ^
+>y : V
+>  : ^
+
+    HelperCond<{ x: U, y: V },
+>x : U
+>  : ^
+>y : V
+>  : ^
+
+        { x: string, y: true }, 1,
+>x : string
+>  : ^^^^^^
+>y : true
+>  : ^^^^
+>true : true
+>     : ^^^^
+
+        { x: number, y: false }, 2> {
+>x : number
+>  : ^^^^^^
+>y : false
+>  : ^^^^^
+>false : false
+>      : ^^^^^
+
+    if (typeof x === "string" && y === true) {
+>typeof x === "string" && y === true : boolean
+>                                    : ^^^^^^^
+>typeof x === "string" : boolean
+>                      : ^^^^^^^
+>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
+>         : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>x : U
+>  : ^
+>"string" : "string"
+>         : ^^^^^^^^
+>y === true : boolean
+>           : ^^^^^^^
+>y : V
+>  : ^
+>true : true
+>     : ^^^^
+
+        return 1; // Error
+>1 : 1
+>  : ^
+    }
+    if (typeof x === "number" && y === false) {
+>typeof x === "number" && y === false : boolean
+>                                     : ^^^^^^^
+>typeof x === "number" : boolean
+>                      : ^^^^^^^
+>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
+>         : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>x : U
+>  : ^
+>"number" : "number"
+>         : ^^^^^^^^
+>y === false : boolean
+>            : ^^^^^^^
+>y : V
+>  : ^
+>false : false
+>      : ^^^^^
+
+        return 2; // Error
+>2 : 2
+>  : ^
+    }
+    return 0; // Error
+>0 : 0
+>  : ^
+}
+
+// From https://github.com/microsoft/TypeScript/issues/24929#issue-332087943
+declare function isString(s: unknown): s is string;
+>isString : (s: unknown) => s is string
+>         : ^ ^^       ^^^^^           
+>s : unknown
+>  : ^^^^^^^
+
+// capitalize a string or each element of an array of strings
+function capitalize<T extends string | string[]>(
+>capitalize : <T extends string | string[]>(input: T) => T extends string[] ? string[] : T extends string ? string : never
+>           : ^ ^^^^^^^^^                 ^^     ^^ ^^^^^                                                                 
+
+    input: T
+>input : T
+>      : ^
+
+): T extends string[] ? string[] : T extends string ? string : never {
+    if (isString(input)) {
+>isString(input) : boolean
+>                : ^^^^^^^
+>isString : (s: unknown) => s is string
+>         : ^ ^^       ^^^^^           
+>input : string | string[]
+>      : ^^^^^^^^^^^^^^^^^
+
+        return input[0].toUpperCase() + input.slice(1); // Ok
+>input[0].toUpperCase() + input.slice(1) : string
+>                                        : ^^^^^^
+>input[0].toUpperCase() : string
+>                       : ^^^^^^
+>input[0].toUpperCase : () => string
+>                     : ^^^^^^      
+>input[0] : string
+>         : ^^^^^^
+>input : string
+>      : ^^^^^^
+>0 : 0
+>  : ^
+>toUpperCase : () => string
+>            : ^^^^^^      
+>input.slice(1) : string
+>               : ^^^^^^
+>input.slice : (start?: number, end?: number) => string
+>            : ^     ^^^      ^^   ^^^      ^^^^^      
+>input : string
+>      : ^^^^^^
+>slice : (start?: number, end?: number) => string
+>      : ^     ^^^      ^^   ^^^      ^^^^^      
+>1 : 1
+>  : ^
+
+    } else {
+        return input.map(elt => capitalize(elt)); // Ok
+>input.map(elt => capitalize(elt)) : string[]
+>                                  : ^^^^^^^^
+>input.map : <U>(callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[]
+>          : ^ ^^          ^^^     ^^^^^^^^^^     ^^      ^^     ^^^^^^^^^^^^^^^^^^       ^^^   ^^^^^^^^
+>input : string[]
+>      : ^^^^^^^^
+>map : <U>(callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[]
+>    : ^ ^^          ^^^     ^^^^^^^^^^     ^^      ^^     ^^^^^^^^^^^^^^^^^^       ^^^   ^^^^^^^^
+>elt => capitalize(elt) : (elt: string) => string
+>                       : ^   ^^^^^^^^^^^^^^^^^^^
+>elt : string
+>    : ^^^^^^
+>capitalize(elt) : string
+>                : ^^^^^^
+>capitalize : <T extends string | string[]>(input: T) => T extends string[] ? string[] : T extends string ? string : never
+>           : ^ ^^^^^^^^^                 ^^     ^^ ^^^^^                                                                 
+>elt : string
+>    : ^^^^^^
+    }
+}
+
+function badCapitalize<T extends string | string[]>(
+>badCapitalize : <T extends string | string[]>(input: T) => T extends string[] ? string[] : T extends string ? string : never
+>              : ^ ^^^^^^^^^                 ^^     ^^ ^^^^^                                                                 
+
+    input: T
+>input : T
+>      : ^
+
+): T extends string[] ? string[] : T extends string ? string : never {
+    if (isString(input)) {
+>isString(input) : boolean
+>                : ^^^^^^^
+>isString : (s: unknown) => s is string
+>         : ^ ^^       ^^^^^           
+>input : string | string[]
+>      : ^^^^^^^^^^^^^^^^^
+
+        return input[0].toUpperCase() + input.slice(1); // Ok
+>input[0].toUpperCase() + input.slice(1) : string
+>                                        : ^^^^^^
+>input[0].toUpperCase() : string
+>                       : ^^^^^^
+>input[0].toUpperCase : () => string
+>                     : ^^^^^^      
+>input[0] : string
+>         : ^^^^^^
+>input : string
+>      : ^^^^^^
+>0 : 0
+>  : ^
+>toUpperCase : () => string
+>            : ^^^^^^      
+>input.slice(1) : string
+>               : ^^^^^^
+>input.slice : (start?: number, end?: number) => string
+>            : ^     ^^^      ^^   ^^^      ^^^^^      
+>input : string
+>      : ^^^^^^
+>slice : (start?: number, end?: number) => string
+>      : ^     ^^^      ^^   ^^^      ^^^^^      
+>1 : 1
+>  : ^
+
+    } else {
+        return input[0].toUpperCase() + input.slice(1); // Bad, error
+>input[0].toUpperCase() + input.slice(1) : string
+>                                        : ^^^^^^
+>input[0].toUpperCase() : string
+>                       : ^^^^^^
+>input[0].toUpperCase : () => string
+>                     : ^^^^^^      
+>input[0] : string
+>         : ^^^^^^
+>input : string[]
+>      : ^^^^^^^^
+>0 : 0
+>  : ^
+>toUpperCase : () => string
+>            : ^^^^^^      
+>input.slice(1) : string[]
+>               : ^^^^^^^^
+>input.slice : (start?: number, end?: number) => string[]
+>            : ^     ^^^      ^^   ^^^      ^^^^^^^^^^^^^
+>input : string[]
+>      : ^^^^^^^^
+>slice : (start?: number, end?: number) => string[]
+>      : ^     ^^^      ^^   ^^^      ^^^^^^^^^^^^^
+>1 : 1
+>  : ^
+    }
+}
+
+// No narrowing because conditional's extends type is different from type parameter constraint types
+function voidRet<T extends { a: string } | undefined>(
+>voidRet : <T extends { a: string; } | undefined>(x: T) => T extends {} ? void : T extends undefined ? number : never
+>        : ^ ^^^^^^^^^                          ^^ ^^ ^^^^^                                                          
+>a : string
+>  : ^^^^^^
+
+    x: T
+>x : T
+>  : ^
+
+): T extends {} ? void : T extends undefined ? number : never {
+    if (x) {
+>x : T
+>  : ^
+
+        return;
+    }
+    return 1;
+>1 : 1
+>  : ^
+}
+
+// Multiple type parameters at once
+function woo<T extends string | number, U extends string | number>(
+>woo : <T extends string | number, U extends string | number>(x: T, y: U) => T extends string ? U extends string ? 1 : U extends number ? 2 : never : T extends number ? U extends number ? 3 : U extends string ? 4 : never : never
+>    : ^ ^^^^^^^^^               ^^ ^^^^^^^^^               ^^ ^^ ^^ ^^ ^^^^^                                                                                                                                                       
+
+    x: T,
+>x : T
+>  : ^
+
+    y: U,
+>y : U
+>  : ^
+
+): T extends string
+    ? U extends string
+        ? 1
+        : U extends number
+          ? 2
+          : never
+    : T extends number
+      ? U extends number
+          ? 3
+          : U extends string
+            ? 4
+            : never
+      : never {
+    if (typeof x === "number" && typeof y === "string") {
+>typeof x === "number" && typeof y === "string" : boolean
+>                                               : ^^^^^^^
+>typeof x === "number" : boolean
+>                      : ^^^^^^^
+>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
+>         : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>x : T
+>  : ^
+>"number" : "number"
+>         : ^^^^^^^^
+>typeof y === "string" : boolean
+>                      : ^^^^^^^
+>typeof y : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
+>         : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>y : U
+>  : ^
+>"string" : "string"
+>         : ^^^^^^^^
+
+        return 1; // Good error
+>1 : 1
+>  : ^
+    }
+    return undefined as any;
+>undefined as any : any
+>                 : ^^^
+>undefined : undefined
+>          : ^^^^^^^^^
+}
+
+function ttt<T extends string | number, U extends string | number>(
+>ttt : <T extends string | number, U extends string | number>(x: T, y: U) => T extends string ? U extends string ? 1 : U extends number ? 2 : never : T extends number ? U extends number ? 3 : U extends string ? 4 : never : never
+>    : ^ ^^^^^^^^^               ^^ ^^^^^^^^^               ^^ ^^ ^^ ^^ ^^^^^                                                                                                                                                       
+
+    x: T,
+>x : T
+>  : ^
+
+    y: U,
+>y : U
+>  : ^
+
+): T extends string
+    ? U extends string
+        ? 1
+        : U extends number
+          ? 2
+          : never
+    : T extends number
+      ? U extends number
+          ? 3
+          : U extends string
+            ? 4
+            : never
+      : never {
+    if (typeof x === "number" && typeof y === "string") {
+>typeof x === "number" && typeof y === "string" : boolean
+>                                               : ^^^^^^^
+>typeof x === "number" : boolean
+>                      : ^^^^^^^
+>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
+>         : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>x : T
+>  : ^
+>"number" : "number"
+>         : ^^^^^^^^
+>typeof y === "string" : boolean
+>                      : ^^^^^^^
+>typeof y : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
+>         : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>y : U
+>  : ^
+>"string" : "string"
+>         : ^^^^^^^^
+
+        return 4; // Ok
+>4 : 4
+>  : ^
+    }
+    
+    return undefined as any;
+>undefined as any : any
+>                 : ^^^
+>undefined : undefined
+>          : ^^^^^^^^^
+}
+
+// Shadowing of the narrowed reference
+function shadowing<T extends 1 | 2>(x: T): T extends 1 ? number : T extends 2 ? string : never {
+>shadowing : <T extends 1 | 2>(x: T) => T extends 1 ? number : T extends 2 ? string : never
+>          : ^ ^^^^^^^^^     ^^ ^^ ^^^^^                                                   
+>x : T
+>  : ^
+
+    if (true) {
+>true : true
+>     : ^^^^
+
+        let x: number = Math.random() ? 1 : 2;
+>x : number
+>  : ^^^^^^
+>Math.random() ? 1 : 2 : 1 | 2
+>                      : ^^^^^
+>Math.random() : number
+>              : ^^^^^^
+>Math.random : () => number
+>            : ^^^^^^      
+>Math : Math
+>     : ^^^^
+>random : () => number
+>       : ^^^^^^      
+>1 : 1
+>  : ^
+>2 : 2
+>  : ^
+
+        if (x === 1) {
+>x === 1 : boolean
+>        : ^^^^^^^
+>x : number
+>  : ^^^^^^
+>1 : 1
+>  : ^
+
+            return 1; // Error
+>1 : 1
+>  : ^
+        }
+        return ""; // Error
+>"" : ""
+>   : ^^
+    }
+}
+
+function noShadowing<T extends 1 | 2>(x: T): T extends 1 ? number : T extends 2 ? string : never {
+>noShadowing : <T extends 1 | 2>(x: T) => T extends 1 ? number : T extends 2 ? string : never
+>            : ^ ^^^^^^^^^     ^^ ^^ ^^^^^                                                   
+>x : T
+>  : ^
+
+    if (true) {
+>true : true
+>     : ^^^^
+
+        if (x === 1) {
+>x === 1 : boolean
+>        : ^^^^^^^
+>x : T
+>  : ^
+>1 : 1
+>  : ^
+
+            return 1; // Ok
+>1 : 1
+>  : ^
+        }
+        return ""; // Ok
+>"" : ""
+>   : ^^
+    }
+}
+
+// If the narrowing reference is out of scope, we simply won't narrow its type
+declare let someX: boolean;
+>someX : boolean
+>      : ^^^^^^^
+
+function scope2<T extends boolean>(a: T): T extends true ? 1 : T extends false ? 2 : never {
+>scope2 : <T extends boolean>(a: T) => T extends true ? 1 : T extends false ? 2 : never
+>       : ^ ^^^^^^^^^       ^^ ^^ ^^^^^                                                
+>a : T
+>  : ^
+>true : true
+>     : ^^^^
+>false : false
+>      : ^^^^^
+
+    if ((true)) {
+>(true) : true
+>       : ^^^^
+>true : true
+>     : ^^^^
+
+        const someX = a;
+>someX : T
+>      : ^
+>a : T
+>  : ^
+
+        if (someX) { // We narrow `someX` and the return type here
+>someX : T
+>      : ^
+
+            return 1;
+>1 : 1
+>  : ^
+        }
+    }
+    if (!someX) { // This is a different `someX`, so we don't narrow here
+>!someX : boolean
+>       : ^^^^^^^
+>someX : boolean
+>      : ^^^^^^^
+
+        return 2;
+>2 : 2
+>  : ^
+    }
+
+    return undefined as any;
+>undefined as any : any
+>                 : ^^^
+>undefined : undefined
+>          : ^^^^^^^^^
+}
+
+function moreShadowing<T extends 1 | 2>(x: T): T extends 1 ? number : T extends 2 ? string : never {
+>moreShadowing : <T extends 1 | 2>(x: T) => T extends 1 ? number : T extends 2 ? string : never
+>              : ^ ^^^^^^^^^     ^^ ^^ ^^^^^                                                   
+>x : T
+>  : ^
+
+    if (x === 2) {
+>x === 2 : boolean
+>        : ^^^^^^^
+>x : T
+>  : ^
+>2 : 2
+>  : ^
+
+        let x: number = Math.random() ? 1 : 2;
+>x : number
+>  : ^^^^^^
+>Math.random() ? 1 : 2 : 1 | 2
+>                      : ^^^^^
+>Math.random() : number
+>              : ^^^^^^
+>Math.random : () => number
+>            : ^^^^^^      
+>Math : Math
+>     : ^^^^
+>random : () => number
+>       : ^^^^^^      
+>1 : 1
+>  : ^
+>2 : 2
+>  : ^
+
+        if (x === 1) {
+>x === 1 : boolean
+>        : ^^^^^^^
+>x : number
+>  : ^^^^^^
+>1 : 1
+>  : ^
+
+            return 1; // Error
+>1 : 1
+>  : ^
+        }
+        return ""; // Ok
+>"" : ""
+>   : ^^
+    }
+    return 0; // Ok
+>0 : 0
+>  : ^
+}
+
+// This would be unsafe to narrow due to `infer` type.
+function withInfer<T extends [string] | number>(x: T): T extends [infer R] ? R : T extends number ? boolean : never {
+>withInfer : <T extends [string] | number>(x: T) => T extends [infer R] ? R : T extends number ? boolean : never
+>          : ^ ^^^^^^^^^                 ^^ ^^ ^^^^^                                                            
+>x : T
+>  : ^
+
+    if (typeof x === "number") {
+>typeof x === "number" : boolean
+>                      : ^^^^^^^
+>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
+>         : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>x : T
+>  : ^
+>"number" : "number"
+>         : ^^^^^^^^
+
+        return true;
+>true : true
+>     : ^^^^
+    }
+    return "";
+>"" : ""
+>   : ^^
+}
+
+const withInferResult = withInfer(["a"] as const); // The type says it returns `"a"`, but the function actually returns `""`.
+>withInferResult : "a"
+>                : ^^^
+>withInfer(["a"] as const) : "a"
+>                          : ^^^
+>withInfer : <T extends [string] | number>(x: T) => T extends [infer R] ? R : T extends number ? boolean : never
+>          : ^ ^^^^^^^^^                 ^^ ^^ ^^^^^                                                            
+>["a"] as const : ["a"]
+>               : ^^^^^
+>["a"] : ["a"]
+>      : ^^^^^
+>"a" : "a"
+>    : ^^^
+
+// Ok
+async function abool<T extends true | false>(x: T): Promise<T extends true ? 1 : T extends false ? 2 : never> {
+>abool : <T extends true | false>(x: T) => Promise<T extends true ? 1 : T extends false ? 2 : never>
+>      : ^ ^^^^^^^^^            ^^ ^^ ^^^^^                                                         
+>true : true
+>     : ^^^^
+>false : false
+>      : ^^^^^
+>x : T
+>  : ^
+>true : true
+>     : ^^^^
+>false : false
+>      : ^^^^^
+
+    if (x) {
+>x : T
+>  : ^
+
+        return 1;
+>1 : 1
+>  : ^
+    }
+    return 2;
+>2 : 2
+>  : ^
+}
+
+// Ok
+function* bbool<T extends true | false>(x: T): Generator<number, T extends true ? 1 : T extends false ? 2 : never, unknown> {
+>bbool : <T extends true | false>(x: T) => Generator<number, T extends true ? 1 : T extends false ? 2 : never, unknown>
+>      : ^ ^^^^^^^^^            ^^ ^^ ^^^^^                                                                            
+>true : true
+>     : ^^^^
+>false : false
+>      : ^^^^^
+>x : T
+>  : ^
+>true : true
+>     : ^^^^
+>false : false
+>      : ^^^^^
+
+    yield 3;
+>yield 3 : unknown
+>        : ^^^^^^^
+>3 : 3
+>  : ^
+
+    if (x) {
+>x : T
+>  : ^
+
+        return 1;
+>1 : 1
+>  : ^
+    }
+    return 2;
+>2 : 2
+>  : ^
+}
+
+// We don't do the same type of narrowing for `yield` statements
+function* cbool<T extends true | false>(x: T): Generator<T extends true ? 1 : T extends false ? 2 : never, number, unknown> {
+>cbool : <T extends true | false>(x: T) => Generator<T extends true ? 1 : T extends false ? 2 : never, number, unknown>
+>      : ^ ^^^^^^^^^            ^^ ^^ ^^^^^                                                                            
+>true : true
+>     : ^^^^
+>false : false
+>      : ^^^^^
+>x : T
+>  : ^
+>true : true
+>     : ^^^^
+>false : false
+>      : ^^^^^
+
+    if (x) {
+>x : T
+>  : ^
+
+        yield 1;
+>yield 1 : unknown
+>        : ^^^^^^^
+>1 : 1
+>  : ^
+    }
+    yield 2;
+>yield 2 : unknown
+>        : ^^^^^^^
+>2 : 2
+>  : ^
+
+    return 0;
+>0 : 0
+>  : ^
+}
+
+// From #33912
+abstract class Operation<T, R> {
+>Operation : Operation<T, R>
+>          : ^^^^^^^^^^^^^^^
+
+    abstract perform(t: T): R;
+>perform : (t: T) => R
+>        : ^ ^^ ^^^^^ 
+>t : T
+>  : ^
+}
+
+type ConditionalReturnType<T, R, EOp extends Operation<T, R> | undefined> =
+>ConditionalReturnType : ConditionalReturnType<T, R, EOp>
+>                      : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+    EOp extends Operation<T, R> ? R : EOp extends undefined ? T | R : never;
+
+
+class ConditionalOperation<
+>ConditionalOperation : ConditionalOperation<T, R, EOp>
+>                     : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+    T,
+    R,
+    EOp extends Operation<T, R> | undefined,
+> extends Operation<T, ConditionalReturnType<T, R, EOp>> {
+>Operation : Operation<T, ConditionalReturnType<T, R, EOp>>
+>          : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+    constructor(
+        private predicate: (value: T) => boolean,
+>predicate : (value: T) => boolean
+>          : ^     ^^ ^^^^^       
+>value : T
+>      : ^
+
+        private thenOp: Operation<T, R>,
+>thenOp : Operation<T, R>
+>       : ^^^^^^^^^^^^^^^
+
+        private elseOp?: EOp,
+>elseOp : EOp | undefined
+>       : ^^^^^^^^^^^^^^^
+
+    ) {
+        super();
+>super() : void
+>        : ^^^^
+>super : typeof Operation
+>      : ^^^^^^^^^^^^^^^^
+    }
+
+    // We won't try to narrow the return type because `T` is declared on the class and we don't analyze this case.
+    perform(t: T): ConditionalReturnType<T, R, EOp> {
+>perform : (t: T) => ConditionalReturnType<T, R, EOp>
+>        : ^ ^^ ^^^^^                                
+>t : T
+>  : ^
+
+        if (this.predicate(t)) {
+>this.predicate(t) : boolean
+>                  : ^^^^^^^
+>this.predicate : (value: T) => boolean
+>               : ^     ^^ ^^^^^       
+>this : this
+>     : ^^^^
+>predicate : (value: T) => boolean
+>          : ^     ^^ ^^^^^       
+>t : T
+>  : ^
+
+            return this.thenOp.perform(t); // Bad: this is assignable to all of the branches of the conditional, but we still can't return it
+>this.thenOp.perform(t) : R
+>                       : ^
+>this.thenOp.perform : (t: T) => R
+>                    : ^ ^^^^^^^^^
+>this.thenOp : Operation<T, R>
+>            : ^^^^^^^^^^^^^^^
+>this : this
+>     : ^^^^
+>thenOp : Operation<T, R>
+>       : ^^^^^^^^^^^^^^^
+>perform : (t: T) => R
+>        : ^ ^^^^^^^^^
+>t : T
+>  : ^
+
+        } else if (typeof this.elseOp !== "undefined") {
+>typeof this.elseOp !== "undefined" : boolean
+>                                   : ^^^^^^^
+>typeof this.elseOp : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
+>                   : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>this.elseOp : EOp | undefined
+>            : ^^^^^^^^^^^^^^^
+>this : this
+>     : ^^^^
+>elseOp : EOp | undefined
+>       : ^^^^^^^^^^^^^^^
+>"undefined" : "undefined"
+>            : ^^^^^^^^^^^
+
+            return this.elseOp.perform(t); // Would be ok
+>this.elseOp.perform(t) : R
+>                       : ^
+>this.elseOp.perform : (t: T) => R
+>                    : ^ ^^^^^^^^^
+>this.elseOp : Operation<T, R>
+>            : ^^^^^^^^^^^^^^^
+>this : this
+>     : ^^^^
+>elseOp : Operation<T, R>
+>       : ^^^^^^^^^^^^^^^
+>perform : (t: T) => R
+>        : ^ ^^^^^^^^^
+>t : T
+>  : ^
+
+        } else {
+            return t; // Would be ok
+>t : T
+>  : ^
+        }
+    }
+}
+
+// Like the version above, we will not attempt to narrow because there's more than one reference to `T`,
+// because `T` shows up in the type of `predicate`.
+function perform<T, R, EOp extends Operation<T, R> | undefined>(
+>perform : <T, R, EOp extends Operation<T, R> | undefined>(t: T, predicate: (value: T) => boolean, thenOp: Operation<T, R>, elseOp?: EOp) => ConditionalReturnType<T, R, EOp>
+>        : ^ ^^ ^^   ^^^^^^^^^                           ^^ ^^ ^^         ^^                     ^^      ^^               ^^      ^^^   ^^^^^                                
+
+    t: T,
+>t : T
+>  : ^
+
+    predicate: (value: T) => boolean,
+>predicate : (value: T) => boolean
+>          : ^     ^^ ^^^^^       
+>value : T
+>      : ^
+
+    thenOp: Operation<T, R>,
+>thenOp : Operation<T, R>
+>       : ^^^^^^^^^^^^^^^
+
+    elseOp?: EOp,
+>elseOp : EOp | undefined
+>       : ^^^^^^^^^^^^^^^
+
+    ): ConditionalReturnType<T, R, EOp> {
+    if (predicate(t)) {
+>predicate(t) : boolean
+>             : ^^^^^^^
+>predicate : (value: T) => boolean
+>          : ^     ^^ ^^^^^       
+>t : T
+>  : ^
+
+        return thenOp.perform(t); // Bad: this is assignable to all of the branches of the conditional, but we still can't return it
+>thenOp.perform(t) : R
+>                  : ^
+>thenOp.perform : (t: T) => R
+>               : ^ ^^^^^^^^^
+>thenOp : Operation<T, R>
+>       : ^^^^^^^^^^^^^^^
+>perform : (t: T) => R
+>        : ^ ^^^^^^^^^
+>t : T
+>  : ^
+
+    } else if (elseOp !== undefined) {
+>elseOp !== undefined : boolean
+>                     : ^^^^^^^
+>elseOp : EOp | undefined
+>       : ^^^^^^^^^^^^^^^
+>undefined : undefined
+>          : ^^^^^^^^^
+
+        return elseOp.perform(t); // Would be ok
+>elseOp.perform(t) : R
+>                  : ^
+>elseOp.perform : (t: T) => R
+>               : ^ ^^^^^^^^^
+>elseOp : Operation<T, R>
+>       : ^^^^^^^^^^^^^^^
+>perform : (t: T) => R
+>        : ^ ^^^^^^^^^
+>t : T
+>  : ^
+
+    } else {
+        return t; // Would be ok
+>t : T
+>  : ^
+    }
+}
+
+// Return conditional expressions with parentheses
+function returnStuff1<T extends boolean>(x: T ): T extends true ? 1 : T extends false ? 2 : never {
+>returnStuff1 : <T extends boolean>(x: T) => T extends true ? 1 : T extends false ? 2 : never
+>             : ^ ^^^^^^^^^       ^^ ^^ ^^^^^                                                
+>x : T
+>  : ^
+>true : true
+>     : ^^^^
+>false : false
+>      : ^^^^^
+
+    return (x ? (1) : 2);
+>(x ? (1) : 2) : 1 | 2
+>              : ^^^^^
+>x ? (1) : 2 : 1 | 2
+>            : ^^^^^
+>x : T
+>  : ^
+>(1) : 1
+>    : ^
+>1 : 1
+>  : ^
+>2 : 2
+>  : ^
+}
+
+function returnStuff2<T extends 1 | 2 | "a">(x: T ):
+>returnStuff2 : <T extends 1 | 2 | "a">(x: T) => T extends 1 ? "one" : T extends 2 ? "two" : T extends "a" ? 0 : never
+>             : ^ ^^^^^^^^^           ^^ ^^ ^^^^^                                                                     
+>x : T
+>  : ^
+
+    T extends 1 ? "one" : T extends 2 ? "two" : T extends "a" ? 0 : never {
+    return (typeof x === "string" ? 0 : (x === 1 ? ("one") : "two"));
+>(typeof x === "string" ? 0 : (x === 1 ? ("one") : "two")) : 0 | "one" | "two"
+>                                                          : ^^^^^^^^^^^^^^^^^
+>typeof x === "string" ? 0 : (x === 1 ? ("one") : "two") : 0 | "one" | "two"
+>                                                        : ^^^^^^^^^^^^^^^^^
+>typeof x === "string" : boolean
+>                      : ^^^^^^^
+>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
+>         : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>x : T
+>  : ^
+>"string" : "string"
+>         : ^^^^^^^^
+>0 : 0
+>  : ^
+>(x === 1 ? ("one") : "two") : "one" | "two"
+>                            : ^^^^^^^^^^^^^
+>x === 1 ? ("one") : "two" : "one" | "two"
+>                          : ^^^^^^^^^^^^^
+>x === 1 : boolean
+>        : ^^^^^^^
+>x : T
+>  : ^
+>1 : 1
+>  : ^
+>("one") : "one"
+>        : ^^^^^
+>"one" : "one"
+>      : ^^^^^
+>"two" : "two"
+>      : ^^^^^
+}
+
+// If the conditional type's input is `never`, then it resolves to `never`:
+function neverOk<T extends boolean>(x: T): T extends true ? 1 : T extends false ? 2 : never {
+>neverOk : <T extends boolean>(x: T) => T extends true ? 1 : T extends false ? 2 : never
+>        : ^ ^^^^^^^^^       ^^ ^^ ^^^^^                                                
+>x : T
+>  : ^
+>true : true
+>     : ^^^^
+>false : false
+>      : ^^^^^
+
+    if (x === true) {
+>x === true : boolean
+>           : ^^^^^^^
+>x : T
+>  : ^
+>true : true
+>     : ^^^^
+
+        return 1;
+>1 : 1
+>  : ^
+    }
+    if (x === false) {
+>x === false : boolean
+>            : ^^^^^^^
+>x : T
+>  : ^
+>false : false
+>      : ^^^^^
+
+        return 2;
+>2 : 2
+>  : ^
+    }
+    return 1;
+>1 : 1
+>  : ^
+}
diff --git a/tests/baselines/reference/dependentReturnType2.errors.txt b/tests/baselines/reference/dependentReturnType2.errors.txt
new file mode 100644
index 0000000000000..4eddac31221f3
--- /dev/null
+++ b/tests/baselines/reference/dependentReturnType2.errors.txt
@@ -0,0 +1,314 @@
+file.js(155,13): error TS2322: Type 'undefined' is not assignable to type 'HelperCond<I, string, T | undefined, RegExp, SettingComposedValue<T>[]>'.
+file.js(168,16): error TS2536: Type 'I' cannot be used to index type '{ [s: string]: any; }'.
+file.js(185,9): error TS2322: Type 'Record<string, MyObj[]>' is not assignable to type 'HelperCond<T, string, MyObj[], undefined, Record<string, MyObj[]>>'.
+
+
+==== file.js (3 errors) ====
+    // Adapted from ts-error-deltas repos
+    
+    /**
+     * @template T
+     * @template A
+     * @template R1
+     * @template B
+     * @template R2
+     * @typedef {T extends A ? R1 : T extends B ? R2 : never} HelperCond
+     */
+    
+    /**
+     * @typedef IMessage
+     * @property {string} [html]
+     * @property {Object[]} [tokens]
+     */
+    
+    class NewKatex {
+        /**
+         * @param {string} s
+         * @returns {string}
+         */
+        render(s) {
+            return "";
+        }
+    
+        /**
+         * @template {string | IMessage} T
+         * @param {T} message
+         * @returns {T extends string ? string : T extends IMessage ? IMessage : never}
+         */
+        renderMessage(message) {
+            if (typeof message === 'string') {
+                return this.render(message); // Ok
+            }
+    
+            if (!message.html?.trim()) {
+                return message; // Ok
+            }
+    
+            if (!message.tokens) {
+                message.tokens = [];
+            }
+    
+            message.html = this.render(message.html);
+            return message; // Ok
+        }
+    }
+    
+    /**
+     * @template {true | false} T
+     * @param {{ dollarSyntax: boolean; parenthesisSyntax: boolean; }} options
+     * @param {T} _isMessage
+     * @returns {T extends true ? (message: IMessage) => IMessage : T extends false ? (message: string) => string : never}
+     */
+    function createKatexMessageRendering(options, _isMessage) {
+        const instance = new NewKatex();
+        if (_isMessage) {
+            return (/** @type {IMessage} */ message) => instance.renderMessage(message); // Ok
+        }
+        return (/** @type {string} */ message) => instance.renderMessage(message); // Ok
+    }
+    
+    // File: Rocket.Chat/apps/meteor/app/settings/lib/settings.ts
+    
+    /**
+     * @typedef {Record<any, any>} MyObj
+     */
+    
+    
+    /**
+     * @typedef {MyObj} SettingValue
+     */
+     
+    /**
+     * @template {SettingValue} T
+     * @typedef {Object} SettingComposedValue
+     * @property {string} key
+     * @property {SettingValue} value
+     */
+    
+    /**
+     * @callback SettingCallback
+     * @param {string} key
+     * @param {SettingValue} value
+     * @param {boolean} [initialLoad]
+     * @returns {void}
+     */
+    
+    /** @type {{ settings: { [s: string]: any } }} */
+    const Meteor = /** @type {any} */ (undefined);
+    /** @type {{ isRegExp(x: unknown): x is RegExp; }} */
+    const _ = /** @type {any} */ (undefined);
+    
+    /**
+     * @param {RegExp} x
+     * @returns {void}
+     */
+    function takesRegExp(x) {
+        return /** @type {any} */ undefined;
+    }
+    /**
+     * @param {string} x
+     * @returns {void}
+     */
+    function takesString(x) {
+        return /** @type {any} */ undefined;
+    }
+    
+    /**
+     * @class NewSettingsBase
+     */
+    class NewSettingsBase {
+        /**
+         * @template {SettingCallback | undefined} C
+         * @template {string | RegExp} I
+         * @template {SettingValue} T
+         * @param {I} _id
+         * @param {C} [callback]
+         * @returns {HelperCond<C, SettingCallback, void, undefined, HelperCond<I, string, T | undefined, RegExp, SettingComposedValue<T>[]>>}
+         */
+        newGet(_id, callback) {
+            if (callback !== undefined) {
+                if (!Meteor.settings) {
+                    return; // Ok
+                }
+                if (_id === '*') {
+                    return Object.keys(Meteor.settings).forEach((key) => {
+                        const value = Meteor.settings[key];
+                        callback(key, value);
+                    });
+                }
+                if (_.isRegExp(_id) && Meteor.settings) {
+                    return Object.keys(Meteor.settings).forEach((key) => {
+                        if (!_id.test(key)) {
+                            return;
+                        }
+                        const value = Meteor.settings[key];
+                        callback(key, value);
+                    });
+                }
+    
+                if (typeof _id === 'string') {
+                    const value = Meteor.settings[_id];
+                    if (value != null) {
+                        callback(_id, Meteor.settings[_id]);
+                    }
+                    return; // Ok
+                }
+    
+                return; // Ok, needed for exhaustiveness check
+            }
+    
+            if (!Meteor.settings) {
+                return undefined; // Error
+                ~~~~~~
+!!! error TS2322: Type 'undefined' is not assignable to type 'HelperCond<I, string, T | undefined, RegExp, SettingComposedValue<T>[]>'.
+            }
+    
+            if (_.isRegExp(_id)) {
+                return Object.keys(Meteor.settings).reduce((/** @type {SettingComposedValue<T>[]} */ items, key) => {
+                    const value = Meteor.settings[key];
+                    if (_id.test(key)) {
+                        items.push({ key, value });
+                    }
+                    return items;
+                }, []); // Ok
+            }
+    
+            return Meteor.settings?.[_id]; // Error
+                   ~~~~~~~~~~~~~~~~~~~~~~
+!!! error TS2536: Type 'I' cannot be used to index type '{ [s: string]: any; }'.
+        }
+    }
+    
+    // File: Rocket.Chat/apps/meteor/app/ui-utils/client/lib/messageBox.ts
+    
+    /**
+     * @typedef {MyObj} MessageBoxAction
+     */
+    
+    /**
+     * @template {string | undefined} T
+     * @param {T} group
+     * @returns {HelperCond<T, string, MessageBoxAction[], undefined, Record<string, MessageBoxAction[]>>}
+     */
+    function getWithBug(group) {
+        if (!group) {
+            return /** @type {Record<string, MessageBoxAction[]>} */({}); // Error
+            ~~~~~~
+!!! error TS2322: Type 'Record<string, MyObj[]>' is not assignable to type 'HelperCond<T, string, MyObj[], undefined, Record<string, MyObj[]>>'.
+        }
+        return /** @type {MessageBoxAction[]} */([]); // Ok
+    }
+    
+    /**
+     * @template {string | undefined} T
+     * @param {T} group
+     * @returns {HelperCond<T, string, MessageBoxAction[], undefined, Record<string, MessageBoxAction[]>>}
+     */
+    function getWithoutBug(group) {
+        if (group === undefined) {
+            return /** @type {Record<string, MessageBoxAction[]>} */({}); // Ok
+        }
+        return /** @type {MessageBoxAction[]} */([]); // Ok
+    }
+    
+    // File: Rocket.Chat/apps/meteor/ee/server/lib/engagementDashboard/date.ts
+    
+    /**
+     * @param {string} x
+     * @returns {Date}
+     */
+    function mapDateForAPI(x) {
+        return /** @type {any} */ (undefined);
+    }
+    
+    /**
+     * @template {string | undefined} T
+     * @param {string} start
+     * @param {T} [end]
+     * @returns {HelperCond<T, string, { start: Date, end: Date }, undefined, { start: Date, end: undefined }>}
+     */
+    function transformDatesForAPI(start, end) {
+        return end !== undefined ?
+            {
+                start: mapDateForAPI(start),
+                end: mapDateForAPI(end),
+            } :
+            {
+                start: mapDateForAPI(start),
+                end: undefined
+            };
+    }
+    
+    // File: Rocket.Chat/packages/agenda/src/Agenda.ts
+    
+    /**
+     * @typedef {MyObj} RepeatOptions
+     */
+    
+    /**
+     * @typedef {MyObj} Job
+     */
+    
+    /**
+     * @typedef {Object} IJob
+     * @property {MyObj} data
+     */
+    class NewAgenda {
+        /**
+         * @param {string | number} interval
+         * @param {string} name
+         * @param {IJob['data']} data
+         * @param {RepeatOptions} options
+         * @returns {Promise<Job>}
+         */
+        async _createIntervalJob(interval, name, data, options) {
+            return /** @type {any} */ (undefined);
+        }
+    
+        /**
+         * @param {string | number} interval
+         * @param {string[]} names
+         * @param {IJob['data']} data
+         * @param {RepeatOptions} options
+         * @returns {Promise<Job[]> | undefined}
+         */
+        _createIntervalJobs(interval, names, data, options) {
+            return undefined;
+        }
+    
+        /**
+         * @template {string | string[]} T
+         * @param {string | number} interval
+         * @param {T} name
+         * @param {IJob['data']} data
+         * @param {RepeatOptions} options
+         * @returns {Promise<HelperCond<T, string, Job, string[], Job[] | undefined>>}
+         */
+        async newEvery(interval, name, data, options) {
+            if (typeof name === 'string') {
+                return this._createIntervalJob(interval, name, data, options); // Ok
+            }
+    
+            if (Array.isArray(name)) {
+                return this._createIntervalJobs(interval, name, data, options); // Ok
+            }
+    
+            throw new Error('Unexpected error: Invalid job name(s)');
+        }
+    }
+    
+    // File: angular/packages/common/src/pipes/case_conversion_pipes.ts
+    
+    /**
+     * @template {string | null | undefined} T
+     * @param {T} value
+     * @returns {HelperCond<T, string, string, null | undefined, null>}
+     */
+    function transform1(value) {
+        if (value == null) return null; // Ok
+        if (typeof value !== 'string') {
+            throw new Error();
+        }
+        return value.toLowerCase(); // Ok
+    }
+    
\ No newline at end of file
diff --git a/tests/baselines/reference/dependentReturnType2.symbols b/tests/baselines/reference/dependentReturnType2.symbols
new file mode 100644
index 0000000000000..4b41f3fe744db
--- /dev/null
+++ b/tests/baselines/reference/dependentReturnType2.symbols
@@ -0,0 +1,594 @@
+//// [tests/cases/compiler/dependentReturnType2.ts] ////
+
+=== file.js ===
+// Adapted from ts-error-deltas repos
+
+/**
+ * @template T
+ * @template A
+ * @template R1
+ * @template B
+ * @template R2
+ * @typedef {T extends A ? R1 : T extends B ? R2 : never} HelperCond
+ */
+
+/**
+ * @typedef IMessage
+ * @property {string} [html]
+ * @property {Object[]} [tokens]
+ */
+
+class NewKatex {
+>NewKatex : Symbol(NewKatex, Decl(file.js, 0, 0))
+
+    /**
+     * @param {string} s
+     * @returns {string}
+     */
+    render(s) {
+>render : Symbol(NewKatex.render, Decl(file.js, 17, 16))
+>s : Symbol(s, Decl(file.js, 22, 11))
+
+        return "";
+    }
+
+    /**
+     * @template {string | IMessage} T
+     * @param {T} message
+     * @returns {T extends string ? string : T extends IMessage ? IMessage : never}
+     */
+    renderMessage(message) {
+>renderMessage : Symbol(NewKatex.renderMessage, Decl(file.js, 24, 5))
+>message : Symbol(message, Decl(file.js, 31, 18))
+
+        if (typeof message === 'string') {
+>message : Symbol(message, Decl(file.js, 31, 18))
+
+            return this.render(message); // Ok
+>this.render : Symbol(NewKatex.render, Decl(file.js, 17, 16))
+>this : Symbol(NewKatex, Decl(file.js, 0, 0))
+>render : Symbol(NewKatex.render, Decl(file.js, 17, 16))
+>message : Symbol(message, Decl(file.js, 31, 18))
+        }
+
+        if (!message.html?.trim()) {
+>message.html?.trim : Symbol(String.trim, Decl(lib.es5.d.ts, --, --))
+>message.html : Symbol(html, Decl(file.js, 13, 3))
+>message : Symbol(message, Decl(file.js, 31, 18))
+>html : Symbol(html, Decl(file.js, 13, 3))
+>trim : Symbol(String.trim, Decl(lib.es5.d.ts, --, --))
+
+            return message; // Ok
+>message : Symbol(message, Decl(file.js, 31, 18))
+        }
+
+        if (!message.tokens) {
+>message.tokens : Symbol(tokens, Decl(file.js, 14, 3))
+>message : Symbol(message, Decl(file.js, 31, 18))
+>tokens : Symbol(tokens, Decl(file.js, 14, 3))
+
+            message.tokens = [];
+>message.tokens : Symbol(tokens, Decl(file.js, 14, 3))
+>message : Symbol(message, Decl(file.js, 31, 18))
+>tokens : Symbol(tokens, Decl(file.js, 14, 3))
+        }
+
+        message.html = this.render(message.html);
+>message.html : Symbol(html, Decl(file.js, 13, 3))
+>message : Symbol(message, Decl(file.js, 31, 18))
+>html : Symbol(html, Decl(file.js, 13, 3))
+>this.render : Symbol(NewKatex.render, Decl(file.js, 17, 16))
+>this : Symbol(NewKatex, Decl(file.js, 0, 0))
+>render : Symbol(NewKatex.render, Decl(file.js, 17, 16))
+>message.html : Symbol(html, Decl(file.js, 13, 3))
+>message : Symbol(message, Decl(file.js, 31, 18))
+>html : Symbol(html, Decl(file.js, 13, 3))
+
+        return message; // Ok
+>message : Symbol(message, Decl(file.js, 31, 18))
+    }
+}
+
+/**
+ * @template {true | false} T
+ * @param {{ dollarSyntax: boolean; parenthesisSyntax: boolean; }} options
+ * @param {T} _isMessage
+ * @returns {T extends true ? (message: IMessage) => IMessage : T extends false ? (message: string) => string : never}
+ */
+function createKatexMessageRendering(options, _isMessage) {
+>createKatexMessageRendering : Symbol(createKatexMessageRendering, Decl(file.js, 47, 1))
+>options : Symbol(options, Decl(file.js, 55, 37))
+>_isMessage : Symbol(_isMessage, Decl(file.js, 55, 45))
+
+    const instance = new NewKatex();
+>instance : Symbol(instance, Decl(file.js, 56, 9))
+>NewKatex : Symbol(NewKatex, Decl(file.js, 0, 0))
+
+    if (_isMessage) {
+>_isMessage : Symbol(_isMessage, Decl(file.js, 55, 45))
+
+        return (/** @type {IMessage} */ message) => instance.renderMessage(message); // Ok
+>message : Symbol(message, Decl(file.js, 58, 16))
+>instance.renderMessage : Symbol(NewKatex.renderMessage, Decl(file.js, 24, 5))
+>instance : Symbol(instance, Decl(file.js, 56, 9))
+>renderMessage : Symbol(NewKatex.renderMessage, Decl(file.js, 24, 5))
+>message : Symbol(message, Decl(file.js, 58, 16))
+    }
+    return (/** @type {string} */ message) => instance.renderMessage(message); // Ok
+>message : Symbol(message, Decl(file.js, 60, 12))
+>instance.renderMessage : Symbol(NewKatex.renderMessage, Decl(file.js, 24, 5))
+>instance : Symbol(instance, Decl(file.js, 56, 9))
+>renderMessage : Symbol(NewKatex.renderMessage, Decl(file.js, 24, 5))
+>message : Symbol(message, Decl(file.js, 60, 12))
+}
+
+// File: Rocket.Chat/apps/meteor/app/settings/lib/settings.ts
+
+/**
+ * @typedef {Record<any, any>} MyObj
+ */
+
+
+/**
+ * @typedef {MyObj} SettingValue
+ */
+ 
+/**
+ * @template {SettingValue} T
+ * @typedef {Object} SettingComposedValue
+ * @property {string} key
+ * @property {SettingValue} value
+ */
+
+/**
+ * @callback SettingCallback
+ * @param {string} key
+ * @param {SettingValue} value
+ * @param {boolean} [initialLoad]
+ * @returns {void}
+ */
+
+/** @type {{ settings: { [s: string]: any } }} */
+const Meteor = /** @type {any} */ (undefined);
+>Meteor : Symbol(Meteor, Decl(file.js, 90, 5))
+>undefined : Symbol(undefined)
+
+/** @type {{ isRegExp(x: unknown): x is RegExp; }} */
+const _ = /** @type {any} */ (undefined);
+>_ : Symbol(_, Decl(file.js, 92, 5))
+>undefined : Symbol(undefined)
+
+/**
+ * @param {RegExp} x
+ * @returns {void}
+ */
+function takesRegExp(x) {
+>takesRegExp : Symbol(takesRegExp, Decl(file.js, 92, 41))
+>x : Symbol(x, Decl(file.js, 98, 21))
+
+    return /** @type {any} */ undefined;
+>undefined : Symbol(undefined)
+}
+/**
+ * @param {string} x
+ * @returns {void}
+ */
+function takesString(x) {
+>takesString : Symbol(takesString, Decl(file.js, 100, 1))
+>x : Symbol(x, Decl(file.js, 105, 21))
+
+    return /** @type {any} */ undefined;
+>undefined : Symbol(undefined)
+}
+
+/**
+ * @class NewSettingsBase
+ */
+class NewSettingsBase {
+>NewSettingsBase : Symbol(NewSettingsBase, Decl(file.js, 107, 1))
+
+    /**
+     * @template {SettingCallback | undefined} C
+     * @template {string | RegExp} I
+     * @template {SettingValue} T
+     * @param {I} _id
+     * @param {C} [callback]
+     * @returns {HelperCond<C, SettingCallback, void, undefined, HelperCond<I, string, T | undefined, RegExp, SettingComposedValue<T>[]>>}
+     */
+    newGet(_id, callback) {
+>newGet : Symbol(NewSettingsBase.newGet, Decl(file.js, 112, 23))
+>_id : Symbol(_id, Decl(file.js, 121, 11))
+>callback : Symbol(callback, Decl(file.js, 121, 15))
+
+        if (callback !== undefined) {
+>callback : Symbol(callback, Decl(file.js, 121, 15))
+>undefined : Symbol(undefined)
+
+            if (!Meteor.settings) {
+>Meteor.settings : Symbol(settings, Decl(file.js, 89, 12))
+>Meteor : Symbol(Meteor, Decl(file.js, 90, 5))
+>settings : Symbol(settings, Decl(file.js, 89, 12))
+
+                return; // Ok
+            }
+            if (_id === '*') {
+>_id : Symbol(_id, Decl(file.js, 121, 11))
+
+                return Object.keys(Meteor.settings).forEach((key) => {
+>Object.keys(Meteor.settings).forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --))
+>Object.keys : Symbol(ObjectConstructor.keys, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
+>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+>keys : Symbol(ObjectConstructor.keys, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
+>Meteor.settings : Symbol(settings, Decl(file.js, 89, 12))
+>Meteor : Symbol(Meteor, Decl(file.js, 90, 5))
+>settings : Symbol(settings, Decl(file.js, 89, 12))
+>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --))
+>key : Symbol(key, Decl(file.js, 127, 61))
+
+                    const value = Meteor.settings[key];
+>value : Symbol(value, Decl(file.js, 128, 25))
+>Meteor.settings : Symbol(settings, Decl(file.js, 89, 12))
+>Meteor : Symbol(Meteor, Decl(file.js, 90, 5))
+>settings : Symbol(settings, Decl(file.js, 89, 12))
+>key : Symbol(key, Decl(file.js, 127, 61))
+
+                    callback(key, value);
+>callback : Symbol(callback, Decl(file.js, 121, 15))
+>key : Symbol(key, Decl(file.js, 127, 61))
+>value : Symbol(value, Decl(file.js, 128, 25))
+
+                });
+            }
+            if (_.isRegExp(_id) && Meteor.settings) {
+>_.isRegExp : Symbol(isRegExp, Decl(file.js, 91, 12))
+>_ : Symbol(_, Decl(file.js, 92, 5))
+>isRegExp : Symbol(isRegExp, Decl(file.js, 91, 12))
+>_id : Symbol(_id, Decl(file.js, 121, 11))
+>Meteor.settings : Symbol(settings, Decl(file.js, 89, 12))
+>Meteor : Symbol(Meteor, Decl(file.js, 90, 5))
+>settings : Symbol(settings, Decl(file.js, 89, 12))
+
+                return Object.keys(Meteor.settings).forEach((key) => {
+>Object.keys(Meteor.settings).forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --))
+>Object.keys : Symbol(ObjectConstructor.keys, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
+>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+>keys : Symbol(ObjectConstructor.keys, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
+>Meteor.settings : Symbol(settings, Decl(file.js, 89, 12))
+>Meteor : Symbol(Meteor, Decl(file.js, 90, 5))
+>settings : Symbol(settings, Decl(file.js, 89, 12))
+>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --))
+>key : Symbol(key, Decl(file.js, 133, 61))
+
+                    if (!_id.test(key)) {
+>_id.test : Symbol(RegExp.test, Decl(lib.es5.d.ts, --, --))
+>_id : Symbol(_id, Decl(file.js, 121, 11))
+>test : Symbol(RegExp.test, Decl(lib.es5.d.ts, --, --))
+>key : Symbol(key, Decl(file.js, 133, 61))
+
+                        return;
+                    }
+                    const value = Meteor.settings[key];
+>value : Symbol(value, Decl(file.js, 137, 25))
+>Meteor.settings : Symbol(settings, Decl(file.js, 89, 12))
+>Meteor : Symbol(Meteor, Decl(file.js, 90, 5))
+>settings : Symbol(settings, Decl(file.js, 89, 12))
+>key : Symbol(key, Decl(file.js, 133, 61))
+
+                    callback(key, value);
+>callback : Symbol(callback, Decl(file.js, 121, 15))
+>key : Symbol(key, Decl(file.js, 133, 61))
+>value : Symbol(value, Decl(file.js, 137, 25))
+
+                });
+            }
+
+            if (typeof _id === 'string') {
+>_id : Symbol(_id, Decl(file.js, 121, 11))
+
+                const value = Meteor.settings[_id];
+>value : Symbol(value, Decl(file.js, 143, 21))
+>Meteor.settings : Symbol(settings, Decl(file.js, 89, 12))
+>Meteor : Symbol(Meteor, Decl(file.js, 90, 5))
+>settings : Symbol(settings, Decl(file.js, 89, 12))
+>_id : Symbol(_id, Decl(file.js, 121, 11))
+
+                if (value != null) {
+>value : Symbol(value, Decl(file.js, 143, 21))
+
+                    callback(_id, Meteor.settings[_id]);
+>callback : Symbol(callback, Decl(file.js, 121, 15))
+>_id : Symbol(_id, Decl(file.js, 121, 11))
+>Meteor.settings : Symbol(settings, Decl(file.js, 89, 12))
+>Meteor : Symbol(Meteor, Decl(file.js, 90, 5))
+>settings : Symbol(settings, Decl(file.js, 89, 12))
+>_id : Symbol(_id, Decl(file.js, 121, 11))
+                }
+                return; // Ok
+            }
+
+            return; // Ok, needed for exhaustiveness check
+        }
+
+        if (!Meteor.settings) {
+>Meteor.settings : Symbol(settings, Decl(file.js, 89, 12))
+>Meteor : Symbol(Meteor, Decl(file.js, 90, 5))
+>settings : Symbol(settings, Decl(file.js, 89, 12))
+
+            return undefined; // Error
+>undefined : Symbol(undefined)
+        }
+
+        if (_.isRegExp(_id)) {
+>_.isRegExp : Symbol(isRegExp, Decl(file.js, 91, 12))
+>_ : Symbol(_, Decl(file.js, 92, 5))
+>isRegExp : Symbol(isRegExp, Decl(file.js, 91, 12))
+>_id : Symbol(_id, Decl(file.js, 121, 11))
+
+            return Object.keys(Meteor.settings).reduce((/** @type {SettingComposedValue<T>[]} */ items, key) => {
+>Object.keys(Meteor.settings).reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+>Object.keys : Symbol(ObjectConstructor.keys, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
+>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+>keys : Symbol(ObjectConstructor.keys, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
+>Meteor.settings : Symbol(settings, Decl(file.js, 89, 12))
+>Meteor : Symbol(Meteor, Decl(file.js, 90, 5))
+>settings : Symbol(settings, Decl(file.js, 89, 12))
+>reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+>items : Symbol(items, Decl(file.js, 158, 56))
+>key : Symbol(key, Decl(file.js, 158, 103))
+
+                const value = Meteor.settings[key];
+>value : Symbol(value, Decl(file.js, 159, 21))
+>Meteor.settings : Symbol(settings, Decl(file.js, 89, 12))
+>Meteor : Symbol(Meteor, Decl(file.js, 90, 5))
+>settings : Symbol(settings, Decl(file.js, 89, 12))
+>key : Symbol(key, Decl(file.js, 158, 103))
+
+                if (_id.test(key)) {
+>_id.test : Symbol(RegExp.test, Decl(lib.es5.d.ts, --, --))
+>_id : Symbol(_id, Decl(file.js, 121, 11))
+>test : Symbol(RegExp.test, Decl(lib.es5.d.ts, --, --))
+>key : Symbol(key, Decl(file.js, 158, 103))
+
+                    items.push({ key, value });
+>items.push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --))
+>items : Symbol(items, Decl(file.js, 158, 56))
+>push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --))
+>key : Symbol(key, Decl(file.js, 161, 32))
+>value : Symbol(value, Decl(file.js, 161, 37))
+                }
+                return items;
+>items : Symbol(items, Decl(file.js, 158, 56))
+
+            }, []); // Ok
+        }
+
+        return Meteor.settings?.[_id]; // Error
+>Meteor.settings : Symbol(settings, Decl(file.js, 89, 12))
+>Meteor : Symbol(Meteor, Decl(file.js, 90, 5))
+>settings : Symbol(settings, Decl(file.js, 89, 12))
+>_id : Symbol(_id, Decl(file.js, 121, 11))
+    }
+}
+
+// File: Rocket.Chat/apps/meteor/app/ui-utils/client/lib/messageBox.ts
+
+/**
+ * @typedef {MyObj} MessageBoxAction
+ */
+
+/**
+ * @template {string | undefined} T
+ * @param {T} group
+ * @returns {HelperCond<T, string, MessageBoxAction[], undefined, Record<string, MessageBoxAction[]>>}
+ */
+function getWithBug(group) {
+>getWithBug : Symbol(getWithBug, Decl(file.js, 169, 1))
+>group : Symbol(group, Decl(file.js, 182, 20))
+
+    if (!group) {
+>group : Symbol(group, Decl(file.js, 182, 20))
+
+        return /** @type {Record<string, MessageBoxAction[]>} */({}); // Error
+    }
+    return /** @type {MessageBoxAction[]} */([]); // Ok
+}
+
+/**
+ * @template {string | undefined} T
+ * @param {T} group
+ * @returns {HelperCond<T, string, MessageBoxAction[], undefined, Record<string, MessageBoxAction[]>>}
+ */
+function getWithoutBug(group) {
+>getWithoutBug : Symbol(getWithoutBug, Decl(file.js, 187, 1))
+>group : Symbol(group, Decl(file.js, 194, 23))
+
+    if (group === undefined) {
+>group : Symbol(group, Decl(file.js, 194, 23))
+>undefined : Symbol(undefined)
+
+        return /** @type {Record<string, MessageBoxAction[]>} */({}); // Ok
+    }
+    return /** @type {MessageBoxAction[]} */([]); // Ok
+}
+
+// File: Rocket.Chat/apps/meteor/ee/server/lib/engagementDashboard/date.ts
+
+/**
+ * @param {string} x
+ * @returns {Date}
+ */
+function mapDateForAPI(x) {
+>mapDateForAPI : Symbol(mapDateForAPI, Decl(file.js, 199, 1))
+>x : Symbol(x, Decl(file.js, 207, 23))
+
+    return /** @type {any} */ (undefined);
+>undefined : Symbol(undefined)
+}
+
+/**
+ * @template {string | undefined} T
+ * @param {string} start
+ * @param {T} [end]
+ * @returns {HelperCond<T, string, { start: Date, end: Date }, undefined, { start: Date, end: undefined }>}
+ */
+function transformDatesForAPI(start, end) {
+>transformDatesForAPI : Symbol(transformDatesForAPI, Decl(file.js, 209, 1))
+>start : Symbol(start, Decl(file.js, 217, 30))
+>end : Symbol(end, Decl(file.js, 217, 36))
+
+    return end !== undefined ?
+>end : Symbol(end, Decl(file.js, 217, 36))
+>undefined : Symbol(undefined)
+        {
+            start: mapDateForAPI(start),
+>start : Symbol(start, Decl(file.js, 219, 9))
+>mapDateForAPI : Symbol(mapDateForAPI, Decl(file.js, 199, 1))
+>start : Symbol(start, Decl(file.js, 217, 30))
+
+            end: mapDateForAPI(end),
+>end : Symbol(end, Decl(file.js, 220, 40))
+>mapDateForAPI : Symbol(mapDateForAPI, Decl(file.js, 199, 1))
+>end : Symbol(end, Decl(file.js, 217, 36))
+
+        } :
+        {
+            start: mapDateForAPI(start),
+>start : Symbol(start, Decl(file.js, 223, 9))
+>mapDateForAPI : Symbol(mapDateForAPI, Decl(file.js, 199, 1))
+>start : Symbol(start, Decl(file.js, 217, 30))
+
+            end: undefined
+>end : Symbol(end, Decl(file.js, 224, 40))
+>undefined : Symbol(undefined)
+
+        };
+}
+
+// File: Rocket.Chat/packages/agenda/src/Agenda.ts
+
+/**
+ * @typedef {MyObj} RepeatOptions
+ */
+
+/**
+ * @typedef {MyObj} Job
+ */
+
+/**
+ * @typedef {Object} IJob
+ * @property {MyObj} data
+ */
+class NewAgenda {
+>NewAgenda : Symbol(NewAgenda, Decl(file.js, 227, 1))
+
+    /**
+     * @param {string | number} interval
+     * @param {string} name
+     * @param {IJob['data']} data
+     * @param {RepeatOptions} options
+     * @returns {Promise<Job>}
+     */
+    async _createIntervalJob(interval, name, data, options) {
+>_createIntervalJob : Symbol(NewAgenda._createIntervalJob, Decl(file.js, 243, 17))
+>interval : Symbol(interval, Decl(file.js, 251, 29))
+>name : Symbol(name, Decl(file.js, 251, 38))
+>data : Symbol(data, Decl(file.js, 251, 44))
+>options : Symbol(options, Decl(file.js, 251, 50))
+
+        return /** @type {any} */ (undefined);
+>undefined : Symbol(undefined)
+    }
+
+    /**
+     * @param {string | number} interval
+     * @param {string[]} names
+     * @param {IJob['data']} data
+     * @param {RepeatOptions} options
+     * @returns {Promise<Job[]> | undefined}
+     */
+    _createIntervalJobs(interval, names, data, options) {
+>_createIntervalJobs : Symbol(NewAgenda._createIntervalJobs, Decl(file.js, 253, 5))
+>interval : Symbol(interval, Decl(file.js, 262, 24))
+>names : Symbol(names, Decl(file.js, 262, 33))
+>data : Symbol(data, Decl(file.js, 262, 40))
+>options : Symbol(options, Decl(file.js, 262, 46))
+
+        return undefined;
+>undefined : Symbol(undefined)
+    }
+
+    /**
+     * @template {string | string[]} T
+     * @param {string | number} interval
+     * @param {T} name
+     * @param {IJob['data']} data
+     * @param {RepeatOptions} options
+     * @returns {Promise<HelperCond<T, string, Job, string[], Job[] | undefined>>}
+     */
+    async newEvery(interval, name, data, options) {
+>newEvery : Symbol(NewAgenda.newEvery, Decl(file.js, 264, 5))
+>interval : Symbol(interval, Decl(file.js, 274, 19))
+>name : Symbol(name, Decl(file.js, 274, 28))
+>data : Symbol(data, Decl(file.js, 274, 34))
+>options : Symbol(options, Decl(file.js, 274, 40))
+
+        if (typeof name === 'string') {
+>name : Symbol(name, Decl(file.js, 274, 28))
+
+            return this._createIntervalJob(interval, name, data, options); // Ok
+>this._createIntervalJob : Symbol(NewAgenda._createIntervalJob, Decl(file.js, 243, 17))
+>this : Symbol(NewAgenda, Decl(file.js, 227, 1))
+>_createIntervalJob : Symbol(NewAgenda._createIntervalJob, Decl(file.js, 243, 17))
+>interval : Symbol(interval, Decl(file.js, 274, 19))
+>name : Symbol(name, Decl(file.js, 274, 28))
+>data : Symbol(data, Decl(file.js, 274, 34))
+>options : Symbol(options, Decl(file.js, 274, 40))
+        }
+
+        if (Array.isArray(name)) {
+>Array.isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --))
+>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, --, --) ... and 4 more)
+>isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --))
+>name : Symbol(name, Decl(file.js, 274, 28))
+
+            return this._createIntervalJobs(interval, name, data, options); // Ok
+>this._createIntervalJobs : Symbol(NewAgenda._createIntervalJobs, Decl(file.js, 253, 5))
+>this : Symbol(NewAgenda, Decl(file.js, 227, 1))
+>_createIntervalJobs : Symbol(NewAgenda._createIntervalJobs, Decl(file.js, 253, 5))
+>interval : Symbol(interval, Decl(file.js, 274, 19))
+>name : Symbol(name, Decl(file.js, 274, 28))
+>data : Symbol(data, Decl(file.js, 274, 34))
+>options : Symbol(options, Decl(file.js, 274, 40))
+        }
+
+        throw new Error('Unexpected error: Invalid job name(s)');
+>Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2022.error.d.ts, --, --))
+    }
+}
+
+// File: angular/packages/common/src/pipes/case_conversion_pipes.ts
+
+/**
+ * @template {string | null | undefined} T
+ * @param {T} value
+ * @returns {HelperCond<T, string, string, null | undefined, null>}
+ */
+function transform1(value) {
+>transform1 : Symbol(transform1, Decl(file.js, 285, 1))
+>value : Symbol(value, Decl(file.js, 294, 20))
+
+    if (value == null) return null; // Ok
+>value : Symbol(value, Decl(file.js, 294, 20))
+
+    if (typeof value !== 'string') {
+>value : Symbol(value, Decl(file.js, 294, 20))
+
+        throw new Error();
+>Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2022.error.d.ts, --, --))
+    }
+    return value.toLowerCase(); // Ok
+>value.toLowerCase : Symbol(String.toLowerCase, Decl(lib.es5.d.ts, --, --))
+>value : Symbol(value, Decl(file.js, 294, 20))
+>toLowerCase : Symbol(String.toLowerCase, Decl(lib.es5.d.ts, --, --))
+}
+
diff --git a/tests/baselines/reference/dependentReturnType2.types b/tests/baselines/reference/dependentReturnType2.types
new file mode 100644
index 0000000000000..1adf92c29a8fd
--- /dev/null
+++ b/tests/baselines/reference/dependentReturnType2.types
@@ -0,0 +1,1007 @@
+//// [tests/cases/compiler/dependentReturnType2.ts] ////
+
+=== file.js ===
+// Adapted from ts-error-deltas repos
+
+/**
+ * @template T
+ * @template A
+ * @template R1
+ * @template B
+ * @template R2
+ * @typedef {T extends A ? R1 : T extends B ? R2 : never} HelperCond
+ */
+
+/**
+ * @typedef IMessage
+ * @property {string} [html]
+ * @property {Object[]} [tokens]
+ */
+
+class NewKatex {
+>NewKatex : NewKatex
+>         : ^^^^^^^^
+
+    /**
+     * @param {string} s
+     * @returns {string}
+     */
+    render(s) {
+>render : (s: string) => string
+>       : ^ ^^      ^^^^^      
+>s : string
+>  : ^^^^^^
+
+        return "";
+>"" : ""
+>   : ^^
+    }
+
+    /**
+     * @template {string | IMessage} T
+     * @param {T} message
+     * @returns {T extends string ? string : T extends IMessage ? IMessage : never}
+     */
+    renderMessage(message) {
+>renderMessage : <T extends string | IMessage>(message: T) => T extends string ? string : T extends IMessage ? IMessage : never
+>              : ^ ^^^^^^^^^                 ^^       ^^ ^^^^^                                                                 
+>message : T
+>        : ^
+
+        if (typeof message === 'string') {
+>typeof message === 'string' : boolean
+>                            : ^^^^^^^
+>typeof message : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
+>               : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>message : T
+>        : ^
+>'string' : "string"
+>         : ^^^^^^^^
+
+            return this.render(message); // Ok
+>this.render(message) : string
+>                     : ^^^^^^
+>this.render : (s: string) => string
+>            : ^ ^^      ^^^^^      
+>this : this
+>     : ^^^^
+>render : (s: string) => string
+>       : ^ ^^      ^^^^^      
+>message : string
+>        : ^^^^^^
+        }
+
+        if (!message.html?.trim()) {
+>!message.html?.trim() : boolean
+>                      : ^^^^^^^
+>message.html?.trim() : string | undefined
+>                     : ^^^^^^^^^^^^^^^^^^
+>message.html?.trim : (() => string) | undefined
+>                   : ^^^^^^^      ^^^^^^^^^^^^^
+>message.html : string | undefined
+>             : ^^^^^^^^^^^^^^^^^^
+>message : IMessage
+>        : ^^^^^^^^
+>html : string | undefined
+>     : ^^^^^^^^^^^^^^^^^^
+>trim : (() => string) | undefined
+>     : ^^^^^^^      ^^^^^^^^^^^^^
+
+            return message; // Ok
+>message : IMessage
+>        : ^^^^^^^^
+        }
+
+        if (!message.tokens) {
+>!message.tokens : boolean
+>                : ^^^^^^^
+>message.tokens : Object[] | undefined
+>               : ^^^^^^^^^^^^^^^^^^^^
+>message : IMessage
+>        : ^^^^^^^^
+>tokens : Object[] | undefined
+>       : ^^^^^^^^^^^^^^^^^^^^
+
+            message.tokens = [];
+>message.tokens = [] : never[]
+>                    : ^^^^^^^
+>message.tokens : Object[] | undefined
+>               : ^^^^^^^^^^^^^^^^^^^^
+>message : IMessage
+>        : ^^^^^^^^
+>tokens : Object[] | undefined
+>       : ^^^^^^^^^^^^^^^^^^^^
+>[] : never[]
+>   : ^^^^^^^
+        }
+
+        message.html = this.render(message.html);
+>message.html = this.render(message.html) : string
+>                                         : ^^^^^^
+>message.html : string | undefined
+>             : ^^^^^^^^^^^^^^^^^^
+>message : IMessage
+>        : ^^^^^^^^
+>html : string | undefined
+>     : ^^^^^^^^^^^^^^^^^^
+>this.render(message.html) : string
+>                          : ^^^^^^
+>this.render : (s: string) => string
+>            : ^ ^^      ^^^^^      
+>this : this
+>     : ^^^^
+>render : (s: string) => string
+>       : ^ ^^      ^^^^^      
+>message.html : string
+>             : ^^^^^^
+>message : IMessage
+>        : ^^^^^^^^
+>html : string
+>     : ^^^^^^
+
+        return message; // Ok
+>message : IMessage
+>        : ^^^^^^^^
+    }
+}
+
+/**
+ * @template {true | false} T
+ * @param {{ dollarSyntax: boolean; parenthesisSyntax: boolean; }} options
+ * @param {T} _isMessage
+ * @returns {T extends true ? (message: IMessage) => IMessage : T extends false ? (message: string) => string : never}
+ */
+function createKatexMessageRendering(options, _isMessage) {
+>createKatexMessageRendering : <T extends true | false>(options: { dollarSyntax: boolean; parenthesisSyntax: boolean; }, _isMessage: T) => T extends true ? (message: IMessage) => IMessage : T extends false ? (message: string) => string : never
+>                            : ^ ^^^^^^^^^            ^^       ^^                                                      ^^          ^^ ^^^^^                                                                                                        
+>options : { dollarSyntax: boolean; parenthesisSyntax: boolean; }
+>        : ^^^^^^^^^^^^^^^^       ^^^^^^^^^^^^^^^^^^^^^       ^^^
+>_isMessage : T
+>           : ^
+
+    const instance = new NewKatex();
+>instance : NewKatex
+>         : ^^^^^^^^
+>new NewKatex() : NewKatex
+>               : ^^^^^^^^
+>NewKatex : typeof NewKatex
+>         : ^^^^^^^^^^^^^^^
+
+    if (_isMessage) {
+>_isMessage : T
+>           : ^
+
+        return (/** @type {IMessage} */ message) => instance.renderMessage(message); // Ok
+>(/** @type {IMessage} */ message) => instance.renderMessage(message) : (message: IMessage) => IMessage
+>                                                                     : ^       ^^        ^^^^^^^^^^^^^
+>message : IMessage
+>        : ^^^^^^^^
+>instance.renderMessage(message) : IMessage
+>                                : ^^^^^^^^
+>instance.renderMessage : <T_1 extends string | IMessage>(message: T_1) => T_1 extends string ? string : T_1 extends IMessage ? IMessage : never
+>                       : ^^^^^^^^^^^^^                 ^^       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>instance : NewKatex
+>         : ^^^^^^^^
+>renderMessage : <T_1 extends string | IMessage>(message: T_1) => T_1 extends string ? string : T_1 extends IMessage ? IMessage : never
+>              : ^^^^^^^^^^^^^                 ^^       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>message : IMessage
+>        : ^^^^^^^^
+    }
+    return (/** @type {string} */ message) => instance.renderMessage(message); // Ok
+>(/** @type {string} */ message) => instance.renderMessage(message) : (message: string) => string
+>                                                                   : ^       ^^      ^^^^^^^^^^^
+>message : string
+>        : ^^^^^^
+>instance.renderMessage(message) : string
+>                                : ^^^^^^
+>instance.renderMessage : <T_1 extends string | IMessage>(message: T_1) => T_1 extends string ? string : T_1 extends IMessage ? IMessage : never
+>                       : ^^^^^^^^^^^^^                 ^^       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>instance : NewKatex
+>         : ^^^^^^^^
+>renderMessage : <T_1 extends string | IMessage>(message: T_1) => T_1 extends string ? string : T_1 extends IMessage ? IMessage : never
+>              : ^^^^^^^^^^^^^                 ^^       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>message : string
+>        : ^^^^^^
+}
+
+// File: Rocket.Chat/apps/meteor/app/settings/lib/settings.ts
+
+/**
+ * @typedef {Record<any, any>} MyObj
+ */
+
+
+/**
+ * @typedef {MyObj} SettingValue
+ */
+ 
+/**
+ * @template {SettingValue} T
+ * @typedef {Object} SettingComposedValue
+ * @property {string} key
+ * @property {SettingValue} value
+ */
+
+/**
+ * @callback SettingCallback
+ * @param {string} key
+ * @param {SettingValue} value
+ * @param {boolean} [initialLoad]
+ * @returns {void}
+ */
+
+/** @type {{ settings: { [s: string]: any } }} */
+const Meteor = /** @type {any} */ (undefined);
+>Meteor : { settings: { [s: string]: any; }; }
+>       : ^^^^^^^^^^^^                     ^^^
+>(undefined) : any
+>            : ^^^
+>undefined : undefined
+>          : ^^^^^^^^^
+
+/** @type {{ isRegExp(x: unknown): x is RegExp; }} */
+const _ = /** @type {any} */ (undefined);
+>_ : { isRegExp(x: unknown): x is RegExp; }
+>  : ^^^^^^^^^^^ ^^       ^^^           ^^^
+>(undefined) : any
+>            : ^^^
+>undefined : undefined
+>          : ^^^^^^^^^
+
+/**
+ * @param {RegExp} x
+ * @returns {void}
+ */
+function takesRegExp(x) {
+>takesRegExp : (x: RegExp) => void
+>            : ^ ^^      ^^^^^    
+>x : RegExp
+>  : ^^^^^^
+
+    return /** @type {any} */ undefined;
+>undefined : undefined
+>          : ^^^^^^^^^
+}
+/**
+ * @param {string} x
+ * @returns {void}
+ */
+function takesString(x) {
+>takesString : (x: string) => void
+>            : ^ ^^      ^^^^^    
+>x : string
+>  : ^^^^^^
+
+    return /** @type {any} */ undefined;
+>undefined : undefined
+>          : ^^^^^^^^^
+}
+
+/**
+ * @class NewSettingsBase
+ */
+class NewSettingsBase {
+>NewSettingsBase : NewSettingsBase
+>                : ^^^^^^^^^^^^^^^
+
+    /**
+     * @template {SettingCallback | undefined} C
+     * @template {string | RegExp} I
+     * @template {SettingValue} T
+     * @param {I} _id
+     * @param {C} [callback]
+     * @returns {HelperCond<C, SettingCallback, void, undefined, HelperCond<I, string, T | undefined, RegExp, SettingComposedValue<T>[]>>}
+     */
+    newGet(_id, callback) {
+>newGet : <C extends SettingCallback | undefined, I extends string | RegExp, T extends SettingValue>(_id: I, callback?: C) => HelperCond<C, SettingCallback, void, undefined, HelperCond<I, string, T | undefined, RegExp, SettingComposedValue<T>[]>>
+>       : ^ ^^^^^^^^^                           ^^ ^^^^^^^^^               ^^ ^^^^^^^^^            ^^   ^^ ^^        ^^^ ^^^^^                                                                                                                        
+>_id : I
+>    : ^
+>callback : C | undefined
+>         : ^^^^^^^^^^^^^
+
+        if (callback !== undefined) {
+>callback !== undefined : boolean
+>                       : ^^^^^^^
+>callback : C | undefined
+>         : ^^^^^^^^^^^^^
+>undefined : undefined
+>          : ^^^^^^^^^
+
+            if (!Meteor.settings) {
+>!Meteor.settings : false
+>                 : ^^^^^
+>Meteor.settings : { [s: string]: any; }
+>                : ^^^^^^^^^^^^^^^^^^^^^
+>Meteor : { settings: { [s: string]: any; }; }
+>       : ^^^^^^^^^^^^                     ^^^
+>settings : { [s: string]: any; }
+>         : ^^^^^^^^^^^^^^^^^^^^^
+
+                return; // Ok
+            }
+            if (_id === '*') {
+>_id === '*' : boolean
+>            : ^^^^^^^
+>_id : I
+>    : ^
+>'*' : "*"
+>    : ^^^
+
+                return Object.keys(Meteor.settings).forEach((key) => {
+>Object.keys(Meteor.settings).forEach((key) => {                    const value = Meteor.settings[key];                    callback(key, value);                }) : void
+>                                                                                                                                                                  : ^^^^
+>Object.keys(Meteor.settings).forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void
+>                                     : ^          ^^^     ^^^^^^^^^^     ^^      ^^     ^^^^^^^^^^^^^^^    ^^       ^^^   ^^^^^    
+>Object.keys(Meteor.settings) : string[]
+>                             : ^^^^^^^^
+>Object.keys : { (o: object): string[]; (o: {}): string[]; }
+>            : ^^^ ^^      ^^^        ^^^ ^^  ^^^        ^^^
+>Object : ObjectConstructor
+>       : ^^^^^^^^^^^^^^^^^
+>keys : { (o: object): string[]; (o: {}): string[]; }
+>     : ^^^ ^^      ^^^        ^^^ ^^  ^^^        ^^^
+>Meteor.settings : { [s: string]: any; }
+>                : ^^^^^^^^^^^^^^^^^^^^^
+>Meteor : { settings: { [s: string]: any; }; }
+>       : ^^^^^^^^^^^^                     ^^^
+>settings : { [s: string]: any; }
+>         : ^^^^^^^^^^^^^^^^^^^^^
+>forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void
+>        : ^          ^^^     ^^^^^^^^^^     ^^      ^^     ^^^^^^^^^^^^^^^    ^^       ^^^   ^^^^^    
+>(key) => {                    const value = Meteor.settings[key];                    callback(key, value);                } : (key: string) => void
+>                                                                                                                            : ^   ^^^^^^^^^^^^^^^^^
+>key : string
+>    : ^^^^^^
+
+                    const value = Meteor.settings[key];
+>value : any
+>      : ^^^
+>Meteor.settings[key] : any
+>                     : ^^^
+>Meteor.settings : { [s: string]: any; }
+>                : ^^^^^^^^^^^^^^^^^^^^^
+>Meteor : { settings: { [s: string]: any; }; }
+>       : ^^^^^^^^^^^^                     ^^^
+>settings : { [s: string]: any; }
+>         : ^^^^^^^^^^^^^^^^^^^^^
+>key : string
+>    : ^^^^^^
+
+                    callback(key, value);
+>callback(key, value) : void
+>                     : ^^^^
+>callback : SettingCallback
+>         : ^^^^^^^^^^^^^^^
+>key : string
+>    : ^^^^^^
+>value : any
+>      : ^^^
+
+                });
+            }
+            if (_.isRegExp(_id) && Meteor.settings) {
+>_.isRegExp(_id) && Meteor.settings : false | { [s: string]: any; }
+>                                   : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>_.isRegExp(_id) : boolean
+>                : ^^^^^^^
+>_.isRegExp : (x: unknown) => x is RegExp
+>           : ^ ^^       ^^^^^           
+>_ : { isRegExp(x: unknown): x is RegExp; }
+>  : ^^^^^^^^^^^ ^^       ^^^           ^^^
+>isRegExp : (x: unknown) => x is RegExp
+>         : ^ ^^       ^^^^^           
+>_id : string | RegExp
+>    : ^^^^^^^^^^^^^^^
+>Meteor.settings : { [s: string]: any; }
+>                : ^^^^^^^^^^^^^^^^^^^^^
+>Meteor : { settings: { [s: string]: any; }; }
+>       : ^^^^^^^^^^^^                     ^^^
+>settings : { [s: string]: any; }
+>         : ^^^^^^^^^^^^^^^^^^^^^
+
+                return Object.keys(Meteor.settings).forEach((key) => {
+>Object.keys(Meteor.settings).forEach((key) => {                    if (!_id.test(key)) {                        return;                    }                    const value = Meteor.settings[key];                    callback(key, value);                }) : void
+>                                                                                                                                                                                                                                                               : ^^^^
+>Object.keys(Meteor.settings).forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void
+>                                     : ^          ^^^     ^^^^^^^^^^     ^^      ^^     ^^^^^^^^^^^^^^^    ^^       ^^^   ^^^^^    
+>Object.keys(Meteor.settings) : string[]
+>                             : ^^^^^^^^
+>Object.keys : { (o: object): string[]; (o: {}): string[]; }
+>            : ^^^ ^^      ^^^        ^^^ ^^  ^^^        ^^^
+>Object : ObjectConstructor
+>       : ^^^^^^^^^^^^^^^^^
+>keys : { (o: object): string[]; (o: {}): string[]; }
+>     : ^^^ ^^      ^^^        ^^^ ^^  ^^^        ^^^
+>Meteor.settings : { [s: string]: any; }
+>                : ^^^^^^^^^^^^^^^^^^^^^
+>Meteor : { settings: { [s: string]: any; }; }
+>       : ^^^^^^^^^^^^                     ^^^
+>settings : { [s: string]: any; }
+>         : ^^^^^^^^^^^^^^^^^^^^^
+>forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void
+>        : ^          ^^^     ^^^^^^^^^^     ^^      ^^     ^^^^^^^^^^^^^^^    ^^       ^^^   ^^^^^    
+>(key) => {                    if (!_id.test(key)) {                        return;                    }                    const value = Meteor.settings[key];                    callback(key, value);                } : (key: string) => void
+>                                                                                                                                                                                                                         : ^   ^^^^^^^^^^^^^^^^^
+>key : string
+>    : ^^^^^^
+
+                    if (!_id.test(key)) {
+>!_id.test(key) : boolean
+>               : ^^^^^^^
+>_id.test(key) : boolean
+>              : ^^^^^^^
+>_id.test : (string: string) => boolean
+>         : ^      ^^      ^^^^^       
+>_id : RegExp
+>    : ^^^^^^
+>test : (string: string) => boolean
+>     : ^      ^^      ^^^^^       
+>key : string
+>    : ^^^^^^
+
+                        return;
+                    }
+                    const value = Meteor.settings[key];
+>value : any
+>      : ^^^
+>Meteor.settings[key] : any
+>                     : ^^^
+>Meteor.settings : { [s: string]: any; }
+>                : ^^^^^^^^^^^^^^^^^^^^^
+>Meteor : { settings: { [s: string]: any; }; }
+>       : ^^^^^^^^^^^^                     ^^^
+>settings : { [s: string]: any; }
+>         : ^^^^^^^^^^^^^^^^^^^^^
+>key : string
+>    : ^^^^^^
+
+                    callback(key, value);
+>callback(key, value) : void
+>                     : ^^^^
+>callback : SettingCallback
+>         : ^^^^^^^^^^^^^^^
+>key : string
+>    : ^^^^^^
+>value : any
+>      : ^^^
+
+                });
+            }
+
+            if (typeof _id === 'string') {
+>typeof _id === 'string' : boolean
+>                        : ^^^^^^^
+>typeof _id : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
+>           : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>_id : I
+>    : ^
+>'string' : "string"
+>         : ^^^^^^^^
+
+                const value = Meteor.settings[_id];
+>value : any
+>      : ^^^
+>Meteor.settings[_id] : any
+>                     : ^^^
+>Meteor.settings : { [s: string]: any; }
+>                : ^^^^^^^^^^^^^^^^^^^^^
+>Meteor : { settings: { [s: string]: any; }; }
+>       : ^^^^^^^^^^^^                     ^^^
+>settings : { [s: string]: any; }
+>         : ^^^^^^^^^^^^^^^^^^^^^
+>_id : I & string
+>    : ^^^^^^^^^^
+
+                if (value != null) {
+>value != null : boolean
+>              : ^^^^^^^
+>value : any
+>      : ^^^
+
+                    callback(_id, Meteor.settings[_id]);
+>callback(_id, Meteor.settings[_id]) : void
+>                                    : ^^^^
+>callback : SettingCallback
+>         : ^^^^^^^^^^^^^^^
+>_id : string
+>    : ^^^^^^
+>Meteor.settings[_id] : any
+>                     : ^^^
+>Meteor.settings : { [s: string]: any; }
+>                : ^^^^^^^^^^^^^^^^^^^^^
+>Meteor : { settings: { [s: string]: any; }; }
+>       : ^^^^^^^^^^^^                     ^^^
+>settings : { [s: string]: any; }
+>         : ^^^^^^^^^^^^^^^^^^^^^
+>_id : I & string
+>    : ^^^^^^^^^^
+                }
+                return; // Ok
+            }
+
+            return; // Ok, needed for exhaustiveness check
+        }
+
+        if (!Meteor.settings) {
+>!Meteor.settings : false
+>                 : ^^^^^
+>Meteor.settings : { [s: string]: any; }
+>                : ^^^^^^^^^^^^^^^^^^^^^
+>Meteor : { settings: { [s: string]: any; }; }
+>       : ^^^^^^^^^^^^                     ^^^
+>settings : { [s: string]: any; }
+>         : ^^^^^^^^^^^^^^^^^^^^^
+
+            return undefined; // Error
+>undefined : undefined
+>          : ^^^^^^^^^
+        }
+
+        if (_.isRegExp(_id)) {
+>_.isRegExp(_id) : boolean
+>                : ^^^^^^^
+>_.isRegExp : (x: unknown) => x is RegExp
+>           : ^ ^^       ^^^^^           
+>_ : { isRegExp(x: unknown): x is RegExp; }
+>  : ^^^^^^^^^^^ ^^       ^^^           ^^^
+>isRegExp : (x: unknown) => x is RegExp
+>         : ^ ^^       ^^^^^           
+>_id : string | RegExp
+>    : ^^^^^^^^^^^^^^^
+
+            return Object.keys(Meteor.settings).reduce((/** @type {SettingComposedValue<T>[]} */ items, key) => {
+>Object.keys(Meteor.settings).reduce((/** @type {SettingComposedValue<T>[]} */ items, key) => {                const value = Meteor.settings[key];                if (_id.test(key)) {                    items.push({ key, value });                }                return items;            }, []) : SettingComposedValue<T>[]
+>                                                                                                                                                                                                                                                                                                     : ^^^^^^^^^^^^^^^^^^^^^^^^^
+>Object.keys(Meteor.settings).reduce : { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string; <U>(callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; }
+>                                    : ^^^          ^^^             ^^^^^^^^^^            ^^^^^^^^^^            ^^      ^^     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^          ^^^             ^^^^^^^^^^            ^^^^^^^^^^            ^^      ^^     ^^^^^^^^^^^^^^^^^^^^^^^            ^^^^^^^^^^^^^^^^^^^^ ^^          ^^^             ^^^^^            ^^^^^^^^^^            ^^      ^^     ^^^^^^^^^^^^^^^^^^            ^^^^^^^^^^
+>Object.keys(Meteor.settings) : string[]
+>                             : ^^^^^^^^
+>Object.keys : { (o: object): string[]; (o: {}): string[]; }
+>            : ^^^ ^^      ^^^        ^^^ ^^  ^^^        ^^^
+>Object : ObjectConstructor
+>       : ^^^^^^^^^^^^^^^^^
+>keys : { (o: object): string[]; (o: {}): string[]; }
+>     : ^^^ ^^      ^^^        ^^^ ^^  ^^^        ^^^
+>Meteor.settings : { [s: string]: any; }
+>                : ^^^^^^^^^^^^^^^^^^^^^
+>Meteor : { settings: { [s: string]: any; }; }
+>       : ^^^^^^^^^^^^                     ^^^
+>settings : { [s: string]: any; }
+>         : ^^^^^^^^^^^^^^^^^^^^^
+>reduce : { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string; <U>(callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; }
+>       : ^^^          ^^^             ^^^^^^^^^^            ^^^^^^^^^^            ^^      ^^     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^          ^^^             ^^^^^^^^^^            ^^^^^^^^^^            ^^      ^^     ^^^^^^^^^^^^^^^^^^^^^^^            ^^^^^^^^^^^^^^^^^^^^ ^^          ^^^             ^^^^^            ^^^^^^^^^^            ^^      ^^     ^^^^^^^^^^^^^^^^^^            ^^^^^^^^^^
+>(/** @type {SettingComposedValue<T>[]} */ items, key) => {                const value = Meteor.settings[key];                if (_id.test(key)) {                    items.push({ key, value });                }                return items;            } : (items: SettingComposedValue<T>[], key: string) => SettingComposedValue<T>[]
+>                                                                                                                                                                                                                                                            : ^     ^^                         ^^   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>items : SettingComposedValue<T>[]
+>      : ^^^^^^^^^^^^^^^^^^^^^^^^^
+>key : string
+>    : ^^^^^^
+
+                const value = Meteor.settings[key];
+>value : any
+>      : ^^^
+>Meteor.settings[key] : any
+>                     : ^^^
+>Meteor.settings : { [s: string]: any; }
+>                : ^^^^^^^^^^^^^^^^^^^^^
+>Meteor : { settings: { [s: string]: any; }; }
+>       : ^^^^^^^^^^^^                     ^^^
+>settings : { [s: string]: any; }
+>         : ^^^^^^^^^^^^^^^^^^^^^
+>key : string
+>    : ^^^^^^
+
+                if (_id.test(key)) {
+>_id.test(key) : boolean
+>              : ^^^^^^^
+>_id.test : (string: string) => boolean
+>         : ^      ^^      ^^^^^       
+>_id : RegExp
+>    : ^^^^^^
+>test : (string: string) => boolean
+>     : ^      ^^      ^^^^^       
+>key : string
+>    : ^^^^^^
+
+                    items.push({ key, value });
+>items.push({ key, value }) : number
+>                           : ^^^^^^
+>items.push : (...items: SettingComposedValue<T>[]) => number
+>           : ^^^^     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^      
+>items : SettingComposedValue<T>[]
+>      : ^^^^^^^^^^^^^^^^^^^^^^^^^
+>push : (...items: SettingComposedValue<T>[]) => number
+>     : ^^^^     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^      
+>{ key, value } : { key: string; value: any; }
+>               : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>key : string
+>    : ^^^^^^
+>value : any
+>      : ^^^
+                }
+                return items;
+>items : SettingComposedValue<T>[]
+>      : ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+            }, []); // Ok
+>[] : never[]
+>   : ^^^^^^^
+        }
+
+        return Meteor.settings?.[_id]; // Error
+>Meteor.settings?.[_id] : any
+>                       : ^^^
+>Meteor.settings : { [s: string]: any; }
+>                : ^^^^^^^^^^^^^^^^^^^^^
+>Meteor : { settings: { [s: string]: any; }; }
+>       : ^^^^^^^^^^^^                     ^^^
+>settings : { [s: string]: any; }
+>         : ^^^^^^^^^^^^^^^^^^^^^
+>_id : I
+>    : ^
+    }
+}
+
+// File: Rocket.Chat/apps/meteor/app/ui-utils/client/lib/messageBox.ts
+
+/**
+ * @typedef {MyObj} MessageBoxAction
+ */
+
+/**
+ * @template {string | undefined} T
+ * @param {T} group
+ * @returns {HelperCond<T, string, MessageBoxAction[], undefined, Record<string, MessageBoxAction[]>>}
+ */
+function getWithBug(group) {
+>getWithBug : <T extends string | undefined>(group: T) => HelperCond<T, string, MessageBoxAction[], undefined, Record<string, MessageBoxAction[]>>
+>           : ^ ^^^^^^^^^                  ^^     ^^ ^^^^^                                                                                        
+>group : T
+>      : ^
+
+    if (!group) {
+>!group : boolean
+>       : ^^^^^^^
+>group : T
+>      : ^
+
+        return /** @type {Record<string, MessageBoxAction[]>} */({}); // Error
+>({}) : Record<string, MyObj[]>
+>     : ^^^^^^^^^^^^^^^^^^^^^^^
+>{} : {}
+>   : ^^
+    }
+    return /** @type {MessageBoxAction[]} */([]); // Ok
+>([]) : MyObj[]
+>     : ^^^^^^^
+>[] : never[]
+>   : ^^^^^^^
+}
+
+/**
+ * @template {string | undefined} T
+ * @param {T} group
+ * @returns {HelperCond<T, string, MessageBoxAction[], undefined, Record<string, MessageBoxAction[]>>}
+ */
+function getWithoutBug(group) {
+>getWithoutBug : <T extends string | undefined>(group: T) => HelperCond<T, string, MessageBoxAction[], undefined, Record<string, MessageBoxAction[]>>
+>              : ^ ^^^^^^^^^                  ^^     ^^ ^^^^^                                                                                        
+>group : T
+>      : ^
+
+    if (group === undefined) {
+>group === undefined : boolean
+>                    : ^^^^^^^
+>group : T
+>      : ^
+>undefined : undefined
+>          : ^^^^^^^^^
+
+        return /** @type {Record<string, MessageBoxAction[]>} */({}); // Ok
+>({}) : Record<string, MyObj[]>
+>     : ^^^^^^^^^^^^^^^^^^^^^^^
+>{} : {}
+>   : ^^
+    }
+    return /** @type {MessageBoxAction[]} */([]); // Ok
+>([]) : MyObj[]
+>     : ^^^^^^^
+>[] : never[]
+>   : ^^^^^^^
+}
+
+// File: Rocket.Chat/apps/meteor/ee/server/lib/engagementDashboard/date.ts
+
+/**
+ * @param {string} x
+ * @returns {Date}
+ */
+function mapDateForAPI(x) {
+>mapDateForAPI : (x: string) => Date
+>              : ^ ^^      ^^^^^    
+>x : string
+>  : ^^^^^^
+
+    return /** @type {any} */ (undefined);
+>(undefined) : any
+>            : ^^^
+>undefined : undefined
+>          : ^^^^^^^^^
+}
+
+/**
+ * @template {string | undefined} T
+ * @param {string} start
+ * @param {T} [end]
+ * @returns {HelperCond<T, string, { start: Date, end: Date }, undefined, { start: Date, end: undefined }>}
+ */
+function transformDatesForAPI(start, end) {
+>transformDatesForAPI : <T extends string | undefined>(start: string, end?: T) => HelperCond<T, string, { start: Date; end: Date; }, undefined, { start: Date; end: undefined; }>
+>                     : ^ ^^^^^^^^^                  ^^     ^^      ^^   ^^^ ^^^^^                                                                                               
+>start : string
+>      : ^^^^^^
+>end : T | undefined
+>    : ^^^^^^^^^^^^^
+
+    return end !== undefined ?
+>end !== undefined ?        {            start: mapDateForAPI(start),            end: mapDateForAPI(end),        } :        {            start: mapDateForAPI(start),            end: undefined        } : { start: Date; end: Date; } | { start: Date; end: undefined; }
+>                                                                                                                                                                                                        : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>end !== undefined : boolean
+>                  : ^^^^^^^
+>end : T | undefined
+>    : ^^^^^^^^^^^^^
+>undefined : undefined
+>          : ^^^^^^^^^
+        {
+>{            start: mapDateForAPI(start),            end: mapDateForAPI(end),        } : { start: Date; end: Date; }
+>                                                                                       : ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+            start: mapDateForAPI(start),
+>start : Date
+>      : ^^^^
+>mapDateForAPI(start) : Date
+>                     : ^^^^
+>mapDateForAPI : (x: string) => Date
+>              : ^ ^^      ^^^^^    
+>start : string
+>      : ^^^^^^
+
+            end: mapDateForAPI(end),
+>end : Date
+>    : ^^^^
+>mapDateForAPI(end) : Date
+>                   : ^^^^
+>mapDateForAPI : (x: string) => Date
+>              : ^ ^^      ^^^^^    
+>end : string
+>    : ^^^^^^
+
+        } :
+        {
+>{            start: mapDateForAPI(start),            end: undefined        } : { start: Date; end: undefined; }
+>                                                                             : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+            start: mapDateForAPI(start),
+>start : Date
+>      : ^^^^
+>mapDateForAPI(start) : Date
+>                     : ^^^^
+>mapDateForAPI : (x: string) => Date
+>              : ^ ^^      ^^^^^    
+>start : string
+>      : ^^^^^^
+
+            end: undefined
+>end : undefined
+>    : ^^^^^^^^^
+>undefined : undefined
+>          : ^^^^^^^^^
+
+        };
+}
+
+// File: Rocket.Chat/packages/agenda/src/Agenda.ts
+
+/**
+ * @typedef {MyObj} RepeatOptions
+ */
+
+/**
+ * @typedef {MyObj} Job
+ */
+
+/**
+ * @typedef {Object} IJob
+ * @property {MyObj} data
+ */
+class NewAgenda {
+>NewAgenda : NewAgenda
+>          : ^^^^^^^^^
+
+    /**
+     * @param {string | number} interval
+     * @param {string} name
+     * @param {IJob['data']} data
+     * @param {RepeatOptions} options
+     * @returns {Promise<Job>}
+     */
+    async _createIntervalJob(interval, name, data, options) {
+>_createIntervalJob : (interval: string | number, name: string, data: IJob["data"], options: RepeatOptions) => Promise<Job>
+>                   : ^        ^^               ^^    ^^      ^^    ^^            ^^       ^^             ^^^^^            
+>interval : string | number
+>         : ^^^^^^^^^^^^^^^
+>name : string
+>     : ^^^^^^
+>data : MyObj
+>     : ^^^^^
+>options : MyObj
+>        : ^^^^^
+
+        return /** @type {any} */ (undefined);
+>(undefined) : any
+>            : ^^^
+>undefined : undefined
+>          : ^^^^^^^^^
+    }
+
+    /**
+     * @param {string | number} interval
+     * @param {string[]} names
+     * @param {IJob['data']} data
+     * @param {RepeatOptions} options
+     * @returns {Promise<Job[]> | undefined}
+     */
+    _createIntervalJobs(interval, names, data, options) {
+>_createIntervalJobs : (interval: string | number, names: string[], data: IJob["data"], options: RepeatOptions) => Promise<Job[]> | undefined
+>                    : ^        ^^               ^^     ^^        ^^    ^^            ^^       ^^             ^^^^^                          
+>interval : string | number
+>         : ^^^^^^^^^^^^^^^
+>names : string[]
+>      : ^^^^^^^^
+>data : MyObj
+>     : ^^^^^
+>options : MyObj
+>        : ^^^^^
+
+        return undefined;
+>undefined : undefined
+>          : ^^^^^^^^^
+    }
+
+    /**
+     * @template {string | string[]} T
+     * @param {string | number} interval
+     * @param {T} name
+     * @param {IJob['data']} data
+     * @param {RepeatOptions} options
+     * @returns {Promise<HelperCond<T, string, Job, string[], Job[] | undefined>>}
+     */
+    async newEvery(interval, name, data, options) {
+>newEvery : <T extends string | string[]>(interval: string | number, name: T, data: IJob["data"], options: RepeatOptions) => Promise<HelperCond<T, string, Job, string[], Job[] | undefined>>
+>         : ^ ^^^^^^^^^                 ^^        ^^               ^^    ^^ ^^    ^^            ^^       ^^             ^^^^^                                                                
+>interval : string | number
+>         : ^^^^^^^^^^^^^^^
+>name : T
+>     : ^
+>data : MyObj
+>     : ^^^^^
+>options : MyObj
+>        : ^^^^^
+
+        if (typeof name === 'string') {
+>typeof name === 'string' : boolean
+>                         : ^^^^^^^
+>typeof name : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
+>            : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>name : T
+>     : ^
+>'string' : "string"
+>         : ^^^^^^^^
+
+            return this._createIntervalJob(interval, name, data, options); // Ok
+>this._createIntervalJob(interval, name, data, options) : Promise<MyObj>
+>                                                       : ^^^^^^^^^^^^^^
+>this._createIntervalJob : (interval: string | number, name: string, data: IJob["data"], options: RepeatOptions) => Promise<Job>
+>                        : ^        ^^               ^^    ^^      ^^    ^^            ^^       ^^             ^^^^^            
+>this : this
+>     : ^^^^
+>_createIntervalJob : (interval: string | number, name: string, data: IJob["data"], options: RepeatOptions) => Promise<Job>
+>                   : ^        ^^               ^^    ^^      ^^    ^^            ^^       ^^             ^^^^^            
+>interval : string | number
+>         : ^^^^^^^^^^^^^^^
+>name : string
+>     : ^^^^^^
+>data : MyObj
+>     : ^^^^^
+>options : MyObj
+>        : ^^^^^
+        }
+
+        if (Array.isArray(name)) {
+>Array.isArray(name) : boolean
+>                    : ^^^^^^^
+>Array.isArray : (arg: any) => arg is any[]
+>              : ^   ^^   ^^^^^            
+>Array : ArrayConstructor
+>      : ^^^^^^^^^^^^^^^^
+>isArray : (arg: any) => arg is any[]
+>        : ^   ^^   ^^^^^            
+>name : string[]
+>     : ^^^^^^^^
+
+            return this._createIntervalJobs(interval, name, data, options); // Ok
+>this._createIntervalJobs(interval, name, data, options) : Promise<MyObj[]> | undefined
+>                                                        : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>this._createIntervalJobs : (interval: string | number, names: string[], data: IJob["data"], options: RepeatOptions) => Promise<Job[]> | undefined
+>                         : ^        ^^               ^^     ^^        ^^    ^^            ^^       ^^             ^^^^^                          
+>this : this
+>     : ^^^^
+>_createIntervalJobs : (interval: string | number, names: string[], data: IJob["data"], options: RepeatOptions) => Promise<Job[]> | undefined
+>                    : ^        ^^               ^^     ^^        ^^    ^^            ^^       ^^             ^^^^^                          
+>interval : string | number
+>         : ^^^^^^^^^^^^^^^
+>name : string[]
+>     : ^^^^^^^^
+>data : MyObj
+>     : ^^^^^
+>options : MyObj
+>        : ^^^^^
+        }
+
+        throw new Error('Unexpected error: Invalid job name(s)');
+>new Error('Unexpected error: Invalid job name(s)') : Error
+>                                                   : ^^^^^
+>Error : ErrorConstructor
+>      : ^^^^^^^^^^^^^^^^
+>'Unexpected error: Invalid job name(s)' : "Unexpected error: Invalid job name(s)"
+>                                        : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    }
+}
+
+// File: angular/packages/common/src/pipes/case_conversion_pipes.ts
+
+/**
+ * @template {string | null | undefined} T
+ * @param {T} value
+ * @returns {HelperCond<T, string, string, null | undefined, null>}
+ */
+function transform1(value) {
+>transform1 : <T extends string | null | undefined>(value: T) => HelperCond<T, string, string, null | undefined, null>
+>           : ^ ^^^^^^^^^                         ^^     ^^ ^^^^^                                                     
+>value : T
+>      : ^
+
+    if (value == null) return null; // Ok
+>value == null : boolean
+>              : ^^^^^^^
+>value : T
+>      : ^
+
+    if (typeof value !== 'string') {
+>typeof value !== 'string' : boolean
+>                          : ^^^^^^^
+>typeof value : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
+>             : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>value : NonNullable<T>
+>      : ^^^^^^^^^^^^^^
+>'string' : "string"
+>         : ^^^^^^^^
+
+        throw new Error();
+>new Error() : Error
+>            : ^^^^^
+>Error : ErrorConstructor
+>      : ^^^^^^^^^^^^^^^^
+    }
+    return value.toLowerCase(); // Ok
+>value.toLowerCase() : string
+>                    : ^^^^^^
+>value.toLowerCase : () => string
+>                  : ^^^^^^      
+>value : string
+>      : ^^^^^^
+>toLowerCase : () => string
+>            : ^^^^^^      
+}
+
diff --git a/tests/baselines/reference/dependentReturnType3.errors.txt b/tests/baselines/reference/dependentReturnType3.errors.txt
new file mode 100644
index 0000000000000..39a9326242262
--- /dev/null
+++ b/tests/baselines/reference/dependentReturnType3.errors.txt
@@ -0,0 +1,224 @@
+dependentReturnType3.ts(114,13): error TS2322: Type 'undefined' is not assignable to type 'HelperCond<I, string, T | undefined, RegExp, SettingComposedValue<T>[]>'.
+dependentReturnType3.ts(130,16): error TS2536: Type 'I' cannot be used to index type '{ [s: string]: any; }'.
+dependentReturnType3.ts(141,9): error TS2322: Type 'Record<string, object[]>' is not assignable to type 'HelperCond<T, string, object[], undefined, Record<string, object[]>>'.
+
+
+==== dependentReturnType3.ts (3 errors) ====
+    // Adapted from ts-error-deltas repos
+    
+    type HelperCond<T, A, R1, B, R2> =
+        T extends A
+            ? R1
+            : T extends B
+                ? R2
+                : never;
+    
+    
+    // File: Rocket.Chat/apps/meteor/app/katex/client/index.ts
+    interface IMessage {
+        html?: string;
+        tokens?: {}[];
+    }
+    
+    class NewKatex {
+        render(s: string): string {
+            return "";
+        }
+    
+        renderMessage<T extends string | IMessage>(message: T):
+            T extends string
+            ? string
+            : T extends IMessage
+              ? IMessage
+              : never {
+            if (typeof message === 'string') {
+                return this.render(message); // Ok
+            }
+    
+            if (!message.html?.trim()) {
+                return message; // Ok
+            }
+    
+            if (!message.tokens) {
+                message.tokens = [];
+            }
+    
+            message.html = this.render(message.html);
+            return message; // Ok
+        }
+    }
+    
+    export function createKatexMessageRendering<T extends true | false>(
+        options: {
+            dollarSyntax: boolean;
+            parenthesisSyntax: boolean;
+        },
+        _isMessage: T,
+    ): T extends true
+        ? (message: IMessage) => IMessage
+        : T extends false
+          ? (message: string) => string
+          : never {
+        const instance = new NewKatex();
+        if (_isMessage) {
+            return (message: IMessage): IMessage => instance.renderMessage(message); // Ok
+        }
+        return (message: string): string => instance.renderMessage(message); // Ok
+    }
+    
+    // File: Rocket.Chat/apps/meteor/app/settings/lib/settings.ts
+    type SettingComposedValue<T extends SettingValue = SettingValue> = { key: string; value: T };
+    type SettingCallback = (key: string, value: SettingValue, initialLoad?: boolean) => void;
+    
+    type SettingValue = object;
+    declare const Meteor: { settings: { [s: string]: any } };
+    declare const _: { isRegExp(x: unknown): x is RegExp; };
+    declare function takesRegExp(x: RegExp): void;
+    declare function takesString(x: string): void;
+    
+    class NewSettingsBase {
+        public newGet<C extends SettingCallback | undefined, I extends string | RegExp, T extends SettingValue = SettingValue>(
+            _id: I,
+            callback?: C,
+        ): HelperCond<C,
+            SettingCallback, void,
+            undefined, HelperCond<I,
+                string, T | undefined,
+                RegExp, SettingComposedValue<T>[]>> {
+            if (callback !== undefined) {
+                if (!Meteor.settings) {
+                    return; // Ok
+                }
+                if (_id === '*') {
+                    return Object.keys(Meteor.settings).forEach((key) => { // Ok
+                        const value = Meteor.settings[key];
+                        callback(key, value);
+                    });
+                }
+                if (_.isRegExp(_id) && Meteor.settings) {
+                    return Object.keys(Meteor.settings).forEach((key) => { // Ok
+                        if (!_id.test(key)) {
+                            return;
+                        }
+                        const value = Meteor.settings[key];
+                        callback(key, value);
+                    });
+                }
+    
+                if (typeof _id === 'string') {
+                    const value = Meteor.settings[_id];
+                    if (value != null) {
+                        callback(_id, Meteor.settings[_id]);
+                    }
+                    return; // Ok
+                }
+    
+                return; // Ok, needed for exhaustiveness check
+            }
+    
+            if (!Meteor.settings) { // Wrong: we don't know that _id is string here, cannot return undefined
+                return undefined; // Error
+                ~~~~~~
+!!! error TS2322: Type 'undefined' is not assignable to type 'HelperCond<I, string, T | undefined, RegExp, SettingComposedValue<T>[]>'.
+            }
+    
+            if (_.isRegExp(_id)) {
+                return Object.keys(Meteor.settings).reduce((items: SettingComposedValue<T>[], key) => {
+    				const value = Meteor.settings[key];
+    				if (_id.test(key)) {
+    					items.push({
+    						key,
+    						value,
+    					});
+    				}
+    				return items;
+    			}, []); // Ok
+            }
+    
+            return Meteor.settings?.[_id]; // Error
+                   ~~~~~~~~~~~~~~~~~~~~~~
+!!! error TS2536: Type 'I' cannot be used to index type '{ [s: string]: any; }'.
+            // The indexing currently doesn't work because it doesn't use the narrowed type of `_id`.
+        }
+    }
+    
+    // File: Rocket.Chat/apps/meteor/app/ui-utils/client/lib/messageBox.ts
+    type MessageBoxAction = object;
+    
+    function getWithBug<T extends string | undefined>(group: T):
+    HelperCond<T, string, MessageBoxAction[], undefined, Record<string, MessageBoxAction[]>> {
+        if (!group) {
+            return {} as Record<string, MessageBoxAction[]>; // Error, could fall into this branch when group is empty string
+            ~~~~~~
+!!! error TS2322: Type 'Record<string, object[]>' is not assignable to type 'HelperCond<T, string, object[], undefined, Record<string, object[]>>'.
+        }
+    
+        return [] as MessageBoxAction[]; // Ok
+    }
+    
+    function getWithoutBug<T extends string | undefined>(group: T):
+    HelperCond<T, string, MessageBoxAction[], undefined, Record<string, MessageBoxAction[]>> {
+        if (group === undefined) {
+            return {} as Record<string, MessageBoxAction[]>; // Ok
+        }
+    
+        return [] as MessageBoxAction[]; // Ok
+    }
+    
+    // File: Rocket.Chat/apps/meteor/ee/server/lib/engagementDashboard/date.ts
+    declare function mapDateForAPI(x: string): Date;
+    export function transformDatesForAPI<T extends string | undefined>(
+        start: string,
+        end?: T
+    ): HelperCond<T, string, { start: Date, end: Date }, undefined, { start: Date, end: undefined }> {
+        return end !== undefined ? // Ok
+            {
+                start: mapDateForAPI(start),
+                end: mapDateForAPI(end),
+            } :
+            {
+                start: mapDateForAPI(start),
+                end: undefined
+            };
+    }
+    
+    // File: Rocket.Chat/packages/agenda/src/Agenda.ts
+    type RepeatOptions = object;
+    type Job = object;
+    type IJob = { data: object };
+    class NewAgenda {
+        public async _createIntervalJob(interval: string | number, name: string, data: IJob['data'], options: RepeatOptions): Promise<Job> { return undefined as any; }
+        private _createIntervalJobs(
+            interval: string | number,
+            names: string[],
+            data: IJob['data'],
+            options: RepeatOptions,
+        ): Promise<Job[]> | undefined { return undefined as any; }
+    
+        public async newEvery<T extends string | string[]>(
+            interval: string | number,
+            name: T,
+            data: IJob['data'],
+            options: RepeatOptions): Promise<HelperCond<T, string, Job, string[], Job[] | undefined>> {
+            if (typeof name === 'string') {
+                return this._createIntervalJob(interval, name, data, options); // Ok
+            }
+    
+            if (Array.isArray(name)) {
+                return this._createIntervalJobs(interval, name, data, options); // Ok
+                // Possible bug in original: createIntervalJobs can return undefined, but the original overload did not acount for that.
+            }
+    
+            throw new Error('Unexpected error: Invalid job name(s)');
+        }
+    }
+    
+    // File: angular/packages/common/src/pipes/case_conversion_pipes.ts
+    
+    function transform1<T extends string | null | undefined>(value: T): HelperCond<T, string, string, null | undefined, null> {
+        if (value == null) return null; // Ok
+        if (typeof value !== 'string') {
+            throw new Error();
+        }
+        return value.toLowerCase(); // Ok
+    }
\ No newline at end of file
diff --git a/tests/baselines/reference/dependentReturnType3.symbols b/tests/baselines/reference/dependentReturnType3.symbols
new file mode 100644
index 0000000000000..3d39bf1559fba
--- /dev/null
+++ b/tests/baselines/reference/dependentReturnType3.symbols
@@ -0,0 +1,679 @@
+//// [tests/cases/compiler/dependentReturnType3.ts] ////
+
+=== dependentReturnType3.ts ===
+// Adapted from ts-error-deltas repos
+
+type HelperCond<T, A, R1, B, R2> =
+>HelperCond : Symbol(HelperCond, Decl(dependentReturnType3.ts, 0, 0))
+>T : Symbol(T, Decl(dependentReturnType3.ts, 2, 16))
+>A : Symbol(A, Decl(dependentReturnType3.ts, 2, 18))
+>R1 : Symbol(R1, Decl(dependentReturnType3.ts, 2, 21))
+>B : Symbol(B, Decl(dependentReturnType3.ts, 2, 25))
+>R2 : Symbol(R2, Decl(dependentReturnType3.ts, 2, 28))
+
+    T extends A
+>T : Symbol(T, Decl(dependentReturnType3.ts, 2, 16))
+>A : Symbol(A, Decl(dependentReturnType3.ts, 2, 18))
+
+        ? R1
+>R1 : Symbol(R1, Decl(dependentReturnType3.ts, 2, 21))
+
+        : T extends B
+>T : Symbol(T, Decl(dependentReturnType3.ts, 2, 16))
+>B : Symbol(B, Decl(dependentReturnType3.ts, 2, 25))
+
+            ? R2
+>R2 : Symbol(R2, Decl(dependentReturnType3.ts, 2, 28))
+
+            : never;
+
+
+// File: Rocket.Chat/apps/meteor/app/katex/client/index.ts
+interface IMessage {
+>IMessage : Symbol(IMessage, Decl(dependentReturnType3.ts, 7, 20))
+
+    html?: string;
+>html : Symbol(IMessage.html, Decl(dependentReturnType3.ts, 11, 20))
+
+    tokens?: {}[];
+>tokens : Symbol(IMessage.tokens, Decl(dependentReturnType3.ts, 12, 18))
+}
+
+class NewKatex {
+>NewKatex : Symbol(NewKatex, Decl(dependentReturnType3.ts, 14, 1))
+
+    render(s: string): string {
+>render : Symbol(NewKatex.render, Decl(dependentReturnType3.ts, 16, 16))
+>s : Symbol(s, Decl(dependentReturnType3.ts, 17, 11))
+
+        return "";
+    }
+
+    renderMessage<T extends string | IMessage>(message: T):
+>renderMessage : Symbol(NewKatex.renderMessage, Decl(dependentReturnType3.ts, 19, 5))
+>T : Symbol(T, Decl(dependentReturnType3.ts, 21, 18))
+>IMessage : Symbol(IMessage, Decl(dependentReturnType3.ts, 7, 20))
+>message : Symbol(message, Decl(dependentReturnType3.ts, 21, 47))
+>T : Symbol(T, Decl(dependentReturnType3.ts, 21, 18))
+
+        T extends string
+>T : Symbol(T, Decl(dependentReturnType3.ts, 21, 18))
+
+        ? string
+        : T extends IMessage
+>T : Symbol(T, Decl(dependentReturnType3.ts, 21, 18))
+>IMessage : Symbol(IMessage, Decl(dependentReturnType3.ts, 7, 20))
+
+          ? IMessage
+>IMessage : Symbol(IMessage, Decl(dependentReturnType3.ts, 7, 20))
+
+          : never {
+        if (typeof message === 'string') {
+>message : Symbol(message, Decl(dependentReturnType3.ts, 21, 47))
+
+            return this.render(message); // Ok
+>this.render : Symbol(NewKatex.render, Decl(dependentReturnType3.ts, 16, 16))
+>this : Symbol(NewKatex, Decl(dependentReturnType3.ts, 14, 1))
+>render : Symbol(NewKatex.render, Decl(dependentReturnType3.ts, 16, 16))
+>message : Symbol(message, Decl(dependentReturnType3.ts, 21, 47))
+        }
+
+        if (!message.html?.trim()) {
+>message.html?.trim : Symbol(String.trim, Decl(lib.es5.d.ts, --, --))
+>message.html : Symbol(IMessage.html, Decl(dependentReturnType3.ts, 11, 20))
+>message : Symbol(message, Decl(dependentReturnType3.ts, 21, 47))
+>html : Symbol(IMessage.html, Decl(dependentReturnType3.ts, 11, 20))
+>trim : Symbol(String.trim, Decl(lib.es5.d.ts, --, --))
+
+            return message; // Ok
+>message : Symbol(message, Decl(dependentReturnType3.ts, 21, 47))
+        }
+
+        if (!message.tokens) {
+>message.tokens : Symbol(IMessage.tokens, Decl(dependentReturnType3.ts, 12, 18))
+>message : Symbol(message, Decl(dependentReturnType3.ts, 21, 47))
+>tokens : Symbol(IMessage.tokens, Decl(dependentReturnType3.ts, 12, 18))
+
+            message.tokens = [];
+>message.tokens : Symbol(IMessage.tokens, Decl(dependentReturnType3.ts, 12, 18))
+>message : Symbol(message, Decl(dependentReturnType3.ts, 21, 47))
+>tokens : Symbol(IMessage.tokens, Decl(dependentReturnType3.ts, 12, 18))
+        }
+
+        message.html = this.render(message.html);
+>message.html : Symbol(IMessage.html, Decl(dependentReturnType3.ts, 11, 20))
+>message : Symbol(message, Decl(dependentReturnType3.ts, 21, 47))
+>html : Symbol(IMessage.html, Decl(dependentReturnType3.ts, 11, 20))
+>this.render : Symbol(NewKatex.render, Decl(dependentReturnType3.ts, 16, 16))
+>this : Symbol(NewKatex, Decl(dependentReturnType3.ts, 14, 1))
+>render : Symbol(NewKatex.render, Decl(dependentReturnType3.ts, 16, 16))
+>message.html : Symbol(IMessage.html, Decl(dependentReturnType3.ts, 11, 20))
+>message : Symbol(message, Decl(dependentReturnType3.ts, 21, 47))
+>html : Symbol(IMessage.html, Decl(dependentReturnType3.ts, 11, 20))
+
+        return message; // Ok
+>message : Symbol(message, Decl(dependentReturnType3.ts, 21, 47))
+    }
+}
+
+export function createKatexMessageRendering<T extends true | false>(
+>createKatexMessageRendering : Symbol(createKatexMessageRendering, Decl(dependentReturnType3.ts, 42, 1))
+>T : Symbol(T, Decl(dependentReturnType3.ts, 44, 44))
+
+    options: {
+>options : Symbol(options, Decl(dependentReturnType3.ts, 44, 68))
+
+        dollarSyntax: boolean;
+>dollarSyntax : Symbol(dollarSyntax, Decl(dependentReturnType3.ts, 45, 14))
+
+        parenthesisSyntax: boolean;
+>parenthesisSyntax : Symbol(parenthesisSyntax, Decl(dependentReturnType3.ts, 46, 30))
+
+    },
+    _isMessage: T,
+>_isMessage : Symbol(_isMessage, Decl(dependentReturnType3.ts, 48, 6))
+>T : Symbol(T, Decl(dependentReturnType3.ts, 44, 44))
+
+): T extends true
+>T : Symbol(T, Decl(dependentReturnType3.ts, 44, 44))
+
+    ? (message: IMessage) => IMessage
+>message : Symbol(message, Decl(dependentReturnType3.ts, 51, 7))
+>IMessage : Symbol(IMessage, Decl(dependentReturnType3.ts, 7, 20))
+>IMessage : Symbol(IMessage, Decl(dependentReturnType3.ts, 7, 20))
+
+    : T extends false
+>T : Symbol(T, Decl(dependentReturnType3.ts, 44, 44))
+
+      ? (message: string) => string
+>message : Symbol(message, Decl(dependentReturnType3.ts, 53, 9))
+
+      : never {
+    const instance = new NewKatex();
+>instance : Symbol(instance, Decl(dependentReturnType3.ts, 55, 9))
+>NewKatex : Symbol(NewKatex, Decl(dependentReturnType3.ts, 14, 1))
+
+    if (_isMessage) {
+>_isMessage : Symbol(_isMessage, Decl(dependentReturnType3.ts, 48, 6))
+
+        return (message: IMessage): IMessage => instance.renderMessage(message); // Ok
+>message : Symbol(message, Decl(dependentReturnType3.ts, 57, 16))
+>IMessage : Symbol(IMessage, Decl(dependentReturnType3.ts, 7, 20))
+>IMessage : Symbol(IMessage, Decl(dependentReturnType3.ts, 7, 20))
+>instance.renderMessage : Symbol(NewKatex.renderMessage, Decl(dependentReturnType3.ts, 19, 5))
+>instance : Symbol(instance, Decl(dependentReturnType3.ts, 55, 9))
+>renderMessage : Symbol(NewKatex.renderMessage, Decl(dependentReturnType3.ts, 19, 5))
+>message : Symbol(message, Decl(dependentReturnType3.ts, 57, 16))
+    }
+    return (message: string): string => instance.renderMessage(message); // Ok
+>message : Symbol(message, Decl(dependentReturnType3.ts, 59, 12))
+>instance.renderMessage : Symbol(NewKatex.renderMessage, Decl(dependentReturnType3.ts, 19, 5))
+>instance : Symbol(instance, Decl(dependentReturnType3.ts, 55, 9))
+>renderMessage : Symbol(NewKatex.renderMessage, Decl(dependentReturnType3.ts, 19, 5))
+>message : Symbol(message, Decl(dependentReturnType3.ts, 59, 12))
+}
+
+// File: Rocket.Chat/apps/meteor/app/settings/lib/settings.ts
+type SettingComposedValue<T extends SettingValue = SettingValue> = { key: string; value: T };
+>SettingComposedValue : Symbol(SettingComposedValue, Decl(dependentReturnType3.ts, 60, 1))
+>T : Symbol(T, Decl(dependentReturnType3.ts, 63, 26))
+>SettingValue : Symbol(SettingValue, Decl(dependentReturnType3.ts, 64, 89))
+>SettingValue : Symbol(SettingValue, Decl(dependentReturnType3.ts, 64, 89))
+>key : Symbol(key, Decl(dependentReturnType3.ts, 63, 68))
+>value : Symbol(value, Decl(dependentReturnType3.ts, 63, 81))
+>T : Symbol(T, Decl(dependentReturnType3.ts, 63, 26))
+
+type SettingCallback = (key: string, value: SettingValue, initialLoad?: boolean) => void;
+>SettingCallback : Symbol(SettingCallback, Decl(dependentReturnType3.ts, 63, 93))
+>key : Symbol(key, Decl(dependentReturnType3.ts, 64, 24))
+>value : Symbol(value, Decl(dependentReturnType3.ts, 64, 36))
+>SettingValue : Symbol(SettingValue, Decl(dependentReturnType3.ts, 64, 89))
+>initialLoad : Symbol(initialLoad, Decl(dependentReturnType3.ts, 64, 57))
+
+type SettingValue = object;
+>SettingValue : Symbol(SettingValue, Decl(dependentReturnType3.ts, 64, 89))
+
+declare const Meteor: { settings: { [s: string]: any } };
+>Meteor : Symbol(Meteor, Decl(dependentReturnType3.ts, 67, 13))
+>settings : Symbol(settings, Decl(dependentReturnType3.ts, 67, 23))
+>s : Symbol(s, Decl(dependentReturnType3.ts, 67, 37))
+
+declare const _: { isRegExp(x: unknown): x is RegExp; };
+>_ : Symbol(_, Decl(dependentReturnType3.ts, 68, 13))
+>isRegExp : Symbol(isRegExp, Decl(dependentReturnType3.ts, 68, 18))
+>x : Symbol(x, Decl(dependentReturnType3.ts, 68, 28))
+>x : Symbol(x, Decl(dependentReturnType3.ts, 68, 28))
+>RegExp : Symbol(RegExp, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+
+declare function takesRegExp(x: RegExp): void;
+>takesRegExp : Symbol(takesRegExp, Decl(dependentReturnType3.ts, 68, 56))
+>x : Symbol(x, Decl(dependentReturnType3.ts, 69, 29))
+>RegExp : Symbol(RegExp, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+
+declare function takesString(x: string): void;
+>takesString : Symbol(takesString, Decl(dependentReturnType3.ts, 69, 46))
+>x : Symbol(x, Decl(dependentReturnType3.ts, 70, 29))
+
+class NewSettingsBase {
+>NewSettingsBase : Symbol(NewSettingsBase, Decl(dependentReturnType3.ts, 70, 46))
+
+    public newGet<C extends SettingCallback | undefined, I extends string | RegExp, T extends SettingValue = SettingValue>(
+>newGet : Symbol(NewSettingsBase.newGet, Decl(dependentReturnType3.ts, 72, 23))
+>C : Symbol(C, Decl(dependentReturnType3.ts, 73, 18))
+>SettingCallback : Symbol(SettingCallback, Decl(dependentReturnType3.ts, 63, 93))
+>I : Symbol(I, Decl(dependentReturnType3.ts, 73, 56))
+>RegExp : Symbol(RegExp, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+>T : Symbol(T, Decl(dependentReturnType3.ts, 73, 83))
+>SettingValue : Symbol(SettingValue, Decl(dependentReturnType3.ts, 64, 89))
+>SettingValue : Symbol(SettingValue, Decl(dependentReturnType3.ts, 64, 89))
+
+        _id: I,
+>_id : Symbol(_id, Decl(dependentReturnType3.ts, 73, 123))
+>I : Symbol(I, Decl(dependentReturnType3.ts, 73, 56))
+
+        callback?: C,
+>callback : Symbol(callback, Decl(dependentReturnType3.ts, 74, 15))
+>C : Symbol(C, Decl(dependentReturnType3.ts, 73, 18))
+
+    ): HelperCond<C,
+>HelperCond : Symbol(HelperCond, Decl(dependentReturnType3.ts, 0, 0))
+>C : Symbol(C, Decl(dependentReturnType3.ts, 73, 18))
+
+        SettingCallback, void,
+>SettingCallback : Symbol(SettingCallback, Decl(dependentReturnType3.ts, 63, 93))
+
+        undefined, HelperCond<I,
+>HelperCond : Symbol(HelperCond, Decl(dependentReturnType3.ts, 0, 0))
+>I : Symbol(I, Decl(dependentReturnType3.ts, 73, 56))
+
+            string, T | undefined,
+>T : Symbol(T, Decl(dependentReturnType3.ts, 73, 83))
+
+            RegExp, SettingComposedValue<T>[]>> {
+>RegExp : Symbol(RegExp, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+>SettingComposedValue : Symbol(SettingComposedValue, Decl(dependentReturnType3.ts, 60, 1))
+>T : Symbol(T, Decl(dependentReturnType3.ts, 73, 83))
+
+        if (callback !== undefined) {
+>callback : Symbol(callback, Decl(dependentReturnType3.ts, 74, 15))
+>undefined : Symbol(undefined)
+
+            if (!Meteor.settings) {
+>Meteor.settings : Symbol(settings, Decl(dependentReturnType3.ts, 67, 23))
+>Meteor : Symbol(Meteor, Decl(dependentReturnType3.ts, 67, 13))
+>settings : Symbol(settings, Decl(dependentReturnType3.ts, 67, 23))
+
+                return; // Ok
+            }
+            if (_id === '*') {
+>_id : Symbol(_id, Decl(dependentReturnType3.ts, 73, 123))
+
+                return Object.keys(Meteor.settings).forEach((key) => { // Ok
+>Object.keys(Meteor.settings).forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --))
+>Object.keys : Symbol(ObjectConstructor.keys, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
+>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+>keys : Symbol(ObjectConstructor.keys, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
+>Meteor.settings : Symbol(settings, Decl(dependentReturnType3.ts, 67, 23))
+>Meteor : Symbol(Meteor, Decl(dependentReturnType3.ts, 67, 13))
+>settings : Symbol(settings, Decl(dependentReturnType3.ts, 67, 23))
+>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --))
+>key : Symbol(key, Decl(dependentReturnType3.ts, 86, 61))
+
+                    const value = Meteor.settings[key];
+>value : Symbol(value, Decl(dependentReturnType3.ts, 87, 25))
+>Meteor.settings : Symbol(settings, Decl(dependentReturnType3.ts, 67, 23))
+>Meteor : Symbol(Meteor, Decl(dependentReturnType3.ts, 67, 13))
+>settings : Symbol(settings, Decl(dependentReturnType3.ts, 67, 23))
+>key : Symbol(key, Decl(dependentReturnType3.ts, 86, 61))
+
+                    callback(key, value);
+>callback : Symbol(callback, Decl(dependentReturnType3.ts, 74, 15))
+>key : Symbol(key, Decl(dependentReturnType3.ts, 86, 61))
+>value : Symbol(value, Decl(dependentReturnType3.ts, 87, 25))
+
+                });
+            }
+            if (_.isRegExp(_id) && Meteor.settings) {
+>_.isRegExp : Symbol(isRegExp, Decl(dependentReturnType3.ts, 68, 18))
+>_ : Symbol(_, Decl(dependentReturnType3.ts, 68, 13))
+>isRegExp : Symbol(isRegExp, Decl(dependentReturnType3.ts, 68, 18))
+>_id : Symbol(_id, Decl(dependentReturnType3.ts, 73, 123))
+>Meteor.settings : Symbol(settings, Decl(dependentReturnType3.ts, 67, 23))
+>Meteor : Symbol(Meteor, Decl(dependentReturnType3.ts, 67, 13))
+>settings : Symbol(settings, Decl(dependentReturnType3.ts, 67, 23))
+
+                return Object.keys(Meteor.settings).forEach((key) => { // Ok
+>Object.keys(Meteor.settings).forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --))
+>Object.keys : Symbol(ObjectConstructor.keys, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
+>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+>keys : Symbol(ObjectConstructor.keys, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
+>Meteor.settings : Symbol(settings, Decl(dependentReturnType3.ts, 67, 23))
+>Meteor : Symbol(Meteor, Decl(dependentReturnType3.ts, 67, 13))
+>settings : Symbol(settings, Decl(dependentReturnType3.ts, 67, 23))
+>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --))
+>key : Symbol(key, Decl(dependentReturnType3.ts, 92, 61))
+
+                    if (!_id.test(key)) {
+>_id.test : Symbol(RegExp.test, Decl(lib.es5.d.ts, --, --))
+>_id : Symbol(_id, Decl(dependentReturnType3.ts, 73, 123))
+>test : Symbol(RegExp.test, Decl(lib.es5.d.ts, --, --))
+>key : Symbol(key, Decl(dependentReturnType3.ts, 92, 61))
+
+                        return;
+                    }
+                    const value = Meteor.settings[key];
+>value : Symbol(value, Decl(dependentReturnType3.ts, 96, 25))
+>Meteor.settings : Symbol(settings, Decl(dependentReturnType3.ts, 67, 23))
+>Meteor : Symbol(Meteor, Decl(dependentReturnType3.ts, 67, 13))
+>settings : Symbol(settings, Decl(dependentReturnType3.ts, 67, 23))
+>key : Symbol(key, Decl(dependentReturnType3.ts, 92, 61))
+
+                    callback(key, value);
+>callback : Symbol(callback, Decl(dependentReturnType3.ts, 74, 15))
+>key : Symbol(key, Decl(dependentReturnType3.ts, 92, 61))
+>value : Symbol(value, Decl(dependentReturnType3.ts, 96, 25))
+
+                });
+            }
+
+            if (typeof _id === 'string') {
+>_id : Symbol(_id, Decl(dependentReturnType3.ts, 73, 123))
+
+                const value = Meteor.settings[_id];
+>value : Symbol(value, Decl(dependentReturnType3.ts, 102, 21))
+>Meteor.settings : Symbol(settings, Decl(dependentReturnType3.ts, 67, 23))
+>Meteor : Symbol(Meteor, Decl(dependentReturnType3.ts, 67, 13))
+>settings : Symbol(settings, Decl(dependentReturnType3.ts, 67, 23))
+>_id : Symbol(_id, Decl(dependentReturnType3.ts, 73, 123))
+
+                if (value != null) {
+>value : Symbol(value, Decl(dependentReturnType3.ts, 102, 21))
+
+                    callback(_id, Meteor.settings[_id]);
+>callback : Symbol(callback, Decl(dependentReturnType3.ts, 74, 15))
+>_id : Symbol(_id, Decl(dependentReturnType3.ts, 73, 123))
+>Meteor.settings : Symbol(settings, Decl(dependentReturnType3.ts, 67, 23))
+>Meteor : Symbol(Meteor, Decl(dependentReturnType3.ts, 67, 13))
+>settings : Symbol(settings, Decl(dependentReturnType3.ts, 67, 23))
+>_id : Symbol(_id, Decl(dependentReturnType3.ts, 73, 123))
+                }
+                return; // Ok
+            }
+
+            return; // Ok, needed for exhaustiveness check
+        }
+
+        if (!Meteor.settings) { // Wrong: we don't know that _id is string here, cannot return undefined
+>Meteor.settings : Symbol(settings, Decl(dependentReturnType3.ts, 67, 23))
+>Meteor : Symbol(Meteor, Decl(dependentReturnType3.ts, 67, 13))
+>settings : Symbol(settings, Decl(dependentReturnType3.ts, 67, 23))
+
+            return undefined; // Error
+>undefined : Symbol(undefined)
+        }
+
+        if (_.isRegExp(_id)) {
+>_.isRegExp : Symbol(isRegExp, Decl(dependentReturnType3.ts, 68, 18))
+>_ : Symbol(_, Decl(dependentReturnType3.ts, 68, 13))
+>isRegExp : Symbol(isRegExp, Decl(dependentReturnType3.ts, 68, 18))
+>_id : Symbol(_id, Decl(dependentReturnType3.ts, 73, 123))
+
+            return Object.keys(Meteor.settings).reduce((items: SettingComposedValue<T>[], key) => {
+>Object.keys(Meteor.settings).reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+>Object.keys : Symbol(ObjectConstructor.keys, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
+>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+>keys : Symbol(ObjectConstructor.keys, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
+>Meteor.settings : Symbol(settings, Decl(dependentReturnType3.ts, 67, 23))
+>Meteor : Symbol(Meteor, Decl(dependentReturnType3.ts, 67, 13))
+>settings : Symbol(settings, Decl(dependentReturnType3.ts, 67, 23))
+>reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+>items : Symbol(items, Decl(dependentReturnType3.ts, 117, 56))
+>SettingComposedValue : Symbol(SettingComposedValue, Decl(dependentReturnType3.ts, 60, 1))
+>T : Symbol(T, Decl(dependentReturnType3.ts, 73, 83))
+>key : Symbol(key, Decl(dependentReturnType3.ts, 117, 89))
+
+				const value = Meteor.settings[key];
+>value : Symbol(value, Decl(dependentReturnType3.ts, 118, 9))
+>Meteor.settings : Symbol(settings, Decl(dependentReturnType3.ts, 67, 23))
+>Meteor : Symbol(Meteor, Decl(dependentReturnType3.ts, 67, 13))
+>settings : Symbol(settings, Decl(dependentReturnType3.ts, 67, 23))
+>key : Symbol(key, Decl(dependentReturnType3.ts, 117, 89))
+
+				if (_id.test(key)) {
+>_id.test : Symbol(RegExp.test, Decl(lib.es5.d.ts, --, --))
+>_id : Symbol(_id, Decl(dependentReturnType3.ts, 73, 123))
+>test : Symbol(RegExp.test, Decl(lib.es5.d.ts, --, --))
+>key : Symbol(key, Decl(dependentReturnType3.ts, 117, 89))
+
+					items.push({
+>items.push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --))
+>items : Symbol(items, Decl(dependentReturnType3.ts, 117, 56))
+>push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --))
+
+						key,
+>key : Symbol(key, Decl(dependentReturnType3.ts, 120, 17))
+
+						value,
+>value : Symbol(value, Decl(dependentReturnType3.ts, 121, 10))
+
+					});
+				}
+				return items;
+>items : Symbol(items, Decl(dependentReturnType3.ts, 117, 56))
+
+			}, []); // Ok
+        }
+
+        return Meteor.settings?.[_id]; // Error
+>Meteor.settings : Symbol(settings, Decl(dependentReturnType3.ts, 67, 23))
+>Meteor : Symbol(Meteor, Decl(dependentReturnType3.ts, 67, 13))
+>settings : Symbol(settings, Decl(dependentReturnType3.ts, 67, 23))
+>_id : Symbol(_id, Decl(dependentReturnType3.ts, 73, 123))
+
+        // The indexing currently doesn't work because it doesn't use the narrowed type of `_id`.
+    }
+}
+
+// File: Rocket.Chat/apps/meteor/app/ui-utils/client/lib/messageBox.ts
+type MessageBoxAction = object;
+>MessageBoxAction : Symbol(MessageBoxAction, Decl(dependentReturnType3.ts, 132, 1))
+
+function getWithBug<T extends string | undefined>(group: T):
+>getWithBug : Symbol(getWithBug, Decl(dependentReturnType3.ts, 135, 31))
+>T : Symbol(T, Decl(dependentReturnType3.ts, 137, 20))
+>group : Symbol(group, Decl(dependentReturnType3.ts, 137, 50))
+>T : Symbol(T, Decl(dependentReturnType3.ts, 137, 20))
+
+HelperCond<T, string, MessageBoxAction[], undefined, Record<string, MessageBoxAction[]>> {
+>HelperCond : Symbol(HelperCond, Decl(dependentReturnType3.ts, 0, 0))
+>T : Symbol(T, Decl(dependentReturnType3.ts, 137, 20))
+>MessageBoxAction : Symbol(MessageBoxAction, Decl(dependentReturnType3.ts, 132, 1))
+>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --))
+>MessageBoxAction : Symbol(MessageBoxAction, Decl(dependentReturnType3.ts, 132, 1))
+
+    if (!group) {
+>group : Symbol(group, Decl(dependentReturnType3.ts, 137, 50))
+
+        return {} as Record<string, MessageBoxAction[]>; // Error, could fall into this branch when group is empty string
+>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --))
+>MessageBoxAction : Symbol(MessageBoxAction, Decl(dependentReturnType3.ts, 132, 1))
+    }
+
+    return [] as MessageBoxAction[]; // Ok
+>MessageBoxAction : Symbol(MessageBoxAction, Decl(dependentReturnType3.ts, 132, 1))
+}
+
+function getWithoutBug<T extends string | undefined>(group: T):
+>getWithoutBug : Symbol(getWithoutBug, Decl(dependentReturnType3.ts, 144, 1))
+>T : Symbol(T, Decl(dependentReturnType3.ts, 146, 23))
+>group : Symbol(group, Decl(dependentReturnType3.ts, 146, 53))
+>T : Symbol(T, Decl(dependentReturnType3.ts, 146, 23))
+
+HelperCond<T, string, MessageBoxAction[], undefined, Record<string, MessageBoxAction[]>> {
+>HelperCond : Symbol(HelperCond, Decl(dependentReturnType3.ts, 0, 0))
+>T : Symbol(T, Decl(dependentReturnType3.ts, 146, 23))
+>MessageBoxAction : Symbol(MessageBoxAction, Decl(dependentReturnType3.ts, 132, 1))
+>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --))
+>MessageBoxAction : Symbol(MessageBoxAction, Decl(dependentReturnType3.ts, 132, 1))
+
+    if (group === undefined) {
+>group : Symbol(group, Decl(dependentReturnType3.ts, 146, 53))
+>undefined : Symbol(undefined)
+
+        return {} as Record<string, MessageBoxAction[]>; // Ok
+>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --))
+>MessageBoxAction : Symbol(MessageBoxAction, Decl(dependentReturnType3.ts, 132, 1))
+    }
+
+    return [] as MessageBoxAction[]; // Ok
+>MessageBoxAction : Symbol(MessageBoxAction, Decl(dependentReturnType3.ts, 132, 1))
+}
+
+// File: Rocket.Chat/apps/meteor/ee/server/lib/engagementDashboard/date.ts
+declare function mapDateForAPI(x: string): Date;
+>mapDateForAPI : Symbol(mapDateForAPI, Decl(dependentReturnType3.ts, 153, 1))
+>x : Symbol(x, Decl(dependentReturnType3.ts, 156, 31))
+>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+
+export function transformDatesForAPI<T extends string | undefined>(
+>transformDatesForAPI : Symbol(transformDatesForAPI, Decl(dependentReturnType3.ts, 156, 48))
+>T : Symbol(T, Decl(dependentReturnType3.ts, 157, 37))
+
+    start: string,
+>start : Symbol(start, Decl(dependentReturnType3.ts, 157, 67))
+
+    end?: T
+>end : Symbol(end, Decl(dependentReturnType3.ts, 158, 18))
+>T : Symbol(T, Decl(dependentReturnType3.ts, 157, 37))
+
+): HelperCond<T, string, { start: Date, end: Date }, undefined, { start: Date, end: undefined }> {
+>HelperCond : Symbol(HelperCond, Decl(dependentReturnType3.ts, 0, 0))
+>T : Symbol(T, Decl(dependentReturnType3.ts, 157, 37))
+>start : Symbol(start, Decl(dependentReturnType3.ts, 160, 26))
+>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+>end : Symbol(end, Decl(dependentReturnType3.ts, 160, 39))
+>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+>start : Symbol(start, Decl(dependentReturnType3.ts, 160, 65))
+>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+>end : Symbol(end, Decl(dependentReturnType3.ts, 160, 78))
+
+    return end !== undefined ? // Ok
+>end : Symbol(end, Decl(dependentReturnType3.ts, 158, 18))
+>undefined : Symbol(undefined)
+        {
+            start: mapDateForAPI(start),
+>start : Symbol(start, Decl(dependentReturnType3.ts, 162, 9))
+>mapDateForAPI : Symbol(mapDateForAPI, Decl(dependentReturnType3.ts, 153, 1))
+>start : Symbol(start, Decl(dependentReturnType3.ts, 157, 67))
+
+            end: mapDateForAPI(end),
+>end : Symbol(end, Decl(dependentReturnType3.ts, 163, 40))
+>mapDateForAPI : Symbol(mapDateForAPI, Decl(dependentReturnType3.ts, 153, 1))
+>end : Symbol(end, Decl(dependentReturnType3.ts, 158, 18))
+
+        } :
+        {
+            start: mapDateForAPI(start),
+>start : Symbol(start, Decl(dependentReturnType3.ts, 166, 9))
+>mapDateForAPI : Symbol(mapDateForAPI, Decl(dependentReturnType3.ts, 153, 1))
+>start : Symbol(start, Decl(dependentReturnType3.ts, 157, 67))
+
+            end: undefined
+>end : Symbol(end, Decl(dependentReturnType3.ts, 167, 40))
+>undefined : Symbol(undefined)
+
+        };
+}
+
+// File: Rocket.Chat/packages/agenda/src/Agenda.ts
+type RepeatOptions = object;
+>RepeatOptions : Symbol(RepeatOptions, Decl(dependentReturnType3.ts, 170, 1))
+
+type Job = object;
+>Job : Symbol(Job, Decl(dependentReturnType3.ts, 173, 28))
+
+type IJob = { data: object };
+>IJob : Symbol(IJob, Decl(dependentReturnType3.ts, 174, 18))
+>data : Symbol(data, Decl(dependentReturnType3.ts, 175, 13))
+
+class NewAgenda {
+>NewAgenda : Symbol(NewAgenda, Decl(dependentReturnType3.ts, 175, 29))
+
+    public async _createIntervalJob(interval: string | number, name: string, data: IJob['data'], options: RepeatOptions): Promise<Job> { return undefined as any; }
+>_createIntervalJob : Symbol(NewAgenda._createIntervalJob, Decl(dependentReturnType3.ts, 176, 17))
+>interval : Symbol(interval, Decl(dependentReturnType3.ts, 177, 36))
+>name : Symbol(name, Decl(dependentReturnType3.ts, 177, 62))
+>data : Symbol(data, Decl(dependentReturnType3.ts, 177, 76))
+>IJob : Symbol(IJob, Decl(dependentReturnType3.ts, 174, 18))
+>options : Symbol(options, Decl(dependentReturnType3.ts, 177, 96))
+>RepeatOptions : Symbol(RepeatOptions, Decl(dependentReturnType3.ts, 170, 1))
+>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+>Job : Symbol(Job, Decl(dependentReturnType3.ts, 173, 28))
+>undefined : Symbol(undefined)
+
+    private _createIntervalJobs(
+>_createIntervalJobs : Symbol(NewAgenda._createIntervalJobs, Decl(dependentReturnType3.ts, 177, 163))
+
+        interval: string | number,
+>interval : Symbol(interval, Decl(dependentReturnType3.ts, 178, 32))
+
+        names: string[],
+>names : Symbol(names, Decl(dependentReturnType3.ts, 179, 34))
+
+        data: IJob['data'],
+>data : Symbol(data, Decl(dependentReturnType3.ts, 180, 24))
+>IJob : Symbol(IJob, Decl(dependentReturnType3.ts, 174, 18))
+
+        options: RepeatOptions,
+>options : Symbol(options, Decl(dependentReturnType3.ts, 181, 27))
+>RepeatOptions : Symbol(RepeatOptions, Decl(dependentReturnType3.ts, 170, 1))
+
+    ): Promise<Job[]> | undefined { return undefined as any; }
+>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+>Job : Symbol(Job, Decl(dependentReturnType3.ts, 173, 28))
+>undefined : Symbol(undefined)
+
+    public async newEvery<T extends string | string[]>(
+>newEvery : Symbol(NewAgenda.newEvery, Decl(dependentReturnType3.ts, 183, 62))
+>T : Symbol(T, Decl(dependentReturnType3.ts, 185, 26))
+
+        interval: string | number,
+>interval : Symbol(interval, Decl(dependentReturnType3.ts, 185, 55))
+
+        name: T,
+>name : Symbol(name, Decl(dependentReturnType3.ts, 186, 34))
+>T : Symbol(T, Decl(dependentReturnType3.ts, 185, 26))
+
+        data: IJob['data'],
+>data : Symbol(data, Decl(dependentReturnType3.ts, 187, 16))
+>IJob : Symbol(IJob, Decl(dependentReturnType3.ts, 174, 18))
+
+        options: RepeatOptions): Promise<HelperCond<T, string, Job, string[], Job[] | undefined>> {
+>options : Symbol(options, Decl(dependentReturnType3.ts, 188, 27))
+>RepeatOptions : Symbol(RepeatOptions, Decl(dependentReturnType3.ts, 170, 1))
+>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+>HelperCond : Symbol(HelperCond, Decl(dependentReturnType3.ts, 0, 0))
+>T : Symbol(T, Decl(dependentReturnType3.ts, 185, 26))
+>Job : Symbol(Job, Decl(dependentReturnType3.ts, 173, 28))
+>Job : Symbol(Job, Decl(dependentReturnType3.ts, 173, 28))
+
+        if (typeof name === 'string') {
+>name : Symbol(name, Decl(dependentReturnType3.ts, 186, 34))
+
+            return this._createIntervalJob(interval, name, data, options); // Ok
+>this._createIntervalJob : Symbol(NewAgenda._createIntervalJob, Decl(dependentReturnType3.ts, 176, 17))
+>this : Symbol(NewAgenda, Decl(dependentReturnType3.ts, 175, 29))
+>_createIntervalJob : Symbol(NewAgenda._createIntervalJob, Decl(dependentReturnType3.ts, 176, 17))
+>interval : Symbol(interval, Decl(dependentReturnType3.ts, 185, 55))
+>name : Symbol(name, Decl(dependentReturnType3.ts, 186, 34))
+>data : Symbol(data, Decl(dependentReturnType3.ts, 187, 16))
+>options : Symbol(options, Decl(dependentReturnType3.ts, 188, 27))
+        }
+
+        if (Array.isArray(name)) {
+>Array.isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --))
+>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, --, --))
+>isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --))
+>name : Symbol(name, Decl(dependentReturnType3.ts, 186, 34))
+
+            return this._createIntervalJobs(interval, name, data, options); // Ok
+>this._createIntervalJobs : Symbol(NewAgenda._createIntervalJobs, Decl(dependentReturnType3.ts, 177, 163))
+>this : Symbol(NewAgenda, Decl(dependentReturnType3.ts, 175, 29))
+>_createIntervalJobs : Symbol(NewAgenda._createIntervalJobs, Decl(dependentReturnType3.ts, 177, 163))
+>interval : Symbol(interval, Decl(dependentReturnType3.ts, 185, 55))
+>name : Symbol(name, Decl(dependentReturnType3.ts, 186, 34))
+>data : Symbol(data, Decl(dependentReturnType3.ts, 187, 16))
+>options : Symbol(options, Decl(dependentReturnType3.ts, 188, 27))
+
+            // Possible bug in original: createIntervalJobs can return undefined, but the original overload did not acount for that.
+        }
+
+        throw new Error('Unexpected error: Invalid job name(s)');
+>Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+    }
+}
+
+// File: angular/packages/common/src/pipes/case_conversion_pipes.ts
+
+function transform1<T extends string | null | undefined>(value: T): HelperCond<T, string, string, null | undefined, null> {
+>transform1 : Symbol(transform1, Decl(dependentReturnType3.ts, 201, 1))
+>T : Symbol(T, Decl(dependentReturnType3.ts, 205, 20))
+>value : Symbol(value, Decl(dependentReturnType3.ts, 205, 57))
+>T : Symbol(T, Decl(dependentReturnType3.ts, 205, 20))
+>HelperCond : Symbol(HelperCond, Decl(dependentReturnType3.ts, 0, 0))
+>T : Symbol(T, Decl(dependentReturnType3.ts, 205, 20))
+
+    if (value == null) return null; // Ok
+>value : Symbol(value, Decl(dependentReturnType3.ts, 205, 57))
+
+    if (typeof value !== 'string') {
+>value : Symbol(value, Decl(dependentReturnType3.ts, 205, 57))
+
+        throw new Error();
+>Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+    }
+    return value.toLowerCase(); // Ok
+>value.toLowerCase : Symbol(String.toLowerCase, Decl(lib.es5.d.ts, --, --))
+>value : Symbol(value, Decl(dependentReturnType3.ts, 205, 57))
+>toLowerCase : Symbol(String.toLowerCase, Decl(lib.es5.d.ts, --, --))
+}
diff --git a/tests/baselines/reference/dependentReturnType3.types b/tests/baselines/reference/dependentReturnType3.types
new file mode 100644
index 0000000000000..ac94d85e9b9e3
--- /dev/null
+++ b/tests/baselines/reference/dependentReturnType3.types
@@ -0,0 +1,1000 @@
+//// [tests/cases/compiler/dependentReturnType3.ts] ////
+
+=== dependentReturnType3.ts ===
+// Adapted from ts-error-deltas repos
+
+type HelperCond<T, A, R1, B, R2> =
+>HelperCond : HelperCond<T, A, R1, B, R2>
+>           : ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+    T extends A
+        ? R1
+        : T extends B
+            ? R2
+            : never;
+
+
+// File: Rocket.Chat/apps/meteor/app/katex/client/index.ts
+interface IMessage {
+    html?: string;
+>html : string | undefined
+>     : ^^^^^^^^^^^^^^^^^^
+
+    tokens?: {}[];
+>tokens : {}[] | undefined
+>       : ^^^^^^^^^^^^^^^^
+}
+
+class NewKatex {
+>NewKatex : NewKatex
+>         : ^^^^^^^^
+
+    render(s: string): string {
+>render : (s: string) => string
+>       : ^ ^^      ^^^^^      
+>s : string
+>  : ^^^^^^
+
+        return "";
+>"" : ""
+>   : ^^
+    }
+
+    renderMessage<T extends string | IMessage>(message: T):
+>renderMessage : <T extends string | IMessage>(message: T) => T extends string ? string : T extends IMessage ? IMessage : never
+>              : ^ ^^^^^^^^^                 ^^       ^^ ^^^^^                                                                 
+>message : T
+>        : ^
+
+        T extends string
+        ? string
+        : T extends IMessage
+          ? IMessage
+          : never {
+        if (typeof message === 'string') {
+>typeof message === 'string' : boolean
+>                            : ^^^^^^^
+>typeof message : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
+>               : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>message : T
+>        : ^
+>'string' : "string"
+>         : ^^^^^^^^
+
+            return this.render(message); // Ok
+>this.render(message) : string
+>                     : ^^^^^^
+>this.render : (s: string) => string
+>            : ^ ^^      ^^^^^      
+>this : this
+>     : ^^^^
+>render : (s: string) => string
+>       : ^ ^^      ^^^^^      
+>message : string
+>        : ^^^^^^
+        }
+
+        if (!message.html?.trim()) {
+>!message.html?.trim() : boolean
+>                      : ^^^^^^^
+>message.html?.trim() : string | undefined
+>                     : ^^^^^^^^^^^^^^^^^^
+>message.html?.trim : (() => string) | undefined
+>                   : ^^^^^^^      ^^^^^^^^^^^^^
+>message.html : string | undefined
+>             : ^^^^^^^^^^^^^^^^^^
+>message : IMessage
+>        : ^^^^^^^^
+>html : string | undefined
+>     : ^^^^^^^^^^^^^^^^^^
+>trim : (() => string) | undefined
+>     : ^^^^^^^      ^^^^^^^^^^^^^
+
+            return message; // Ok
+>message : IMessage
+>        : ^^^^^^^^
+        }
+
+        if (!message.tokens) {
+>!message.tokens : boolean
+>                : ^^^^^^^
+>message.tokens : {}[] | undefined
+>               : ^^^^^^^^^^^^^^^^
+>message : IMessage
+>        : ^^^^^^^^
+>tokens : {}[] | undefined
+>       : ^^^^^^^^^^^^^^^^
+
+            message.tokens = [];
+>message.tokens = [] : never[]
+>                    : ^^^^^^^
+>message.tokens : {}[] | undefined
+>               : ^^^^^^^^^^^^^^^^
+>message : IMessage
+>        : ^^^^^^^^
+>tokens : {}[] | undefined
+>       : ^^^^^^^^^^^^^^^^
+>[] : never[]
+>   : ^^^^^^^
+        }
+
+        message.html = this.render(message.html);
+>message.html = this.render(message.html) : string
+>                                         : ^^^^^^
+>message.html : string | undefined
+>             : ^^^^^^^^^^^^^^^^^^
+>message : IMessage
+>        : ^^^^^^^^
+>html : string | undefined
+>     : ^^^^^^^^^^^^^^^^^^
+>this.render(message.html) : string
+>                          : ^^^^^^
+>this.render : (s: string) => string
+>            : ^ ^^      ^^^^^      
+>this : this
+>     : ^^^^
+>render : (s: string) => string
+>       : ^ ^^      ^^^^^      
+>message.html : string
+>             : ^^^^^^
+>message : IMessage
+>        : ^^^^^^^^
+>html : string
+>     : ^^^^^^
+
+        return message; // Ok
+>message : IMessage
+>        : ^^^^^^^^
+    }
+}
+
+export function createKatexMessageRendering<T extends true | false>(
+>createKatexMessageRendering : <T extends true | false>(options: { dollarSyntax: boolean; parenthesisSyntax: boolean; }, _isMessage: T) => T extends true ? (message: IMessage) => IMessage : T extends false ? (message: string) => string : never
+>                            : ^ ^^^^^^^^^            ^^       ^^                                                      ^^          ^^ ^^^^^                                                                                                        
+>true : true
+>     : ^^^^
+>false : false
+>      : ^^^^^
+
+    options: {
+>options : { dollarSyntax: boolean; parenthesisSyntax: boolean; }
+>        : ^^^^^^^^^^^^^^^^       ^^^^^^^^^^^^^^^^^^^^^       ^^^
+
+        dollarSyntax: boolean;
+>dollarSyntax : boolean
+>             : ^^^^^^^
+
+        parenthesisSyntax: boolean;
+>parenthesisSyntax : boolean
+>                  : ^^^^^^^
+
+    },
+    _isMessage: T,
+>_isMessage : T
+>           : ^
+
+): T extends true
+>true : true
+>     : ^^^^
+
+    ? (message: IMessage) => IMessage
+>message : IMessage
+>        : ^^^^^^^^
+
+    : T extends false
+>false : false
+>      : ^^^^^
+
+      ? (message: string) => string
+>message : string
+>        : ^^^^^^
+
+      : never {
+    const instance = new NewKatex();
+>instance : NewKatex
+>         : ^^^^^^^^
+>new NewKatex() : NewKatex
+>               : ^^^^^^^^
+>NewKatex : typeof NewKatex
+>         : ^^^^^^^^^^^^^^^
+
+    if (_isMessage) {
+>_isMessage : T
+>           : ^
+
+        return (message: IMessage): IMessage => instance.renderMessage(message); // Ok
+>(message: IMessage): IMessage => instance.renderMessage(message) : (message: IMessage) => IMessage
+>                                                                 : ^       ^^        ^^^^^        
+>message : IMessage
+>        : ^^^^^^^^
+>instance.renderMessage(message) : IMessage
+>                                : ^^^^^^^^
+>instance.renderMessage : <T_1 extends string | IMessage>(message: T_1) => T_1 extends string ? string : T_1 extends IMessage ? IMessage : never
+>                       : ^^^^^^^^^^^^^                 ^^       ^^   ^^^^^                                                                     
+>instance : NewKatex
+>         : ^^^^^^^^
+>renderMessage : <T_1 extends string | IMessage>(message: T_1) => T_1 extends string ? string : T_1 extends IMessage ? IMessage : never
+>              : ^^^^^^^^^^^^^                 ^^       ^^   ^^^^^                                                                     
+>message : IMessage
+>        : ^^^^^^^^
+    }
+    return (message: string): string => instance.renderMessage(message); // Ok
+>(message: string): string => instance.renderMessage(message) : (message: string) => string
+>                                                             : ^       ^^      ^^^^^      
+>message : string
+>        : ^^^^^^
+>instance.renderMessage(message) : string
+>                                : ^^^^^^
+>instance.renderMessage : <T_1 extends string | IMessage>(message: T_1) => T_1 extends string ? string : T_1 extends IMessage ? IMessage : never
+>                       : ^^^^^^^^^^^^^                 ^^       ^^   ^^^^^                                                                     
+>instance : NewKatex
+>         : ^^^^^^^^
+>renderMessage : <T_1 extends string | IMessage>(message: T_1) => T_1 extends string ? string : T_1 extends IMessage ? IMessage : never
+>              : ^^^^^^^^^^^^^                 ^^       ^^   ^^^^^                                                                     
+>message : string
+>        : ^^^^^^
+}
+
+// File: Rocket.Chat/apps/meteor/app/settings/lib/settings.ts
+type SettingComposedValue<T extends SettingValue = SettingValue> = { key: string; value: T };
+>SettingComposedValue : SettingComposedValue<T>
+>                     : ^^^^^^^^^^^^^^^^^^^^^^^
+>key : string
+>    : ^^^^^^
+>value : T
+>      : ^
+
+type SettingCallback = (key: string, value: SettingValue, initialLoad?: boolean) => void;
+>SettingCallback : SettingCallback
+>                : ^^^^^^^^^^^^^^^
+>key : string
+>    : ^^^^^^
+>value : object
+>      : ^^^^^^
+>initialLoad : boolean | undefined
+>            : ^^^^^^^^^^^^^^^^^^^
+
+type SettingValue = object;
+>SettingValue : object
+>             : ^^^^^^
+
+declare const Meteor: { settings: { [s: string]: any } };
+>Meteor : { settings: { [s: string]: any; }; }
+>       : ^^^^^^^^^^^^                     ^^^
+>settings : { [s: string]: any; }
+>         : ^^^^^^^^^^^^^^^^^^^^^
+>s : string
+>  : ^^^^^^
+
+declare const _: { isRegExp(x: unknown): x is RegExp; };
+>_ : { isRegExp(x: unknown): x is RegExp; }
+>  : ^^^^^^^^^^^ ^^       ^^^           ^^^
+>isRegExp : (x: unknown) => x is RegExp
+>         : ^ ^^       ^^^^^           
+>x : unknown
+>  : ^^^^^^^
+
+declare function takesRegExp(x: RegExp): void;
+>takesRegExp : (x: RegExp) => void
+>            : ^ ^^      ^^^^^    
+>x : RegExp
+>  : ^^^^^^
+
+declare function takesString(x: string): void;
+>takesString : (x: string) => void
+>            : ^ ^^      ^^^^^    
+>x : string
+>  : ^^^^^^
+
+class NewSettingsBase {
+>NewSettingsBase : NewSettingsBase
+>                : ^^^^^^^^^^^^^^^
+
+    public newGet<C extends SettingCallback | undefined, I extends string | RegExp, T extends SettingValue = SettingValue>(
+>newGet : <C extends SettingCallback | undefined, I extends string | RegExp, T extends SettingValue = object>(_id: I, callback?: C) => HelperCond<C, SettingCallback, void, undefined, HelperCond<I, string, T | undefined, RegExp, SettingComposedValue<T>[]>>
+>       : ^ ^^^^^^^^^                           ^^ ^^^^^^^^^               ^^ ^^^^^^^^^            ^^^^^^^^^^^   ^^ ^^        ^^^ ^^^^^                                                                                                                        
+
+        _id: I,
+>_id : I
+>    : ^
+
+        callback?: C,
+>callback : C | undefined
+>         : ^^^^^^^^^^^^^
+
+    ): HelperCond<C,
+        SettingCallback, void,
+        undefined, HelperCond<I,
+            string, T | undefined,
+            RegExp, SettingComposedValue<T>[]>> {
+        if (callback !== undefined) {
+>callback !== undefined : boolean
+>                       : ^^^^^^^
+>callback : C | undefined
+>         : ^^^^^^^^^^^^^
+>undefined : undefined
+>          : ^^^^^^^^^
+
+            if (!Meteor.settings) {
+>!Meteor.settings : false
+>                 : ^^^^^
+>Meteor.settings : { [s: string]: any; }
+>                : ^^^^^^^^^^^^^^^^^^^^^
+>Meteor : { settings: { [s: string]: any; }; }
+>       : ^^^^^^^^^^^^                     ^^^
+>settings : { [s: string]: any; }
+>         : ^^^^^^^^^^^^^^^^^^^^^
+
+                return; // Ok
+            }
+            if (_id === '*') {
+>_id === '*' : boolean
+>            : ^^^^^^^
+>_id : I
+>    : ^
+>'*' : "*"
+>    : ^^^
+
+                return Object.keys(Meteor.settings).forEach((key) => { // Ok
+>Object.keys(Meteor.settings).forEach((key) => { // Ok                    const value = Meteor.settings[key];                    callback(key, value);                }) : void
+>                                                                                                                                                                        : ^^^^
+>Object.keys(Meteor.settings).forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void
+>                                     : ^          ^^^     ^^^^^^^^^^     ^^      ^^     ^^^^^^^^^^^^^^^    ^^       ^^^   ^^^^^    
+>Object.keys(Meteor.settings) : string[]
+>                             : ^^^^^^^^
+>Object.keys : { (o: object): string[]; (o: {}): string[]; }
+>            : ^^^ ^^      ^^^        ^^^ ^^  ^^^        ^^^
+>Object : ObjectConstructor
+>       : ^^^^^^^^^^^^^^^^^
+>keys : { (o: object): string[]; (o: {}): string[]; }
+>     : ^^^ ^^      ^^^        ^^^ ^^  ^^^        ^^^
+>Meteor.settings : { [s: string]: any; }
+>                : ^^^^^^^^^^^^^^^^^^^^^
+>Meteor : { settings: { [s: string]: any; }; }
+>       : ^^^^^^^^^^^^                     ^^^
+>settings : { [s: string]: any; }
+>         : ^^^^^^^^^^^^^^^^^^^^^
+>forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void
+>        : ^          ^^^     ^^^^^^^^^^     ^^      ^^     ^^^^^^^^^^^^^^^    ^^       ^^^   ^^^^^    
+>(key) => { // Ok                    const value = Meteor.settings[key];                    callback(key, value);                } : (key: string) => void
+>                                                                                                                                  : ^   ^^^^^^^^^^^^^^^^^
+>key : string
+>    : ^^^^^^
+
+                    const value = Meteor.settings[key];
+>value : any
+>      : ^^^
+>Meteor.settings[key] : any
+>                     : ^^^
+>Meteor.settings : { [s: string]: any; }
+>                : ^^^^^^^^^^^^^^^^^^^^^
+>Meteor : { settings: { [s: string]: any; }; }
+>       : ^^^^^^^^^^^^                     ^^^
+>settings : { [s: string]: any; }
+>         : ^^^^^^^^^^^^^^^^^^^^^
+>key : string
+>    : ^^^^^^
+
+                    callback(key, value);
+>callback(key, value) : void
+>                     : ^^^^
+>callback : SettingCallback
+>         : ^^^^^^^^^^^^^^^
+>key : string
+>    : ^^^^^^
+>value : any
+>      : ^^^
+
+                });
+            }
+            if (_.isRegExp(_id) && Meteor.settings) {
+>_.isRegExp(_id) && Meteor.settings : false | { [s: string]: any; }
+>                                   : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>_.isRegExp(_id) : boolean
+>                : ^^^^^^^
+>_.isRegExp : (x: unknown) => x is RegExp
+>           : ^ ^^       ^^^^^           
+>_ : { isRegExp(x: unknown): x is RegExp; }
+>  : ^^^^^^^^^^^ ^^       ^^^           ^^^
+>isRegExp : (x: unknown) => x is RegExp
+>         : ^ ^^       ^^^^^           
+>_id : string | RegExp
+>    : ^^^^^^^^^^^^^^^
+>Meteor.settings : { [s: string]: any; }
+>                : ^^^^^^^^^^^^^^^^^^^^^
+>Meteor : { settings: { [s: string]: any; }; }
+>       : ^^^^^^^^^^^^                     ^^^
+>settings : { [s: string]: any; }
+>         : ^^^^^^^^^^^^^^^^^^^^^
+
+                return Object.keys(Meteor.settings).forEach((key) => { // Ok
+>Object.keys(Meteor.settings).forEach((key) => { // Ok                    if (!_id.test(key)) {                        return;                    }                    const value = Meteor.settings[key];                    callback(key, value);                }) : void
+>                                                                                                                                                                                                                                                                     : ^^^^
+>Object.keys(Meteor.settings).forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void
+>                                     : ^          ^^^     ^^^^^^^^^^     ^^      ^^     ^^^^^^^^^^^^^^^    ^^       ^^^   ^^^^^    
+>Object.keys(Meteor.settings) : string[]
+>                             : ^^^^^^^^
+>Object.keys : { (o: object): string[]; (o: {}): string[]; }
+>            : ^^^ ^^      ^^^        ^^^ ^^  ^^^        ^^^
+>Object : ObjectConstructor
+>       : ^^^^^^^^^^^^^^^^^
+>keys : { (o: object): string[]; (o: {}): string[]; }
+>     : ^^^ ^^      ^^^        ^^^ ^^  ^^^        ^^^
+>Meteor.settings : { [s: string]: any; }
+>                : ^^^^^^^^^^^^^^^^^^^^^
+>Meteor : { settings: { [s: string]: any; }; }
+>       : ^^^^^^^^^^^^                     ^^^
+>settings : { [s: string]: any; }
+>         : ^^^^^^^^^^^^^^^^^^^^^
+>forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void
+>        : ^          ^^^     ^^^^^^^^^^     ^^      ^^     ^^^^^^^^^^^^^^^    ^^       ^^^   ^^^^^    
+>(key) => { // Ok                    if (!_id.test(key)) {                        return;                    }                    const value = Meteor.settings[key];                    callback(key, value);                } : (key: string) => void
+>                                                                                                                                                                                                                               : ^   ^^^^^^^^^^^^^^^^^
+>key : string
+>    : ^^^^^^
+
+                    if (!_id.test(key)) {
+>!_id.test(key) : boolean
+>               : ^^^^^^^
+>_id.test(key) : boolean
+>              : ^^^^^^^
+>_id.test : (string: string) => boolean
+>         : ^      ^^      ^^^^^       
+>_id : RegExp
+>    : ^^^^^^
+>test : (string: string) => boolean
+>     : ^      ^^      ^^^^^       
+>key : string
+>    : ^^^^^^
+
+                        return;
+                    }
+                    const value = Meteor.settings[key];
+>value : any
+>      : ^^^
+>Meteor.settings[key] : any
+>                     : ^^^
+>Meteor.settings : { [s: string]: any; }
+>                : ^^^^^^^^^^^^^^^^^^^^^
+>Meteor : { settings: { [s: string]: any; }; }
+>       : ^^^^^^^^^^^^                     ^^^
+>settings : { [s: string]: any; }
+>         : ^^^^^^^^^^^^^^^^^^^^^
+>key : string
+>    : ^^^^^^
+
+                    callback(key, value);
+>callback(key, value) : void
+>                     : ^^^^
+>callback : SettingCallback
+>         : ^^^^^^^^^^^^^^^
+>key : string
+>    : ^^^^^^
+>value : any
+>      : ^^^
+
+                });
+            }
+
+            if (typeof _id === 'string') {
+>typeof _id === 'string' : boolean
+>                        : ^^^^^^^
+>typeof _id : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
+>           : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>_id : I
+>    : ^
+>'string' : "string"
+>         : ^^^^^^^^
+
+                const value = Meteor.settings[_id];
+>value : any
+>      : ^^^
+>Meteor.settings[_id] : any
+>                     : ^^^
+>Meteor.settings : { [s: string]: any; }
+>                : ^^^^^^^^^^^^^^^^^^^^^
+>Meteor : { settings: { [s: string]: any; }; }
+>       : ^^^^^^^^^^^^                     ^^^
+>settings : { [s: string]: any; }
+>         : ^^^^^^^^^^^^^^^^^^^^^
+>_id : I & string
+>    : ^^^^^^^^^^
+
+                if (value != null) {
+>value != null : boolean
+>              : ^^^^^^^
+>value : any
+>      : ^^^
+
+                    callback(_id, Meteor.settings[_id]);
+>callback(_id, Meteor.settings[_id]) : void
+>                                    : ^^^^
+>callback : SettingCallback
+>         : ^^^^^^^^^^^^^^^
+>_id : string
+>    : ^^^^^^
+>Meteor.settings[_id] : any
+>                     : ^^^
+>Meteor.settings : { [s: string]: any; }
+>                : ^^^^^^^^^^^^^^^^^^^^^
+>Meteor : { settings: { [s: string]: any; }; }
+>       : ^^^^^^^^^^^^                     ^^^
+>settings : { [s: string]: any; }
+>         : ^^^^^^^^^^^^^^^^^^^^^
+>_id : I & string
+>    : ^^^^^^^^^^
+                }
+                return; // Ok
+            }
+
+            return; // Ok, needed for exhaustiveness check
+        }
+
+        if (!Meteor.settings) { // Wrong: we don't know that _id is string here, cannot return undefined
+>!Meteor.settings : false
+>                 : ^^^^^
+>Meteor.settings : { [s: string]: any; }
+>                : ^^^^^^^^^^^^^^^^^^^^^
+>Meteor : { settings: { [s: string]: any; }; }
+>       : ^^^^^^^^^^^^                     ^^^
+>settings : { [s: string]: any; }
+>         : ^^^^^^^^^^^^^^^^^^^^^
+
+            return undefined; // Error
+>undefined : undefined
+>          : ^^^^^^^^^
+        }
+
+        if (_.isRegExp(_id)) {
+>_.isRegExp(_id) : boolean
+>                : ^^^^^^^
+>_.isRegExp : (x: unknown) => x is RegExp
+>           : ^ ^^       ^^^^^           
+>_ : { isRegExp(x: unknown): x is RegExp; }
+>  : ^^^^^^^^^^^ ^^       ^^^           ^^^
+>isRegExp : (x: unknown) => x is RegExp
+>         : ^ ^^       ^^^^^           
+>_id : string | RegExp
+>    : ^^^^^^^^^^^^^^^
+
+            return Object.keys(Meteor.settings).reduce((items: SettingComposedValue<T>[], key) => {
+>Object.keys(Meteor.settings).reduce((items: SettingComposedValue<T>[], key) => {				const value = Meteor.settings[key];				if (_id.test(key)) {					items.push({						key,						value,					});				}				return items;			}, []) : SettingComposedValue<T>[]
+>                                                                                                                                                                                                                              : ^^^^^^^^^^^^^^^^^^^^^^^^^
+>Object.keys(Meteor.settings).reduce : { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string; <U>(callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; }
+>                                    : ^^^          ^^^             ^^^^^^^^^^            ^^^^^^^^^^            ^^      ^^     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^          ^^^             ^^^^^^^^^^            ^^^^^^^^^^            ^^      ^^     ^^^^^^^^^^^^^^^^^^^^^^^            ^^^^^^^^^^^^^^^^^^^^ ^^          ^^^             ^^^^^            ^^^^^^^^^^            ^^      ^^     ^^^^^^^^^^^^^^^^^^            ^^^^^^^^^^
+>Object.keys(Meteor.settings) : string[]
+>                             : ^^^^^^^^
+>Object.keys : { (o: object): string[]; (o: {}): string[]; }
+>            : ^^^ ^^      ^^^        ^^^ ^^  ^^^        ^^^
+>Object : ObjectConstructor
+>       : ^^^^^^^^^^^^^^^^^
+>keys : { (o: object): string[]; (o: {}): string[]; }
+>     : ^^^ ^^      ^^^        ^^^ ^^  ^^^        ^^^
+>Meteor.settings : { [s: string]: any; }
+>                : ^^^^^^^^^^^^^^^^^^^^^
+>Meteor : { settings: { [s: string]: any; }; }
+>       : ^^^^^^^^^^^^                     ^^^
+>settings : { [s: string]: any; }
+>         : ^^^^^^^^^^^^^^^^^^^^^
+>reduce : { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string; <U>(callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; }
+>       : ^^^          ^^^             ^^^^^^^^^^            ^^^^^^^^^^            ^^      ^^     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^          ^^^             ^^^^^^^^^^            ^^^^^^^^^^            ^^      ^^     ^^^^^^^^^^^^^^^^^^^^^^^            ^^^^^^^^^^^^^^^^^^^^ ^^          ^^^             ^^^^^            ^^^^^^^^^^            ^^      ^^     ^^^^^^^^^^^^^^^^^^            ^^^^^^^^^^
+>(items: SettingComposedValue<T>[], key) => {				const value = Meteor.settings[key];				if (_id.test(key)) {					items.push({						key,						value,					});				}				return items;			} : (items: SettingComposedValue<T>[], key: string) => SettingComposedValue<T>[]
+>                                                                                                                                                                                     : ^     ^^                         ^^   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>items : SettingComposedValue<T>[]
+>      : ^^^^^^^^^^^^^^^^^^^^^^^^^
+>key : string
+>    : ^^^^^^
+
+				const value = Meteor.settings[key];
+>value : any
+>      : ^^^
+>Meteor.settings[key] : any
+>                     : ^^^
+>Meteor.settings : { [s: string]: any; }
+>                : ^^^^^^^^^^^^^^^^^^^^^
+>Meteor : { settings: { [s: string]: any; }; }
+>       : ^^^^^^^^^^^^                     ^^^
+>settings : { [s: string]: any; }
+>         : ^^^^^^^^^^^^^^^^^^^^^
+>key : string
+>    : ^^^^^^
+
+				if (_id.test(key)) {
+>_id.test(key) : boolean
+>              : ^^^^^^^
+>_id.test : (string: string) => boolean
+>         : ^      ^^      ^^^^^       
+>_id : RegExp
+>    : ^^^^^^
+>test : (string: string) => boolean
+>     : ^      ^^      ^^^^^       
+>key : string
+>    : ^^^^^^
+
+					items.push({
+>items.push({						key,						value,					}) : number
+>                                          : ^^^^^^
+>items.push : (...items: SettingComposedValue<T>[]) => number
+>           : ^^^^     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^      
+>items : SettingComposedValue<T>[]
+>      : ^^^^^^^^^^^^^^^^^^^^^^^^^
+>push : (...items: SettingComposedValue<T>[]) => number
+>     : ^^^^     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^      
+>{						key,						value,					} : { key: string; value: any; }
+>                              : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+						key,
+>key : string
+>    : ^^^^^^
+
+						value,
+>value : any
+>      : ^^^
+
+					});
+				}
+				return items;
+>items : SettingComposedValue<T>[]
+>      : ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+			}, []); // Ok
+>[] : never[]
+>   : ^^^^^^^
+        }
+
+        return Meteor.settings?.[_id]; // Error
+>Meteor.settings?.[_id] : any
+>                       : ^^^
+>Meteor.settings : { [s: string]: any; }
+>                : ^^^^^^^^^^^^^^^^^^^^^
+>Meteor : { settings: { [s: string]: any; }; }
+>       : ^^^^^^^^^^^^                     ^^^
+>settings : { [s: string]: any; }
+>         : ^^^^^^^^^^^^^^^^^^^^^
+>_id : I
+>    : ^
+
+        // The indexing currently doesn't work because it doesn't use the narrowed type of `_id`.
+    }
+}
+
+// File: Rocket.Chat/apps/meteor/app/ui-utils/client/lib/messageBox.ts
+type MessageBoxAction = object;
+>MessageBoxAction : object
+>                 : ^^^^^^
+
+function getWithBug<T extends string | undefined>(group: T):
+>getWithBug : <T extends string | undefined>(group: T) => HelperCond<T, string, MessageBoxAction[], undefined, Record<string, MessageBoxAction[]>>
+>           : ^ ^^^^^^^^^                  ^^     ^^ ^^^^^                                                                                        
+>group : T
+>      : ^
+
+HelperCond<T, string, MessageBoxAction[], undefined, Record<string, MessageBoxAction[]>> {
+    if (!group) {
+>!group : boolean
+>       : ^^^^^^^
+>group : T
+>      : ^
+
+        return {} as Record<string, MessageBoxAction[]>; // Error, could fall into this branch when group is empty string
+>{} as Record<string, MessageBoxAction[]> : Record<string, object[]>
+>                                         : ^^^^^^^^^^^^^^^^^^^^^^^^
+>{} : {}
+>   : ^^
+    }
+
+    return [] as MessageBoxAction[]; // Ok
+>[] as MessageBoxAction[] : object[]
+>                         : ^^^^^^^^
+>[] : never[]
+>   : ^^^^^^^
+}
+
+function getWithoutBug<T extends string | undefined>(group: T):
+>getWithoutBug : <T extends string | undefined>(group: T) => HelperCond<T, string, MessageBoxAction[], undefined, Record<string, MessageBoxAction[]>>
+>              : ^ ^^^^^^^^^                  ^^     ^^ ^^^^^                                                                                        
+>group : T
+>      : ^
+
+HelperCond<T, string, MessageBoxAction[], undefined, Record<string, MessageBoxAction[]>> {
+    if (group === undefined) {
+>group === undefined : boolean
+>                    : ^^^^^^^
+>group : T
+>      : ^
+>undefined : undefined
+>          : ^^^^^^^^^
+
+        return {} as Record<string, MessageBoxAction[]>; // Ok
+>{} as Record<string, MessageBoxAction[]> : Record<string, object[]>
+>                                         : ^^^^^^^^^^^^^^^^^^^^^^^^
+>{} : {}
+>   : ^^
+    }
+
+    return [] as MessageBoxAction[]; // Ok
+>[] as MessageBoxAction[] : object[]
+>                         : ^^^^^^^^
+>[] : never[]
+>   : ^^^^^^^
+}
+
+// File: Rocket.Chat/apps/meteor/ee/server/lib/engagementDashboard/date.ts
+declare function mapDateForAPI(x: string): Date;
+>mapDateForAPI : (x: string) => Date
+>              : ^ ^^      ^^^^^    
+>x : string
+>  : ^^^^^^
+
+export function transformDatesForAPI<T extends string | undefined>(
+>transformDatesForAPI : <T extends string | undefined>(start: string, end?: T) => HelperCond<T, string, { start: Date; end: Date; }, undefined, { start: Date; end: undefined; }>
+>                     : ^ ^^^^^^^^^                  ^^     ^^      ^^   ^^^ ^^^^^                                                                                               
+
+    start: string,
+>start : string
+>      : ^^^^^^
+
+    end?: T
+>end : T | undefined
+>    : ^^^^^^^^^^^^^
+
+): HelperCond<T, string, { start: Date, end: Date }, undefined, { start: Date, end: undefined }> {
+>start : Date
+>      : ^^^^
+>end : Date
+>    : ^^^^
+>start : Date
+>      : ^^^^
+>end : undefined
+>    : ^^^^^^^^^
+
+    return end !== undefined ? // Ok
+>end !== undefined ? // Ok        {            start: mapDateForAPI(start),            end: mapDateForAPI(end),        } :        {            start: mapDateForAPI(start),            end: undefined        } : { start: Date; end: Date; } | { start: Date; end: undefined; }
+>                                                                                                                                                                                                              : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>end !== undefined : boolean
+>                  : ^^^^^^^
+>end : T | undefined
+>    : ^^^^^^^^^^^^^
+>undefined : undefined
+>          : ^^^^^^^^^
+        {
+>{            start: mapDateForAPI(start),            end: mapDateForAPI(end),        } : { start: Date; end: Date; }
+>                                                                                       : ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+            start: mapDateForAPI(start),
+>start : Date
+>      : ^^^^
+>mapDateForAPI(start) : Date
+>                     : ^^^^
+>mapDateForAPI : (x: string) => Date
+>              : ^ ^^      ^^^^^    
+>start : string
+>      : ^^^^^^
+
+            end: mapDateForAPI(end),
+>end : Date
+>    : ^^^^
+>mapDateForAPI(end) : Date
+>                   : ^^^^
+>mapDateForAPI : (x: string) => Date
+>              : ^ ^^      ^^^^^    
+>end : string
+>    : ^^^^^^
+
+        } :
+        {
+>{            start: mapDateForAPI(start),            end: undefined        } : { start: Date; end: undefined; }
+>                                                                             : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+            start: mapDateForAPI(start),
+>start : Date
+>      : ^^^^
+>mapDateForAPI(start) : Date
+>                     : ^^^^
+>mapDateForAPI : (x: string) => Date
+>              : ^ ^^      ^^^^^    
+>start : string
+>      : ^^^^^^
+
+            end: undefined
+>end : undefined
+>    : ^^^^^^^^^
+>undefined : undefined
+>          : ^^^^^^^^^
+
+        };
+}
+
+// File: Rocket.Chat/packages/agenda/src/Agenda.ts
+type RepeatOptions = object;
+>RepeatOptions : object
+>              : ^^^^^^
+
+type Job = object;
+>Job : object
+>    : ^^^^^^
+
+type IJob = { data: object };
+>IJob : IJob
+>     : ^^^^
+>data : object
+>     : ^^^^^^
+
+class NewAgenda {
+>NewAgenda : NewAgenda
+>          : ^^^^^^^^^
+
+    public async _createIntervalJob(interval: string | number, name: string, data: IJob['data'], options: RepeatOptions): Promise<Job> { return undefined as any; }
+>_createIntervalJob : (interval: string | number, name: string, data: IJob["data"], options: RepeatOptions) => Promise<Job>
+>                   : ^        ^^               ^^    ^^      ^^    ^^            ^^       ^^             ^^^^^            
+>interval : string | number
+>         : ^^^^^^^^^^^^^^^
+>name : string
+>     : ^^^^^^
+>data : object
+>     : ^^^^^^
+>options : object
+>        : ^^^^^^
+>undefined as any : any
+>                 : ^^^
+>undefined : undefined
+>          : ^^^^^^^^^
+
+    private _createIntervalJobs(
+>_createIntervalJobs : (interval: string | number, names: string[], data: IJob["data"], options: RepeatOptions) => Promise<Job[]> | undefined
+>                    : ^        ^^               ^^     ^^        ^^    ^^            ^^       ^^             ^^^^^                          
+
+        interval: string | number,
+>interval : string | number
+>         : ^^^^^^^^^^^^^^^
+
+        names: string[],
+>names : string[]
+>      : ^^^^^^^^
+
+        data: IJob['data'],
+>data : object
+>     : ^^^^^^
+
+        options: RepeatOptions,
+>options : object
+>        : ^^^^^^
+
+    ): Promise<Job[]> | undefined { return undefined as any; }
+>undefined as any : any
+>                 : ^^^
+>undefined : undefined
+>          : ^^^^^^^^^
+
+    public async newEvery<T extends string | string[]>(
+>newEvery : <T extends string | string[]>(interval: string | number, name: T, data: IJob["data"], options: RepeatOptions) => Promise<HelperCond<T, string, Job, string[], Job[] | undefined>>
+>         : ^ ^^^^^^^^^                 ^^        ^^               ^^    ^^ ^^    ^^            ^^       ^^             ^^^^^                                                                
+
+        interval: string | number,
+>interval : string | number
+>         : ^^^^^^^^^^^^^^^
+
+        name: T,
+>name : T
+>     : ^
+
+        data: IJob['data'],
+>data : object
+>     : ^^^^^^
+
+        options: RepeatOptions): Promise<HelperCond<T, string, Job, string[], Job[] | undefined>> {
+>options : object
+>        : ^^^^^^
+
+        if (typeof name === 'string') {
+>typeof name === 'string' : boolean
+>                         : ^^^^^^^
+>typeof name : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
+>            : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>name : T
+>     : ^
+>'string' : "string"
+>         : ^^^^^^^^
+
+            return this._createIntervalJob(interval, name, data, options); // Ok
+>this._createIntervalJob(interval, name, data, options) : Promise<object>
+>                                                       : ^^^^^^^^^^^^^^^
+>this._createIntervalJob : (interval: string | number, name: string, data: IJob["data"], options: RepeatOptions) => Promise<Job>
+>                        : ^        ^^               ^^    ^^      ^^    ^^            ^^       ^^             ^^^^^            
+>this : this
+>     : ^^^^
+>_createIntervalJob : (interval: string | number, name: string, data: IJob["data"], options: RepeatOptions) => Promise<Job>
+>                   : ^        ^^               ^^    ^^      ^^    ^^            ^^       ^^             ^^^^^            
+>interval : string | number
+>         : ^^^^^^^^^^^^^^^
+>name : string
+>     : ^^^^^^
+>data : object
+>     : ^^^^^^
+>options : object
+>        : ^^^^^^
+        }
+
+        if (Array.isArray(name)) {
+>Array.isArray(name) : boolean
+>                    : ^^^^^^^
+>Array.isArray : (arg: any) => arg is any[]
+>              : ^   ^^   ^^^^^            
+>Array : ArrayConstructor
+>      : ^^^^^^^^^^^^^^^^
+>isArray : (arg: any) => arg is any[]
+>        : ^   ^^   ^^^^^            
+>name : string[]
+>     : ^^^^^^^^
+
+            return this._createIntervalJobs(interval, name, data, options); // Ok
+>this._createIntervalJobs(interval, name, data, options) : Promise<object[]> | undefined
+>                                                        : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>this._createIntervalJobs : (interval: string | number, names: string[], data: IJob["data"], options: RepeatOptions) => Promise<Job[]> | undefined
+>                         : ^        ^^               ^^     ^^        ^^    ^^            ^^       ^^             ^^^^^                          
+>this : this
+>     : ^^^^
+>_createIntervalJobs : (interval: string | number, names: string[], data: IJob["data"], options: RepeatOptions) => Promise<Job[]> | undefined
+>                    : ^        ^^               ^^     ^^        ^^    ^^            ^^       ^^             ^^^^^                          
+>interval : string | number
+>         : ^^^^^^^^^^^^^^^
+>name : string[]
+>     : ^^^^^^^^
+>data : object
+>     : ^^^^^^
+>options : object
+>        : ^^^^^^
+
+            // Possible bug in original: createIntervalJobs can return undefined, but the original overload did not acount for that.
+        }
+
+        throw new Error('Unexpected error: Invalid job name(s)');
+>new Error('Unexpected error: Invalid job name(s)') : Error
+>                                                   : ^^^^^
+>Error : ErrorConstructor
+>      : ^^^^^^^^^^^^^^^^
+>'Unexpected error: Invalid job name(s)' : "Unexpected error: Invalid job name(s)"
+>                                        : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    }
+}
+
+// File: angular/packages/common/src/pipes/case_conversion_pipes.ts
+
+function transform1<T extends string | null | undefined>(value: T): HelperCond<T, string, string, null | undefined, null> {
+>transform1 : <T extends string | null | undefined>(value: T) => HelperCond<T, string, string, null | undefined, null>
+>           : ^ ^^^^^^^^^                         ^^     ^^ ^^^^^                                                     
+>value : T
+>      : ^
+
+    if (value == null) return null; // Ok
+>value == null : boolean
+>              : ^^^^^^^
+>value : T
+>      : ^
+
+    if (typeof value !== 'string') {
+>typeof value !== 'string' : boolean
+>                          : ^^^^^^^
+>typeof value : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
+>             : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>value : NonNullable<T>
+>      : ^^^^^^^^^^^^^^
+>'string' : "string"
+>         : ^^^^^^^^
+
+        throw new Error();
+>new Error() : Error
+>            : ^^^^^
+>Error : ErrorConstructor
+>      : ^^^^^^^^^^^^^^^^
+    }
+    return value.toLowerCase(); // Ok
+>value.toLowerCase() : string
+>                    : ^^^^^^
+>value.toLowerCase : () => string
+>                  : ^^^^^^      
+>value : string
+>      : ^^^^^^
+>toLowerCase : () => string
+>            : ^^^^^^      
+}
diff --git a/tests/baselines/reference/dependentReturnType4.errors.txt b/tests/baselines/reference/dependentReturnType4.errors.txt
new file mode 100644
index 0000000000000..5f06601f9fe98
--- /dev/null
+++ b/tests/baselines/reference/dependentReturnType4.errors.txt
@@ -0,0 +1,40 @@
+dependentReturnType4.ts(28,9): error TS2322: Type '0' is not assignable to type 'T extends undefined ? 0 : T extends string ? 1 : never'.
+dependentReturnType4.ts(30,5): error TS2322: Type '1' is not assignable to type 'T extends undefined ? 0 : T extends string ? 1 : never'.
+
+
+==== dependentReturnType4.ts (2 errors) ====
+    declare const rand: { a?: never };
+    type Missing = typeof rand.a;
+    
+    // Detection of valid optional parameter references
+    
+    // Ok, will narrow return type
+    function bar1<T extends string | Missing>(x?: T):
+        T extends Missing ? 0 : T extends string ? 1 : never {
+        if (x === undefined) {
+            return 0;
+        }
+        return 1;
+    }
+    
+    // Ok, will narrow return type
+    function bar2<T extends string | undefined>(x?: T):
+        T extends undefined ? 0 : T extends string ? 1 : never {
+        if (x === undefined) {
+            return 0;
+        }
+        return 1;
+    }
+    
+    // Not ok, will not narrow return type
+    function bar3<T extends string>(x?: T):
+        T extends undefined ? 0 : T extends string ? 1 : never {
+        if (x === undefined) {
+            return 0;
+            ~~~~~~
+!!! error TS2322: Type '0' is not assignable to type 'T extends undefined ? 0 : T extends string ? 1 : never'.
+        }
+        return 1;
+        ~~~~~~
+!!! error TS2322: Type '1' is not assignable to type 'T extends undefined ? 0 : T extends string ? 1 : never'.
+    }
\ No newline at end of file
diff --git a/tests/baselines/reference/dependentReturnType4.symbols b/tests/baselines/reference/dependentReturnType4.symbols
new file mode 100644
index 0000000000000..77b99a29dd972
--- /dev/null
+++ b/tests/baselines/reference/dependentReturnType4.symbols
@@ -0,0 +1,76 @@
+//// [tests/cases/compiler/dependentReturnType4.ts] ////
+
+=== dependentReturnType4.ts ===
+declare const rand: { a?: never };
+>rand : Symbol(rand, Decl(dependentReturnType4.ts, 0, 13))
+>a : Symbol(a, Decl(dependentReturnType4.ts, 0, 21))
+
+type Missing = typeof rand.a;
+>Missing : Symbol(Missing, Decl(dependentReturnType4.ts, 0, 34))
+>rand.a : Symbol(a, Decl(dependentReturnType4.ts, 0, 21))
+>rand : Symbol(rand, Decl(dependentReturnType4.ts, 0, 13))
+>a : Symbol(a, Decl(dependentReturnType4.ts, 0, 21))
+
+// Detection of valid optional parameter references
+
+// Ok, will narrow return type
+function bar1<T extends string | Missing>(x?: T):
+>bar1 : Symbol(bar1, Decl(dependentReturnType4.ts, 1, 29))
+>T : Symbol(T, Decl(dependentReturnType4.ts, 6, 14))
+>Missing : Symbol(Missing, Decl(dependentReturnType4.ts, 0, 34))
+>x : Symbol(x, Decl(dependentReturnType4.ts, 6, 42))
+>T : Symbol(T, Decl(dependentReturnType4.ts, 6, 14))
+
+    T extends Missing ? 0 : T extends string ? 1 : never {
+>T : Symbol(T, Decl(dependentReturnType4.ts, 6, 14))
+>Missing : Symbol(Missing, Decl(dependentReturnType4.ts, 0, 34))
+>T : Symbol(T, Decl(dependentReturnType4.ts, 6, 14))
+
+    if (x === undefined) {
+>x : Symbol(x, Decl(dependentReturnType4.ts, 6, 42))
+>undefined : Symbol(undefined)
+
+        return 0;
+    }
+    return 1;
+}
+
+// Ok, will narrow return type
+function bar2<T extends string | undefined>(x?: T):
+>bar2 : Symbol(bar2, Decl(dependentReturnType4.ts, 12, 1))
+>T : Symbol(T, Decl(dependentReturnType4.ts, 15, 14))
+>x : Symbol(x, Decl(dependentReturnType4.ts, 15, 44))
+>T : Symbol(T, Decl(dependentReturnType4.ts, 15, 14))
+
+    T extends undefined ? 0 : T extends string ? 1 : never {
+>T : Symbol(T, Decl(dependentReturnType4.ts, 15, 14))
+>T : Symbol(T, Decl(dependentReturnType4.ts, 15, 14))
+
+    if (x === undefined) {
+>x : Symbol(x, Decl(dependentReturnType4.ts, 15, 44))
+>undefined : Symbol(undefined)
+
+        return 0;
+    }
+    return 1;
+}
+
+// Not ok, will not narrow return type
+function bar3<T extends string>(x?: T):
+>bar3 : Symbol(bar3, Decl(dependentReturnType4.ts, 21, 1))
+>T : Symbol(T, Decl(dependentReturnType4.ts, 24, 14))
+>x : Symbol(x, Decl(dependentReturnType4.ts, 24, 32))
+>T : Symbol(T, Decl(dependentReturnType4.ts, 24, 14))
+
+    T extends undefined ? 0 : T extends string ? 1 : never {
+>T : Symbol(T, Decl(dependentReturnType4.ts, 24, 14))
+>T : Symbol(T, Decl(dependentReturnType4.ts, 24, 14))
+
+    if (x === undefined) {
+>x : Symbol(x, Decl(dependentReturnType4.ts, 24, 32))
+>undefined : Symbol(undefined)
+
+        return 0;
+    }
+    return 1;
+}
diff --git a/tests/baselines/reference/dependentReturnType4.types b/tests/baselines/reference/dependentReturnType4.types
new file mode 100644
index 0000000000000..8b2b910a65fbb
--- /dev/null
+++ b/tests/baselines/reference/dependentReturnType4.types
@@ -0,0 +1,95 @@
+//// [tests/cases/compiler/dependentReturnType4.ts] ////
+
+=== dependentReturnType4.ts ===
+declare const rand: { a?: never };
+>rand : { a?: never; }
+>     : ^^^^^^     ^^^
+>a : undefined
+>  : ^^^^^^^^^
+
+type Missing = typeof rand.a;
+>Missing : undefined
+>        : ^^^^^^^^^
+>rand.a : undefined
+>       : ^^^^^^^^^
+>rand : { a?: never; }
+>     : ^^^^^^     ^^^
+>a : undefined
+>  : ^^^^^^^^^
+
+// Detection of valid optional parameter references
+
+// Ok, will narrow return type
+function bar1<T extends string | Missing>(x?: T):
+>bar1 : <T extends string | Missing>(x?: T) => T extends Missing ? 0 : T extends string ? 1 : never
+>     : ^ ^^^^^^^^^                ^^ ^^^ ^^^^^                                                    
+>x : T | undefined
+>  : ^^^^^^^^^^^^^
+
+    T extends Missing ? 0 : T extends string ? 1 : never {
+    if (x === undefined) {
+>x === undefined : boolean
+>                : ^^^^^^^
+>x : T | undefined
+>  : ^^^^^^^^^^^^^
+>undefined : undefined
+>          : ^^^^^^^^^
+
+        return 0;
+>0 : 0
+>  : ^
+    }
+    return 1;
+>1 : 1
+>  : ^
+}
+
+// Ok, will narrow return type
+function bar2<T extends string | undefined>(x?: T):
+>bar2 : <T extends string | undefined>(x?: T) => T extends undefined ? 0 : T extends string ? 1 : never
+>     : ^ ^^^^^^^^^                  ^^ ^^^ ^^^^^                                                      
+>x : T | undefined
+>  : ^^^^^^^^^^^^^
+
+    T extends undefined ? 0 : T extends string ? 1 : never {
+    if (x === undefined) {
+>x === undefined : boolean
+>                : ^^^^^^^
+>x : T | undefined
+>  : ^^^^^^^^^^^^^
+>undefined : undefined
+>          : ^^^^^^^^^
+
+        return 0;
+>0 : 0
+>  : ^
+    }
+    return 1;
+>1 : 1
+>  : ^
+}
+
+// Not ok, will not narrow return type
+function bar3<T extends string>(x?: T):
+>bar3 : <T extends string>(x?: T) => T extends undefined ? 0 : T extends string ? 1 : never
+>     : ^ ^^^^^^^^^      ^^ ^^^ ^^^^^                                                      
+>x : T | undefined
+>  : ^^^^^^^^^^^^^
+
+    T extends undefined ? 0 : T extends string ? 1 : never {
+    if (x === undefined) {
+>x === undefined : boolean
+>                : ^^^^^^^
+>x : T | undefined
+>  : ^^^^^^^^^^^^^
+>undefined : undefined
+>          : ^^^^^^^^^
+
+        return 0;
+>0 : 0
+>  : ^
+    }
+    return 1;
+>1 : 1
+>  : ^
+}
diff --git a/tests/baselines/reference/dependentReturnType5.errors.txt b/tests/baselines/reference/dependentReturnType5.errors.txt
new file mode 100644
index 0000000000000..ce2ada8762c9b
--- /dev/null
+++ b/tests/baselines/reference/dependentReturnType5.errors.txt
@@ -0,0 +1,109 @@
+dependentReturnType5.ts(54,13): error TS2322: Type '2' is not assignable to type 'Comp[T]'.
+  Type '2' is not assignable to type '3'.
+dependentReturnType5.ts(65,5): error TS2322: Type '2' is not assignable to type 'Comp[T]'.
+  Type '2' is not assignable to type '3'.
+
+
+==== dependentReturnType5.ts (2 errors) ====
+    // Indexed access return type
+    interface A1 {
+        "prop": true;
+        [s: string]: boolean;
+    }
+    
+    // This was already allowed but is unsound.
+    function foo1<T extends string>(x: T): A1[T] {
+        return false;
+    }
+    const rfoo1 = foo1("prop"); // Type says true, but actually returns false.
+    
+    interface A2 {
+        "prop": true;
+        [n: number]: string;
+    }
+    
+    // We could soundly allow that, because `"prop"` and `[n: number]` are disjoint types.
+    function foo2<T extends "prop" | number>(x: T): A2[T] {
+        if (x === "prop") {
+            return true;
+        }
+        return "some string";
+    }
+    const rfoo2 = foo2("prop");
+    const rfoo22 = foo2(34);
+    const rfoo222 = foo2(Math.random() ? "prop" : 34);
+    
+    interface A3 {
+        [s: string]: boolean;
+    }
+    
+    // No need for return type narrowing.
+    function foo3<T extends string>(x: T): A3[T] {
+        if (Math.random()) return true;
+        return false;
+    }
+    
+    interface Comp {
+        foo: 2;
+        [n: number]: 3;
+        [s: string]: 2 | 3 | 4;
+    }
+    
+    function indexedComp<T extends number | string>(x: T): Comp[T] {
+        if (x === "foo") {
+            if (Math.random()) {
+                return 3; // Error
+            }
+            return 2; // Ok
+        }
+        if (typeof x === "number") {
+            if (Math.random()) {
+                return 2; // Error
+                ~~~~~~
+!!! error TS2322: Type '2' is not assignable to type 'Comp[T]'.
+!!! error TS2322:   Type '2' is not assignable to type '3'.
+            }
+            return 3; // Ok
+        }
+        return 4; // Ok
+    }
+    
+    function indexedComp2<T extends number | string>(x: T): Comp[T] {
+        if (Math.random()) {
+            return 3; // Bad, unsound
+        }
+        return 2; // Error
+        ~~~~~~
+!!! error TS2322: Type '2' is not assignable to type 'Comp[T]'.
+!!! error TS2322:   Type '2' is not assignable to type '3'.
+    }
+    
+    
+    // Most common case supported:
+    interface F {
+        "t": number,
+        "f": boolean,
+    }
+    
+    // Ok
+    function depLikeFun<T extends "t" | "f">(str: T): F[T] {
+        if (str === "t") {
+            return 1;
+        } else {
+            return true;
+        }
+    }
+    
+    depLikeFun("t"); // has type number
+    depLikeFun("f"); // has type boolean
+    
+    type IndirectF<T extends keyof F> = F[T];
+    
+    // Ok
+    function depLikeFun2<T extends "t" | "f">(str: T): IndirectF<T> {
+        if (str === "t") {
+            return 1;
+        } else {
+            return true;
+        }
+    }
\ No newline at end of file
diff --git a/tests/baselines/reference/dependentReturnType5.symbols b/tests/baselines/reference/dependentReturnType5.symbols
new file mode 100644
index 0000000000000..9061f59ff0c12
--- /dev/null
+++ b/tests/baselines/reference/dependentReturnType5.symbols
@@ -0,0 +1,220 @@
+//// [tests/cases/compiler/dependentReturnType5.ts] ////
+
+=== dependentReturnType5.ts ===
+// Indexed access return type
+interface A1 {
+>A1 : Symbol(A1, Decl(dependentReturnType5.ts, 0, 0))
+
+    "prop": true;
+>"prop" : Symbol(A1["prop"], Decl(dependentReturnType5.ts, 1, 14))
+
+    [s: string]: boolean;
+>s : Symbol(s, Decl(dependentReturnType5.ts, 3, 5))
+}
+
+// This was already allowed but is unsound.
+function foo1<T extends string>(x: T): A1[T] {
+>foo1 : Symbol(foo1, Decl(dependentReturnType5.ts, 4, 1))
+>T : Symbol(T, Decl(dependentReturnType5.ts, 7, 14))
+>x : Symbol(x, Decl(dependentReturnType5.ts, 7, 32))
+>T : Symbol(T, Decl(dependentReturnType5.ts, 7, 14))
+>A1 : Symbol(A1, Decl(dependentReturnType5.ts, 0, 0))
+>T : Symbol(T, Decl(dependentReturnType5.ts, 7, 14))
+
+    return false;
+}
+const rfoo1 = foo1("prop"); // Type says true, but actually returns false.
+>rfoo1 : Symbol(rfoo1, Decl(dependentReturnType5.ts, 10, 5))
+>foo1 : Symbol(foo1, Decl(dependentReturnType5.ts, 4, 1))
+
+interface A2 {
+>A2 : Symbol(A2, Decl(dependentReturnType5.ts, 10, 27))
+
+    "prop": true;
+>"prop" : Symbol(A2["prop"], Decl(dependentReturnType5.ts, 12, 14))
+
+    [n: number]: string;
+>n : Symbol(n, Decl(dependentReturnType5.ts, 14, 5))
+}
+
+// We could soundly allow that, because `"prop"` and `[n: number]` are disjoint types.
+function foo2<T extends "prop" | number>(x: T): A2[T] {
+>foo2 : Symbol(foo2, Decl(dependentReturnType5.ts, 15, 1))
+>T : Symbol(T, Decl(dependentReturnType5.ts, 18, 14))
+>x : Symbol(x, Decl(dependentReturnType5.ts, 18, 41))
+>T : Symbol(T, Decl(dependentReturnType5.ts, 18, 14))
+>A2 : Symbol(A2, Decl(dependentReturnType5.ts, 10, 27))
+>T : Symbol(T, Decl(dependentReturnType5.ts, 18, 14))
+
+    if (x === "prop") {
+>x : Symbol(x, Decl(dependentReturnType5.ts, 18, 41))
+
+        return true;
+    }
+    return "some string";
+}
+const rfoo2 = foo2("prop");
+>rfoo2 : Symbol(rfoo2, Decl(dependentReturnType5.ts, 24, 5))
+>foo2 : Symbol(foo2, Decl(dependentReturnType5.ts, 15, 1))
+
+const rfoo22 = foo2(34);
+>rfoo22 : Symbol(rfoo22, Decl(dependentReturnType5.ts, 25, 5))
+>foo2 : Symbol(foo2, Decl(dependentReturnType5.ts, 15, 1))
+
+const rfoo222 = foo2(Math.random() ? "prop" : 34);
+>rfoo222 : Symbol(rfoo222, Decl(dependentReturnType5.ts, 26, 5))
+>foo2 : Symbol(foo2, Decl(dependentReturnType5.ts, 15, 1))
+>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
+>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
+
+interface A3 {
+>A3 : Symbol(A3, Decl(dependentReturnType5.ts, 26, 50))
+
+    [s: string]: boolean;
+>s : Symbol(s, Decl(dependentReturnType5.ts, 29, 5))
+}
+
+// No need for return type narrowing.
+function foo3<T extends string>(x: T): A3[T] {
+>foo3 : Symbol(foo3, Decl(dependentReturnType5.ts, 30, 1))
+>T : Symbol(T, Decl(dependentReturnType5.ts, 33, 14))
+>x : Symbol(x, Decl(dependentReturnType5.ts, 33, 32))
+>T : Symbol(T, Decl(dependentReturnType5.ts, 33, 14))
+>A3 : Symbol(A3, Decl(dependentReturnType5.ts, 26, 50))
+>T : Symbol(T, Decl(dependentReturnType5.ts, 33, 14))
+
+    if (Math.random()) return true;
+>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
+>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
+
+    return false;
+}
+
+interface Comp {
+>Comp : Symbol(Comp, Decl(dependentReturnType5.ts, 36, 1))
+
+    foo: 2;
+>foo : Symbol(Comp.foo, Decl(dependentReturnType5.ts, 38, 16))
+
+    [n: number]: 3;
+>n : Symbol(n, Decl(dependentReturnType5.ts, 40, 5))
+
+    [s: string]: 2 | 3 | 4;
+>s : Symbol(s, Decl(dependentReturnType5.ts, 41, 5))
+}
+
+function indexedComp<T extends number | string>(x: T): Comp[T] {
+>indexedComp : Symbol(indexedComp, Decl(dependentReturnType5.ts, 42, 1))
+>T : Symbol(T, Decl(dependentReturnType5.ts, 44, 21))
+>x : Symbol(x, Decl(dependentReturnType5.ts, 44, 48))
+>T : Symbol(T, Decl(dependentReturnType5.ts, 44, 21))
+>Comp : Symbol(Comp, Decl(dependentReturnType5.ts, 36, 1))
+>T : Symbol(T, Decl(dependentReturnType5.ts, 44, 21))
+
+    if (x === "foo") {
+>x : Symbol(x, Decl(dependentReturnType5.ts, 44, 48))
+
+        if (Math.random()) {
+>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
+>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
+
+            return 3; // Error
+        }
+        return 2; // Ok
+    }
+    if (typeof x === "number") {
+>x : Symbol(x, Decl(dependentReturnType5.ts, 44, 48))
+
+        if (Math.random()) {
+>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
+>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
+
+            return 2; // Error
+        }
+        return 3; // Ok
+    }
+    return 4; // Ok
+}
+
+function indexedComp2<T extends number | string>(x: T): Comp[T] {
+>indexedComp2 : Symbol(indexedComp2, Decl(dependentReturnType5.ts, 58, 1))
+>T : Symbol(T, Decl(dependentReturnType5.ts, 60, 22))
+>x : Symbol(x, Decl(dependentReturnType5.ts, 60, 49))
+>T : Symbol(T, Decl(dependentReturnType5.ts, 60, 22))
+>Comp : Symbol(Comp, Decl(dependentReturnType5.ts, 36, 1))
+>T : Symbol(T, Decl(dependentReturnType5.ts, 60, 22))
+
+    if (Math.random()) {
+>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
+>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
+
+        return 3; // Bad, unsound
+    }
+    return 2; // Error
+}
+
+
+// Most common case supported:
+interface F {
+>F : Symbol(F, Decl(dependentReturnType5.ts, 65, 1))
+
+    "t": number,
+>"t" : Symbol(F["t"], Decl(dependentReturnType5.ts, 69, 13))
+
+    "f": boolean,
+>"f" : Symbol(F["f"], Decl(dependentReturnType5.ts, 70, 16))
+}
+
+// Ok
+function depLikeFun<T extends "t" | "f">(str: T): F[T] {
+>depLikeFun : Symbol(depLikeFun, Decl(dependentReturnType5.ts, 72, 1))
+>T : Symbol(T, Decl(dependentReturnType5.ts, 75, 20))
+>str : Symbol(str, Decl(dependentReturnType5.ts, 75, 41))
+>T : Symbol(T, Decl(dependentReturnType5.ts, 75, 20))
+>F : Symbol(F, Decl(dependentReturnType5.ts, 65, 1))
+>T : Symbol(T, Decl(dependentReturnType5.ts, 75, 20))
+
+    if (str === "t") {
+>str : Symbol(str, Decl(dependentReturnType5.ts, 75, 41))
+
+        return 1;
+    } else {
+        return true;
+    }
+}
+
+depLikeFun("t"); // has type number
+>depLikeFun : Symbol(depLikeFun, Decl(dependentReturnType5.ts, 72, 1))
+
+depLikeFun("f"); // has type boolean
+>depLikeFun : Symbol(depLikeFun, Decl(dependentReturnType5.ts, 72, 1))
+
+type IndirectF<T extends keyof F> = F[T];
+>IndirectF : Symbol(IndirectF, Decl(dependentReturnType5.ts, 84, 16))
+>T : Symbol(T, Decl(dependentReturnType5.ts, 86, 15))
+>F : Symbol(F, Decl(dependentReturnType5.ts, 65, 1))
+>F : Symbol(F, Decl(dependentReturnType5.ts, 65, 1))
+>T : Symbol(T, Decl(dependentReturnType5.ts, 86, 15))
+
+// Ok
+function depLikeFun2<T extends "t" | "f">(str: T): IndirectF<T> {
+>depLikeFun2 : Symbol(depLikeFun2, Decl(dependentReturnType5.ts, 86, 41))
+>T : Symbol(T, Decl(dependentReturnType5.ts, 89, 21))
+>str : Symbol(str, Decl(dependentReturnType5.ts, 89, 42))
+>T : Symbol(T, Decl(dependentReturnType5.ts, 89, 21))
+>IndirectF : Symbol(IndirectF, Decl(dependentReturnType5.ts, 84, 16))
+>T : Symbol(T, Decl(dependentReturnType5.ts, 89, 21))
+
+    if (str === "t") {
+>str : Symbol(str, Decl(dependentReturnType5.ts, 89, 42))
+
+        return 1;
+    } else {
+        return true;
+    }
+}
diff --git a/tests/baselines/reference/dependentReturnType5.types b/tests/baselines/reference/dependentReturnType5.types
new file mode 100644
index 0000000000000..25f542fec56de
--- /dev/null
+++ b/tests/baselines/reference/dependentReturnType5.types
@@ -0,0 +1,331 @@
+//// [tests/cases/compiler/dependentReturnType5.ts] ////
+
+=== dependentReturnType5.ts ===
+// Indexed access return type
+interface A1 {
+    "prop": true;
+>"prop" : true
+>       : ^^^^
+>true : true
+>     : ^^^^
+
+    [s: string]: boolean;
+>s : string
+>  : ^^^^^^
+}
+
+// This was already allowed but is unsound.
+function foo1<T extends string>(x: T): A1[T] {
+>foo1 : <T extends string>(x: T) => A1[T]
+>     : ^ ^^^^^^^^^      ^^ ^^ ^^^^^     
+>x : T
+>  : ^
+
+    return false;
+>false : false
+>      : ^^^^^
+}
+const rfoo1 = foo1("prop"); // Type says true, but actually returns false.
+>rfoo1 : true
+>      : ^^^^
+>foo1("prop") : true
+>             : ^^^^
+>foo1 : <T extends string>(x: T) => A1[T]
+>     : ^ ^^^^^^^^^      ^^ ^^ ^^^^^     
+>"prop" : "prop"
+>       : ^^^^^^
+
+interface A2 {
+    "prop": true;
+>"prop" : true
+>       : ^^^^
+>true : true
+>     : ^^^^
+
+    [n: number]: string;
+>n : number
+>  : ^^^^^^
+}
+
+// We could soundly allow that, because `"prop"` and `[n: number]` are disjoint types.
+function foo2<T extends "prop" | number>(x: T): A2[T] {
+>foo2 : <T extends "prop" | number>(x: T) => A2[T]
+>     : ^ ^^^^^^^^^               ^^ ^^ ^^^^^     
+>x : T
+>  : ^
+
+    if (x === "prop") {
+>x === "prop" : boolean
+>             : ^^^^^^^
+>x : T
+>  : ^
+>"prop" : "prop"
+>       : ^^^^^^
+
+        return true;
+>true : true
+>     : ^^^^
+    }
+    return "some string";
+>"some string" : "some string"
+>              : ^^^^^^^^^^^^^
+}
+const rfoo2 = foo2("prop");
+>rfoo2 : true
+>      : ^^^^
+>foo2("prop") : true
+>             : ^^^^
+>foo2 : <T extends "prop" | number>(x: T) => A2[T]
+>     : ^ ^^^^^^^^^               ^^ ^^ ^^^^^     
+>"prop" : "prop"
+>       : ^^^^^^
+
+const rfoo22 = foo2(34);
+>rfoo22 : string
+>       : ^^^^^^
+>foo2(34) : string
+>         : ^^^^^^
+>foo2 : <T extends "prop" | number>(x: T) => A2[T]
+>     : ^ ^^^^^^^^^               ^^ ^^ ^^^^^     
+>34 : 34
+>   : ^^
+
+const rfoo222 = foo2(Math.random() ? "prop" : 34);
+>rfoo222 : string | true
+>        : ^^^^^^^^^^^^^
+>foo2(Math.random() ? "prop" : 34) : string | true
+>                                  : ^^^^^^^^^^^^^
+>foo2 : <T extends "prop" | number>(x: T) => A2[T]
+>     : ^ ^^^^^^^^^               ^^ ^^ ^^^^^     
+>Math.random() ? "prop" : 34 : "prop" | 34
+>                            : ^^^^^^^^^^^
+>Math.random() : number
+>              : ^^^^^^
+>Math.random : () => number
+>            : ^^^^^^      
+>Math : Math
+>     : ^^^^
+>random : () => number
+>       : ^^^^^^      
+>"prop" : "prop"
+>       : ^^^^^^
+>34 : 34
+>   : ^^
+
+interface A3 {
+    [s: string]: boolean;
+>s : string
+>  : ^^^^^^
+}
+
+// No need for return type narrowing.
+function foo3<T extends string>(x: T): A3[T] {
+>foo3 : <T extends string>(x: T) => A3[T]
+>     : ^ ^^^^^^^^^      ^^ ^^ ^^^^^     
+>x : T
+>  : ^
+
+    if (Math.random()) return true;
+>Math.random() : number
+>              : ^^^^^^
+>Math.random : () => number
+>            : ^^^^^^      
+>Math : Math
+>     : ^^^^
+>random : () => number
+>       : ^^^^^^      
+>true : true
+>     : ^^^^
+
+    return false;
+>false : false
+>      : ^^^^^
+}
+
+interface Comp {
+    foo: 2;
+>foo : 2
+>    : ^
+
+    [n: number]: 3;
+>n : number
+>  : ^^^^^^
+
+    [s: string]: 2 | 3 | 4;
+>s : string
+>  : ^^^^^^
+}
+
+function indexedComp<T extends number | string>(x: T): Comp[T] {
+>indexedComp : <T extends number | string>(x: T) => Comp[T]
+>            : ^ ^^^^^^^^^               ^^ ^^ ^^^^^       
+>x : T
+>  : ^
+
+    if (x === "foo") {
+>x === "foo" : boolean
+>            : ^^^^^^^
+>x : T
+>  : ^
+>"foo" : "foo"
+>      : ^^^^^
+
+        if (Math.random()) {
+>Math.random() : number
+>              : ^^^^^^
+>Math.random : () => number
+>            : ^^^^^^      
+>Math : Math
+>     : ^^^^
+>random : () => number
+>       : ^^^^^^      
+
+            return 3; // Error
+>3 : 3
+>  : ^
+        }
+        return 2; // Ok
+>2 : 2
+>  : ^
+    }
+    if (typeof x === "number") {
+>typeof x === "number" : boolean
+>                      : ^^^^^^^
+>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
+>         : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>x : T
+>  : ^
+>"number" : "number"
+>         : ^^^^^^^^
+
+        if (Math.random()) {
+>Math.random() : number
+>              : ^^^^^^
+>Math.random : () => number
+>            : ^^^^^^      
+>Math : Math
+>     : ^^^^
+>random : () => number
+>       : ^^^^^^      
+
+            return 2; // Error
+>2 : 2
+>  : ^
+        }
+        return 3; // Ok
+>3 : 3
+>  : ^
+    }
+    return 4; // Ok
+>4 : 4
+>  : ^
+}
+
+function indexedComp2<T extends number | string>(x: T): Comp[T] {
+>indexedComp2 : <T extends number | string>(x: T) => Comp[T]
+>             : ^ ^^^^^^^^^               ^^ ^^ ^^^^^       
+>x : T
+>  : ^
+
+    if (Math.random()) {
+>Math.random() : number
+>              : ^^^^^^
+>Math.random : () => number
+>            : ^^^^^^      
+>Math : Math
+>     : ^^^^
+>random : () => number
+>       : ^^^^^^      
+
+        return 3; // Bad, unsound
+>3 : 3
+>  : ^
+    }
+    return 2; // Error
+>2 : 2
+>  : ^
+}
+
+
+// Most common case supported:
+interface F {
+    "t": number,
+>"t" : number
+>    : ^^^^^^
+
+    "f": boolean,
+>"f" : boolean
+>    : ^^^^^^^
+}
+
+// Ok
+function depLikeFun<T extends "t" | "f">(str: T): F[T] {
+>depLikeFun : <T extends "t" | "f">(str: T) => F[T]
+>           : ^ ^^^^^^^^^         ^^   ^^ ^^^^^    
+>str : T
+>    : ^
+
+    if (str === "t") {
+>str === "t" : boolean
+>            : ^^^^^^^
+>str : T
+>    : ^
+>"t" : "t"
+>    : ^^^
+
+        return 1;
+>1 : 1
+>  : ^
+
+    } else {
+        return true;
+>true : true
+>     : ^^^^
+    }
+}
+
+depLikeFun("t"); // has type number
+>depLikeFun("t") : number
+>                : ^^^^^^
+>depLikeFun : <T extends "t" | "f">(str: T) => F[T]
+>           : ^ ^^^^^^^^^         ^^   ^^ ^^^^^    
+>"t" : "t"
+>    : ^^^
+
+depLikeFun("f"); // has type boolean
+>depLikeFun("f") : boolean
+>                : ^^^^^^^
+>depLikeFun : <T extends "t" | "f">(str: T) => F[T]
+>           : ^ ^^^^^^^^^         ^^   ^^ ^^^^^    
+>"f" : "f"
+>    : ^^^
+
+type IndirectF<T extends keyof F> = F[T];
+>IndirectF : IndirectF<T>
+>          : ^^^^^^^^^^^^
+
+// Ok
+function depLikeFun2<T extends "t" | "f">(str: T): IndirectF<T> {
+>depLikeFun2 : <T extends "t" | "f">(str: T) => IndirectF<T>
+>            : ^ ^^^^^^^^^         ^^   ^^ ^^^^^            
+>str : T
+>    : ^
+
+    if (str === "t") {
+>str === "t" : boolean
+>            : ^^^^^^^
+>str : T
+>    : ^
+>"t" : "t"
+>    : ^^^
+
+        return 1;
+>1 : 1
+>  : ^
+
+    } else {
+        return true;
+>true : true
+>     : ^^^^
+    }
+}
diff --git a/tests/baselines/reference/dependentReturnType6.errors.txt b/tests/baselines/reference/dependentReturnType6.errors.txt
new file mode 100644
index 0000000000000..638c23268ad80
--- /dev/null
+++ b/tests/baselines/reference/dependentReturnType6.errors.txt
@@ -0,0 +1,193 @@
+file.ts(28,26): error TS2322: Type 'true' is not assignable to type 'SomeInterfaceBad<T>[U]'.
+  Type 'true' is not assignable to type 'T extends 1 ? true : T extends 2 ? false : never'.
+file.ts(28,33): error TS2322: Type 'false' is not assignable to type 'SomeInterfaceBad<T>[U]'.
+  Type 'false' is not assignable to type 'T extends 1 ? true : T extends 2 ? false : never'.
+file.ts(30,16): error TS2322: Type '1' is not assignable to type 'SomeInterfaceBad<T>[U]'.
+  Type '1' is not assignable to type 'T extends true ? 1 : T extends false ? 2 : never'.
+file.ts(30,20): error TS2322: Type '2' is not assignable to type 'SomeInterfaceBad<T>[U]'.
+  Type '2' is not assignable to type 'T extends true ? 1 : T extends false ? 2 : never'.
+file.ts(80,13): error TS2322: Type '1' is not assignable to type 'this extends Sub1 ? 1 : this extends Sub2 ? 2 : never'.
+file.ts(82,9): error TS2322: Type '2' is not assignable to type 'this extends Sub1 ? 1 : this extends Sub2 ? 2 : never'.
+file.ts(94,16): error TS2322: Type '1' is not assignable to type 'T extends true ? 1 : T extends false ? 2 : never'.
+file.ts(94,20): error TS2322: Type '2' is not assignable to type 'T extends true ? 1 : T extends false ? 2 : never'.
+file.ts(98,100): error TS2322: Type '1 | 2' is not assignable to type 'T extends true ? 1 : T extends false ? 2 : never'.
+  Type '1' is not assignable to type 'T extends true ? 1 : T extends false ? 2 : never'.
+file.ts(106,9): error TS2322: Type 'number' is not assignable to type 'SomeCond<T>'.
+file.ts(106,9): error TS2589: Type instantiation is excessively deep and possibly infinite.
+file.ts(108,5): error TS2322: Type 'number' is not assignable to type 'SomeCond<T>'.
+file.ts(114,60): error TS2366: Function lacks ending return statement and return type does not include 'undefined'.
+file.ts(116,9): error TS2322: Type '"one"' is not assignable to type 'OtherCond<U> | OtherCond<V>'.
+file.ts(126,9): error TS2322: Type '"a"' is not assignable to type 'T extends (infer P)[] ? P : T extends number ? undefined : never'.
+file.ts(128,5): error TS2322: Type 'undefined' is not assignable to type 'T extends (infer P)[] ? P : T extends number ? undefined : never'.
+
+
+==== file.ts (16 errors) ====
+    // Type parameter in outer scope
+    function outer<T extends boolean>(x: T): number {
+        return inner();
+    
+        function inner(): T extends true ? 1 : T extends false ? 2 : never {
+            return x ? 1 : 2;
+        }
+    }
+    
+    // Overloads
+    function fun6<T extends boolean>(x: T, y: string): T extends true ? string : T extends false ? 2 : never;
+    function fun6<T extends boolean>(x: T, y: undefined): T extends true ? 1 : T extends false ? 2 : never;
+    function fun6(x: boolean): 1 | 2 | string;
+    function fun6<T extends boolean>(x: T, y?: string): T extends true ? 1 | string : T extends false ? 2 : never {
+        return x ? y !== undefined ? y : 1 : 2;
+    }
+    
+    // Indexed access with conditional inside
+    
+    // DOESN'T NARROW the nested conditional type of wrong shape
+    interface SomeInterfaceBad<T> {
+        prop1: T extends 1 ? true : T extends 2 ? false : never;
+        prop2: T extends true ? 1 : T extends false ? 2 : never;
+    }
+    
+    function fun4bad<T, U extends keyof SomeInterfaceBad<unknown>>(x: T, y: U): SomeInterfaceBad<T>[U] {
+        if (y === "prop1") {
+            return x === 1 ? true : false;
+                             ~~~~
+!!! error TS2322: Type 'true' is not assignable to type 'SomeInterfaceBad<T>[U]'.
+!!! error TS2322:   Type 'true' is not assignable to type 'T extends 1 ? true : T extends 2 ? false : never'.
+                                    ~~~~~
+!!! error TS2322: Type 'false' is not assignable to type 'SomeInterfaceBad<T>[U]'.
+!!! error TS2322:   Type 'false' is not assignable to type 'T extends 1 ? true : T extends 2 ? false : never'.
+        }
+        return x ? 1 : 2;
+                   ~
+!!! error TS2322: Type '1' is not assignable to type 'SomeInterfaceBad<T>[U]'.
+!!! error TS2322:   Type '1' is not assignable to type 'T extends true ? 1 : T extends false ? 2 : never'.
+                       ~
+!!! error TS2322: Type '2' is not assignable to type 'SomeInterfaceBad<T>[U]'.
+!!! error TS2322:   Type '2' is not assignable to type 'T extends true ? 1 : T extends false ? 2 : never'.
+    }
+    
+    // Narrows nested conditional type of right shape
+    interface SomeInterfaceGood<T> {
+        prop1: T extends true ? 2 : T extends false ? 1 : never;
+        prop2: T extends true ? 1 : T extends false ? 2 : never;
+    }
+    
+    function fun4good<T extends boolean, U extends keyof SomeInterfaceGood<unknown>>(x: T, y: U): SomeInterfaceGood<T>[U] {
+        if (y === "prop1") {
+            return x ? 2 : 1;
+        }
+        return x ? 1 : 2;
+    }
+    
+    // Indexed access with indexed access inside - OK, narrows
+    interface BB {
+        "a": number;
+        "b": string;
+    }
+    
+    interface AA<T extends keyof BB> {
+        "c": BB[T];
+        "d": boolean,
+    }
+    
+    function reduction<T extends keyof BB, U extends keyof AA<any>>(x: T, y: U): AA<T>[U] {
+        if (x === "a" && y === "c") {
+            return 0; // Ok
+        }
+    
+        return undefined as never;
+    }
+    
+    // Conditional with indexed access inside - OK, narrows
+    function fun5<T extends 1 | 2, U extends keyof BB>(x: T, y: U): T extends 1 ? BB[U] : T extends 2 ? boolean : never {
+        if (x === 1) {
+            if (y === "a") {
+                return 0;
+            }
+            return "";
+        }
+        return true;
+    }
+    
+    // `this` type parameter - Doesn't narrow
+    abstract class SomeClass {
+        fun3(this: Sub1 | Sub2): this extends Sub1 ? 1 : this extends Sub2 ? 2 : never {
+            if (this instanceof Sub1) {
+                return 1;
+                ~~~~~~
+!!! error TS2322: Type '1' is not assignable to type 'this extends Sub1 ? 1 : this extends Sub2 ? 2 : never'.
+            }
+            return 2;
+            ~~~~~~
+!!! error TS2322: Type '2' is not assignable to type 'this extends Sub1 ? 1 : this extends Sub2 ? 2 : never'.
+        }
+    }
+    class Sub1 extends SomeClass {
+        #sub1!: symbol;
+    };
+    class Sub2 extends SomeClass {
+        #sub2!: symbol;
+    };
+    
+    // Detection of type parameter reference in presence of typeof
+    function fun2<T extends boolean>(x: T, y: typeof x): T extends true ? 1 : T extends false ? 2 : never {
+        return x ? 1 : 2;
+                   ~
+!!! error TS2322: Type '1' is not assignable to type 'T extends true ? 1 : T extends false ? 2 : never'.
+                       ~
+!!! error TS2322: Type '2' is not assignable to type 'T extends true ? 1 : T extends false ? 2 : never'.
+    }
+    
+    // Contextually-typed lambdas
+    const fun1: <T extends boolean>(x: T) => T extends true ? 1 : T extends false ? 2 : never = (x) => x ? 1 : 2;
+                                                                                                       ~~~~~~~~~
+!!! error TS2322: Type '1 | 2' is not assignable to type 'T extends true ? 1 : T extends false ? 2 : never'.
+!!! error TS2322:   Type '1' is not assignable to type 'T extends true ? 1 : T extends false ? 2 : never'.
+!!! related TS6502 file.ts:98:13: The expected type comes from the return type of this signature.
+    
+    
+    // Circular conditionals
+    type SomeCond<T> = T extends true ? 1 : T extends false ? SomeCond<T> : never;
+    
+    function f7<T extends boolean>(x: T): SomeCond<T> {
+        if (x) {
+            return 1;
+            ~~~~~~
+!!! error TS2322: Type 'number' is not assignable to type 'SomeCond<T>'.
+            ~~~~~~
+!!! error TS2589: Type instantiation is excessively deep and possibly infinite.
+        }
+        return 2;
+        ~~~~~~
+!!! error TS2322: Type 'number' is not assignable to type 'SomeCond<T>'.
+    }
+    
+    // Composite instantiation of conditional type
+    type OtherCond<T> = T extends 1 ? "one" : T extends 2 ? "two" : T extends 3 ? "three" : T extends 4 ? "four" : never;
+    
+    function f8<U extends 1 | 2, V extends 3 | 4>(x: U, y: V): OtherCond<U | V> {
+                                                               ~~~~~~~~~~~~~~~~
+!!! error TS2366: Function lacks ending return statement and return type does not include 'undefined'.
+        if (x === 1 && y === 3)  {
+            return "one";
+            ~~~~~~
+!!! error TS2322: Type '"one"' is not assignable to type 'OtherCond<U> | OtherCond<V>'.
+        }
+    }
+    
+    // Conditionals with `infer` - will not narrow, it is not safe to infer from the narrowed type into an `infer` type parameter
+    function f9<T extends "a"[] | "b"[] | number>(x: T): T extends Array<infer P> ? P : T extends number ? undefined : never {
+        if (Array.isArray(x)) {
+            // If we allowed narrowing of the conditional return type, when resolving the conditional `T & ("a"[] | "b"[]) extends Array<infer P> ? P : ...`,
+            // we could infer `"a" | "b"` for `P`, and allow "a" to be returned. However, when calling `f10`, `T` could be instantiated with `"b"[]`, and the return type would be `"b"`,
+            // so allowing an `"a"` return would be unsound.
+            return "a";
+            ~~~~~~
+!!! error TS2322: Type '"a"' is not assignable to type 'T extends (infer P)[] ? P : T extends number ? undefined : never'.
+        }
+        return undefined;
+        ~~~~~~
+!!! error TS2322: Type 'undefined' is not assignable to type 'T extends (infer P)[] ? P : T extends number ? undefined : never'.
+    }
+    
+    
\ No newline at end of file
diff --git a/tests/baselines/reference/dependentReturnType6.symbols b/tests/baselines/reference/dependentReturnType6.symbols
new file mode 100644
index 0000000000000..44fc28739e099
--- /dev/null
+++ b/tests/baselines/reference/dependentReturnType6.symbols
@@ -0,0 +1,367 @@
+//// [tests/cases/compiler/dependentReturnType6.ts] ////
+
+=== file.ts ===
+// Type parameter in outer scope
+function outer<T extends boolean>(x: T): number {
+>outer : Symbol(outer, Decl(file.ts, 0, 0))
+>T : Symbol(T, Decl(file.ts, 1, 15))
+>x : Symbol(x, Decl(file.ts, 1, 34))
+>T : Symbol(T, Decl(file.ts, 1, 15))
+
+    return inner();
+>inner : Symbol(inner, Decl(file.ts, 2, 19))
+
+    function inner(): T extends true ? 1 : T extends false ? 2 : never {
+>inner : Symbol(inner, Decl(file.ts, 2, 19))
+>T : Symbol(T, Decl(file.ts, 1, 15))
+>T : Symbol(T, Decl(file.ts, 1, 15))
+
+        return x ? 1 : 2;
+>x : Symbol(x, Decl(file.ts, 1, 34))
+    }
+}
+
+// Overloads
+function fun6<T extends boolean>(x: T, y: string): T extends true ? string : T extends false ? 2 : never;
+>fun6 : Symbol(fun6, Decl(file.ts, 7, 1), Decl(file.ts, 10, 105), Decl(file.ts, 11, 103), Decl(file.ts, 12, 42))
+>T : Symbol(T, Decl(file.ts, 10, 14))
+>x : Symbol(x, Decl(file.ts, 10, 33))
+>T : Symbol(T, Decl(file.ts, 10, 14))
+>y : Symbol(y, Decl(file.ts, 10, 38))
+>T : Symbol(T, Decl(file.ts, 10, 14))
+>T : Symbol(T, Decl(file.ts, 10, 14))
+
+function fun6<T extends boolean>(x: T, y: undefined): T extends true ? 1 : T extends false ? 2 : never;
+>fun6 : Symbol(fun6, Decl(file.ts, 7, 1), Decl(file.ts, 10, 105), Decl(file.ts, 11, 103), Decl(file.ts, 12, 42))
+>T : Symbol(T, Decl(file.ts, 11, 14))
+>x : Symbol(x, Decl(file.ts, 11, 33))
+>T : Symbol(T, Decl(file.ts, 11, 14))
+>y : Symbol(y, Decl(file.ts, 11, 38))
+>T : Symbol(T, Decl(file.ts, 11, 14))
+>T : Symbol(T, Decl(file.ts, 11, 14))
+
+function fun6(x: boolean): 1 | 2 | string;
+>fun6 : Symbol(fun6, Decl(file.ts, 7, 1), Decl(file.ts, 10, 105), Decl(file.ts, 11, 103), Decl(file.ts, 12, 42))
+>x : Symbol(x, Decl(file.ts, 12, 14))
+
+function fun6<T extends boolean>(x: T, y?: string): T extends true ? 1 | string : T extends false ? 2 : never {
+>fun6 : Symbol(fun6, Decl(file.ts, 7, 1), Decl(file.ts, 10, 105), Decl(file.ts, 11, 103), Decl(file.ts, 12, 42))
+>T : Symbol(T, Decl(file.ts, 13, 14))
+>x : Symbol(x, Decl(file.ts, 13, 33))
+>T : Symbol(T, Decl(file.ts, 13, 14))
+>y : Symbol(y, Decl(file.ts, 13, 38))
+>T : Symbol(T, Decl(file.ts, 13, 14))
+>T : Symbol(T, Decl(file.ts, 13, 14))
+
+    return x ? y !== undefined ? y : 1 : 2;
+>x : Symbol(x, Decl(file.ts, 13, 33))
+>y : Symbol(y, Decl(file.ts, 13, 38))
+>undefined : Symbol(undefined)
+>y : Symbol(y, Decl(file.ts, 13, 38))
+}
+
+// Indexed access with conditional inside
+
+// DOESN'T NARROW the nested conditional type of wrong shape
+interface SomeInterfaceBad<T> {
+>SomeInterfaceBad : Symbol(SomeInterfaceBad, Decl(file.ts, 15, 1))
+>T : Symbol(T, Decl(file.ts, 20, 27))
+
+    prop1: T extends 1 ? true : T extends 2 ? false : never;
+>prop1 : Symbol(SomeInterfaceBad.prop1, Decl(file.ts, 20, 31))
+>T : Symbol(T, Decl(file.ts, 20, 27))
+>T : Symbol(T, Decl(file.ts, 20, 27))
+
+    prop2: T extends true ? 1 : T extends false ? 2 : never;
+>prop2 : Symbol(SomeInterfaceBad.prop2, Decl(file.ts, 21, 60))
+>T : Symbol(T, Decl(file.ts, 20, 27))
+>T : Symbol(T, Decl(file.ts, 20, 27))
+}
+
+function fun4bad<T, U extends keyof SomeInterfaceBad<unknown>>(x: T, y: U): SomeInterfaceBad<T>[U] {
+>fun4bad : Symbol(fun4bad, Decl(file.ts, 23, 1))
+>T : Symbol(T, Decl(file.ts, 25, 17))
+>U : Symbol(U, Decl(file.ts, 25, 19))
+>SomeInterfaceBad : Symbol(SomeInterfaceBad, Decl(file.ts, 15, 1))
+>x : Symbol(x, Decl(file.ts, 25, 63))
+>T : Symbol(T, Decl(file.ts, 25, 17))
+>y : Symbol(y, Decl(file.ts, 25, 68))
+>U : Symbol(U, Decl(file.ts, 25, 19))
+>SomeInterfaceBad : Symbol(SomeInterfaceBad, Decl(file.ts, 15, 1))
+>T : Symbol(T, Decl(file.ts, 25, 17))
+>U : Symbol(U, Decl(file.ts, 25, 19))
+
+    if (y === "prop1") {
+>y : Symbol(y, Decl(file.ts, 25, 68))
+
+        return x === 1 ? true : false;
+>x : Symbol(x, Decl(file.ts, 25, 63))
+    }
+    return x ? 1 : 2;
+>x : Symbol(x, Decl(file.ts, 25, 63))
+}
+
+// Narrows nested conditional type of right shape
+interface SomeInterfaceGood<T> {
+>SomeInterfaceGood : Symbol(SomeInterfaceGood, Decl(file.ts, 30, 1))
+>T : Symbol(T, Decl(file.ts, 33, 28))
+
+    prop1: T extends true ? 2 : T extends false ? 1 : never;
+>prop1 : Symbol(SomeInterfaceGood.prop1, Decl(file.ts, 33, 32))
+>T : Symbol(T, Decl(file.ts, 33, 28))
+>T : Symbol(T, Decl(file.ts, 33, 28))
+
+    prop2: T extends true ? 1 : T extends false ? 2 : never;
+>prop2 : Symbol(SomeInterfaceGood.prop2, Decl(file.ts, 34, 60))
+>T : Symbol(T, Decl(file.ts, 33, 28))
+>T : Symbol(T, Decl(file.ts, 33, 28))
+}
+
+function fun4good<T extends boolean, U extends keyof SomeInterfaceGood<unknown>>(x: T, y: U): SomeInterfaceGood<T>[U] {
+>fun4good : Symbol(fun4good, Decl(file.ts, 36, 1))
+>T : Symbol(T, Decl(file.ts, 38, 18))
+>U : Symbol(U, Decl(file.ts, 38, 36))
+>SomeInterfaceGood : Symbol(SomeInterfaceGood, Decl(file.ts, 30, 1))
+>x : Symbol(x, Decl(file.ts, 38, 81))
+>T : Symbol(T, Decl(file.ts, 38, 18))
+>y : Symbol(y, Decl(file.ts, 38, 86))
+>U : Symbol(U, Decl(file.ts, 38, 36))
+>SomeInterfaceGood : Symbol(SomeInterfaceGood, Decl(file.ts, 30, 1))
+>T : Symbol(T, Decl(file.ts, 38, 18))
+>U : Symbol(U, Decl(file.ts, 38, 36))
+
+    if (y === "prop1") {
+>y : Symbol(y, Decl(file.ts, 38, 86))
+
+        return x ? 2 : 1;
+>x : Symbol(x, Decl(file.ts, 38, 81))
+    }
+    return x ? 1 : 2;
+>x : Symbol(x, Decl(file.ts, 38, 81))
+}
+
+// Indexed access with indexed access inside - OK, narrows
+interface BB {
+>BB : Symbol(BB, Decl(file.ts, 43, 1))
+
+    "a": number;
+>"a" : Symbol(BB["a"], Decl(file.ts, 46, 14))
+
+    "b": string;
+>"b" : Symbol(BB["b"], Decl(file.ts, 47, 16))
+}
+
+interface AA<T extends keyof BB> {
+>AA : Symbol(AA, Decl(file.ts, 49, 1))
+>T : Symbol(T, Decl(file.ts, 51, 13))
+>BB : Symbol(BB, Decl(file.ts, 43, 1))
+
+    "c": BB[T];
+>"c" : Symbol(AA["c"], Decl(file.ts, 51, 34))
+>BB : Symbol(BB, Decl(file.ts, 43, 1))
+>T : Symbol(T, Decl(file.ts, 51, 13))
+
+    "d": boolean,
+>"d" : Symbol(AA["d"], Decl(file.ts, 52, 15))
+}
+
+function reduction<T extends keyof BB, U extends keyof AA<any>>(x: T, y: U): AA<T>[U] {
+>reduction : Symbol(reduction, Decl(file.ts, 54, 1))
+>T : Symbol(T, Decl(file.ts, 56, 19))
+>BB : Symbol(BB, Decl(file.ts, 43, 1))
+>U : Symbol(U, Decl(file.ts, 56, 38))
+>AA : Symbol(AA, Decl(file.ts, 49, 1))
+>x : Symbol(x, Decl(file.ts, 56, 64))
+>T : Symbol(T, Decl(file.ts, 56, 19))
+>y : Symbol(y, Decl(file.ts, 56, 69))
+>U : Symbol(U, Decl(file.ts, 56, 38))
+>AA : Symbol(AA, Decl(file.ts, 49, 1))
+>T : Symbol(T, Decl(file.ts, 56, 19))
+>U : Symbol(U, Decl(file.ts, 56, 38))
+
+    if (x === "a" && y === "c") {
+>x : Symbol(x, Decl(file.ts, 56, 64))
+>y : Symbol(y, Decl(file.ts, 56, 69))
+
+        return 0; // Ok
+    }
+
+    return undefined as never;
+>undefined : Symbol(undefined)
+}
+
+// Conditional with indexed access inside - OK, narrows
+function fun5<T extends 1 | 2, U extends keyof BB>(x: T, y: U): T extends 1 ? BB[U] : T extends 2 ? boolean : never {
+>fun5 : Symbol(fun5, Decl(file.ts, 62, 1))
+>T : Symbol(T, Decl(file.ts, 65, 14))
+>U : Symbol(U, Decl(file.ts, 65, 30))
+>BB : Symbol(BB, Decl(file.ts, 43, 1))
+>x : Symbol(x, Decl(file.ts, 65, 51))
+>T : Symbol(T, Decl(file.ts, 65, 14))
+>y : Symbol(y, Decl(file.ts, 65, 56))
+>U : Symbol(U, Decl(file.ts, 65, 30))
+>T : Symbol(T, Decl(file.ts, 65, 14))
+>BB : Symbol(BB, Decl(file.ts, 43, 1))
+>U : Symbol(U, Decl(file.ts, 65, 30))
+>T : Symbol(T, Decl(file.ts, 65, 14))
+
+    if (x === 1) {
+>x : Symbol(x, Decl(file.ts, 65, 51))
+
+        if (y === "a") {
+>y : Symbol(y, Decl(file.ts, 65, 56))
+
+            return 0;
+        }
+        return "";
+    }
+    return true;
+}
+
+// `this` type parameter - Doesn't narrow
+abstract class SomeClass {
+>SomeClass : Symbol(SomeClass, Decl(file.ts, 73, 1))
+
+    fun3(this: Sub1 | Sub2): this extends Sub1 ? 1 : this extends Sub2 ? 2 : never {
+>fun3 : Symbol(SomeClass.fun3, Decl(file.ts, 76, 26))
+>this : Symbol(this, Decl(file.ts, 77, 9))
+>Sub1 : Symbol(Sub1, Decl(file.ts, 83, 1))
+>Sub2 : Symbol(Sub2, Decl(file.ts, 86, 2))
+>Sub1 : Symbol(Sub1, Decl(file.ts, 83, 1))
+>Sub2 : Symbol(Sub2, Decl(file.ts, 86, 2))
+
+        if (this instanceof Sub1) {
+>this : Symbol(this, Decl(file.ts, 77, 9))
+>Sub1 : Symbol(Sub1, Decl(file.ts, 83, 1))
+
+            return 1;
+        }
+        return 2;
+    }
+}
+class Sub1 extends SomeClass {
+>Sub1 : Symbol(Sub1, Decl(file.ts, 83, 1))
+>SomeClass : Symbol(SomeClass, Decl(file.ts, 73, 1))
+
+    #sub1!: symbol;
+>#sub1 : Symbol(Sub1.#sub1, Decl(file.ts, 84, 30))
+
+};
+class Sub2 extends SomeClass {
+>Sub2 : Symbol(Sub2, Decl(file.ts, 86, 2))
+>SomeClass : Symbol(SomeClass, Decl(file.ts, 73, 1))
+
+    #sub2!: symbol;
+>#sub2 : Symbol(Sub2.#sub2, Decl(file.ts, 87, 30))
+
+};
+
+// Detection of type parameter reference in presence of typeof
+function fun2<T extends boolean>(x: T, y: typeof x): T extends true ? 1 : T extends false ? 2 : never {
+>fun2 : Symbol(fun2, Decl(file.ts, 89, 2))
+>T : Symbol(T, Decl(file.ts, 92, 14))
+>x : Symbol(x, Decl(file.ts, 92, 33))
+>T : Symbol(T, Decl(file.ts, 92, 14))
+>y : Symbol(y, Decl(file.ts, 92, 38))
+>x : Symbol(x, Decl(file.ts, 92, 33))
+>T : Symbol(T, Decl(file.ts, 92, 14))
+>T : Symbol(T, Decl(file.ts, 92, 14))
+
+    return x ? 1 : 2;
+>x : Symbol(x, Decl(file.ts, 92, 33))
+}
+
+// Contextually-typed lambdas
+const fun1: <T extends boolean>(x: T) => T extends true ? 1 : T extends false ? 2 : never = (x) => x ? 1 : 2;
+>fun1 : Symbol(fun1, Decl(file.ts, 97, 5))
+>T : Symbol(T, Decl(file.ts, 97, 13))
+>x : Symbol(x, Decl(file.ts, 97, 32))
+>T : Symbol(T, Decl(file.ts, 97, 13))
+>T : Symbol(T, Decl(file.ts, 97, 13))
+>T : Symbol(T, Decl(file.ts, 97, 13))
+>x : Symbol(x, Decl(file.ts, 97, 93))
+>x : Symbol(x, Decl(file.ts, 97, 93))
+
+
+// Circular conditionals
+type SomeCond<T> = T extends true ? 1 : T extends false ? SomeCond<T> : never;
+>SomeCond : Symbol(SomeCond, Decl(file.ts, 97, 109))
+>T : Symbol(T, Decl(file.ts, 101, 14))
+>T : Symbol(T, Decl(file.ts, 101, 14))
+>T : Symbol(T, Decl(file.ts, 101, 14))
+>SomeCond : Symbol(SomeCond, Decl(file.ts, 97, 109))
+>T : Symbol(T, Decl(file.ts, 101, 14))
+
+function f7<T extends boolean>(x: T): SomeCond<T> {
+>f7 : Symbol(f7, Decl(file.ts, 101, 78))
+>T : Symbol(T, Decl(file.ts, 103, 12))
+>x : Symbol(x, Decl(file.ts, 103, 31))
+>T : Symbol(T, Decl(file.ts, 103, 12))
+>SomeCond : Symbol(SomeCond, Decl(file.ts, 97, 109))
+>T : Symbol(T, Decl(file.ts, 103, 12))
+
+    if (x) {
+>x : Symbol(x, Decl(file.ts, 103, 31))
+
+        return 1;
+    }
+    return 2;
+}
+
+// Composite instantiation of conditional type
+type OtherCond<T> = T extends 1 ? "one" : T extends 2 ? "two" : T extends 3 ? "three" : T extends 4 ? "four" : never;
+>OtherCond : Symbol(OtherCond, Decl(file.ts, 108, 1))
+>T : Symbol(T, Decl(file.ts, 111, 15))
+>T : Symbol(T, Decl(file.ts, 111, 15))
+>T : Symbol(T, Decl(file.ts, 111, 15))
+>T : Symbol(T, Decl(file.ts, 111, 15))
+>T : Symbol(T, Decl(file.ts, 111, 15))
+
+function f8<U extends 1 | 2, V extends 3 | 4>(x: U, y: V): OtherCond<U | V> {
+>f8 : Symbol(f8, Decl(file.ts, 111, 117))
+>U : Symbol(U, Decl(file.ts, 113, 12))
+>V : Symbol(V, Decl(file.ts, 113, 28))
+>x : Symbol(x, Decl(file.ts, 113, 46))
+>U : Symbol(U, Decl(file.ts, 113, 12))
+>y : Symbol(y, Decl(file.ts, 113, 51))
+>V : Symbol(V, Decl(file.ts, 113, 28))
+>OtherCond : Symbol(OtherCond, Decl(file.ts, 108, 1))
+>U : Symbol(U, Decl(file.ts, 113, 12))
+>V : Symbol(V, Decl(file.ts, 113, 28))
+
+    if (x === 1 && y === 3)  {
+>x : Symbol(x, Decl(file.ts, 113, 46))
+>y : Symbol(y, Decl(file.ts, 113, 51))
+
+        return "one";
+    }
+}
+
+// Conditionals with `infer` - will not narrow, it is not safe to infer from the narrowed type into an `infer` type parameter
+function f9<T extends "a"[] | "b"[] | number>(x: T): T extends Array<infer P> ? P : T extends number ? undefined : never {
+>f9 : Symbol(f9, Decl(file.ts, 117, 1))
+>T : Symbol(T, Decl(file.ts, 120, 12))
+>x : Symbol(x, Decl(file.ts, 120, 46))
+>T : Symbol(T, Decl(file.ts, 120, 12))
+>T : Symbol(T, Decl(file.ts, 120, 12))
+>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, --, --) ... and 4 more)
+>P : Symbol(P, Decl(file.ts, 120, 74))
+>P : Symbol(P, Decl(file.ts, 120, 74))
+>T : Symbol(T, Decl(file.ts, 120, 12))
+
+    if (Array.isArray(x)) {
+>Array.isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --))
+>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, --, --) ... and 4 more)
+>isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --))
+>x : Symbol(x, Decl(file.ts, 120, 46))
+
+        // If we allowed narrowing of the conditional return type, when resolving the conditional `T & ("a"[] | "b"[]) extends Array<infer P> ? P : ...`,
+        // we could infer `"a" | "b"` for `P`, and allow "a" to be returned. However, when calling `f10`, `T` could be instantiated with `"b"[]`, and the return type would be `"b"`,
+        // so allowing an `"a"` return would be unsound.
+        return "a";
+    }
+    return undefined;
+>undefined : Symbol(undefined)
+}
+
+
diff --git a/tests/baselines/reference/dependentReturnType6.types b/tests/baselines/reference/dependentReturnType6.types
new file mode 100644
index 0000000000000..f1831992e691f
--- /dev/null
+++ b/tests/baselines/reference/dependentReturnType6.types
@@ -0,0 +1,512 @@
+//// [tests/cases/compiler/dependentReturnType6.ts] ////
+
+=== Performance Stats ===
+Instantiation count: 5,000
+
+=== file.ts ===
+// Type parameter in outer scope
+function outer<T extends boolean>(x: T): number {
+>outer : <T extends boolean>(x: T) => number
+>      : ^ ^^^^^^^^^       ^^ ^^ ^^^^^      
+>x : T
+>  : ^
+
+    return inner();
+>inner() : T extends true ? 1 : T extends false ? 2 : never
+>        : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>inner : () => T extends true ? 1 : T extends false ? 2 : never
+>      : ^^^^^^                                                
+
+    function inner(): T extends true ? 1 : T extends false ? 2 : never {
+>inner : () => T extends true ? 1 : T extends false ? 2 : never
+>      : ^^^^^^                                                
+>true : true
+>     : ^^^^
+>false : false
+>      : ^^^^^
+
+        return x ? 1 : 2;
+>x ? 1 : 2 : 1 | 2
+>          : ^^^^^
+>x : T
+>  : ^
+>1 : 1
+>  : ^
+>2 : 2
+>  : ^
+    }
+}
+
+// Overloads
+function fun6<T extends boolean>(x: T, y: string): T extends true ? string : T extends false ? 2 : never;
+>fun6 : { <T extends boolean>(x: T, y: string): T extends true ? string : T extends false ? 2 : never; <T_1 extends boolean>(x: T_1, y: undefined): T_1 extends true ? 1 : T_1 extends false ? 2 : never; (x: boolean): 1 | 2 | string; }
+>     : ^^^ ^^^^^^^^^       ^^ ^^ ^^ ^^      ^^^                                                     ^^^^^^^^^^^^^^^       ^^ ^^   ^^ ^^         ^^^                                                    ^^^ ^^       ^^^              ^^^
+>x : T
+>  : ^
+>y : string
+>  : ^^^^^^
+>true : true
+>     : ^^^^
+>false : false
+>      : ^^^^^
+
+function fun6<T extends boolean>(x: T, y: undefined): T extends true ? 1 : T extends false ? 2 : never;
+>fun6 : { <T_1 extends boolean>(x: T_1, y: string): T_1 extends true ? string : T_1 extends false ? 2 : never; <T extends boolean>(x: T, y: undefined): T extends true ? 1 : T extends false ? 2 : never; (x: boolean): 1 | 2 | string; }
+>     : ^^^^^^^^^^^^^^^       ^^ ^^   ^^ ^^      ^^^                                                         ^^^ ^^^^^^^^^       ^^ ^^ ^^ ^^         ^^^                                                ^^^ ^^       ^^^              ^^^
+>x : T
+>  : ^
+>y : undefined
+>  : ^^^^^^^^^
+>true : true
+>     : ^^^^
+>false : false
+>      : ^^^^^
+
+function fun6(x: boolean): 1 | 2 | string;
+>fun6 : { <T extends boolean>(x: T, y: string): T extends true ? string : T extends false ? 2 : never; <T extends boolean>(x: T, y: undefined): T extends true ? 1 : T extends false ? 2 : never; (x: boolean): 1 | 2 | string; }
+>     : ^^^ ^^^^^^^^^       ^^ ^^ ^^ ^^      ^^^                                                     ^^^ ^^^^^^^^^       ^^ ^^ ^^ ^^         ^^^                                                ^^^ ^^       ^^^              ^^^
+>x : boolean
+>  : ^^^^^^^
+
+function fun6<T extends boolean>(x: T, y?: string): T extends true ? 1 | string : T extends false ? 2 : never {
+>fun6 : { <T_1 extends boolean>(x: T_1, y: string): T_1 extends true ? string : T_1 extends false ? 2 : never; <T_1 extends boolean>(x: T_1, y: undefined): T_1 extends true ? 1 : T_1 extends false ? 2 : never; (x: boolean): 1 | 2 | string; }
+>     : ^^^^^^^^^^^^^^^       ^^ ^^   ^^ ^^      ^^^                                                         ^^^^^^^^^^^^^^^       ^^ ^^   ^^ ^^         ^^^                                                    ^^^ ^^       ^^^              ^^^
+>x : T
+>  : ^
+>y : string | undefined
+>  : ^^^^^^^^^^^^^^^^^^
+>true : true
+>     : ^^^^
+>false : false
+>      : ^^^^^
+
+    return x ? y !== undefined ? y : 1 : 2;
+>x ? y !== undefined ? y : 1 : 2 : string | 1 | 2
+>                                : ^^^^^^^^^^^^^^
+>x : T
+>  : ^
+>y !== undefined ? y : 1 : string | 1
+>                        : ^^^^^^^^^^
+>y !== undefined : boolean
+>                : ^^^^^^^
+>y : string | undefined
+>  : ^^^^^^^^^^^^^^^^^^
+>undefined : undefined
+>          : ^^^^^^^^^
+>y : string
+>  : ^^^^^^
+>1 : 1
+>  : ^
+>2 : 2
+>  : ^
+}
+
+// Indexed access with conditional inside
+
+// DOESN'T NARROW the nested conditional type of wrong shape
+interface SomeInterfaceBad<T> {
+    prop1: T extends 1 ? true : T extends 2 ? false : never;
+>prop1 : T extends 1 ? true : T extends 2 ? false : never
+>      : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>true : true
+>     : ^^^^
+>false : false
+>      : ^^^^^
+
+    prop2: T extends true ? 1 : T extends false ? 2 : never;
+>prop2 : T extends true ? 1 : T extends false ? 2 : never
+>      : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>true : true
+>     : ^^^^
+>false : false
+>      : ^^^^^
+}
+
+function fun4bad<T, U extends keyof SomeInterfaceBad<unknown>>(x: T, y: U): SomeInterfaceBad<T>[U] {
+>fun4bad : <T, U extends keyof SomeInterfaceBad<unknown>>(x: T, y: U) => SomeInterfaceBad<T>[U]
+>        : ^ ^^ ^^^^^^^^^                               ^^ ^^ ^^ ^^ ^^^^^                      
+>x : T
+>  : ^
+>y : U
+>  : ^
+
+    if (y === "prop1") {
+>y === "prop1" : boolean
+>              : ^^^^^^^
+>y : U
+>  : ^
+>"prop1" : "prop1"
+>        : ^^^^^^^
+
+        return x === 1 ? true : false;
+>x === 1 ? true : false : boolean
+>                       : ^^^^^^^
+>x === 1 : boolean
+>        : ^^^^^^^
+>x : T
+>  : ^
+>1 : 1
+>  : ^
+>true : true
+>     : ^^^^
+>false : false
+>      : ^^^^^
+    }
+    return x ? 1 : 2;
+>x ? 1 : 2 : 1 | 2
+>          : ^^^^^
+>x : T
+>  : ^
+>1 : 1
+>  : ^
+>2 : 2
+>  : ^
+}
+
+// Narrows nested conditional type of right shape
+interface SomeInterfaceGood<T> {
+    prop1: T extends true ? 2 : T extends false ? 1 : never;
+>prop1 : T extends true ? 2 : T extends false ? 1 : never
+>      : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>true : true
+>     : ^^^^
+>false : false
+>      : ^^^^^
+
+    prop2: T extends true ? 1 : T extends false ? 2 : never;
+>prop2 : T extends true ? 1 : T extends false ? 2 : never
+>      : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>true : true
+>     : ^^^^
+>false : false
+>      : ^^^^^
+}
+
+function fun4good<T extends boolean, U extends keyof SomeInterfaceGood<unknown>>(x: T, y: U): SomeInterfaceGood<T>[U] {
+>fun4good : <T extends boolean, U extends keyof SomeInterfaceGood<unknown>>(x: T, y: U) => SomeInterfaceGood<T>[U]
+>         : ^ ^^^^^^^^^       ^^ ^^^^^^^^^                                ^^ ^^ ^^ ^^ ^^^^^                       
+>x : T
+>  : ^
+>y : U
+>  : ^
+
+    if (y === "prop1") {
+>y === "prop1" : boolean
+>              : ^^^^^^^
+>y : U
+>  : ^
+>"prop1" : "prop1"
+>        : ^^^^^^^
+
+        return x ? 2 : 1;
+>x ? 2 : 1 : 1 | 2
+>          : ^^^^^
+>x : T
+>  : ^
+>2 : 2
+>  : ^
+>1 : 1
+>  : ^
+    }
+    return x ? 1 : 2;
+>x ? 1 : 2 : 1 | 2
+>          : ^^^^^
+>x : T
+>  : ^
+>1 : 1
+>  : ^
+>2 : 2
+>  : ^
+}
+
+// Indexed access with indexed access inside - OK, narrows
+interface BB {
+    "a": number;
+>"a" : number
+>    : ^^^^^^
+
+    "b": string;
+>"b" : string
+>    : ^^^^^^
+}
+
+interface AA<T extends keyof BB> {
+    "c": BB[T];
+>"c" : BB[T]
+>    : ^^^^^
+
+    "d": boolean,
+>"d" : boolean
+>    : ^^^^^^^
+}
+
+function reduction<T extends keyof BB, U extends keyof AA<any>>(x: T, y: U): AA<T>[U] {
+>reduction : <T extends keyof BB, U extends keyof AA<any>>(x: T, y: U) => AA<T>[U]
+>          : ^ ^^^^^^^^^        ^^ ^^^^^^^^^             ^^ ^^ ^^ ^^ ^^^^^        
+>x : T
+>  : ^
+>y : U
+>  : ^
+
+    if (x === "a" && y === "c") {
+>x === "a" && y === "c" : boolean
+>                       : ^^^^^^^
+>x === "a" : boolean
+>          : ^^^^^^^
+>x : T
+>  : ^
+>"a" : "a"
+>    : ^^^
+>y === "c" : boolean
+>          : ^^^^^^^
+>y : U
+>  : ^
+>"c" : "c"
+>    : ^^^
+
+        return 0; // Ok
+>0 : 0
+>  : ^
+    }
+
+    return undefined as never;
+>undefined as never : never
+>                   : ^^^^^
+>undefined : undefined
+>          : ^^^^^^^^^
+}
+
+// Conditional with indexed access inside - OK, narrows
+function fun5<T extends 1 | 2, U extends keyof BB>(x: T, y: U): T extends 1 ? BB[U] : T extends 2 ? boolean : never {
+>fun5 : <T extends 1 | 2, U extends keyof BB>(x: T, y: U) => T extends 1 ? BB[U] : T extends 2 ? boolean : never
+>     : ^ ^^^^^^^^^     ^^ ^^^^^^^^^        ^^ ^^ ^^ ^^ ^^^^^                                                   
+>x : T
+>  : ^
+>y : U
+>  : ^
+
+    if (x === 1) {
+>x === 1 : boolean
+>        : ^^^^^^^
+>x : T
+>  : ^
+>1 : 1
+>  : ^
+
+        if (y === "a") {
+>y === "a" : boolean
+>          : ^^^^^^^
+>y : U
+>  : ^
+>"a" : "a"
+>    : ^^^
+
+            return 0;
+>0 : 0
+>  : ^
+        }
+        return "";
+>"" : ""
+>   : ^^
+    }
+    return true;
+>true : true
+>     : ^^^^
+}
+
+// `this` type parameter - Doesn't narrow
+abstract class SomeClass {
+>SomeClass : SomeClass
+>          : ^^^^^^^^^
+
+    fun3(this: Sub1 | Sub2): this extends Sub1 ? 1 : this extends Sub2 ? 2 : never {
+>fun3 : (this: Sub1 | Sub2) => this extends Sub1 ? 1 : this extends Sub2 ? 2 : never
+>     : ^    ^^           ^^^^^                                                     
+>this : Sub1 | Sub2
+>     : ^^^^^^^^^^^
+
+        if (this instanceof Sub1) {
+>this instanceof Sub1 : boolean
+>                     : ^^^^^^^
+>this : Sub1 | Sub2
+>     : ^^^^^^^^^^^
+>Sub1 : typeof Sub1
+>     : ^^^^^^^^^^^
+
+            return 1;
+>1 : 1
+>  : ^
+        }
+        return 2;
+>2 : 2
+>  : ^
+    }
+}
+class Sub1 extends SomeClass {
+>Sub1 : Sub1
+>     : ^^^^
+>SomeClass : SomeClass
+>          : ^^^^^^^^^
+
+    #sub1!: symbol;
+>#sub1 : symbol
+>      : ^^^^^^
+
+};
+class Sub2 extends SomeClass {
+>Sub2 : Sub2
+>     : ^^^^
+>SomeClass : SomeClass
+>          : ^^^^^^^^^
+
+    #sub2!: symbol;
+>#sub2 : symbol
+>      : ^^^^^^
+
+};
+
+// Detection of type parameter reference in presence of typeof
+function fun2<T extends boolean>(x: T, y: typeof x): T extends true ? 1 : T extends false ? 2 : never {
+>fun2 : <T extends boolean>(x: T, y: typeof x) => T extends true ? 1 : T extends false ? 2 : never
+>     : ^ ^^^^^^^^^       ^^ ^^ ^^ ^^        ^^^^^                                                
+>x : T
+>  : ^
+>y : T
+>  : ^
+>x : T
+>  : ^
+>true : true
+>     : ^^^^
+>false : false
+>      : ^^^^^
+
+    return x ? 1 : 2;
+>x ? 1 : 2 : 1 | 2
+>          : ^^^^^
+>x : T
+>  : ^
+>1 : 1
+>  : ^
+>2 : 2
+>  : ^
+}
+
+// Contextually-typed lambdas
+const fun1: <T extends boolean>(x: T) => T extends true ? 1 : T extends false ? 2 : never = (x) => x ? 1 : 2;
+>fun1 : <T extends boolean>(x: T) => T extends true ? 1 : T extends false ? 2 : never
+>     : ^ ^^^^^^^^^       ^^ ^^ ^^^^^                                                
+>x : T
+>  : ^
+>true : true
+>     : ^^^^
+>false : false
+>      : ^^^^^
+>(x) => x ? 1 : 2 : <T extends boolean>(x: T) => 1 | 2
+>                 : ^ ^^^^^^^^^       ^^ ^^^^^^^^^^^^^
+>x : T
+>  : ^
+>x ? 1 : 2 : 1 | 2
+>          : ^^^^^
+>x : T
+>  : ^
+>1 : 1
+>  : ^
+>2 : 2
+>  : ^
+
+
+// Circular conditionals
+type SomeCond<T> = T extends true ? 1 : T extends false ? SomeCond<T> : never;
+>SomeCond : SomeCond<T>
+>         : ^^^^^^^^^^^
+>true : true
+>     : ^^^^
+>false : false
+>      : ^^^^^
+
+function f7<T extends boolean>(x: T): SomeCond<T> {
+>f7 : <T extends boolean>(x: T) => SomeCond<T>
+>   : ^ ^^^^^^^^^       ^^ ^^ ^^^^^           
+>x : T
+>  : ^
+
+    if (x) {
+>x : T
+>  : ^
+
+        return 1;
+>1 : 1
+>  : ^
+    }
+    return 2;
+>2 : 2
+>  : ^
+}
+
+// Composite instantiation of conditional type
+type OtherCond<T> = T extends 1 ? "one" : T extends 2 ? "two" : T extends 3 ? "three" : T extends 4 ? "four" : never;
+>OtherCond : OtherCond<T>
+>          : ^^^^^^^^^^^^
+
+function f8<U extends 1 | 2, V extends 3 | 4>(x: U, y: V): OtherCond<U | V> {
+>f8 : <U extends 1 | 2, V extends 3 | 4>(x: U, y: V) => OtherCond<U | V>
+>   : ^ ^^^^^^^^^     ^^ ^^^^^^^^^     ^^ ^^ ^^ ^^ ^^^^^                
+>x : U
+>  : ^
+>y : V
+>  : ^
+
+    if (x === 1 && y === 3)  {
+>x === 1 && y === 3 : boolean
+>                   : ^^^^^^^
+>x === 1 : boolean
+>        : ^^^^^^^
+>x : U
+>  : ^
+>1 : 1
+>  : ^
+>y === 3 : boolean
+>        : ^^^^^^^
+>y : V
+>  : ^
+>3 : 3
+>  : ^
+
+        return "one";
+>"one" : "one"
+>      : ^^^^^
+    }
+}
+
+// Conditionals with `infer` - will not narrow, it is not safe to infer from the narrowed type into an `infer` type parameter
+function f9<T extends "a"[] | "b"[] | number>(x: T): T extends Array<infer P> ? P : T extends number ? undefined : never {
+>f9 : <T extends "a"[] | "b"[] | number>(x: T) => T extends Array<infer P> ? P : T extends number ? undefined : never
+>   : ^ ^^^^^^^^^                      ^^ ^^ ^^^^^                                                                   
+>x : T
+>  : ^
+
+    if (Array.isArray(x)) {
+>Array.isArray(x) : boolean
+>                 : ^^^^^^^
+>Array.isArray : (arg: any) => arg is any[]
+>              : ^   ^^   ^^^^^            
+>Array : ArrayConstructor
+>      : ^^^^^^^^^^^^^^^^
+>isArray : (arg: any) => arg is any[]
+>        : ^   ^^   ^^^^^            
+>x : number | "a"[] | "b"[]
+>  : ^^^^^^^^^^^^^^^^^^^^^^
+
+        // If we allowed narrowing of the conditional return type, when resolving the conditional `T & ("a"[] | "b"[]) extends Array<infer P> ? P : ...`,
+        // we could infer `"a" | "b"` for `P`, and allow "a" to be returned. However, when calling `f10`, `T` could be instantiated with `"b"[]`, and the return type would be `"b"`,
+        // so allowing an `"a"` return would be unsound.
+        return "a";
+>"a" : "a"
+>    : ^^^
+    }
+    return undefined;
+>undefined : undefined
+>          : ^^^^^^^^^
+}
+
+
diff --git a/tests/baselines/reference/dependentReturnType8.symbols b/tests/baselines/reference/dependentReturnType8.symbols
new file mode 100644
index 0000000000000..9151c3c4dde80
--- /dev/null
+++ b/tests/baselines/reference/dependentReturnType8.symbols
@@ -0,0 +1,30 @@
+//// [tests/cases/compiler/dependentReturnType8.ts] ////
+
+=== dependentReturnType8.ts ===
+export {};
+
+declare const record: Record<string, string[]>;
+>record : Symbol(record, Decl(dependentReturnType8.ts, 2, 13))
+>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --))
+
+declare const array: string[];
+>array : Symbol(array, Decl(dependentReturnType8.ts, 3, 13))
+
+// Arrow function with expression body
+const getObject =
+>getObject : Symbol(getObject, Decl(dependentReturnType8.ts, 6, 5))
+
+    <T extends string | undefined>(group: T): T extends string ? string[] : T extends undefined ? Record<string, string[]> : never =>
+>T : Symbol(T, Decl(dependentReturnType8.ts, 7, 5))
+>group : Symbol(group, Decl(dependentReturnType8.ts, 7, 35))
+>T : Symbol(T, Decl(dependentReturnType8.ts, 7, 5))
+>T : Symbol(T, Decl(dependentReturnType8.ts, 7, 5))
+>T : Symbol(T, Decl(dependentReturnType8.ts, 7, 5))
+>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --))
+
+        group === undefined ? record : array;
+>group : Symbol(group, Decl(dependentReturnType8.ts, 7, 35))
+>undefined : Symbol(undefined)
+>record : Symbol(record, Decl(dependentReturnType8.ts, 2, 13))
+>array : Symbol(array, Decl(dependentReturnType8.ts, 3, 13))
+
diff --git a/tests/baselines/reference/dependentReturnType8.types b/tests/baselines/reference/dependentReturnType8.types
new file mode 100644
index 0000000000000..c42a8b0bccb77
--- /dev/null
+++ b/tests/baselines/reference/dependentReturnType8.types
@@ -0,0 +1,38 @@
+//// [tests/cases/compiler/dependentReturnType8.ts] ////
+
+=== dependentReturnType8.ts ===
+export {};
+
+declare const record: Record<string, string[]>;
+>record : Record<string, string[]>
+>       : ^^^^^^^^^^^^^^^^^^^^^^^^
+
+declare const array: string[];
+>array : string[]
+>      : ^^^^^^^^
+
+// Arrow function with expression body
+const getObject =
+>getObject : <T extends string | undefined>(group: T) => T extends string ? string[] : T extends undefined ? Record<string, string[]> : never
+>          : ^ ^^^^^^^^^                  ^^     ^^ ^^^^^                                                                                    
+
+    <T extends string | undefined>(group: T): T extends string ? string[] : T extends undefined ? Record<string, string[]> : never =>
+><T extends string | undefined>(group: T): T extends string ? string[] : T extends undefined ? Record<string, string[]> : never =>        group === undefined ? record : array : <T extends string | undefined>(group: T) => T extends string ? string[] : T extends undefined ? Record<string, string[]> : never
+>                                                                                                                                                                              : ^ ^^^^^^^^^                  ^^     ^^ ^^^^^                                                                                    
+>group : T
+>      : ^
+
+        group === undefined ? record : array;
+>group === undefined ? record : array : string[] | Record<string, string[]>
+>                                     : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>group === undefined : boolean
+>                    : ^^^^^^^
+>group : T
+>      : ^
+>undefined : undefined
+>          : ^^^^^^^^^
+>record : Record<string, string[]>
+>       : ^^^^^^^^^^^^^^^^^^^^^^^^
+>array : string[]
+>      : ^^^^^^^^
+
diff --git a/tests/baselines/reference/dependentReturnType9.errors.txt b/tests/baselines/reference/dependentReturnType9.errors.txt
new file mode 100644
index 0000000000000..da12eeaab2eb4
--- /dev/null
+++ b/tests/baselines/reference/dependentReturnType9.errors.txt
@@ -0,0 +1,71 @@
+dependentReturnType9.ts(57,4): error TS2366: Function lacks ending return statement and return type does not include 'undefined'.
+
+
+==== dependentReturnType9.ts (1 errors) ====
+    type Payload =
+      | { _tag: "auth"; username: string; password: string }
+      | { _tag: "cart"; items: Array<{ id: string; quantity: number }> }
+      | { _tag: "person"; name: string; age: number };
+    
+    type PayloadContent = {
+      [P in Payload as P["_tag"]]: Omit<P, "_tag">;
+    };
+    
+    // ok, exhaustive cases and default case with throw
+    function mockPayload<P_TAG extends Payload["_tag"]>(
+      str: P_TAG,
+    ): PayloadContent[P_TAG] {
+      switch (str) {
+        case "auth":
+          return { username: "test", password: "admin" };
+        case "cart":
+          return { items: [{ id: "123", quantity: 123 }] };
+        case "person":
+          return { name: "andrea", age: 27 };
+        default:
+          throw new Error("unknown tag");
+      }
+    }
+    
+    // ok, non-exhaustive cases but default case with throw
+    function mockPayload2<P_TAG extends Payload["_tag"]>(
+      str: P_TAG,
+    ): PayloadContent[P_TAG] {
+      switch (str) {
+        case "auth":
+          return { username: "test", password: "admin" };
+        case "cart":
+          return { items: [{ id: "123", quantity: 123 }] };
+        default:
+          throw new Error("unhandled tag");
+      }
+    }
+    
+    // ok, exhaustive cases
+    function mockPayload3<P_TAG extends Payload["_tag"]>(
+      str: P_TAG,
+    ): PayloadContent[P_TAG] {
+      switch (str) {
+        case "auth":
+          return { username: "test", password: "admin" };
+        case "cart":
+          return { items: [{ id: "123", quantity: 123 }] };
+        case "person":
+          return { name: "andrea", age: 27 };
+      }
+    }
+    
+    // error, non-exhaustive cases
+    function mockPayload4<P_TAG extends Payload["_tag"]>(
+      str: P_TAG,
+    ): PayloadContent[P_TAG] {
+       ~~~~~~~~~~~~~~~~~~~~~
+!!! error TS2366: Function lacks ending return statement and return type does not include 'undefined'.
+      switch (str) {
+        case "auth":
+          return { username: "test", password: "admin" };
+        case "cart":
+          return { items: [{ id: "123", quantity: 123 }] };
+      }
+    }
+    
\ No newline at end of file
diff --git a/tests/baselines/reference/dependentReturnType9.symbols b/tests/baselines/reference/dependentReturnType9.symbols
new file mode 100644
index 0000000000000..d66bb2d76f040
--- /dev/null
+++ b/tests/baselines/reference/dependentReturnType9.symbols
@@ -0,0 +1,173 @@
+//// [tests/cases/compiler/dependentReturnType9.ts] ////
+
+=== dependentReturnType9.ts ===
+type Payload =
+>Payload : Symbol(Payload, Decl(dependentReturnType9.ts, 0, 0))
+
+  | { _tag: "auth"; username: string; password: string }
+>_tag : Symbol(_tag, Decl(dependentReturnType9.ts, 1, 5))
+>username : Symbol(username, Decl(dependentReturnType9.ts, 1, 19))
+>password : Symbol(password, Decl(dependentReturnType9.ts, 1, 37))
+
+  | { _tag: "cart"; items: Array<{ id: string; quantity: number }> }
+>_tag : Symbol(_tag, Decl(dependentReturnType9.ts, 2, 5))
+>items : Symbol(items, Decl(dependentReturnType9.ts, 2, 19))
+>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+>id : Symbol(id, Decl(dependentReturnType9.ts, 2, 34))
+>quantity : Symbol(quantity, Decl(dependentReturnType9.ts, 2, 46))
+
+  | { _tag: "person"; name: string; age: number };
+>_tag : Symbol(_tag, Decl(dependentReturnType9.ts, 3, 5))
+>name : Symbol(name, Decl(dependentReturnType9.ts, 3, 21))
+>age : Symbol(age, Decl(dependentReturnType9.ts, 3, 35))
+
+type PayloadContent = {
+>PayloadContent : Symbol(PayloadContent, Decl(dependentReturnType9.ts, 3, 50))
+
+  [P in Payload as P["_tag"]]: Omit<P, "_tag">;
+>P : Symbol(P, Decl(dependentReturnType9.ts, 6, 3))
+>Payload : Symbol(Payload, Decl(dependentReturnType9.ts, 0, 0))
+>P : Symbol(P, Decl(dependentReturnType9.ts, 6, 3))
+>Omit : Symbol(Omit, Decl(lib.es5.d.ts, --, --))
+>P : Symbol(P, Decl(dependentReturnType9.ts, 6, 3))
+
+};
+
+// ok, exhaustive cases and default case with throw
+function mockPayload<P_TAG extends Payload["_tag"]>(
+>mockPayload : Symbol(mockPayload, Decl(dependentReturnType9.ts, 7, 2))
+>P_TAG : Symbol(P_TAG, Decl(dependentReturnType9.ts, 10, 21))
+>Payload : Symbol(Payload, Decl(dependentReturnType9.ts, 0, 0))
+
+  str: P_TAG,
+>str : Symbol(str, Decl(dependentReturnType9.ts, 10, 52))
+>P_TAG : Symbol(P_TAG, Decl(dependentReturnType9.ts, 10, 21))
+
+): PayloadContent[P_TAG] {
+>PayloadContent : Symbol(PayloadContent, Decl(dependentReturnType9.ts, 3, 50))
+>P_TAG : Symbol(P_TAG, Decl(dependentReturnType9.ts, 10, 21))
+
+  switch (str) {
+>str : Symbol(str, Decl(dependentReturnType9.ts, 10, 52))
+
+    case "auth":
+      return { username: "test", password: "admin" };
+>username : Symbol(username, Decl(dependentReturnType9.ts, 15, 14))
+>password : Symbol(password, Decl(dependentReturnType9.ts, 15, 32))
+
+    case "cart":
+      return { items: [{ id: "123", quantity: 123 }] };
+>items : Symbol(items, Decl(dependentReturnType9.ts, 17, 14))
+>id : Symbol(id, Decl(dependentReturnType9.ts, 17, 24))
+>quantity : Symbol(quantity, Decl(dependentReturnType9.ts, 17, 35))
+
+    case "person":
+      return { name: "andrea", age: 27 };
+>name : Symbol(name, Decl(dependentReturnType9.ts, 19, 14))
+>age : Symbol(age, Decl(dependentReturnType9.ts, 19, 30))
+
+    default:
+      throw new Error("unknown tag");
+>Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+  }
+}
+
+// ok, non-exhaustive cases but default case with throw
+function mockPayload2<P_TAG extends Payload["_tag"]>(
+>mockPayload2 : Symbol(mockPayload2, Decl(dependentReturnType9.ts, 23, 1))
+>P_TAG : Symbol(P_TAG, Decl(dependentReturnType9.ts, 26, 22))
+>Payload : Symbol(Payload, Decl(dependentReturnType9.ts, 0, 0))
+
+  str: P_TAG,
+>str : Symbol(str, Decl(dependentReturnType9.ts, 26, 53))
+>P_TAG : Symbol(P_TAG, Decl(dependentReturnType9.ts, 26, 22))
+
+): PayloadContent[P_TAG] {
+>PayloadContent : Symbol(PayloadContent, Decl(dependentReturnType9.ts, 3, 50))
+>P_TAG : Symbol(P_TAG, Decl(dependentReturnType9.ts, 26, 22))
+
+  switch (str) {
+>str : Symbol(str, Decl(dependentReturnType9.ts, 26, 53))
+
+    case "auth":
+      return { username: "test", password: "admin" };
+>username : Symbol(username, Decl(dependentReturnType9.ts, 31, 14))
+>password : Symbol(password, Decl(dependentReturnType9.ts, 31, 32))
+
+    case "cart":
+      return { items: [{ id: "123", quantity: 123 }] };
+>items : Symbol(items, Decl(dependentReturnType9.ts, 33, 14))
+>id : Symbol(id, Decl(dependentReturnType9.ts, 33, 24))
+>quantity : Symbol(quantity, Decl(dependentReturnType9.ts, 33, 35))
+
+    default:
+      throw new Error("unhandled tag");
+>Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+  }
+}
+
+// ok, exhaustive cases
+function mockPayload3<P_TAG extends Payload["_tag"]>(
+>mockPayload3 : Symbol(mockPayload3, Decl(dependentReturnType9.ts, 37, 1))
+>P_TAG : Symbol(P_TAG, Decl(dependentReturnType9.ts, 40, 22))
+>Payload : Symbol(Payload, Decl(dependentReturnType9.ts, 0, 0))
+
+  str: P_TAG,
+>str : Symbol(str, Decl(dependentReturnType9.ts, 40, 53))
+>P_TAG : Symbol(P_TAG, Decl(dependentReturnType9.ts, 40, 22))
+
+): PayloadContent[P_TAG] {
+>PayloadContent : Symbol(PayloadContent, Decl(dependentReturnType9.ts, 3, 50))
+>P_TAG : Symbol(P_TAG, Decl(dependentReturnType9.ts, 40, 22))
+
+  switch (str) {
+>str : Symbol(str, Decl(dependentReturnType9.ts, 40, 53))
+
+    case "auth":
+      return { username: "test", password: "admin" };
+>username : Symbol(username, Decl(dependentReturnType9.ts, 45, 14))
+>password : Symbol(password, Decl(dependentReturnType9.ts, 45, 32))
+
+    case "cart":
+      return { items: [{ id: "123", quantity: 123 }] };
+>items : Symbol(items, Decl(dependentReturnType9.ts, 47, 14))
+>id : Symbol(id, Decl(dependentReturnType9.ts, 47, 24))
+>quantity : Symbol(quantity, Decl(dependentReturnType9.ts, 47, 35))
+
+    case "person":
+      return { name: "andrea", age: 27 };
+>name : Symbol(name, Decl(dependentReturnType9.ts, 49, 14))
+>age : Symbol(age, Decl(dependentReturnType9.ts, 49, 30))
+  }
+}
+
+// error, non-exhaustive cases
+function mockPayload4<P_TAG extends Payload["_tag"]>(
+>mockPayload4 : Symbol(mockPayload4, Decl(dependentReturnType9.ts, 51, 1))
+>P_TAG : Symbol(P_TAG, Decl(dependentReturnType9.ts, 54, 22))
+>Payload : Symbol(Payload, Decl(dependentReturnType9.ts, 0, 0))
+
+  str: P_TAG,
+>str : Symbol(str, Decl(dependentReturnType9.ts, 54, 53))
+>P_TAG : Symbol(P_TAG, Decl(dependentReturnType9.ts, 54, 22))
+
+): PayloadContent[P_TAG] {
+>PayloadContent : Symbol(PayloadContent, Decl(dependentReturnType9.ts, 3, 50))
+>P_TAG : Symbol(P_TAG, Decl(dependentReturnType9.ts, 54, 22))
+
+  switch (str) {
+>str : Symbol(str, Decl(dependentReturnType9.ts, 54, 53))
+
+    case "auth":
+      return { username: "test", password: "admin" };
+>username : Symbol(username, Decl(dependentReturnType9.ts, 59, 14))
+>password : Symbol(password, Decl(dependentReturnType9.ts, 59, 32))
+
+    case "cart":
+      return { items: [{ id: "123", quantity: 123 }] };
+>items : Symbol(items, Decl(dependentReturnType9.ts, 61, 14))
+>id : Symbol(id, Decl(dependentReturnType9.ts, 61, 24))
+>quantity : Symbol(quantity, Decl(dependentReturnType9.ts, 61, 35))
+  }
+}
+
diff --git a/tests/baselines/reference/dependentReturnType9.types b/tests/baselines/reference/dependentReturnType9.types
new file mode 100644
index 0000000000000..834e5f578388b
--- /dev/null
+++ b/tests/baselines/reference/dependentReturnType9.types
@@ -0,0 +1,306 @@
+//// [tests/cases/compiler/dependentReturnType9.ts] ////
+
+=== dependentReturnType9.ts ===
+type Payload =
+>Payload : Payload
+>        : ^^^^^^^
+
+  | { _tag: "auth"; username: string; password: string }
+>_tag : "auth"
+>     : ^^^^^^
+>username : string
+>         : ^^^^^^
+>password : string
+>         : ^^^^^^
+
+  | { _tag: "cart"; items: Array<{ id: string; quantity: number }> }
+>_tag : "cart"
+>     : ^^^^^^
+>items : { id: string; quantity: number; }[]
+>      : ^^^^^^      ^^^^^^^^^^^^      ^^^^^
+>id : string
+>   : ^^^^^^
+>quantity : number
+>         : ^^^^^^
+
+  | { _tag: "person"; name: string; age: number };
+>_tag : "person"
+>     : ^^^^^^^^
+>name : string
+>     : ^^^^^^
+>age : number
+>    : ^^^^^^
+
+type PayloadContent = {
+>PayloadContent : PayloadContent
+>               : ^^^^^^^^^^^^^^
+
+  [P in Payload as P["_tag"]]: Omit<P, "_tag">;
+};
+
+// ok, exhaustive cases and default case with throw
+function mockPayload<P_TAG extends Payload["_tag"]>(
+>mockPayload : <P_TAG extends Payload["_tag"]>(str: P_TAG) => PayloadContent[P_TAG]
+>            : ^     ^^^^^^^^^               ^^   ^^     ^^^^^                     
+
+  str: P_TAG,
+>str : P_TAG
+>    : ^^^^^
+
+): PayloadContent[P_TAG] {
+  switch (str) {
+>str : P_TAG
+>    : ^^^^^
+
+    case "auth":
+>"auth" : "auth"
+>       : ^^^^^^
+
+      return { username: "test", password: "admin" };
+>{ username: "test", password: "admin" } : { username: string; password: string; }
+>                                        : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>username : string
+>         : ^^^^^^
+>"test" : "test"
+>       : ^^^^^^
+>password : string
+>         : ^^^^^^
+>"admin" : "admin"
+>        : ^^^^^^^
+
+    case "cart":
+>"cart" : "cart"
+>       : ^^^^^^
+
+      return { items: [{ id: "123", quantity: 123 }] };
+>{ items: [{ id: "123", quantity: 123 }] } : { items: { id: string; quantity: number; }[]; }
+>                                          : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>items : { id: string; quantity: number; }[]
+>      : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>[{ id: "123", quantity: 123 }] : { id: string; quantity: number; }[]
+>                               : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>{ id: "123", quantity: 123 } : { id: string; quantity: number; }
+>                             : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>id : string
+>   : ^^^^^^
+>"123" : "123"
+>      : ^^^^^
+>quantity : number
+>         : ^^^^^^
+>123 : 123
+>    : ^^^
+
+    case "person":
+>"person" : "person"
+>         : ^^^^^^^^
+
+      return { name: "andrea", age: 27 };
+>{ name: "andrea", age: 27 } : { name: string; age: number; }
+>                            : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>name : string
+>     : ^^^^^^
+>"andrea" : "andrea"
+>         : ^^^^^^^^
+>age : number
+>    : ^^^^^^
+>27 : 27
+>   : ^^
+
+    default:
+      throw new Error("unknown tag");
+>new Error("unknown tag") : Error
+>                         : ^^^^^
+>Error : ErrorConstructor
+>      : ^^^^^^^^^^^^^^^^
+>"unknown tag" : "unknown tag"
+>              : ^^^^^^^^^^^^^
+  }
+}
+
+// ok, non-exhaustive cases but default case with throw
+function mockPayload2<P_TAG extends Payload["_tag"]>(
+>mockPayload2 : <P_TAG extends Payload["_tag"]>(str: P_TAG) => PayloadContent[P_TAG]
+>             : ^     ^^^^^^^^^               ^^   ^^     ^^^^^                     
+
+  str: P_TAG,
+>str : P_TAG
+>    : ^^^^^
+
+): PayloadContent[P_TAG] {
+  switch (str) {
+>str : P_TAG
+>    : ^^^^^
+
+    case "auth":
+>"auth" : "auth"
+>       : ^^^^^^
+
+      return { username: "test", password: "admin" };
+>{ username: "test", password: "admin" } : { username: string; password: string; }
+>                                        : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>username : string
+>         : ^^^^^^
+>"test" : "test"
+>       : ^^^^^^
+>password : string
+>         : ^^^^^^
+>"admin" : "admin"
+>        : ^^^^^^^
+
+    case "cart":
+>"cart" : "cart"
+>       : ^^^^^^
+
+      return { items: [{ id: "123", quantity: 123 }] };
+>{ items: [{ id: "123", quantity: 123 }] } : { items: { id: string; quantity: number; }[]; }
+>                                          : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>items : { id: string; quantity: number; }[]
+>      : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>[{ id: "123", quantity: 123 }] : { id: string; quantity: number; }[]
+>                               : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>{ id: "123", quantity: 123 } : { id: string; quantity: number; }
+>                             : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>id : string
+>   : ^^^^^^
+>"123" : "123"
+>      : ^^^^^
+>quantity : number
+>         : ^^^^^^
+>123 : 123
+>    : ^^^
+
+    default:
+      throw new Error("unhandled tag");
+>new Error("unhandled tag") : Error
+>                           : ^^^^^
+>Error : ErrorConstructor
+>      : ^^^^^^^^^^^^^^^^
+>"unhandled tag" : "unhandled tag"
+>                : ^^^^^^^^^^^^^^^
+  }
+}
+
+// ok, exhaustive cases
+function mockPayload3<P_TAG extends Payload["_tag"]>(
+>mockPayload3 : <P_TAG extends Payload["_tag"]>(str: P_TAG) => PayloadContent[P_TAG]
+>             : ^     ^^^^^^^^^               ^^   ^^     ^^^^^                     
+
+  str: P_TAG,
+>str : P_TAG
+>    : ^^^^^
+
+): PayloadContent[P_TAG] {
+  switch (str) {
+>str : P_TAG
+>    : ^^^^^
+
+    case "auth":
+>"auth" : "auth"
+>       : ^^^^^^
+
+      return { username: "test", password: "admin" };
+>{ username: "test", password: "admin" } : { username: string; password: string; }
+>                                        : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>username : string
+>         : ^^^^^^
+>"test" : "test"
+>       : ^^^^^^
+>password : string
+>         : ^^^^^^
+>"admin" : "admin"
+>        : ^^^^^^^
+
+    case "cart":
+>"cart" : "cart"
+>       : ^^^^^^
+
+      return { items: [{ id: "123", quantity: 123 }] };
+>{ items: [{ id: "123", quantity: 123 }] } : { items: { id: string; quantity: number; }[]; }
+>                                          : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>items : { id: string; quantity: number; }[]
+>      : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>[{ id: "123", quantity: 123 }] : { id: string; quantity: number; }[]
+>                               : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>{ id: "123", quantity: 123 } : { id: string; quantity: number; }
+>                             : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>id : string
+>   : ^^^^^^
+>"123" : "123"
+>      : ^^^^^
+>quantity : number
+>         : ^^^^^^
+>123 : 123
+>    : ^^^
+
+    case "person":
+>"person" : "person"
+>         : ^^^^^^^^
+
+      return { name: "andrea", age: 27 };
+>{ name: "andrea", age: 27 } : { name: string; age: number; }
+>                            : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>name : string
+>     : ^^^^^^
+>"andrea" : "andrea"
+>         : ^^^^^^^^
+>age : number
+>    : ^^^^^^
+>27 : 27
+>   : ^^
+  }
+}
+
+// error, non-exhaustive cases
+function mockPayload4<P_TAG extends Payload["_tag"]>(
+>mockPayload4 : <P_TAG extends Payload["_tag"]>(str: P_TAG) => PayloadContent[P_TAG]
+>             : ^     ^^^^^^^^^               ^^   ^^     ^^^^^                     
+
+  str: P_TAG,
+>str : P_TAG
+>    : ^^^^^
+
+): PayloadContent[P_TAG] {
+  switch (str) {
+>str : P_TAG
+>    : ^^^^^
+
+    case "auth":
+>"auth" : "auth"
+>       : ^^^^^^
+
+      return { username: "test", password: "admin" };
+>{ username: "test", password: "admin" } : { username: string; password: string; }
+>                                        : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>username : string
+>         : ^^^^^^
+>"test" : "test"
+>       : ^^^^^^
+>password : string
+>         : ^^^^^^
+>"admin" : "admin"
+>        : ^^^^^^^
+
+    case "cart":
+>"cart" : "cart"
+>       : ^^^^^^
+
+      return { items: [{ id: "123", quantity: 123 }] };
+>{ items: [{ id: "123", quantity: 123 }] } : { items: { id: string; quantity: number; }[]; }
+>                                          : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>items : { id: string; quantity: number; }[]
+>      : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>[{ id: "123", quantity: 123 }] : { id: string; quantity: number; }[]
+>                               : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>{ id: "123", quantity: 123 } : { id: string; quantity: number; }
+>                             : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>id : string
+>   : ^^^^^^
+>"123" : "123"
+>      : ^^^^^
+>quantity : number
+>         : ^^^^^^
+>123 : 123
+>    : ^^^
+  }
+}
+
diff --git a/tests/baselines/reference/duplicateIdentifierBindingElementInParameterDeclaration1.types b/tests/baselines/reference/duplicateIdentifierBindingElementInParameterDeclaration1.types
index e522c270b4ebd..0428b2813d9a4 100644
--- a/tests/baselines/reference/duplicateIdentifierBindingElementInParameterDeclaration1.types
+++ b/tests/baselines/reference/duplicateIdentifierBindingElementInParameterDeclaration1.types
@@ -79,7 +79,7 @@ function f6([f, ...f]) { }
 
 function f7(a, func = (a) => { return 1 }) { }  // not error
 >f7 : (a: any, func?: (a: any) => number) => void
->   : ^ ^^^^^^^    ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^
+>   : ^ ^^^^^^^    ^^^^   ^^^^^^^^^^^^^^^^^^^^^^^
 >a : any
 >  : ^^^
 >func : (a: any) => number
diff --git a/tests/baselines/reference/duplicateIdentifierBindingElementInParameterDeclaration2.types b/tests/baselines/reference/duplicateIdentifierBindingElementInParameterDeclaration2.types
index f3bd469381583..5d86eb8582f97 100644
--- a/tests/baselines/reference/duplicateIdentifierBindingElementInParameterDeclaration2.types
+++ b/tests/baselines/reference/duplicateIdentifierBindingElementInParameterDeclaration2.types
@@ -83,7 +83,7 @@ function f6([f, ...f]) { }
 
 function f7(a, func = (a) => { return 1 }){ }  // not error
 >f7 : (a: any, func?: (a: any) => number) => void
->   : ^ ^^^^^^^    ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^
+>   : ^ ^^^^^^^    ^^^^   ^^^^^^^^^^^^^^^^^^^^^^^
 >a : any
 >  : ^^^
 >func : (a: any) => number
diff --git a/tests/baselines/reference/elidedJSImport2(module=commonjs).js b/tests/baselines/reference/elidedJSImport2(module=commonjs).js
index 6cfa0b9cdd53f..6709fa9d1e452 100644
--- a/tests/baselines/reference/elidedJSImport2(module=commonjs).js
+++ b/tests/baselines/reference/elidedJSImport2(module=commonjs).js
@@ -46,13 +46,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 var __importDefault = (this && this.__importDefault) || function (mod) {
     return (mod && mod.__esModule) ? mod : { "default": mod };
 };
diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08.types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08.types
index c68e418bf65c2..b47b22daec481 100644
--- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08.types
+++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08.types
@@ -8,9 +8,9 @@ function f(arguments) {
 
     var a = () => (arguments) => arguments;
 >a : () => (arguments: any) => any
->  : ^^^^^^^         ^^^^^^^^^^^^^
+>  : ^^^^^^^           ^^^^^^^^^^^
 >() => (arguments) => arguments : () => (arguments: any) => any
->                               : ^^^^^^^         ^^^^^^^^^^^^^
+>                               : ^^^^^^^           ^^^^^^^^^^^
 >(arguments) => arguments : (arguments: any) => any
 >                         : ^         ^^^^^^^^^^^^^
 >arguments : any
diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6.types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6.types
index d1207c2a72b7c..0f6f1c03d6407 100644
--- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6.types
+++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6.types
@@ -8,9 +8,9 @@ function f(arguments) {
 
     var a = () => (arguments) => arguments;
 >a : () => (arguments: any) => any
->  : ^^^^^^^         ^^^^^^^^^^^^^
+>  : ^^^^^^^           ^^^^^^^^^^^
 >() => (arguments) => arguments : () => (arguments: any) => any
->                               : ^^^^^^^         ^^^^^^^^^^^^^
+>                               : ^^^^^^^           ^^^^^^^^^^^
 >(arguments) => arguments : (arguments: any) => any
 >                         : ^         ^^^^^^^^^^^^^
 >arguments : any
diff --git a/tests/baselines/reference/emitThisInObjectLiteralGetter.types b/tests/baselines/reference/emitThisInObjectLiteralGetter.types
index 82187319bd4ce..9b6084af63471 100644
--- a/tests/baselines/reference/emitThisInObjectLiteralGetter.types
+++ b/tests/baselines/reference/emitThisInObjectLiteralGetter.types
@@ -3,9 +3,9 @@
 === emitThisInObjectLiteralGetter.ts ===
 const example = {
 >example : { readonly foo: (item: any) => any; }
->        : ^^^^^^^^^^^^^^^^^    ^^^^^^^^^^^^^^^^
+>        : ^^^^^^^^^^^^^^^^^      ^^^^^^^^^^^^^^
 >{    get foo() {        return item => this.bar(item);    }} : { readonly foo: (item: any) => any; }
->                                                             : ^^^^^^^^^^^^^^^^^    ^^^^^^^^^^^^^^^^
+>                                                             : ^^^^^^^^^^^^^^^^^      ^^^^^^^^^^^^^^
 
     get foo() {
 >foo : (item: any) => any
diff --git a/tests/baselines/reference/esDecorators-contextualTypes.2.types b/tests/baselines/reference/esDecorators-contextualTypes.2.types
index 8e662b83fdc46..7daa7b43500c6 100644
--- a/tests/baselines/reference/esDecorators-contextualTypes.2.types
+++ b/tests/baselines/reference/esDecorators-contextualTypes.2.types
@@ -9,7 +9,7 @@ class C {
 >boundMethodLogger("Yadda", /*bound*/ true) : (target: (this: C) => void, context: ClassMethodDecoratorContext<C, (this: C) => void>) => (this: C) => void
 >                                           : ^      ^^^    ^^^^^^^^^^^^^^       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^    ^^^^^^^^^^^^^^^^^^^    ^^^^^^^^^^^^
 >boundMethodLogger : <This, Args extends any[], Return>(source: string, bound?: boolean) => (target: (this: This, ...args: Args) => Return, context: ClassMethodDecoratorContext<This, (this: This, ...args: Args) => Return>) => ((this: This, ...args: Args) => Return)
->                  : ^    ^^    ^^^^^^^^^     ^^      ^^      ^^      ^^     ^^^^^^^^^^^^^^^^      ^^                                     ^^       ^^                                                                        ^^^^^                                       
+>                  : ^    ^^    ^^^^^^^^^     ^^      ^^      ^^      ^^     ^^^^^^^^^^^^^^^^                                             ^^                                                                                 ^^^^^                                       
 >"Yadda" : "Yadda"
 >        : ^^^^^^^
 >true : true
@@ -53,7 +53,7 @@ export { C };
 
 function boundMethodLogger<This, Args extends any[], Return>(source: string, bound = true) {
 >boundMethodLogger : <This, Args extends any[], Return>(source: string, bound?: boolean) => (target: (this: This, ...args: Args) => Return, context: ClassMethodDecoratorContext<This, (this: This, ...args: Args) => Return>) => ((this: This, ...args: Args) => Return)
->                  : ^    ^^    ^^^^^^^^^     ^^      ^^      ^^      ^^     ^^^^^^^^^^^^^^^^      ^^                                     ^^       ^^                                                                        ^^^^^                                       
+>                  : ^    ^^    ^^^^^^^^^     ^^      ^^      ^^      ^^     ^^^^^^^^^^^^^^^^                                             ^^                                                                                 ^^^^^                                       
 >source : string
 >       : ^^^^^^
 >bound : boolean
diff --git a/tests/baselines/reference/esModuleInterop.js b/tests/baselines/reference/esModuleInterop.js
index 7fc4766128144..dfa6714dfb553 100644
--- a/tests/baselines/reference/esModuleInterop.js
+++ b/tests/baselines/reference/esModuleInterop.js
@@ -36,13 +36,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 var __importDefault = (this && this.__importDefault) || function (mod) {
     return (mod && mod.__esModule) ? mod : { "default": mod };
 };
diff --git a/tests/baselines/reference/esModuleInteropDefaultImports.js b/tests/baselines/reference/esModuleInteropDefaultImports.js
index eafda0be85ead..bdbca9c602068 100644
--- a/tests/baselines/reference/esModuleInteropDefaultImports.js
+++ b/tests/baselines/reference/esModuleInteropDefaultImports.js
@@ -62,13 +62,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 var __importDefault = (this && this.__importDefault) || function (mod) {
     return (mod && mod.__esModule) ? mod : { "default": mod };
 };
diff --git a/tests/baselines/reference/esModuleInteropImportCall.js b/tests/baselines/reference/esModuleInteropImportCall.js
index 0defb7297d999..3b77991c066a8 100644
--- a/tests/baselines/reference/esModuleInteropImportCall.js
+++ b/tests/baselines/reference/esModuleInteropImportCall.js
@@ -27,13 +27,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Promise.resolve().then(function () { return __importStar(require("./foo")); }).then(function (f) {
     f.default;
 });
diff --git a/tests/baselines/reference/esModuleInteropImportNamespace.js b/tests/baselines/reference/esModuleInteropImportNamespace.js
index 3bbcde7aa65cb..f87145c51b80a 100644
--- a/tests/baselines/reference/esModuleInteropImportNamespace.js
+++ b/tests/baselines/reference/esModuleInteropImportNamespace.js
@@ -28,13 +28,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 var foo = __importStar(require("./foo"));
 foo.default;
diff --git a/tests/baselines/reference/esModuleInteropNamedDefaultImports.js b/tests/baselines/reference/esModuleInteropNamedDefaultImports.js
index 3d46bb0bd2263..3e6d66ca8d17a 100644
--- a/tests/baselines/reference/esModuleInteropNamedDefaultImports.js
+++ b/tests/baselines/reference/esModuleInteropNamedDefaultImports.js
@@ -46,13 +46,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 var __importDefault = (this && this.__importDefault) || function (mod) {
     return (mod && mod.__esModule) ? mod : { "default": mod };
 };
diff --git a/tests/baselines/reference/esModuleInteropPrettyErrorRelatedInformation.js b/tests/baselines/reference/esModuleInteropPrettyErrorRelatedInformation.js
index 903fe6cfedb9e..c771d97ce68b8 100644
--- a/tests/baselines/reference/esModuleInteropPrettyErrorRelatedInformation.js
+++ b/tests/baselines/reference/esModuleInteropPrettyErrorRelatedInformation.js
@@ -28,13 +28,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 var foo = __importStar(require("./foo"));
 function invoke(f) { f(); }
diff --git a/tests/baselines/reference/esModuleInteropUsesExportStarWhenDefaultPlusNames.js b/tests/baselines/reference/esModuleInteropUsesExportStarWhenDefaultPlusNames.js
index 41377087f314a..47a596f509127 100644
--- a/tests/baselines/reference/esModuleInteropUsesExportStarWhenDefaultPlusNames.js
+++ b/tests/baselines/reference/esModuleInteropUsesExportStarWhenDefaultPlusNames.js
@@ -23,13 +23,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 var dep_1 = __importStar(require("./dep"));
 void dep_1.default;
diff --git a/tests/baselines/reference/esModuleInteropWithExportStar.js b/tests/baselines/reference/esModuleInteropWithExportStar.js
index b52b84ecbf484..afca8d846cb6f 100644
--- a/tests/baselines/reference/esModuleInteropWithExportStar.js
+++ b/tests/baselines/reference/esModuleInteropWithExportStar.js
@@ -30,13 +30,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 var __exportStar = (this && this.__exportStar) || function(m, exports) {
     for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
 };
diff --git a/tests/baselines/reference/esModuleIntersectionCrash.js b/tests/baselines/reference/esModuleIntersectionCrash.js
index 54644a786816e..9dda130c9be33 100644
--- a/tests/baselines/reference/esModuleIntersectionCrash.js
+++ b/tests/baselines/reference/esModuleIntersectionCrash.js
@@ -30,13 +30,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 var mod = __importStar(require("./mod"));
 mod.a;
diff --git a/tests/baselines/reference/exportAsNamespace2(module=amd).js b/tests/baselines/reference/exportAsNamespace2(module=amd).js
index 206ebc540ec03..6d96465116c40 100644
--- a/tests/baselines/reference/exportAsNamespace2(module=amd).js
+++ b/tests/baselines/reference/exportAsNamespace2(module=amd).js
@@ -40,13 +40,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 define(["require", "exports", "./0"], function (require, exports, ns) {
     "use strict";
     Object.defineProperty(exports, "__esModule", { value: true });
@@ -72,13 +82,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 define(["require", "exports", "./1"], function (require, exports, foo) {
     "use strict";
     Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/tests/baselines/reference/exportAsNamespace2(module=commonjs).js b/tests/baselines/reference/exportAsNamespace2(module=commonjs).js
index 1b01d88024ba0..2a30d56343dc1 100644
--- a/tests/baselines/reference/exportAsNamespace2(module=commonjs).js
+++ b/tests/baselines/reference/exportAsNamespace2(module=commonjs).js
@@ -39,13 +39,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.ns = void 0;
 exports.ns = __importStar(require("./0"));
@@ -69,13 +79,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 var foo = __importStar(require("./1"));
 foo.ns.a;
diff --git a/tests/baselines/reference/exportAsNamespace2(module=umd).js b/tests/baselines/reference/exportAsNamespace2(module=umd).js
index df4d21d62d05e..0d00483e33978 100644
--- a/tests/baselines/reference/exportAsNamespace2(module=umd).js
+++ b/tests/baselines/reference/exportAsNamespace2(module=umd).js
@@ -48,13 +48,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 (function (factory) {
     if (typeof module === "object" && typeof module.exports === "object") {
         var v = factory(require, exports);
@@ -88,13 +98,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 (function (factory) {
     if (typeof module === "object" && typeof module.exports === "object") {
         var v = factory(require, exports);
diff --git a/tests/baselines/reference/exportAsNamespace3(module=amd).js b/tests/baselines/reference/exportAsNamespace3(module=amd).js
index 499fca43328b2..5534074ddcd5d 100644
--- a/tests/baselines/reference/exportAsNamespace3(module=amd).js
+++ b/tests/baselines/reference/exportAsNamespace3(module=amd).js
@@ -43,13 +43,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 define(["require", "exports", "./0"], function (require, exports, ns) {
     "use strict";
     Object.defineProperty(exports, "__esModule", { value: true });
@@ -78,13 +88,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 define(["require", "exports", "./1"], function (require, exports, foo) {
     "use strict";
     Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/tests/baselines/reference/exportAsNamespace3(module=commonjs).js b/tests/baselines/reference/exportAsNamespace3(module=commonjs).js
index e4b2d67ce91af..6041d7ed9d048 100644
--- a/tests/baselines/reference/exportAsNamespace3(module=commonjs).js
+++ b/tests/baselines/reference/exportAsNamespace3(module=commonjs).js
@@ -42,13 +42,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.ns = void 0;
 exports.ns = __importStar(require("./0"));
@@ -75,13 +85,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 var foo = __importStar(require("./1"));
 foo.ns.a;
diff --git a/tests/baselines/reference/exportAsNamespace3(module=umd).js b/tests/baselines/reference/exportAsNamespace3(module=umd).js
index af2aad50c8cc0..6429a7572635c 100644
--- a/tests/baselines/reference/exportAsNamespace3(module=umd).js
+++ b/tests/baselines/reference/exportAsNamespace3(module=umd).js
@@ -51,13 +51,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 (function (factory) {
     if (typeof module === "object" && typeof module.exports === "object") {
         var v = factory(require, exports);
@@ -94,13 +104,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 (function (factory) {
     if (typeof module === "object" && typeof module.exports === "object") {
         var v = factory(require, exports);
diff --git a/tests/baselines/reference/exportAsNamespace4(module=amd).js b/tests/baselines/reference/exportAsNamespace4(module=amd).js
index d9e6470b31a1d..7f33f01907b06 100644
--- a/tests/baselines/reference/exportAsNamespace4(module=amd).js
+++ b/tests/baselines/reference/exportAsNamespace4(module=amd).js
@@ -46,13 +46,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 define(["require", "exports", "./0"], function (require, exports, _0_1) {
     "use strict";
     Object.defineProperty(exports, "__esModule", { value: true });
@@ -76,13 +86,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 define(["require", "exports", "./0"], function (require, exports, ns) {
     "use strict";
     Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/tests/baselines/reference/exportAsNamespace4(module=commonjs).js b/tests/baselines/reference/exportAsNamespace4(module=commonjs).js
index 60f213ca826c4..626bb73714ea0 100644
--- a/tests/baselines/reference/exportAsNamespace4(module=commonjs).js
+++ b/tests/baselines/reference/exportAsNamespace4(module=commonjs).js
@@ -45,13 +45,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.default = void 0;
 exports.default = __importStar(require("./0"));
@@ -73,13 +83,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 var ns = __importStar(require("./0"));
 exports.default = ns;
diff --git a/tests/baselines/reference/exportAsNamespace4(module=umd).js b/tests/baselines/reference/exportAsNamespace4(module=umd).js
index 2f550d39b3590..84e1399466514 100644
--- a/tests/baselines/reference/exportAsNamespace4(module=umd).js
+++ b/tests/baselines/reference/exportAsNamespace4(module=umd).js
@@ -54,13 +54,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 (function (factory) {
     if (typeof module === "object" && typeof module.exports === "object") {
         var v = factory(require, exports);
@@ -92,13 +102,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 (function (factory) {
     if (typeof module === "object" && typeof module.exports === "object") {
         var v = factory(require, exports);
diff --git a/tests/baselines/reference/exportAsNamespace_exportAssignment.js b/tests/baselines/reference/exportAsNamespace_exportAssignment.js
index 635f9cc875320..993a12b6d9c07 100644
--- a/tests/baselines/reference/exportAsNamespace_exportAssignment.js
+++ b/tests/baselines/reference/exportAsNamespace_exportAssignment.js
@@ -28,13 +28,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.ns = void 0;
 exports.ns = __importStar(require("./a"));
diff --git a/tests/baselines/reference/exportDefault.js b/tests/baselines/reference/exportDefault.js
index 4bf273d4cbf59..479fb55596ee3 100644
--- a/tests/baselines/reference/exportDefault.js
+++ b/tests/baselines/reference/exportDefault.js
@@ -59,13 +59,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 var types = __importStar(require("./a"));
 exports.default = types;
@@ -96,13 +106,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 var types = __importStar(require("./b"));
 new types.default.A(); // Error
diff --git a/tests/baselines/reference/fatarrowfunctionsOptionalArgs.types b/tests/baselines/reference/fatarrowfunctionsOptionalArgs.types
index 789ae0f39331f..39e1460dba673 100644
--- a/tests/baselines/reference/fatarrowfunctionsOptionalArgs.types
+++ b/tests/baselines/reference/fatarrowfunctionsOptionalArgs.types
@@ -623,7 +623,7 @@ false ? null : (...arg: number[]) => 68;
 >a : any
 >  : ^^^
 >(b)=>(c)=>81 : (b: any) => (c: any) => number
->             : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
+>             : ^ ^^^^^^^^^^^   ^^^^^^^^^^^^^^
 >b : any
 >  : ^^^
 >(c)=>81 : (c: any) => number
@@ -633,7 +633,7 @@ false ? null : (...arg: number[]) => 68;
 >81 : 81
 >   : ^^
 >(c)=>(d)=>82 : (c: any) => (d: any) => number
->             : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
+>             : ^ ^^^^^^^^^^^   ^^^^^^^^^^^^^^
 >c : any
 >  : ^^^
 >(d)=>82 : (d: any) => number
diff --git a/tests/baselines/reference/findAllRefsForFunctionExpression01.baseline.jsonc b/tests/baselines/reference/findAllRefsForFunctionExpression01.baseline.jsonc
index 9e043f4399b0c..a9b11df74bbcb 100644
--- a/tests/baselines/reference/findAllRefsForFunctionExpression01.baseline.jsonc
+++ b/tests/baselines/reference/findAllRefsForFunctionExpression01.baseline.jsonc
@@ -16,7 +16,7 @@
     "containerKind": "",
     "containerName": "",
     "kind": "local function",
-    "name": "(local function) foo(a?: void, b?: () => (a?: void, b?: ...) => void): void",
+    "name": "(local function) foo(a?: void, b?: () => (a?: void, b?: () => ...) => void): void",
     "displayParts": [
      {
       "text": "(",
@@ -154,6 +154,26 @@
       "text": " ",
       "kind": "space"
      },
+     {
+      "text": "(",
+      "kind": "punctuation"
+     },
+     {
+      "text": ")",
+      "kind": "punctuation"
+     },
+     {
+      "text": " ",
+      "kind": "space"
+     },
+     {
+      "text": "=>",
+      "kind": "punctuation"
+     },
+     {
+      "text": " ",
+      "kind": "space"
+     },
      {
       "text": "...",
       "kind": "text"
@@ -218,7 +238,7 @@
     "containerKind": "",
     "containerName": "",
     "kind": "local function",
-    "name": "(local function) foo(a?: void, b?: () => (a?: void, b?: ...) => void): void",
+    "name": "(local function) foo(a?: void, b?: () => (a?: void, b?: () => ...) => void): void",
     "displayParts": [
      {
       "text": "(",
@@ -356,6 +376,26 @@
       "text": " ",
       "kind": "space"
      },
+     {
+      "text": "(",
+      "kind": "punctuation"
+     },
+     {
+      "text": ")",
+      "kind": "punctuation"
+     },
+     {
+      "text": " ",
+      "kind": "space"
+     },
+     {
+      "text": "=>",
+      "kind": "punctuation"
+     },
+     {
+      "text": " ",
+      "kind": "space"
+     },
      {
       "text": "...",
       "kind": "text"
@@ -420,7 +460,7 @@
     "containerKind": "",
     "containerName": "",
     "kind": "local function",
-    "name": "(local function) foo(a?: void, b?: () => (a?: void, b?: ...) => void): void",
+    "name": "(local function) foo(a?: void, b?: () => (a?: void, b?: () => ...) => void): void",
     "displayParts": [
      {
       "text": "(",
@@ -558,6 +598,26 @@
       "text": " ",
       "kind": "space"
      },
+     {
+      "text": "(",
+      "kind": "punctuation"
+     },
+     {
+      "text": ")",
+      "kind": "punctuation"
+     },
+     {
+      "text": " ",
+      "kind": "space"
+     },
+     {
+      "text": "=>",
+      "kind": "punctuation"
+     },
+     {
+      "text": " ",
+      "kind": "space"
+     },
      {
       "text": "...",
       "kind": "text"
@@ -622,7 +682,7 @@
     "containerKind": "",
     "containerName": "",
     "kind": "local function",
-    "name": "(local function) foo(a?: void, b?: () => (a?: void, b?: ...) => void): void",
+    "name": "(local function) foo(a?: void, b?: () => (a?: void, b?: () => ...) => void): void",
     "displayParts": [
      {
       "text": "(",
@@ -760,6 +820,26 @@
       "text": " ",
       "kind": "space"
      },
+     {
+      "text": "(",
+      "kind": "punctuation"
+     },
+     {
+      "text": ")",
+      "kind": "punctuation"
+     },
+     {
+      "text": " ",
+      "kind": "space"
+     },
+     {
+      "text": "=>",
+      "kind": "punctuation"
+     },
+     {
+      "text": " ",
+      "kind": "space"
+     },
      {
       "text": "...",
       "kind": "text"
@@ -824,7 +904,7 @@
     "containerKind": "",
     "containerName": "",
     "kind": "local function",
-    "name": "(local function) foo(a?: void, b?: () => (a?: void, b?: ...) => void): void",
+    "name": "(local function) foo(a?: void, b?: () => (a?: void, b?: () => ...) => void): void",
     "displayParts": [
      {
       "text": "(",
@@ -962,6 +1042,26 @@
       "text": " ",
       "kind": "space"
      },
+     {
+      "text": "(",
+      "kind": "punctuation"
+     },
+     {
+      "text": ")",
+      "kind": "punctuation"
+     },
+     {
+      "text": " ",
+      "kind": "space"
+     },
+     {
+      "text": "=>",
+      "kind": "punctuation"
+     },
+     {
+      "text": " ",
+      "kind": "space"
+     },
      {
       "text": "...",
       "kind": "text"
@@ -1026,7 +1126,7 @@
     "containerKind": "",
     "containerName": "",
     "kind": "local function",
-    "name": "(local function) foo(a?: void, b?: () => (a?: void, b?: ...) => void): void",
+    "name": "(local function) foo(a?: void, b?: () => (a?: void, b?: () => ...) => void): void",
     "displayParts": [
      {
       "text": "(",
@@ -1164,6 +1264,26 @@
       "text": " ",
       "kind": "space"
      },
+     {
+      "text": "(",
+      "kind": "punctuation"
+     },
+     {
+      "text": ")",
+      "kind": "punctuation"
+     },
+     {
+      "text": " ",
+      "kind": "space"
+     },
+     {
+      "text": "=>",
+      "kind": "punctuation"
+     },
+     {
+      "text": " ",
+      "kind": "space"
+     },
      {
       "text": "...",
       "kind": "text"
@@ -1228,7 +1348,7 @@
     "containerKind": "",
     "containerName": "",
     "kind": "local function",
-    "name": "(local function) foo(a?: void, b?: () => (a?: void, b?: ...) => void): void",
+    "name": "(local function) foo(a?: void, b?: () => (a?: void, b?: () => ...) => void): void",
     "displayParts": [
      {
       "text": "(",
@@ -1366,6 +1486,26 @@
       "text": " ",
       "kind": "space"
      },
+     {
+      "text": "(",
+      "kind": "punctuation"
+     },
+     {
+      "text": ")",
+      "kind": "punctuation"
+     },
+     {
+      "text": " ",
+      "kind": "space"
+     },
+     {
+      "text": "=>",
+      "kind": "punctuation"
+     },
+     {
+      "text": " ",
+      "kind": "space"
+     },
      {
       "text": "...",
       "kind": "text"
diff --git a/tests/baselines/reference/functionExpressionReturningItself.js b/tests/baselines/reference/functionExpressionReturningItself.js
index 621a881f70101..d586748c30b56 100644
--- a/tests/baselines/reference/functionExpressionReturningItself.js
+++ b/tests/baselines/reference/functionExpressionReturningItself.js
@@ -8,4 +8,4 @@ var x = function somefn() { return somefn; };
 
 
 //// [functionExpressionReturningItself.d.ts]
-declare var x: () => /*elided*/ any;
+declare var x: () => () => /*elided*/ any;
diff --git a/tests/baselines/reference/generatorTypeCheck39.types b/tests/baselines/reference/generatorTypeCheck39.types
index c9da6e9618eff..1c82d58f441cc 100644
--- a/tests/baselines/reference/generatorTypeCheck39.types
+++ b/tests/baselines/reference/generatorTypeCheck39.types
@@ -3,7 +3,7 @@
 === generatorTypeCheck39.ts ===
 function decorator(x: any) {
 >decorator : (x: any) => (y: any) => void
->          : ^ ^^   ^^^^^^ ^^^^^^^^^^^^^^
+>          : ^ ^^   ^^^^^^   ^^^^^^^^^^^^
 >x : any
 >  : ^^^
 
@@ -21,7 +21,7 @@ function* g() {
 >decorator(yield 0) : (y: any) => void
 >                   : ^ ^^^^^^^^^^^^^^
 >decorator : (x: any) => (y: any) => void
->          : ^ ^^   ^^^^^^ ^^^^^^^^^^^^^^
+>          : ^ ^^   ^^^^^^   ^^^^^^^^^^^^
 >yield 0 : any
 >        : ^^^
 >0 : 0
diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgs2.types b/tests/baselines/reference/genericCallWithObjectTypeArgs2.types
index 4d2825da3dd2a..de56297eacd06 100644
--- a/tests/baselines/reference/genericCallWithObjectTypeArgs2.types
+++ b/tests/baselines/reference/genericCallWithObjectTypeArgs2.types
@@ -105,7 +105,7 @@ var r2 = f({ x: new Base(), y: new Derived2() }); // {}[]
 
 function f2<T extends Base, U extends Base>(a: { x: T; y: U }) {
 >f2 : <T extends Base, U extends Base>(a: { x: T; y: U; }) => (x: T) => U
->   : ^ ^^^^^^^^^    ^^ ^^^^^^^^^    ^^ ^^               ^^^^^^ ^^ ^^^^^^
+>   : ^ ^^^^^^^^^    ^^ ^^^^^^^^^    ^^ ^^               ^^^^^^    ^^^^^^
 >a : { x: T; y: U; }
 >  : ^^^^^ ^^^^^ ^^^
 >x : T
@@ -132,7 +132,7 @@ var r3 = f2({ x: new Derived(), y: new Derived2() }); // Derived => Derived2
 >f2({ x: new Derived(), y: new Derived2() }) : (x: Derived) => Derived2
 >                                            : ^ ^^^^^^^^^^^^^^^^^^^^^^
 >f2 : <T extends Base, U extends Base>(a: { x: T; y: U; }) => (x: T) => U
->   : ^ ^^^^^^^^^    ^^ ^^^^^^^^^    ^^ ^^               ^^^^^^ ^^ ^^^^^^
+>   : ^ ^^^^^^^^^    ^^ ^^^^^^^^^    ^^ ^^               ^^^^^^    ^^^^^^
 >{ x: new Derived(), y: new Derived2() } : { x: Derived; y: Derived2; }
 >                                        : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >x : Derived
@@ -168,7 +168,7 @@ var r4 = f2(i); // Base => Derived
 >f2(i) : (x: Base) => Derived
 >      : ^ ^^^^^^^^^^^^^^^^^^
 >f2 : <T extends Base, U extends Base>(a: { x: T; y: U; }) => (x: T) => U
->   : ^ ^^^^^^^^^    ^^ ^^^^^^^^^    ^^ ^^               ^^^^^^ ^^ ^^^^^^
+>   : ^ ^^^^^^^^^    ^^ ^^^^^^^^^    ^^ ^^               ^^^^^^    ^^^^^^
 >i : I<Base, Derived>
 >  : ^^^^^^^^^^^^^^^^
 
diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.types b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.types
index b0cf1ce86aba9..f540f37df42b2 100644
--- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.types
+++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.types
@@ -27,7 +27,7 @@ class D {
 
 function foo<T, U extends T>(t: T, t2: U) {
 >foo : <T, U extends T>(t: T, t2: U) => (x: T) => U
->    : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^  ^^ ^^^^^^ ^^ ^^^^^^
+>    : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^  ^^ ^^^^^^    ^^^^^^
 >t : T
 >  : ^
 >t2 : U
@@ -56,7 +56,7 @@ var r = foo(c, d);
 >foo(c, d) : (x: C) => D
 >          : ^ ^^^^^^^^^
 >foo : <T, U extends T>(t: T, t2: U) => (x: T) => U
->    : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^  ^^ ^^^^^^ ^^ ^^^^^^
+>    : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^  ^^ ^^^^^^    ^^^^^^
 >c : C
 >  : ^
 >d : D
@@ -68,7 +68,7 @@ var r2 = foo(d, c); // error because C does not extend D
 >foo(d, c) : (x: D) => D
 >          : ^ ^^^^^^^^^
 >foo : <T, U extends T>(t: T, t2: U) => (x: T) => U
->    : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^  ^^ ^^^^^^ ^^ ^^^^^^
+>    : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^  ^^ ^^^^^^    ^^^^^^
 >d : D
 >  : ^
 >c : C
@@ -80,7 +80,7 @@ var r3 = foo(c, { x: '', foo: c });
 >foo(c, { x: '', foo: c }) : (x: C) => { x: string; foo: C; }
 >                          : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >foo : <T, U extends T>(t: T, t2: U) => (x: T) => U
->    : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^  ^^ ^^^^^^ ^^ ^^^^^^
+>    : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^  ^^ ^^^^^^    ^^^^^^
 >c : C
 >  : ^
 >{ x: '', foo: c } : { x: string; foo: C; }
@@ -100,7 +100,7 @@ var r4 = foo(null, null);
 >foo(null, null) : (x: any) => any
 >                : ^ ^^^^^^^^^^^^^
 >foo : <T, U extends T>(t: T, t2: U) => (x: T) => U
->    : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^  ^^ ^^^^^^ ^^ ^^^^^^
+>    : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^  ^^ ^^^^^^    ^^^^^^
 
 var r5 = foo({}, null);
 >r5 : (x: {}) => any
@@ -108,7 +108,7 @@ var r5 = foo({}, null);
 >foo({}, null) : (x: {}) => any
 >              : ^ ^^^^^^^^^^^^
 >foo : <T, U extends T>(t: T, t2: U) => (x: T) => U
->    : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^  ^^ ^^^^^^ ^^ ^^^^^^
+>    : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^  ^^ ^^^^^^    ^^^^^^
 >{} : {}
 >   : ^^
 
@@ -118,7 +118,7 @@ var r6 = foo(null, {});
 >foo(null, {}) : (x: any) => {}
 >              : ^ ^^^^^^^^^^^^
 >foo : <T, U extends T>(t: T, t2: U) => (x: T) => U
->    : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^  ^^ ^^^^^^ ^^ ^^^^^^
+>    : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^  ^^ ^^^^^^    ^^^^^^
 >{} : {}
 >   : ^^
 
@@ -128,7 +128,7 @@ var r7 = foo({}, {});
 >foo({}, {}) : (x: {}) => {}
 >            : ^ ^^^^^^^^^^^
 >foo : <T, U extends T>(t: T, t2: U) => (x: T) => U
->    : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^  ^^ ^^^^^^ ^^ ^^^^^^
+>    : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^  ^^ ^^^^^^    ^^^^^^
 >{} : {}
 >   : ^^
 >{} : {}
@@ -140,7 +140,7 @@ var r8 = foo(() => { }, () => { });
 >foo(() => { }, () => { }) : (x: () => void) => () => void
 >                          : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >foo : <T, U extends T>(t: T, t2: U) => (x: T) => U
->    : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^  ^^ ^^^^^^ ^^ ^^^^^^
+>    : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^  ^^ ^^^^^^    ^^^^^^
 >() => { } : () => void
 >          : ^^^^^^^^^^
 >() => { } : () => void
@@ -152,7 +152,7 @@ var r9 = foo(() => { }, () => 1);
 >foo(() => { }, () => 1) : (x: () => void) => () => number
 >                        : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >foo : <T, U extends T>(t: T, t2: U) => (x: T) => U
->    : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^  ^^ ^^^^^^ ^^ ^^^^^^
+>    : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^  ^^ ^^^^^^    ^^^^^^
 >() => { } : () => void
 >          : ^^^^^^^^^^
 >() => 1 : () => number
@@ -170,7 +170,7 @@ function other<T, U extends T>() {
 >foo(c, d) : (x: C) => D
 >          : ^ ^^^^^^^^^
 >foo : <T_1, U_1 extends T_1>(t: T_1, t2: U_1) => (x: T_1) => U_1
->    : ^^^^^^^^^^^^^^^^^^   ^^ ^^   ^^  ^^   ^^^^^^ ^^   ^^^^^^^^
+>    : ^^^^^^^^^^^^^^^^^^   ^^ ^^   ^^  ^^   ^^^^^^      ^^^^^^^^
 >c : C
 >  : ^
 >d : D
@@ -182,7 +182,7 @@ function other<T, U extends T>() {
 >foo<T, U>(c, d) : (x: T) => U
 >                : ^ ^^^^^^^^^
 >foo : <T_1, U_1 extends T_1>(t: T_1, t2: U_1) => (x: T_1) => U_1
->    : ^^^^^^^^^^^^^^^^^^   ^^ ^^   ^^  ^^   ^^^^^^ ^^   ^^^^^^^^
+>    : ^^^^^^^^^^^^^^^^^^   ^^ ^^   ^^  ^^   ^^^^^^      ^^^^^^^^
 >c : C
 >  : ^
 >d : D
diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.types b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.types
index 6c82e41b5ff2a..072c2e96aa1e0 100644
--- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.types
+++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.types
@@ -27,7 +27,7 @@ class D {
 
 function foo<T, U extends T>(t: T, t2: U) {
 >foo : <T, U extends T>(t: T, t2: U) => (x: T) => U
->    : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^  ^^ ^^^^^^ ^^ ^^^^^^
+>    : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^  ^^ ^^^^^^    ^^^^^^
 >t : T
 >  : ^
 >t2 : U
@@ -56,7 +56,7 @@ var r2 = foo(d, c); // the constraints are self-referencing, no downstream error
 >foo(d, c) : (x: D) => D
 >          : ^ ^^^^^^^^^
 >foo : <T, U extends T>(t: T, t2: U) => (x: T) => U
->    : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^  ^^ ^^^^^^ ^^ ^^^^^^
+>    : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^  ^^ ^^^^^^    ^^^^^^
 >d : D
 >  : ^
 >c : C
@@ -68,7 +68,7 @@ var r9 = foo(() => 1, () => { }); // the constraints are self-referencing, no do
 >foo(() => 1, () => { }) : (x: () => number) => () => number
 >                        : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >foo : <T, U extends T>(t: T, t2: U) => (x: T) => U
->    : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^  ^^ ^^^^^^ ^^ ^^^^^^
+>    : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^  ^^ ^^^^^^    ^^^^^^
 >() => 1 : () => number
 >        : ^^^^^^^^^^^^
 >1 : 1
@@ -86,7 +86,7 @@ function other<T, U extends T>() {
 >foo<T, U>(c, d) : (x: T) => U
 >                : ^ ^^^^^^^^^
 >foo : <T_1, U_1 extends T_1>(t: T_1, t2: U_1) => (x: T_1) => U_1
->    : ^^^^^^^^^^^^^^^^^^   ^^ ^^   ^^  ^^   ^^^^^^ ^^   ^^^^^^^^
+>    : ^^^^^^^^^^^^^^^^^^   ^^ ^^   ^^  ^^   ^^^^^^      ^^^^^^^^
 >c : C
 >  : ^
 >d : D
diff --git a/tests/baselines/reference/genericCallWithinOwnBodyCastTypeParameterIdentity.types b/tests/baselines/reference/genericCallWithinOwnBodyCastTypeParameterIdentity.types
index da5e47d588991..f8095e434ba12 100644
--- a/tests/baselines/reference/genericCallWithinOwnBodyCastTypeParameterIdentity.types
+++ b/tests/baselines/reference/genericCallWithinOwnBodyCastTypeParameterIdentity.types
@@ -17,9 +17,9 @@ interface Thenable<Value> {
 
 const toThenable = <Result, Input>(fn: (input: Input) => Result | Thenable<Result>) =>
 >toThenable : <Result, Input>(fn: (input: Input) => Result | Thenable<Result>) => (input: Input) => Thenable<Result>
->           : ^      ^^     ^^  ^^                                           ^^^^^^     ^^     ^^^^^                
+>           : ^      ^^     ^^  ^^                                           ^^^^^^            ^^^^^                
 ><Result, Input>(fn: (input: Input) => Result | Thenable<Result>) =>    (input: Input): Thenable<Result> => {        const result = fn(input)        return {            then<V>(onFulfilled: (value: Result) => V | Thenable<V>) {                return toThenable<V, Result>(onFulfilled)(result as Result)            }        };    } : <Result, Input>(fn: (input: Input) => Result | Thenable<Result>) => (input: Input) => Thenable<Result>
->                                                                                                                                                                                                                                                                                                                                          : ^      ^^     ^^  ^^                                           ^^^^^^     ^^     ^^^^^                
+>                                                                                                                                                                                                                                                                                                                                          : ^      ^^     ^^  ^^                                           ^^^^^^            ^^^^^                
 >fn : (input: Input) => Result | Thenable<Result>
 >   : ^     ^^     ^^^^^                         
 >input : Input
@@ -59,7 +59,7 @@ const toThenable = <Result, Input>(fn: (input: Input) => Result | Thenable<Resul
 >toThenable<V, Result>(onFulfilled) : (input: Result) => Thenable<V>
 >                                   : ^     ^^^^^^^^^^^^^^^^^^^^^^^^
 >toThenable : <Result, Input>(fn: (input: Input) => Result | Thenable<Result>) => (input: Input) => Thenable<Result>
->           : ^      ^^     ^^  ^^                                           ^^^^^^     ^^     ^^^^^                
+>           : ^      ^^     ^^  ^^                                           ^^^^^^            ^^^^^                
 >onFulfilled : (value: Result) => V | Thenable<V>
 >            : ^     ^^      ^^^^^               
 >result as Result : Result
@@ -72,9 +72,9 @@ const toThenable = <Result, Input>(fn: (input: Input) => Result | Thenable<Resul
 
 const toThenableInferred = <Result, Input>(fn: (input: Input) => Result | Thenable<Result>) =>
 >toThenableInferred : <Result, Input>(fn: (input: Input) => Result | Thenable<Result>) => (input: Input) => Thenable<Result>
->                   : ^      ^^     ^^  ^^                                           ^^^^^^     ^^     ^^^^^                
+>                   : ^      ^^     ^^  ^^                                           ^^^^^^            ^^^^^                
 ><Result, Input>(fn: (input: Input) => Result | Thenable<Result>) =>    (input: Input): Thenable<Result> => {        const result = fn(input)        return {            then(onFulfilled) {                return toThenableInferred(onFulfilled)(result as Result)            }        };    } : <Result, Input>(fn: (input: Input) => Result | Thenable<Result>) => (input: Input) => Thenable<Result>
->                                                                                                                                                                                                                                                                                                : ^      ^^     ^^  ^^                                           ^^^^^^     ^^     ^^^^^                
+>                                                                                                                                                                                                                                                                                                : ^      ^^     ^^  ^^                                           ^^^^^^            ^^^^^                
 >fn : (input: Input) => Result | Thenable<Result>
 >   : ^     ^^     ^^^^^                         
 >input : Input
@@ -112,7 +112,7 @@ const toThenableInferred = <Result, Input>(fn: (input: Input) => Result | Thenab
 >toThenableInferred(onFulfilled) : (input: Result) => Thenable<V>
 >                                : ^     ^^^^^^^^^^^^^^^^^^^^^^^^
 >toThenableInferred : <Result, Input>(fn: (input: Input) => Result | Thenable<Result>) => (input: Input) => Thenable<Result>
->                   : ^      ^^     ^^  ^^                                           ^^^^^^     ^^     ^^^^^                
+>                   : ^      ^^     ^^  ^^                                           ^^^^^^            ^^^^^                
 >onFulfilled : (value: Result) => V | Thenable<V>
 >            : ^     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >result as Result : Result
diff --git a/tests/baselines/reference/genericContextualTypes1.types b/tests/baselines/reference/genericContextualTypes1.types
index 8501eb750fa2d..d7a5de0c1d661 100644
--- a/tests/baselines/reference/genericContextualTypes1.types
+++ b/tests/baselines/reference/genericContextualTypes1.types
@@ -235,9 +235,9 @@ const f13: <T>(x: Box<T[]>) => T = compose(unbox, unlist);
 
 const arrayMap = <T, U>(f: (x: T) => U) => (a: T[]) => a.map(f);
 >arrayMap : <T, U>(f: (x: T) => U) => (a: T[]) => U[]
->         : ^ ^^ ^^ ^^           ^^^^^^ ^^   ^^^^^^^^
+>         : ^ ^^ ^^ ^^           ^^^^^^      ^^^^^^^^
 ><T, U>(f: (x: T) => U) => (a: T[]) => a.map(f) : <T, U>(f: (x: T) => U) => (a: T[]) => U[]
->                                               : ^ ^^ ^^ ^^           ^^^^^^ ^^   ^^^^^^^^
+>                                               : ^ ^^ ^^ ^^           ^^^^^^      ^^^^^^^^
 >f : (x: T) => U
 >  : ^ ^^ ^^^^^ 
 >x : T
@@ -259,9 +259,9 @@ const arrayMap = <T, U>(f: (x: T) => U) => (a: T[]) => a.map(f);
 
 const arrayFilter = <T>(f: (x: T) => boolean) => (a: T[]) => a.filter(f);
 >arrayFilter : <T>(f: (x: T) => boolean) => (a: T[]) => T[]
->            : ^ ^^ ^^                 ^^^^^^ ^^   ^^^^^^^^
+>            : ^ ^^ ^^                 ^^^^^^      ^^^^^^^^
 ><T>(f: (x: T) => boolean) => (a: T[]) => a.filter(f) : <T>(f: (x: T) => boolean) => (a: T[]) => T[]
->                                                     : ^ ^^ ^^                 ^^^^^^ ^^   ^^^^^^^^
+>                                                     : ^ ^^ ^^                 ^^^^^^      ^^^^^^^^
 >f : (x: T) => boolean
 >  : ^ ^^ ^^^^^       
 >x : T
@@ -289,7 +289,7 @@ const f20: (a: string[]) => number[] = arrayMap(x => x.length);
 >arrayMap(x => x.length) : (a: string[]) => number[]
 >                        : ^ ^^^^^^^^^^^^^^^^^^^^^^^
 >arrayMap : <T, U>(f: (x: T) => U) => (a: T[]) => U[]
->         : ^ ^^ ^^ ^^           ^^^^^^ ^^   ^^^^^^^^
+>         : ^ ^^ ^^ ^^           ^^^^^^      ^^^^^^^^
 >x => x.length : (x: string) => number
 >              : ^ ^^^^^^^^^^^^^^^^^^^
 >x : string
@@ -309,7 +309,7 @@ const f21: <A>(a: A[]) => A[][] = arrayMap(x => [x]);
 >arrayMap(x => [x]) : (a: A[]) => A[][]
 >                   : ^ ^^^^^^^^^^^^^^^
 >arrayMap : <T, U>(f: (x: T) => U) => (a: T[]) => U[]
->         : ^ ^^ ^^ ^^           ^^^^^^ ^^   ^^^^^^^^
+>         : ^ ^^ ^^ ^^           ^^^^^^      ^^^^^^^^
 >x => [x] : (x: A) => A[]
 >         : ^ ^^^^^^^^^^^
 >x : A
@@ -327,7 +327,7 @@ const f22: <A>(a: A[]) => A[] = arrayMap(identity);
 >arrayMap(identity) : (a: A[]) => A[]
 >                   : ^ ^^^^^^^^^^^^^
 >arrayMap : <T, U>(f: (x: T) => U) => (a: T[]) => U[]
->         : ^ ^^ ^^ ^^           ^^^^^^ ^^   ^^^^^^^^
+>         : ^ ^^ ^^ ^^           ^^^^^^      ^^^^^^^^
 >identity : <T>(x: T) => T
 >         : ^ ^^ ^^ ^^^^^ 
 
@@ -339,7 +339,7 @@ const f23: <A>(a: A[]) => Box<A>[] = arrayMap(value => ({ value }));
 >arrayMap(value => ({ value })) : (a: A[]) => { value: A; }[]
 >                               : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^
 >arrayMap : <T, U>(f: (x: T) => U) => (a: T[]) => U[]
->         : ^ ^^ ^^ ^^           ^^^^^^ ^^   ^^^^^^^^
+>         : ^ ^^ ^^ ^^           ^^^^^^      ^^^^^^^^
 >value => ({ value }) : (value: A) => { value: A; }
 >                     : ^     ^^^^^^^^^^^^^^^^^^^^^
 >value : A
@@ -359,7 +359,7 @@ const f30: (a: string[]) => string[] = arrayFilter(x => x.length > 10);
 >arrayFilter(x => x.length > 10) : (a: string[]) => string[]
 >                                : ^ ^^^^^^^^^^^^^^^^^^^^^^^
 >arrayFilter : <T>(f: (x: T) => boolean) => (a: T[]) => T[]
->            : ^ ^^ ^^                 ^^^^^^ ^^   ^^^^^^^^
+>            : ^ ^^ ^^                 ^^^^^^      ^^^^^^^^
 >x => x.length > 10 : (x: string) => boolean
 >                   : ^ ^^^^^^^^^^^^^^^^^^^^
 >x : string
@@ -383,7 +383,7 @@ const f31: <T extends Box<number>>(a: T[]) => T[] = arrayFilter(x => x.value > 1
 >arrayFilter(x => x.value > 10) : (a: T[]) => T[]
 >                               : ^ ^^^^^^^^^^^^^
 >arrayFilter : <T>(f: (x: T) => boolean) => (a: T[]) => T[]
->            : ^ ^^ ^^                 ^^^^^^ ^^   ^^^^^^^^
+>            : ^ ^^ ^^                 ^^^^^^      ^^^^^^^^
 >x => x.value > 10 : (x: T) => boolean
 >                  : ^ ^^^^^^^^^^^^^^^
 >x : T
diff --git a/tests/baselines/reference/genericFunctionInference1.types b/tests/baselines/reference/genericFunctionInference1.types
index e973ef58a7da3..7275fd51f97be 100644
--- a/tests/baselines/reference/genericFunctionInference1.types
+++ b/tests/baselines/reference/genericFunctionInference1.types
@@ -874,7 +874,7 @@ declare class Bag<T> {
 
 function asFunction<A extends any[], B>(cf: new (...args: A) => B) {
 >asFunction : <A extends any[], B>(cf: new (...args: A) => B) => (...args: A) => B
->           : ^ ^^^^^^^^^     ^^ ^^  ^^                     ^^^^^^^^^    ^^ ^^^^^^
+>           : ^ ^^^^^^^^^     ^^ ^^  ^^                     ^^^^^^          ^^^^^^
 >cf : new (...args: A) => B
 >   : ^^^^^^^^    ^^ ^^^^^ 
 >args : A
@@ -901,7 +901,7 @@ const newPoint = asFunction(Point);
 >asFunction(Point) : (x: number, y: number) => Point
 >                  : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >asFunction : <A extends any[], B>(cf: new (...args: A) => B) => (...args: A) => B
->           : ^ ^^^^^^^^^     ^^ ^^  ^^                     ^^^^^^^^^    ^^ ^^^^^^
+>           : ^ ^^^^^^^^^     ^^ ^^  ^^                     ^^^^^^          ^^^^^^
 >Point : typeof Point
 >      : ^^^^^^^^^^^^
 
@@ -911,7 +911,7 @@ const newBag = asFunction(Bag);
 >asFunction(Bag) : <T>(...args: T[]) => Bag<T>
 >                : ^ ^^^^^    ^^^^^^^^^^^^^^^^
 >asFunction : <A extends any[], B>(cf: new (...args: A) => B) => (...args: A) => B
->           : ^ ^^^^^^^^^     ^^ ^^  ^^                     ^^^^^^^^^    ^^ ^^^^^^
+>           : ^ ^^^^^^^^^     ^^ ^^  ^^                     ^^^^^^          ^^^^^^
 >Bag : typeof Bag
 >    : ^^^^^^^^^^
 
@@ -1197,9 +1197,9 @@ var actual = flip(zip);
 
 const map = <T, U>(transform: (t: T) => U) =>
 >map : <T, U>(transform: (t: T) => U) => (arr: T[]) => U[]
->    : ^ ^^ ^^         ^^           ^^^^^^   ^^   ^^^^^^^^
+>    : ^ ^^ ^^         ^^           ^^^^^^        ^^^^^^^^
 ><T, U>(transform: (t: T) => U) =>    (arr: T[]) => arr.map(transform) : <T, U>(transform: (t: T) => U) => (arr: T[]) => U[]
->                                                                      : ^ ^^ ^^         ^^           ^^^^^^   ^^   ^^^^^^^^
+>                                                                      : ^ ^^ ^^         ^^           ^^^^^^        ^^^^^^^^
 >transform : (t: T) => U
 >          : ^ ^^ ^^^^^ 
 >t : T
@@ -1239,7 +1239,7 @@ const arr: string[] = map(identityStr)(['a']);
 >map(identityStr) : (arr: string[]) => string[]
 >                 : ^   ^^^^^^^^^^^^^^^^^^^^^^^
 >map : <T, U>(transform: (t: T) => U) => (arr: T[]) => U[]
->    : ^ ^^ ^^         ^^           ^^^^^^   ^^   ^^^^^^^^
+>    : ^ ^^ ^^         ^^           ^^^^^^        ^^^^^^^^
 >identityStr : (t: string) => string
 >            : ^ ^^      ^^^^^^^^^^^
 >['a'] : string[]
@@ -1255,7 +1255,7 @@ const arr1: string[] = map(identity)(['a']);
 >map(identity) : <T>(arr: T[]) => T[]
 >              : ^ ^^   ^^^^^^^^^^^^^
 >map : <T, U>(transform: (t: T) => U) => (arr: T[]) => U[]
->    : ^ ^^ ^^         ^^           ^^^^^^   ^^   ^^^^^^^^
+>    : ^ ^^ ^^         ^^           ^^^^^^        ^^^^^^^^
 >identity : <T>(value: T) => T
 >         : ^ ^^     ^^ ^^^^^ 
 >['a'] : string[]
diff --git a/tests/baselines/reference/genericRestParameters1.types b/tests/baselines/reference/genericRestParameters1.types
index 12a2957921f4e..4c181e295a9e5 100644
--- a/tests/baselines/reference/genericRestParameters1.types
+++ b/tests/baselines/reference/genericRestParameters1.types
@@ -867,7 +867,7 @@ let x32 = callr(sn, f16);  // string | number
 
 function bind<T, U extends unknown[], V>(f: (x: T, ...rest: U) => V, x: T) {
 >bind : <T, U extends unknown[], V>(f: (x: T, ...rest: U) => V, x: T) => (...rest: U) => V
->     : ^ ^^ ^^^^^^^^^         ^^ ^^ ^^                       ^^ ^^ ^^^^^^^^^    ^^ ^^^^^^
+>     : ^ ^^ ^^^^^^^^^         ^^ ^^ ^^                       ^^ ^^ ^^^^^^          ^^^^^^
 >f : (x: T, ...rest: U) => V
 >  : ^ ^^ ^^^^^    ^^ ^^^^^ 
 >x : T
@@ -910,7 +910,7 @@ const f21 = bind(f20, 42);  // (y: string, z: boolean) => string[]
 >bind(f20, 42) : (y: string, z: boolean) => string[]
 >              : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >bind : <T, U extends unknown[], V>(f: (x: T, ...rest: U) => V, x: T) => (...rest: U) => V
->     : ^ ^^ ^^^^^^^^^         ^^ ^^ ^^                       ^^ ^^ ^^^^^^^^^    ^^ ^^^^^^
+>     : ^ ^^ ^^^^^^^^^         ^^ ^^ ^^                       ^^ ^^ ^^^^^^          ^^^^^^
 >f20 : (x: number, y: string, z: boolean) => string[]
 >    : ^ ^^      ^^ ^^      ^^ ^^       ^^^^^        
 >42 : 42
@@ -922,7 +922,7 @@ const f22 = bind(f21, "hello");  // (z: boolean) => string[]
 >bind(f21, "hello") : (z: boolean) => string[]
 >                   : ^^^^^^^^^^^^^^^^^^^^^^^^
 >bind : <T, U extends unknown[], V>(f: (x: T, ...rest: U) => V, x: T) => (...rest: U) => V
->     : ^ ^^ ^^^^^^^^^         ^^ ^^ ^^                       ^^ ^^ ^^^^^^^^^    ^^ ^^^^^^
+>     : ^ ^^ ^^^^^^^^^         ^^ ^^ ^^                       ^^ ^^ ^^^^^^          ^^^^^^
 >f21 : (y: string, z: boolean) => string[]
 >    : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >"hello" : "hello"
@@ -934,7 +934,7 @@ const f23 = bind(f22, true);  // () => string[]
 >bind(f22, true) : () => string[]
 >                : ^^^^^^^^^^^^^^
 >bind : <T, U extends unknown[], V>(f: (x: T, ...rest: U) => V, x: T) => (...rest: U) => V
->     : ^ ^^ ^^^^^^^^^         ^^ ^^ ^^                       ^^ ^^ ^^^^^^^^^    ^^ ^^^^^^
+>     : ^ ^^ ^^^^^^^^^         ^^ ^^ ^^                       ^^ ^^ ^^^^^^          ^^^^^^
 >f22 : (z: boolean) => string[]
 >    : ^^^^^^^^^^^^^^^^^^^^^^^^
 >true : true
@@ -992,7 +992,7 @@ const g21 = bind(g20, 42);  // (y: string, z: boolean) => string[]
 >bind(g20, 42) : (y?: string | undefined, z?: boolean | undefined) => string[]
 >              : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >bind : <T, U extends unknown[], V>(f: (x: T, ...rest: U) => V, x: T) => (...rest: U) => V
->     : ^ ^^ ^^^^^^^^^         ^^ ^^ ^^                       ^^ ^^ ^^^^^^^^^    ^^ ^^^^^^
+>     : ^ ^^ ^^^^^^^^^         ^^ ^^ ^^                       ^^ ^^ ^^^^^^          ^^^^^^
 >g20 : (x: number, y?: string, z?: boolean) => string[]
 >    : ^ ^^      ^^ ^^^      ^^ ^^^       ^^^^^        
 >42 : 42
@@ -1004,7 +1004,7 @@ const g22 = bind(g21, "hello");  // (z: boolean) => string[]
 >bind(g21, "hello") : (z?: boolean | undefined) => string[]
 >                   : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >bind : <T, U extends unknown[], V>(f: (x: T, ...rest: U) => V, x: T) => (...rest: U) => V
->     : ^ ^^ ^^^^^^^^^         ^^ ^^ ^^                       ^^ ^^ ^^^^^^^^^    ^^ ^^^^^^
+>     : ^ ^^ ^^^^^^^^^         ^^ ^^ ^^                       ^^ ^^ ^^^^^^          ^^^^^^
 >g21 : (y?: string | undefined, z?: boolean | undefined) => string[]
 >    : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >"hello" : "hello"
@@ -1016,7 +1016,7 @@ const g23 = bind(g22, true);  // () => string[]
 >bind(g22, true) : () => string[]
 >                : ^^^^^^^^^^^^^^
 >bind : <T, U extends unknown[], V>(f: (x: T, ...rest: U) => V, x: T) => (...rest: U) => V
->     : ^ ^^ ^^^^^^^^^         ^^ ^^ ^^                       ^^ ^^ ^^^^^^^^^    ^^ ^^^^^^
+>     : ^ ^^ ^^^^^^^^^         ^^ ^^ ^^                       ^^ ^^ ^^^^^^          ^^^^^^
 >g22 : (z?: boolean | undefined) => string[]
 >    : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >true : true
diff --git a/tests/baselines/reference/genericTypeParameterEquivalence2.types b/tests/baselines/reference/genericTypeParameterEquivalence2.types
index 3f77e182574ac..982fdc6970d3e 100644
--- a/tests/baselines/reference/genericTypeParameterEquivalence2.types
+++ b/tests/baselines/reference/genericTypeParameterEquivalence2.types
@@ -178,7 +178,7 @@ function curry1<A, B, C>(f: (a: A, b: B) => C): (ax: A) => (bx: B) => C {
 
     return function (ay: A) {
 >function (ay: A) {        return function (by: B) {            return f(ay, by);        };    } : (ay: A) => (by: B) => C
->                                                                                                : ^  ^^ ^^^^^^  ^^ ^^^^^^
+>                                                                                                : ^  ^^ ^^^^^^     ^^^^^^
 >ay : A
 >   : ^
 
diff --git a/tests/baselines/reference/importEquals1.js b/tests/baselines/reference/importEquals1.js
index e711e198cfcdd..0335086770cc5 100644
--- a/tests/baselines/reference/importEquals1.js
+++ b/tests/baselines/reference/importEquals1.js
@@ -59,13 +59,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 var types = __importStar(require("./a"));
 module.exports = types;
 //// [d.js]
diff --git a/tests/baselines/reference/importEquals2.js b/tests/baselines/reference/importEquals2.js
index 7479a96ab254b..54b2b804e9b58 100644
--- a/tests/baselines/reference/importEquals2.js
+++ b/tests/baselines/reference/importEquals2.js
@@ -39,13 +39,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 var a = __importStar(require("./a"));
 module.exports = a;
 //// [c.js]
diff --git a/tests/baselines/reference/inferTypePredicates.js b/tests/baselines/reference/inferTypePredicates.js
index b5802c0e50a99..315652eec06d0 100644
--- a/tests/baselines/reference/inferTypePredicates.js
+++ b/tests/baselines/reference/inferTypePredicates.js
@@ -616,8 +616,8 @@ declare function assertAndPredicate(x: string | number | Date): x is string;
 declare let snd: string | number | Date;
 declare function isNumberWithThis(this: Date, x: number | string): x is number;
 declare function narrowFromAny(x: any): x is number;
-declare const noInferenceFromRest: (f_0: "a" | "b") => boolean;
-declare const noInferenceFromImpossibleRest: () => boolean;
+declare const noInferenceFromRest: (...f: ["a" | "b"]) => boolean;
+declare const noInferenceFromImpossibleRest: (...f: []) => boolean;
 declare function inferWithRest(x: string | null, ...f: ["a", "b"]): x is string;
 declare const foobar: {
     type: "foo";
diff --git a/tests/baselines/reference/inferTypes1.types b/tests/baselines/reference/inferTypes1.types
index edc97a2ea14c0..33d5e8d331d6d 100644
--- a/tests/baselines/reference/inferTypes1.types
+++ b/tests/baselines/reference/inferTypes1.types
@@ -657,7 +657,7 @@ type Test2 = EnsureIsString<42>;  // never
 
 function invoker <K extends string | number | symbol, A extends any[]> (key: K, ...args: A) {
 >invoker : <K extends string | number | symbol, A extends any[]>(key: K, ...args: A) => <T extends Record<K, (...args: A) => any>>(obj: T) => ReturnType<T[K]>
->        : ^ ^^^^^^^^^                        ^^ ^^^^^^^^^     ^^   ^^ ^^^^^    ^^ ^^^^^^ ^^^^^^^^^                              ^^   ^^ ^^^^^                
+>        : ^ ^^^^^^^^^                        ^^ ^^^^^^^^^     ^^   ^^ ^^^^^    ^^ ^^^^^^                                        ^^      ^^^^^                
 >key : K
 >    : ^
 >args : A
@@ -692,7 +692,7 @@ const result = invoker('test', true)({ test: (a: boolean) => 123 })
 >invoker('test', true) : <T extends Record<"test", (args_0: boolean) => any>>(obj: T) => ReturnType<T["test"]>
 >                      : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   ^^^   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >invoker : <K extends string | number | symbol, A extends any[]>(key: K, ...args: A) => <T extends Record<K, (...args: A) => any>>(obj: T) => ReturnType<T[K]>
->        : ^ ^^^^^^^^^                        ^^ ^^^^^^^^^     ^^   ^^ ^^^^^    ^^ ^^^^^^ ^^^^^^^^^                              ^^   ^^ ^^^^^                
+>        : ^ ^^^^^^^^^                        ^^ ^^^^^^^^^     ^^   ^^ ^^^^^    ^^ ^^^^^^                                        ^^      ^^^^^                
 >'test' : "test"
 >       : ^^^^^^
 >true : true
diff --git a/tests/baselines/reference/inferTypesWithExtendsDependingOnTypeVariables.symbols b/tests/baselines/reference/inferTypesWithExtendsDependingOnTypeVariables.symbols
new file mode 100644
index 0000000000000..20a17c8c279af
--- /dev/null
+++ b/tests/baselines/reference/inferTypesWithExtendsDependingOnTypeVariables.symbols
@@ -0,0 +1,18 @@
+//// [tests/cases/conformance/types/conditional/inferTypesWithExtendsDependingOnTypeVariables.ts] ////
+
+=== inferTypesWithExtendsDependingOnTypeVariables.ts ===
+// repro from https://github.com/microsoft/TypeScript/issues/54197
+
+type Bar<K, T extends readonly unknown[]> = T extends readonly [any, ...infer X extends readonly K[]] ? X : never;
+>Bar : Symbol(Bar, Decl(inferTypesWithExtendsDependingOnTypeVariables.ts, 0, 0))
+>K : Symbol(K, Decl(inferTypesWithExtendsDependingOnTypeVariables.ts, 2, 9))
+>T : Symbol(T, Decl(inferTypesWithExtendsDependingOnTypeVariables.ts, 2, 11))
+>T : Symbol(T, Decl(inferTypesWithExtendsDependingOnTypeVariables.ts, 2, 11))
+>X : Symbol(X, Decl(inferTypesWithExtendsDependingOnTypeVariables.ts, 2, 77))
+>K : Symbol(K, Decl(inferTypesWithExtendsDependingOnTypeVariables.ts, 2, 9))
+>X : Symbol(X, Decl(inferTypesWithExtendsDependingOnTypeVariables.ts, 2, 77))
+
+type Res1 = Bar<"a" | "b", ["a", "b", "b"]>
+>Res1 : Symbol(Res1, Decl(inferTypesWithExtendsDependingOnTypeVariables.ts, 2, 114))
+>Bar : Symbol(Bar, Decl(inferTypesWithExtendsDependingOnTypeVariables.ts, 0, 0))
+
diff --git a/tests/baselines/reference/inferTypesWithExtendsDependingOnTypeVariables.types b/tests/baselines/reference/inferTypesWithExtendsDependingOnTypeVariables.types
new file mode 100644
index 0000000000000..d891ae6597fca
--- /dev/null
+++ b/tests/baselines/reference/inferTypesWithExtendsDependingOnTypeVariables.types
@@ -0,0 +1,13 @@
+//// [tests/cases/conformance/types/conditional/inferTypesWithExtendsDependingOnTypeVariables.ts] ////
+
+=== inferTypesWithExtendsDependingOnTypeVariables.ts ===
+// repro from https://github.com/microsoft/TypeScript/issues/54197
+
+type Bar<K, T extends readonly unknown[]> = T extends readonly [any, ...infer X extends readonly K[]] ? X : never;
+>Bar : Bar<K, T>
+>    : ^^^^^^^^^
+
+type Res1 = Bar<"a" | "b", ["a", "b", "b"]>
+>Res1 : ["b", "b"]
+>     : ^^^^^^^^^^
+
diff --git a/tests/baselines/reference/inlayHintsOverloadCall.baseline b/tests/baselines/reference/inlayHintsOverloadCall1.baseline
similarity index 100%
rename from tests/baselines/reference/inlayHintsOverloadCall.baseline
rename to tests/baselines/reference/inlayHintsOverloadCall1.baseline
diff --git a/tests/baselines/reference/inlayHintsOverloadCall2.baseline b/tests/baselines/reference/inlayHintsOverloadCall2.baseline
new file mode 100644
index 0000000000000..37cb8b498eb4d
--- /dev/null
+++ b/tests/baselines/reference/inlayHintsOverloadCall2.baseline
@@ -0,0 +1,18 @@
+// === Inlay Hints ===
+    { n: [1, 2, 3] },
+    ^
+{
+  "text": "ok_1:",
+  "position": 195,
+  "kind": "Parameter",
+  "whitespaceAfter": true
+}
+
+    {
+    ^
+{
+  "text": "ok_2:",
+  "position": 217,
+  "kind": "Parameter",
+  "whitespaceAfter": true
+}
\ No newline at end of file
diff --git a/tests/baselines/reference/instantiationExpressionErrorNoCrash.types b/tests/baselines/reference/instantiationExpressionErrorNoCrash.types
index b32eaab984765..479e3ec1c6e0b 100644
--- a/tests/baselines/reference/instantiationExpressionErrorNoCrash.types
+++ b/tests/baselines/reference/instantiationExpressionErrorNoCrash.types
@@ -3,9 +3,9 @@
 === instantiationExpressionErrorNoCrash.ts ===
 const createCacheReducer = <N extends string, QR>(
 >createCacheReducer : <N extends string, QR>(queries: Cache<N, QR>["queries"]) => (state?: { queries: QR; }) => { queries: QR; }
->                   : ^ ^^^^^^^^^      ^^  ^^       ^^                       ^^^^^^     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>                   : ^ ^^^^^^^^^      ^^  ^^       ^^                       ^^^^^^     ^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 ><N extends string, QR>(    queries: Cache<N, QR>["queries"],) => {    const queriesMap = {} as QR;    const initialState = {        queries: queriesMap,    };    return (state = initialState) => state;} : <N extends string, QR>(queries: Cache<N, QR>["queries"]) => (state?: { queries: QR; }) => { queries: QR; }
->                                                                                                                                                                                                           : ^ ^^^^^^^^^      ^^  ^^       ^^                       ^^^^^^     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>                                                                                                                                                                                                           : ^ ^^^^^^^^^      ^^  ^^       ^^                       ^^^^^^     ^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
     queries: Cache<N, QR>["queries"],
 >queries : { [QK in keyof QR]: any; }
@@ -56,7 +56,7 @@ export type Cache<N extends string, QR> = {
 
         [QK in keyof QR]: ReturnType<typeof createCacheReducer<QR>>;
 >createCacheReducer : <N_1 extends string, QR_1>(queries: Cache<N_1, QR_1>["queries"]) => (state?: { queries: QR_1; }) => { queries: QR_1; }
->                   : ^^^^^^^^^^^^^      ^^^^^^^^       ^^                           ^^^^^^     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>                   : ^^^^^^^^^^^^^      ^^^^^^^^       ^^                           ^^^^^^     ^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
     };
 };
diff --git a/tests/baselines/reference/intersectionTypeInference1.types b/tests/baselines/reference/intersectionTypeInference1.types
index 63f9439e7f208..5dea88354b0fe 100644
--- a/tests/baselines/reference/intersectionTypeInference1.types
+++ b/tests/baselines/reference/intersectionTypeInference1.types
@@ -31,9 +31,9 @@ const parameterFn = (props:{store:string}) => alert(props.store)
 
 const brokenFunction = <OwnProps>(f: (p: {dispatch: number} & OwnProps) => void) => (o: OwnProps) => o
 >brokenFunction : <OwnProps>(f: (p: { dispatch: number; } & OwnProps) => void) => (o: OwnProps) => OwnProps
->               : ^        ^^ ^^                                             ^^^^^^ ^^        ^^^^^^^^^^^^^
+>               : ^        ^^ ^^                                             ^^^^^^           ^^^^^^^^^^^^^
 ><OwnProps>(f: (p: {dispatch: number} & OwnProps) => void) => (o: OwnProps) => o : <OwnProps>(f: (p: { dispatch: number; } & OwnProps) => void) => (o: OwnProps) => OwnProps
->                                                                                : ^        ^^ ^^                                             ^^^^^^ ^^        ^^^^^^^^^^^^^
+>                                                                                : ^        ^^ ^^                                             ^^^^^^           ^^^^^^^^^^^^^
 >f : (p: { dispatch: number; } & OwnProps) => void
 >  : ^ ^^                                ^^^^^    
 >p : { dispatch: number; } & OwnProps
@@ -55,7 +55,7 @@ export const Form3 = brokenFunction(parameterFn)({store: "hello"})
 >brokenFunction(parameterFn) : (o: { store: string; }) => { store: string; }
 >                            : ^ ^^^^^^^^^^^      ^^^^^^^^^^^^^^^^^      ^^^
 >brokenFunction : <OwnProps>(f: (p: { dispatch: number; } & OwnProps) => void) => (o: OwnProps) => OwnProps
->               : ^        ^^ ^^                                             ^^^^^^ ^^        ^^^^^^^^^^^^^
+>               : ^        ^^ ^^                                             ^^^^^^           ^^^^^^^^^^^^^
 >parameterFn : (props: { store: string; }) => void
 >            : ^     ^^                  ^^^^^^^^^
 >{store: "hello"} : { store: string; }
diff --git a/tests/baselines/reference/intersectionsAndEmptyObjects.js b/tests/baselines/reference/intersectionsAndEmptyObjects.js
index 7fad0d891b3cc..bb786ece46e72 100644
--- a/tests/baselines/reference/intersectionsAndEmptyObjects.js
+++ b/tests/baselines/reference/intersectionsAndEmptyObjects.js
@@ -111,13 +111,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 let x01;
 let x02;
 let x03;
diff --git a/tests/baselines/reference/intraExpressionInferences.types b/tests/baselines/reference/intraExpressionInferences.types
index 7078c2603beb4..37c49da2a03a3 100644
--- a/tests/baselines/reference/intraExpressionInferences.types
+++ b/tests/baselines/reference/intraExpressionInferences.types
@@ -817,7 +817,7 @@ interface Opts<TParams, TDone, TMapped> {
 
 function example<TParams, TDone, TMapped>(options: Opts<TParams, TDone, TMapped>) {
 >example : <TParams, TDone, TMapped>(options: Opts<TParams, TDone, TMapped>) => (params: TParams) => TMapped
->        : ^       ^^     ^^       ^^       ^^                             ^^^^^^      ^^       ^^^^^^^^^^^^
+>        : ^       ^^     ^^       ^^       ^^                             ^^^^^^               ^^^^^^^^^^^^
 >options : Opts<TParams, TDone, TMapped>
 >        : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
@@ -871,7 +871,7 @@ example({
 >example({    fetch: (params: Params) => 123,    map: (number) => String(number)}) : (params: Params) => string
 >                                                                                  : ^      ^^^^^^^^^^^^^^^^^^^
 >example : <TParams, TDone, TMapped>(options: Opts<TParams, TDone, TMapped>) => (params: TParams) => TMapped
->        : ^       ^^     ^^       ^^       ^^                             ^^^^^^      ^^       ^^^^^^^^^^^^
+>        : ^       ^^     ^^       ^^       ^^                             ^^^^^^               ^^^^^^^^^^^^
 >{    fetch: (params: Params) => 123,    map: (number) => String(number)} : { fetch: (params: Params) => number; map: (number: number) => string; }
 >                                                                         : ^^^^^^^^^^      ^^      ^^^^^^^^^^^^^^^^^^^      ^^^^^^^^^^^^^^^^^^^^^^
 
@@ -905,7 +905,7 @@ example({
 >example({    fetch: (params: Params, foo: number) => 123,    map: (number) => String(number)}) : (params: Params) => string
 >                                                                                               : ^      ^^^^^^^^^^^^^^^^^^^
 >example : <TParams, TDone, TMapped>(options: Opts<TParams, TDone, TMapped>) => (params: TParams) => TMapped
->        : ^       ^^     ^^       ^^       ^^                             ^^^^^^      ^^       ^^^^^^^^^^^^
+>        : ^       ^^     ^^       ^^       ^^                             ^^^^^^               ^^^^^^^^^^^^
 >{    fetch: (params: Params, foo: number) => 123,    map: (number) => String(number)} : { fetch: (params: Params, foo: number) => number; map: (number: number) => string; }
 >                                                                                      : ^^^^^^^^^^      ^^      ^^   ^^      ^^^^^^^^^^^^^^^^^^^      ^^^^^^^^^^^^^^^^^^^^^^
 
@@ -941,7 +941,7 @@ example({
 >example({    fetch: (params: Params, foo) => 123,    map: (number) => String(number)}) : (params: Params) => string
 >                                                                                       : ^      ^^^^^^^^^^^^^^^^^^^
 >example : <TParams, TDone, TMapped>(options: Opts<TParams, TDone, TMapped>) => (params: TParams) => TMapped
->        : ^       ^^     ^^       ^^       ^^                             ^^^^^^      ^^       ^^^^^^^^^^^^
+>        : ^       ^^     ^^       ^^       ^^                             ^^^^^^               ^^^^^^^^^^^^
 >{    fetch: (params: Params, foo) => 123,    map: (number) => String(number)} : { fetch: (params: Params, foo: number) => number; map: (number: number) => string; }
 >                                                                              : ^^^^^^^^^^      ^^      ^^   ^^^^^^^^^^^^^^^^^^^^^^^^^^^      ^^^^^^^^^^^^^^^^^^^^^^
 
diff --git a/tests/baselines/reference/isolatedDeclarationsAddUndefined.types b/tests/baselines/reference/isolatedDeclarationsAddUndefined.types
index 8c2ef0242be6c..40db4115589bb 100644
--- a/tests/baselines/reference/isolatedDeclarationsAddUndefined.types
+++ b/tests/baselines/reference/isolatedDeclarationsAddUndefined.types
@@ -45,7 +45,7 @@ export class Bar {
 === file2.ts ===
 export function foo(p = (ip = 10, v: number): void => {}): void{
 >foo : (p?: (ip: number | undefined, v: number) => void) => void
->    : ^ ^^^^  ^^^^^^^^^^^^^^^^^^^^^^ ^^      ^^^^^    ^^^^^    
+>    : ^ ^^^^    ^^^^^^^^^^^^^^^^^^^^         ^^^^^    ^^^^^    
 >p : (ip: number | undefined, v: number) => void
 >  : ^  ^^^^^^^^^^^^^^^^^^^^^^ ^^      ^^^^^    
 >(ip = 10, v: number): void => {} : (ip: number | undefined, v: number) => void
@@ -63,7 +63,7 @@ type T = number
 
 export function foo2(p = (ip = 10 as T, v: number): void => {}): void{}
 >foo2 : (p?: (ip: T | undefined, v: number) => void) => void
->     : ^ ^^^^  ^^ ^^^^^^^^^^^^^^ ^^      ^^^^^    ^^^^^    
+>     : ^ ^^^^     ^^^^^^^^^^^^^^         ^^^^^    ^^^^^    
 >p : (ip: T | undefined, v: number) => void
 >  : ^  ^^ ^^^^^^^^^^^^^^ ^^      ^^^^^    
 >(ip = 10 as T, v: number): void => {} : (ip: T | undefined, v: number) => void
diff --git a/tests/baselines/reference/iteratorExtraParameters.errors.txt b/tests/baselines/reference/iteratorExtraParameters.errors.txt
new file mode 100644
index 0000000000000..fec3eb9882bda
--- /dev/null
+++ b/tests/baselines/reference/iteratorExtraParameters.errors.txt
@@ -0,0 +1,50 @@
+iteratorExtraParameters.ts(11,21): error TS2488: Type '{ [Symbol.iterator](_: number): Generator<number, void, unknown>; }' must have a '[Symbol.iterator]()' method that returns an iterator.
+iteratorExtraParameters.ts(13,12): error TS2488: Type '{ [Symbol.iterator](_: number): Generator<number, void, unknown>; }' must have a '[Symbol.iterator]()' method that returns an iterator.
+iteratorExtraParameters.ts(15,9): error TS2488: Type '{ [Symbol.iterator](_: number): Generator<number, void, unknown>; }' must have a '[Symbol.iterator]()' method that returns an iterator.
+iteratorExtraParameters.ts(17,10): error TS2488: Type '{ [Symbol.iterator](_: number): Generator<number, void, unknown>; }' must have a '[Symbol.iterator]()' method that returns an iterator.
+
+
+==== iteratorExtraParameters.ts (4 errors) ====
+    // https://github.com/microsoft/TypeScript/issues/57130
+    const iter = {
+        *[Symbol.iterator](_: number) {
+            yield 0;
+        }
+    };
+    
+    declare function g(...args: any): any;
+    
+    function* f() {
+        for (const _ of iter);
+                        ~~~~
+!!! error TS2488: Type '{ [Symbol.iterator](_: number): Generator<number, void, unknown>; }' must have a '[Symbol.iterator]()' method that returns an iterator.
+!!! related TS2322 iteratorExtraParameters.ts:11:21: Type '{ [Symbol.iterator](_: number): Generator<number, void, unknown>; }' is not assignable to type 'Iterable<T, TReturn, TNext>'.
+  Types of property '[Symbol.iterator]' are incompatible.
+    Type '(_: number) => Generator<number, void, unknown>' is not assignable to type '() => Iterator<T, TReturn, TNext>'.
+      Target signature provides too few arguments. Expected 1 or more, but got 0.
+    
+        yield* iter;
+               ~~~~
+!!! error TS2488: Type '{ [Symbol.iterator](_: number): Generator<number, void, unknown>; }' must have a '[Symbol.iterator]()' method that returns an iterator.
+!!! related TS2322 iteratorExtraParameters.ts:13:12: Type '{ [Symbol.iterator](_: number): Generator<number, void, unknown>; }' is not assignable to type 'Iterable<T, TReturn, TNext>'.
+  Types of property '[Symbol.iterator]' are incompatible.
+    Type '(_: number) => Generator<number, void, unknown>' is not assignable to type '() => Iterator<T, TReturn, TNext>'.
+      Target signature provides too few arguments. Expected 1 or more, but got 0.
+    
+        [...iter]
+            ~~~~
+!!! error TS2488: Type '{ [Symbol.iterator](_: number): Generator<number, void, unknown>; }' must have a '[Symbol.iterator]()' method that returns an iterator.
+!!! related TS2322 iteratorExtraParameters.ts:15:9: Type '{ [Symbol.iterator](_: number): Generator<number, void, unknown>; }' is not assignable to type 'Iterable<T, TReturn, TNext>'.
+  Types of property '[Symbol.iterator]' are incompatible.
+    Type '(_: number) => Generator<number, void, unknown>' is not assignable to type '() => Iterator<T, TReturn, TNext>'.
+      Target signature provides too few arguments. Expected 1 or more, but got 0.
+    
+        g(...iter);
+             ~~~~
+!!! error TS2488: Type '{ [Symbol.iterator](_: number): Generator<number, void, unknown>; }' must have a '[Symbol.iterator]()' method that returns an iterator.
+!!! related TS2322 iteratorExtraParameters.ts:17:10: Type '{ [Symbol.iterator](_: number): Generator<number, void, unknown>; }' is not assignable to type 'Iterable<T, TReturn, TNext>'.
+  Types of property '[Symbol.iterator]' are incompatible.
+    Type '(_: number) => Generator<number, void, unknown>' is not assignable to type '() => Iterator<T, TReturn, TNext>'.
+      Target signature provides too few arguments. Expected 1 or more, but got 0.
+    }
+    
\ No newline at end of file
diff --git a/tests/baselines/reference/jsdocSignatureOnReturnedFunction.types b/tests/baselines/reference/jsdocSignatureOnReturnedFunction.types
index df1f478940662..c603114085451 100644
--- a/tests/baselines/reference/jsdocSignatureOnReturnedFunction.types
+++ b/tests/baselines/reference/jsdocSignatureOnReturnedFunction.types
@@ -3,7 +3,7 @@
 === jsdocSignatureOnReturnedFunction.js ===
 function f1() {
 >f1 : () => (a: number, b: number) => number
->   : ^^^^^^^ ^^      ^^ ^^      ^^^^^      
+>   : ^^^^^^^         ^^         ^^^^^      
 
     /**
      * @param {number} a
@@ -30,7 +30,7 @@ function f1() {
 
 function f2() {
 >f2 : () => (a: number, b: number) => number
->   : ^^^^^^^ ^^      ^^ ^^      ^^^^^      
+>   : ^^^^^^^         ^^         ^^^^^      
 
     /**
      * @param {number} a
diff --git a/tests/baselines/reference/jsxFragReactReferenceErrors(jsx=preserve).js b/tests/baselines/reference/jsxFragReactReferenceErrors(jsx=preserve).js
new file mode 100644
index 0000000000000..29e499dbf98ea
--- /dev/null
+++ b/tests/baselines/reference/jsxFragReactReferenceErrors(jsx=preserve).js
@@ -0,0 +1,18 @@
+//// [tests/cases/compiler/jsxFragReactReferenceErrors.tsx] ////
+
+//// [jsxFragReactReferenceErrors.tsx]
+/// <reference path="/.lib/react18/react18.d.ts" />
+/// <reference path="/.lib/react18/global.d.ts" />
+export function Component(){
+
+return <>
+  </>
+}
+
+//// [jsxFragReactReferenceErrors.jsx]
+/// <reference path="react18/react18.d.ts" />
+/// <reference path="react18/global.d.ts" />
+export function Component() {
+    return <>
+  </>;
+}
diff --git a/tests/baselines/reference/jsxFragReactReferenceErrors(jsx=preserve).symbols b/tests/baselines/reference/jsxFragReactReferenceErrors(jsx=preserve).symbols
new file mode 100644
index 0000000000000..df63a975364b0
--- /dev/null
+++ b/tests/baselines/reference/jsxFragReactReferenceErrors(jsx=preserve).symbols
@@ -0,0 +1,11 @@
+//// [tests/cases/compiler/jsxFragReactReferenceErrors.tsx] ////
+
+=== jsxFragReactReferenceErrors.tsx ===
+/// <reference path="react18/react18.d.ts" />
+/// <reference path="react18/global.d.ts" />
+export function Component(){
+>Component : Symbol(Component, Decl(jsxFragReactReferenceErrors.tsx, 0, 0))
+
+return <>
+  </>
+}
diff --git a/tests/baselines/reference/jsxFragReactReferenceErrors(jsx=preserve).types b/tests/baselines/reference/jsxFragReactReferenceErrors(jsx=preserve).types
new file mode 100644
index 0000000000000..64a3cab0824cf
--- /dev/null
+++ b/tests/baselines/reference/jsxFragReactReferenceErrors(jsx=preserve).types
@@ -0,0 +1,15 @@
+//// [tests/cases/compiler/jsxFragReactReferenceErrors.tsx] ////
+
+=== jsxFragReactReferenceErrors.tsx ===
+/// <reference path="react18/react18.d.ts" />
+/// <reference path="react18/global.d.ts" />
+export function Component(){
+>Component : () => JSX.Element
+>          : ^^^^^^^^^^^^^^^^^
+
+return <>
+><>  </> : JSX.Element
+>        : ^^^^^^^^^^^
+
+  </>
+}
diff --git a/tests/baselines/reference/jsxFragReactReferenceErrors(jsx=react-native).js b/tests/baselines/reference/jsxFragReactReferenceErrors(jsx=react-native).js
new file mode 100644
index 0000000000000..9ccb21875c4e4
--- /dev/null
+++ b/tests/baselines/reference/jsxFragReactReferenceErrors(jsx=react-native).js
@@ -0,0 +1,18 @@
+//// [tests/cases/compiler/jsxFragReactReferenceErrors.tsx] ////
+
+//// [jsxFragReactReferenceErrors.tsx]
+/// <reference path="/.lib/react18/react18.d.ts" />
+/// <reference path="/.lib/react18/global.d.ts" />
+export function Component(){
+
+return <>
+  </>
+}
+
+//// [jsxFragReactReferenceErrors.js]
+/// <reference path="react18/react18.d.ts" />
+/// <reference path="react18/global.d.ts" />
+export function Component() {
+    return <>
+  </>;
+}
diff --git a/tests/baselines/reference/jsxFragReactReferenceErrors(jsx=react-native).symbols b/tests/baselines/reference/jsxFragReactReferenceErrors(jsx=react-native).symbols
new file mode 100644
index 0000000000000..df63a975364b0
--- /dev/null
+++ b/tests/baselines/reference/jsxFragReactReferenceErrors(jsx=react-native).symbols
@@ -0,0 +1,11 @@
+//// [tests/cases/compiler/jsxFragReactReferenceErrors.tsx] ////
+
+=== jsxFragReactReferenceErrors.tsx ===
+/// <reference path="react18/react18.d.ts" />
+/// <reference path="react18/global.d.ts" />
+export function Component(){
+>Component : Symbol(Component, Decl(jsxFragReactReferenceErrors.tsx, 0, 0))
+
+return <>
+  </>
+}
diff --git a/tests/baselines/reference/jsxFragReactReferenceErrors(jsx=react-native).types b/tests/baselines/reference/jsxFragReactReferenceErrors(jsx=react-native).types
new file mode 100644
index 0000000000000..64a3cab0824cf
--- /dev/null
+++ b/tests/baselines/reference/jsxFragReactReferenceErrors(jsx=react-native).types
@@ -0,0 +1,15 @@
+//// [tests/cases/compiler/jsxFragReactReferenceErrors.tsx] ////
+
+=== jsxFragReactReferenceErrors.tsx ===
+/// <reference path="react18/react18.d.ts" />
+/// <reference path="react18/global.d.ts" />
+export function Component(){
+>Component : () => JSX.Element
+>          : ^^^^^^^^^^^^^^^^^
+
+return <>
+><>  </> : JSX.Element
+>        : ^^^^^^^^^^^
+
+  </>
+}
diff --git a/tests/baselines/reference/keyofAndIndexedAccess.types b/tests/baselines/reference/keyofAndIndexedAccess.types
index b2a181563045a..33fafc02e83a9 100644
--- a/tests/baselines/reference/keyofAndIndexedAccess.types
+++ b/tests/baselines/reference/keyofAndIndexedAccess.types
@@ -2429,9 +2429,9 @@ function f1(thing: Thing) {
 
 const assignTo2 = <T, K1 extends keyof T, K2 extends keyof T[K1]>(object: T, key1: K1, key2: K2) =>
 >assignTo2 : <T, K1 extends keyof T, K2 extends keyof T[K1]>(object: T, key1: K1, key2: K2) => (value: T[K1][K2]) => T[K1][K2]
->          : ^ ^^  ^^^^^^^^^       ^^  ^^^^^^^^^           ^^      ^^ ^^    ^^  ^^    ^^  ^^^^^^     ^^         ^^^^^^^^^^^^^^
+>          : ^ ^^  ^^^^^^^^^       ^^  ^^^^^^^^^           ^^      ^^ ^^    ^^  ^^    ^^  ^^^^^^                ^^^^^^^^^^^^^^
 ><T, K1 extends keyof T, K2 extends keyof T[K1]>(object: T, key1: K1, key2: K2) =>    (value: T[K1][K2]) => object[key1][key2] = value : <T, K1 extends keyof T, K2 extends keyof T[K1]>(object: T, key1: K1, key2: K2) => (value: T[K1][K2]) => T[K1][K2]
->                                                                                                                                      : ^ ^^  ^^^^^^^^^       ^^  ^^^^^^^^^           ^^      ^^ ^^    ^^  ^^    ^^  ^^^^^^     ^^         ^^^^^^^^^^^^^^
+>                                                                                                                                      : ^ ^^  ^^^^^^^^^       ^^  ^^^^^^^^^           ^^      ^^ ^^    ^^  ^^    ^^  ^^^^^^                ^^^^^^^^^^^^^^
 >object : T
 >       : ^
 >key1 : K1
diff --git a/tests/baselines/reference/mixinWithBaseDependingOnSelfNoCrash1.errors.txt b/tests/baselines/reference/mixinWithBaseDependingOnSelfNoCrash1.errors.txt
new file mode 100644
index 0000000000000..32bf1ab29c710
--- /dev/null
+++ b/tests/baselines/reference/mixinWithBaseDependingOnSelfNoCrash1.errors.txt
@@ -0,0 +1,22 @@
+mixinWithBaseDependingOnSelfNoCrash1.ts(11,48): error TS2345: Argument of type 'typeof BaseItem' is not assignable to parameter of type 'new (...args: any[]) => any'.
+  Type 'typeof BaseItem' provides no match for the signature 'new (...args: any[]): any'.
+
+
+==== mixinWithBaseDependingOnSelfNoCrash1.ts (1 errors) ====
+    // https://github.com/microsoft/TypeScript/issues/60202
+    
+    declare class Document<Parent> {}
+    
+    declare class BaseItem extends Document<typeof Item> {}
+    
+    declare function ClientDocumentMixin<
+      BaseClass extends new (...args: any[]) => any,
+    >(Base: BaseClass): any;
+    
+    declare class Item extends ClientDocumentMixin(BaseItem) {}
+                                                   ~~~~~~~~
+!!! error TS2345: Argument of type 'typeof BaseItem' is not assignable to parameter of type 'new (...args: any[]) => any'.
+!!! error TS2345:   Type 'typeof BaseItem' provides no match for the signature 'new (...args: any[]): any'.
+    
+    export {};
+    
\ No newline at end of file
diff --git a/tests/baselines/reference/mixinWithBaseDependingOnSelfNoCrash1.symbols b/tests/baselines/reference/mixinWithBaseDependingOnSelfNoCrash1.symbols
new file mode 100644
index 0000000000000..5ee8ad8a80a88
--- /dev/null
+++ b/tests/baselines/reference/mixinWithBaseDependingOnSelfNoCrash1.symbols
@@ -0,0 +1,32 @@
+//// [tests/cases/conformance/classes/mixinWithBaseDependingOnSelfNoCrash1.ts] ////
+
+=== mixinWithBaseDependingOnSelfNoCrash1.ts ===
+// https://github.com/microsoft/TypeScript/issues/60202
+
+declare class Document<Parent> {}
+>Document : Symbol(Document, Decl(mixinWithBaseDependingOnSelfNoCrash1.ts, 0, 0))
+>Parent : Symbol(Parent, Decl(mixinWithBaseDependingOnSelfNoCrash1.ts, 2, 23))
+
+declare class BaseItem extends Document<typeof Item> {}
+>BaseItem : Symbol(BaseItem, Decl(mixinWithBaseDependingOnSelfNoCrash1.ts, 2, 33))
+>Document : Symbol(Document, Decl(mixinWithBaseDependingOnSelfNoCrash1.ts, 0, 0))
+>Item : Symbol(Item, Decl(mixinWithBaseDependingOnSelfNoCrash1.ts, 8, 24))
+
+declare function ClientDocumentMixin<
+>ClientDocumentMixin : Symbol(ClientDocumentMixin, Decl(mixinWithBaseDependingOnSelfNoCrash1.ts, 4, 55))
+
+  BaseClass extends new (...args: any[]) => any,
+>BaseClass : Symbol(BaseClass, Decl(mixinWithBaseDependingOnSelfNoCrash1.ts, 6, 37))
+>args : Symbol(args, Decl(mixinWithBaseDependingOnSelfNoCrash1.ts, 7, 25))
+
+>(Base: BaseClass): any;
+>Base : Symbol(Base, Decl(mixinWithBaseDependingOnSelfNoCrash1.ts, 8, 2))
+>BaseClass : Symbol(BaseClass, Decl(mixinWithBaseDependingOnSelfNoCrash1.ts, 6, 37))
+
+declare class Item extends ClientDocumentMixin(BaseItem) {}
+>Item : Symbol(Item, Decl(mixinWithBaseDependingOnSelfNoCrash1.ts, 8, 24))
+>ClientDocumentMixin : Symbol(ClientDocumentMixin, Decl(mixinWithBaseDependingOnSelfNoCrash1.ts, 4, 55))
+>BaseItem : Symbol(BaseItem, Decl(mixinWithBaseDependingOnSelfNoCrash1.ts, 2, 33))
+
+export {};
+
diff --git a/tests/baselines/reference/mixinWithBaseDependingOnSelfNoCrash1.types b/tests/baselines/reference/mixinWithBaseDependingOnSelfNoCrash1.types
new file mode 100644
index 0000000000000..faf32bed91b60
--- /dev/null
+++ b/tests/baselines/reference/mixinWithBaseDependingOnSelfNoCrash1.types
@@ -0,0 +1,41 @@
+//// [tests/cases/conformance/classes/mixinWithBaseDependingOnSelfNoCrash1.ts] ////
+
+=== mixinWithBaseDependingOnSelfNoCrash1.ts ===
+// https://github.com/microsoft/TypeScript/issues/60202
+
+declare class Document<Parent> {}
+>Document : Document<Parent>
+>         : ^^^^^^^^^^^^^^^^
+
+declare class BaseItem extends Document<typeof Item> {}
+>BaseItem : BaseItem
+>         : ^^^^^^^^
+>Document : Document<typeof Item>
+>         : ^^^^^^^^^^^^^^^^^^^^^
+>Item : typeof Item
+>     : ^^^^^^^^^^^
+
+declare function ClientDocumentMixin<
+>ClientDocumentMixin : <BaseClass extends new (...args: any[]) => any>(Base: BaseClass) => any
+>                    : ^         ^^^^^^^^^                           ^^    ^^         ^^^^^   
+
+  BaseClass extends new (...args: any[]) => any,
+>args : any[]
+>     : ^^^^^
+
+>(Base: BaseClass): any;
+>Base : BaseClass
+>     : ^^^^^^^^^
+
+declare class Item extends ClientDocumentMixin(BaseItem) {}
+>Item : Item
+>     : ^^^^
+>ClientDocumentMixin(BaseItem) : any
+>                              : ^^^
+>ClientDocumentMixin : <BaseClass extends new (...args: any[]) => any>(Base: BaseClass) => any
+>                    : ^         ^^^^^^^^^                           ^^    ^^         ^^^^^   
+>BaseItem : typeof BaseItem
+>         : ^^^^^^^^^^^^^^^
+
+export {};
+
diff --git a/tests/baselines/reference/modulePreserve2.trace.json b/tests/baselines/reference/modulePreserve2.trace.json
index 2c5e355a9c5f1..5be93c83ba8f0 100644
--- a/tests/baselines/reference/modulePreserve2.trace.json
+++ b/tests/baselines/reference/modulePreserve2.trace.json
@@ -1103,6 +1103,20 @@
     "======== Module name '@typescript/lib-esnext/iterator' was not resolved. ========",
     "File '/.ts/package.json' does not exist according to earlier cached lookups.",
     "File '/package.json' does not exist according to earlier cached lookups.",
+    "======== Resolving module '@typescript/lib-esnext/promise' from '/.src/__lib_node_modules_lookup_lib.esnext.promise.d.ts__.ts'. ========",
+    "Explicitly specified module resolution kind: 'Node10'.",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: TypeScript, Declaration.",
+    "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
+    "Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Directory '/node_modules/@types' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: JavaScript.",
+    "Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
+    "Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
+    "======== Module name '@typescript/lib-esnext/promise' was not resolved. ========",
+    "File '/.ts/package.json' does not exist according to earlier cached lookups.",
+    "File '/package.json' does not exist according to earlier cached lookups.",
     "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========",
     "Explicitly specified module resolution kind: 'Node10'.",
     "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.",
diff --git a/tests/baselines/reference/modulePreserve3.trace.json b/tests/baselines/reference/modulePreserve3.trace.json
index 8af477a6c587a..b94656b2ece0b 100644
--- a/tests/baselines/reference/modulePreserve3.trace.json
+++ b/tests/baselines/reference/modulePreserve3.trace.json
@@ -1030,6 +1030,19 @@
     "======== Module name '@typescript/lib-esnext/iterator' was not resolved. ========",
     "File '/.ts/package.json' does not exist according to earlier cached lookups.",
     "File '/package.json' does not exist according to earlier cached lookups.",
+    "======== Resolving module '@typescript/lib-esnext/promise' from '/.src/__lib_node_modules_lookup_lib.esnext.promise.d.ts__.ts'. ========",
+    "Explicitly specified module resolution kind: 'Node10'.",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: TypeScript, Declaration.",
+    "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
+    "Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: JavaScript.",
+    "Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
+    "Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
+    "======== Module name '@typescript/lib-esnext/promise' was not resolved. ========",
+    "File '/.ts/package.json' does not exist according to earlier cached lookups.",
+    "File '/package.json' does not exist according to earlier cached lookups.",
     "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========",
     "Explicitly specified module resolution kind: 'Node10'.",
     "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.",
diff --git a/tests/baselines/reference/moduleResolutionWithModule(module=node16,moduleresolution=node16).js b/tests/baselines/reference/moduleResolutionWithModule(module=node16,moduleresolution=node16).js
index 23844cf6bab19..2d0c7b4607ea5 100644
--- a/tests/baselines/reference/moduleResolutionWithModule(module=node16,moduleresolution=node16).js
+++ b/tests/baselines/reference/moduleResolutionWithModule(module=node16,moduleresolution=node16).js
@@ -30,13 +30,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 const p = __importStar(require("pkg"));
 p.thing();
diff --git a/tests/baselines/reference/moduleResolutionWithModule(module=node16,moduleresolution=nodenext).js b/tests/baselines/reference/moduleResolutionWithModule(module=node16,moduleresolution=nodenext).js
index 23844cf6bab19..2d0c7b4607ea5 100644
--- a/tests/baselines/reference/moduleResolutionWithModule(module=node16,moduleresolution=nodenext).js
+++ b/tests/baselines/reference/moduleResolutionWithModule(module=node16,moduleresolution=nodenext).js
@@ -30,13 +30,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 const p = __importStar(require("pkg"));
 p.thing();
diff --git a/tests/baselines/reference/moduleResolutionWithModule(module=nodenext,moduleresolution=node16).js b/tests/baselines/reference/moduleResolutionWithModule(module=nodenext,moduleresolution=node16).js
index 23844cf6bab19..2d0c7b4607ea5 100644
--- a/tests/baselines/reference/moduleResolutionWithModule(module=nodenext,moduleresolution=node16).js
+++ b/tests/baselines/reference/moduleResolutionWithModule(module=nodenext,moduleresolution=node16).js
@@ -30,13 +30,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 const p = __importStar(require("pkg"));
 p.thing();
diff --git a/tests/baselines/reference/moduleResolutionWithModule(module=nodenext,moduleresolution=nodenext).js b/tests/baselines/reference/moduleResolutionWithModule(module=nodenext,moduleresolution=nodenext).js
index 23844cf6bab19..2d0c7b4607ea5 100644
--- a/tests/baselines/reference/moduleResolutionWithModule(module=nodenext,moduleresolution=nodenext).js
+++ b/tests/baselines/reference/moduleResolutionWithModule(module=nodenext,moduleresolution=nodenext).js
@@ -30,13 +30,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 const p = __importStar(require("pkg"));
 p.thing();
diff --git a/tests/baselines/reference/narrowingPastLastAssignment.types b/tests/baselines/reference/narrowingPastLastAssignment.types
index 6b6ea09ba96ca..f2c62a10d1381 100644
--- a/tests/baselines/reference/narrowingPastLastAssignment.types
+++ b/tests/baselines/reference/narrowingPastLastAssignment.types
@@ -567,7 +567,7 @@ namespace Foo {
 
 function f10() {
 >f10 : () => (k: number) => boolean
->    : ^^^^^^^ ^^      ^^^^^^^^^^^^
+>    : ^^^^^^^         ^^^^^^^^^^^^
 
     let i: number | undefined;
 >i : number | undefined
@@ -600,7 +600,7 @@ function f10() {
 
 function makeAdder(n?: number) {
 >makeAdder : (n?: number) => (m: number) => number
->          : ^ ^^^      ^^^^^^ ^^      ^^^^^^^^^^^
+>          : ^ ^^^      ^^^^^^         ^^^^^^^^^^^
 >n : number | undefined
 >  : ^^^^^^^^^^^^^^^^^^
 
diff --git a/tests/baselines/reference/nestedRecursiveLambda.types b/tests/baselines/reference/nestedRecursiveLambda.types
index 097b3ce0cba15..7e99adf7f4c77 100644
--- a/tests/baselines/reference/nestedRecursiveLambda.types
+++ b/tests/baselines/reference/nestedRecursiveLambda.types
@@ -10,9 +10,9 @@ void (r =>(r => r));
 >void (r =>(r => r)) : undefined
 >                    : ^^^^^^^^^
 >(r =>(r => r)) : (r: any) => (r: any) => any
->               : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^
+>               : ^ ^^^^^^^^^^^   ^^^^^^^^^^^
 >r =>(r => r) : (r: any) => (r: any) => any
->             : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^
+>             : ^ ^^^^^^^^^^^   ^^^^^^^^^^^
 >r : any
 >(r => r) : (r: any) => any
 >         : ^ ^^^^^^^^^^^^^
@@ -42,9 +42,9 @@ void(r =>(r => r));
 >void(r =>(r => r)) : undefined
 >                   : ^^^^^^^^^
 >(r =>(r => r)) : (r: any) => (r: any) => any
->               : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^
+>               : ^ ^^^^^^^^^^^   ^^^^^^^^^^^
 >r =>(r => r) : (r: any) => (r: any) => any
->             : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^
+>             : ^ ^^^^^^^^^^^   ^^^^^^^^^^^
 >r : any
 >(r => r) : (r: any) => any
 >         : ^ ^^^^^^^^^^^^^
@@ -55,11 +55,11 @@ void(r =>(r => r));
 
 [(r =>(r => r))]
 >[(r =>(r => r))] : ((r: any) => (r: any) => any)[]
->                 : ^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
+>                 : ^^ ^^^^^^^^^^^   ^^^^^^^^^^^^^^
 >(r =>(r => r)) : (r: any) => (r: any) => any
->               : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^
+>               : ^ ^^^^^^^^^^^   ^^^^^^^^^^^
 >r =>(r => r) : (r: any) => (r: any) => any
->             : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^
+>             : ^ ^^^^^^^^^^^   ^^^^^^^^^^^
 >r : any
 >(r => r) : (r: any) => any
 >         : ^ ^^^^^^^^^^^^^
diff --git a/tests/baselines/reference/nodeAllowJsPackageSelfName(module=node16).js b/tests/baselines/reference/nodeAllowJsPackageSelfName(module=node16).js
index aeafa06e28154..1498e98d79602 100644
--- a/tests/baselines/reference/nodeAllowJsPackageSelfName(module=node16).js
+++ b/tests/baselines/reference/nodeAllowJsPackageSelfName(module=node16).js
@@ -46,13 +46,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // esm format file
 const self = __importStar(require("package"));
diff --git a/tests/baselines/reference/nodeAllowJsPackageSelfName(module=nodenext).js b/tests/baselines/reference/nodeAllowJsPackageSelfName(module=nodenext).js
index aeafa06e28154..1498e98d79602 100644
--- a/tests/baselines/reference/nodeAllowJsPackageSelfName(module=nodenext).js
+++ b/tests/baselines/reference/nodeAllowJsPackageSelfName(module=nodenext).js
@@ -46,13 +46,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // esm format file
 const self = __importStar(require("package"));
diff --git a/tests/baselines/reference/nodeModules1(module=node16).js b/tests/baselines/reference/nodeModules1(module=node16).js
index 5b6840498ef10..bfebc4d12e830 100644
--- a/tests/baselines/reference/nodeModules1(module=node16).js
+++ b/tests/baselines/reference/nodeModules1(module=node16).js
@@ -389,13 +389,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.x = void 0;
 // ESM-format imports below should issue errors
diff --git a/tests/baselines/reference/nodeModules1(module=nodenext).js b/tests/baselines/reference/nodeModules1(module=nodenext).js
index 5b6840498ef10..bfebc4d12e830 100644
--- a/tests/baselines/reference/nodeModules1(module=nodenext).js
+++ b/tests/baselines/reference/nodeModules1(module=nodenext).js
@@ -389,13 +389,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.x = void 0;
 // ESM-format imports below should issue errors
diff --git a/tests/baselines/reference/nodeModulesAllowJs1(module=node16).js b/tests/baselines/reference/nodeModulesAllowJs1(module=node16).js
index 1376e7c5aea80..4a63449d26383 100644
--- a/tests/baselines/reference/nodeModulesAllowJs1(module=node16).js
+++ b/tests/baselines/reference/nodeModulesAllowJs1(module=node16).js
@@ -389,13 +389,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.x = void 0;
 // ESM-format imports below should issue errors
diff --git a/tests/baselines/reference/nodeModulesAllowJs1(module=nodenext).js b/tests/baselines/reference/nodeModulesAllowJs1(module=nodenext).js
index 1376e7c5aea80..4a63449d26383 100644
--- a/tests/baselines/reference/nodeModulesAllowJs1(module=nodenext).js
+++ b/tests/baselines/reference/nodeModulesAllowJs1(module=nodenext).js
@@ -389,13 +389,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.x = void 0;
 // ESM-format imports below should issue errors
diff --git a/tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=node16).js b/tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=node16).js
index c117ac16cc8ab..89094051db9df 100644
--- a/tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=node16).js
+++ b/tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=node16).js
@@ -156,13 +156,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // cjs format file
 const cjs = __importStar(require("package/cjs"));
diff --git a/tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=nodenext).js b/tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=nodenext).js
index c117ac16cc8ab..89094051db9df 100644
--- a/tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=nodenext).js
+++ b/tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=nodenext).js
@@ -156,13 +156,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // cjs format file
 const cjs = __importStar(require("package/cjs"));
diff --git a/tests/baselines/reference/nodeModulesAllowJsPackageExports(module=node16).js b/tests/baselines/reference/nodeModulesAllowJsPackageExports(module=node16).js
index e3375b612b21b..208b7a1a36fde 100644
--- a/tests/baselines/reference/nodeModulesAllowJsPackageExports(module=node16).js
+++ b/tests/baselines/reference/nodeModulesAllowJsPackageExports(module=node16).js
@@ -120,13 +120,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // cjs format file
 const cjs = __importStar(require("package/cjs"));
diff --git a/tests/baselines/reference/nodeModulesAllowJsPackageExports(module=nodenext).js b/tests/baselines/reference/nodeModulesAllowJsPackageExports(module=nodenext).js
index e3375b612b21b..208b7a1a36fde 100644
--- a/tests/baselines/reference/nodeModulesAllowJsPackageExports(module=nodenext).js
+++ b/tests/baselines/reference/nodeModulesAllowJsPackageExports(module=nodenext).js
@@ -120,13 +120,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // cjs format file
 const cjs = __importStar(require("package/cjs"));
diff --git a/tests/baselines/reference/nodeModulesAllowJsPackageImports(module=node16).js b/tests/baselines/reference/nodeModulesAllowJsPackageImports(module=node16).js
index e0863137eee73..510e6b7128c79 100644
--- a/tests/baselines/reference/nodeModulesAllowJsPackageImports(module=node16).js
+++ b/tests/baselines/reference/nodeModulesAllowJsPackageImports(module=node16).js
@@ -63,13 +63,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // esm format file
 const cjs = __importStar(require("#cjs"));
diff --git a/tests/baselines/reference/nodeModulesAllowJsPackageImports(module=nodenext).js b/tests/baselines/reference/nodeModulesAllowJsPackageImports(module=nodenext).js
index e0863137eee73..510e6b7128c79 100644
--- a/tests/baselines/reference/nodeModulesAllowJsPackageImports(module=nodenext).js
+++ b/tests/baselines/reference/nodeModulesAllowJsPackageImports(module=nodenext).js
@@ -63,13 +63,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // esm format file
 const cjs = __importStar(require("#cjs"));
diff --git a/tests/baselines/reference/nodeModulesAllowJsPackagePatternExports(module=node16).js b/tests/baselines/reference/nodeModulesAllowJsPackagePatternExports(module=node16).js
index db1bb37d36aac..79669dc7d4da8 100644
--- a/tests/baselines/reference/nodeModulesAllowJsPackagePatternExports(module=node16).js
+++ b/tests/baselines/reference/nodeModulesAllowJsPackagePatternExports(module=node16).js
@@ -99,13 +99,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // cjs format file
 const cjsi = __importStar(require("inner/cjs/index"));
diff --git a/tests/baselines/reference/nodeModulesAllowJsPackagePatternExports(module=nodenext).js b/tests/baselines/reference/nodeModulesAllowJsPackagePatternExports(module=nodenext).js
index db1bb37d36aac..79669dc7d4da8 100644
--- a/tests/baselines/reference/nodeModulesAllowJsPackagePatternExports(module=nodenext).js
+++ b/tests/baselines/reference/nodeModulesAllowJsPackagePatternExports(module=nodenext).js
@@ -99,13 +99,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // cjs format file
 const cjsi = __importStar(require("inner/cjs/index"));
diff --git a/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsExclude(module=node16).js b/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsExclude(module=node16).js
index 7ede2700377a9..3ba5fbbce0406 100644
--- a/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsExclude(module=node16).js
+++ b/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsExclude(module=node16).js
@@ -102,13 +102,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // cjs format file
 const cjsi = __importStar(require("inner/cjs/exclude/index"));
diff --git a/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsExclude(module=nodenext).js b/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsExclude(module=nodenext).js
index 7ede2700377a9..3ba5fbbce0406 100644
--- a/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsExclude(module=nodenext).js
+++ b/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsExclude(module=nodenext).js
@@ -102,13 +102,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // cjs format file
 const cjsi = __importStar(require("inner/cjs/exclude/index"));
diff --git a/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=node16).js b/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=node16).js
index e10a987a39924..b23d73a88c0e9 100644
--- a/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=node16).js
+++ b/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=node16).js
@@ -99,13 +99,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // cjs format file
 const cjsi = __importStar(require("inner/cjs/index.cjs"));
diff --git a/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=nodenext).js b/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=nodenext).js
index e10a987a39924..b23d73a88c0e9 100644
--- a/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=nodenext).js
+++ b/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=nodenext).js
@@ -99,13 +99,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // cjs format file
 const cjsi = __importStar(require("inner/cjs/index.cjs"));
diff --git a/tests/baselines/reference/nodeModulesConditionalPackageExports(module=node16).js b/tests/baselines/reference/nodeModulesConditionalPackageExports(module=node16).js
index a67f7fdfdd48d..8bf4f316a59ff 100644
--- a/tests/baselines/reference/nodeModulesConditionalPackageExports(module=node16).js
+++ b/tests/baselines/reference/nodeModulesConditionalPackageExports(module=node16).js
@@ -156,13 +156,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // cjs format file
 const cjs = __importStar(require("package/cjs"));
diff --git a/tests/baselines/reference/nodeModulesConditionalPackageExports(module=nodenext).js b/tests/baselines/reference/nodeModulesConditionalPackageExports(module=nodenext).js
index a67f7fdfdd48d..8bf4f316a59ff 100644
--- a/tests/baselines/reference/nodeModulesConditionalPackageExports(module=nodenext).js
+++ b/tests/baselines/reference/nodeModulesConditionalPackageExports(module=nodenext).js
@@ -156,13 +156,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // cjs format file
 const cjs = __importStar(require("package/cjs"));
diff --git a/tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=node16).js b/tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=node16).js
index 7500542fd8d1b..58d736d2641fe 100644
--- a/tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=node16).js
+++ b/tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=node16).js
@@ -123,13 +123,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.f = exports.e = exports.d = exports.c = exports.b = exports.a = void 0;
 // cjs format file
diff --git a/tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=nodenext).js b/tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=nodenext).js
index 7500542fd8d1b..58d736d2641fe 100644
--- a/tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=nodenext).js
+++ b/tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=nodenext).js
@@ -123,13 +123,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.f = exports.e = exports.d = exports.c = exports.b = exports.a = void 0;
 // cjs format file
diff --git a/tests/baselines/reference/nodeModulesExportsBlocksTypesVersions(module=nodenext).trace.json b/tests/baselines/reference/nodeModulesExportsBlocksTypesVersions(module=nodenext).trace.json
index cf69499e12883..94077f69708fb 100644
--- a/tests/baselines/reference/nodeModulesExportsBlocksTypesVersions(module=nodenext).trace.json
+++ b/tests/baselines/reference/nodeModulesExportsBlocksTypesVersions(module=nodenext).trace.json
@@ -1273,6 +1273,20 @@
     "======== Module name '@typescript/lib-esnext/iterator' was not resolved. ========",
     "File '/.ts/package.json' does not exist according to earlier cached lookups.",
     "File '/package.json' does not exist according to earlier cached lookups.",
+    "======== Resolving module '@typescript/lib-esnext/promise' from '/.src/__lib_node_modules_lookup_lib.esnext.promise.d.ts__.ts'. ========",
+    "Explicitly specified module resolution kind: 'Node10'.",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: TypeScript, Declaration.",
+    "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
+    "Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Directory '/node_modules/@types' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: JavaScript.",
+    "Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
+    "Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
+    "======== Module name '@typescript/lib-esnext/promise' was not resolved. ========",
+    "File '/.ts/package.json' does not exist according to earlier cached lookups.",
+    "File '/package.json' does not exist according to earlier cached lookups.",
     "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========",
     "Explicitly specified module resolution kind: 'Node10'.",
     "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.",
diff --git a/tests/baselines/reference/nodeModulesImportResolutionIntoExport(module=node16).js b/tests/baselines/reference/nodeModulesImportResolutionIntoExport(module=node16).js
index d9c0ba1a429a3..a60b20a63d224 100644
--- a/tests/baselines/reference/nodeModulesImportResolutionIntoExport(module=node16).js
+++ b/tests/baselines/reference/nodeModulesImportResolutionIntoExport(module=node16).js
@@ -41,13 +41,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // esm format file
 const type = __importStar(require("#type"));
diff --git a/tests/baselines/reference/nodeModulesImportResolutionIntoExport(module=nodenext).js b/tests/baselines/reference/nodeModulesImportResolutionIntoExport(module=nodenext).js
index d9c0ba1a429a3..a60b20a63d224 100644
--- a/tests/baselines/reference/nodeModulesImportResolutionIntoExport(module=nodenext).js
+++ b/tests/baselines/reference/nodeModulesImportResolutionIntoExport(module=nodenext).js
@@ -41,13 +41,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // esm format file
 const type = __importStar(require("#type"));
diff --git a/tests/baselines/reference/nodeModulesImportResolutionNoCycle(module=node16).js b/tests/baselines/reference/nodeModulesImportResolutionNoCycle(module=node16).js
index a5ed511f6f5f7..fa6401e1a49a4 100644
--- a/tests/baselines/reference/nodeModulesImportResolutionNoCycle(module=node16).js
+++ b/tests/baselines/reference/nodeModulesImportResolutionNoCycle(module=node16).js
@@ -49,13 +49,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // esm format file
 const type = __importStar(require("#type"));
diff --git a/tests/baselines/reference/nodeModulesImportResolutionNoCycle(module=nodenext).js b/tests/baselines/reference/nodeModulesImportResolutionNoCycle(module=nodenext).js
index a5ed511f6f5f7..fa6401e1a49a4 100644
--- a/tests/baselines/reference/nodeModulesImportResolutionNoCycle(module=nodenext).js
+++ b/tests/baselines/reference/nodeModulesImportResolutionNoCycle(module=nodenext).js
@@ -49,13 +49,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // esm format file
 const type = __importStar(require("#type"));
diff --git a/tests/baselines/reference/nodeModulesPackageExports(module=node16).js b/tests/baselines/reference/nodeModulesPackageExports(module=node16).js
index d974207d7b4ee..7d1a5738c7346 100644
--- a/tests/baselines/reference/nodeModulesPackageExports(module=node16).js
+++ b/tests/baselines/reference/nodeModulesPackageExports(module=node16).js
@@ -120,13 +120,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // cjs format file
 const cjs = __importStar(require("package/cjs"));
diff --git a/tests/baselines/reference/nodeModulesPackageExports(module=nodenext).js b/tests/baselines/reference/nodeModulesPackageExports(module=nodenext).js
index d974207d7b4ee..7d1a5738c7346 100644
--- a/tests/baselines/reference/nodeModulesPackageExports(module=nodenext).js
+++ b/tests/baselines/reference/nodeModulesPackageExports(module=nodenext).js
@@ -120,13 +120,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // cjs format file
 const cjs = __importStar(require("package/cjs"));
diff --git a/tests/baselines/reference/nodeModulesPackageImports(module=node16).js b/tests/baselines/reference/nodeModulesPackageImports(module=node16).js
index fb612b6c2fd66..c25d1005e93d5 100644
--- a/tests/baselines/reference/nodeModulesPackageImports(module=node16).js
+++ b/tests/baselines/reference/nodeModulesPackageImports(module=node16).js
@@ -63,13 +63,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // esm format file
 const cjs = __importStar(require("#cjs"));
diff --git a/tests/baselines/reference/nodeModulesPackageImports(module=nodenext).js b/tests/baselines/reference/nodeModulesPackageImports(module=nodenext).js
index fb612b6c2fd66..c25d1005e93d5 100644
--- a/tests/baselines/reference/nodeModulesPackageImports(module=nodenext).js
+++ b/tests/baselines/reference/nodeModulesPackageImports(module=nodenext).js
@@ -63,13 +63,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // esm format file
 const cjs = __importStar(require("#cjs"));
diff --git a/tests/baselines/reference/nodeModulesPackageImports(module=nodenext).trace.json b/tests/baselines/reference/nodeModulesPackageImports(module=nodenext).trace.json
index a8fe93ee30144..c8e575a33d80b 100644
--- a/tests/baselines/reference/nodeModulesPackageImports(module=nodenext).trace.json
+++ b/tests/baselines/reference/nodeModulesPackageImports(module=nodenext).trace.json
@@ -1199,6 +1199,21 @@
     "======== Module name '@typescript/lib-esnext/iterator' was not resolved. ========",
     "File '/.ts/package.json' does not exist according to earlier cached lookups.",
     "File '/package.json' does not exist according to earlier cached lookups.",
+    "======== Resolving module '@typescript/lib-esnext/promise' from '/.src/__lib_node_modules_lookup_lib.esnext.promise.d.ts__.ts'. ========",
+    "Explicitly specified module resolution kind: 'Node10'.",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: TypeScript, Declaration.",
+    "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
+    "Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Directory '/node_modules' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: JavaScript.",
+    "Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
+    "Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
+    "Directory '/node_modules' does not exist, skipping all lookups in it.",
+    "======== Module name '@typescript/lib-esnext/promise' was not resolved. ========",
+    "File '/.ts/package.json' does not exist according to earlier cached lookups.",
+    "File '/package.json' does not exist according to earlier cached lookups.",
     "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========",
     "Explicitly specified module resolution kind: 'Node10'.",
     "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.",
diff --git a/tests/baselines/reference/nodeModulesPackagePatternExports(module=node16).js b/tests/baselines/reference/nodeModulesPackagePatternExports(module=node16).js
index cef593a42469a..f710ad1fe43f2 100644
--- a/tests/baselines/reference/nodeModulesPackagePatternExports(module=node16).js
+++ b/tests/baselines/reference/nodeModulesPackagePatternExports(module=node16).js
@@ -99,13 +99,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // cjs format file
 const cjsi = __importStar(require("inner/cjs/index"));
diff --git a/tests/baselines/reference/nodeModulesPackagePatternExports(module=nodenext).js b/tests/baselines/reference/nodeModulesPackagePatternExports(module=nodenext).js
index cef593a42469a..f710ad1fe43f2 100644
--- a/tests/baselines/reference/nodeModulesPackagePatternExports(module=nodenext).js
+++ b/tests/baselines/reference/nodeModulesPackagePatternExports(module=nodenext).js
@@ -99,13 +99,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // cjs format file
 const cjsi = __importStar(require("inner/cjs/index"));
diff --git a/tests/baselines/reference/nodeModulesPackagePatternExportsExclude(module=node16).js b/tests/baselines/reference/nodeModulesPackagePatternExportsExclude(module=node16).js
index 5c3a1fea21903..5fe735dbc37b1 100644
--- a/tests/baselines/reference/nodeModulesPackagePatternExportsExclude(module=node16).js
+++ b/tests/baselines/reference/nodeModulesPackagePatternExportsExclude(module=node16).js
@@ -156,13 +156,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // cjs format file
 const cjsi = __importStar(require("inner/cjs/exclude/index"));
diff --git a/tests/baselines/reference/nodeModulesPackagePatternExportsExclude(module=nodenext).js b/tests/baselines/reference/nodeModulesPackagePatternExportsExclude(module=nodenext).js
index 5c3a1fea21903..5fe735dbc37b1 100644
--- a/tests/baselines/reference/nodeModulesPackagePatternExportsExclude(module=nodenext).js
+++ b/tests/baselines/reference/nodeModulesPackagePatternExportsExclude(module=nodenext).js
@@ -156,13 +156,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // cjs format file
 const cjsi = __importStar(require("inner/cjs/exclude/index"));
diff --git a/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node16).js b/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node16).js
index 62c5b11569855..18a9e37f040a1 100644
--- a/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node16).js
+++ b/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node16).js
@@ -99,13 +99,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // cjs format file
 const cjsi = __importStar(require("inner/cjs/index.cjs"));
diff --git a/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=nodenext).js b/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=nodenext).js
index 62c5b11569855..18a9e37f040a1 100644
--- a/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=nodenext).js
+++ b/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=nodenext).js
@@ -99,13 +99,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // cjs format file
 const cjsi = __importStar(require("inner/cjs/index.cjs"));
diff --git a/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=nodenext).trace.json b/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=nodenext).trace.json
index b39696da67c6c..71b06f24e6e5d 100644
--- a/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=nodenext).trace.json
+++ b/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=nodenext).trace.json
@@ -1248,6 +1248,20 @@
     "======== Module name '@typescript/lib-esnext/iterator' was not resolved. ========",
     "File '/.ts/package.json' does not exist according to earlier cached lookups.",
     "File '/package.json' does not exist according to earlier cached lookups.",
+    "======== Resolving module '@typescript/lib-esnext/promise' from '/.src/__lib_node_modules_lookup_lib.esnext.promise.d.ts__.ts'. ========",
+    "Explicitly specified module resolution kind: 'Node10'.",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: TypeScript, Declaration.",
+    "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
+    "Directory '/.src/node_modules/@types' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Directory '/node_modules' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: JavaScript.",
+    "Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
+    "Directory '/node_modules' does not exist, skipping all lookups in it.",
+    "======== Module name '@typescript/lib-esnext/promise' was not resolved. ========",
+    "File '/.ts/package.json' does not exist according to earlier cached lookups.",
+    "File '/package.json' does not exist according to earlier cached lookups.",
     "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========",
     "Explicitly specified module resolution kind: 'Node10'.",
     "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.",
diff --git a/tests/baselines/reference/nodeModulesResolveJsonModule(module=node16).js b/tests/baselines/reference/nodeModulesResolveJsonModule(module=node16).js
index 1d93a589402d8..09afe3776dcb2 100644
--- a/tests/baselines/reference/nodeModulesResolveJsonModule(module=node16).js
+++ b/tests/baselines/reference/nodeModulesResolveJsonModule(module=node16).js
@@ -57,13 +57,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 var __importDefault = (this && this.__importDefault) || function (mod) {
     return (mod && mod.__esModule) ? mod : { "default": mod };
 };
diff --git a/tests/baselines/reference/nodeModulesResolveJsonModule(module=nodenext).js b/tests/baselines/reference/nodeModulesResolveJsonModule(module=nodenext).js
index 1d93a589402d8..09afe3776dcb2 100644
--- a/tests/baselines/reference/nodeModulesResolveJsonModule(module=nodenext).js
+++ b/tests/baselines/reference/nodeModulesResolveJsonModule(module=nodenext).js
@@ -57,13 +57,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 var __importDefault = (this && this.__importDefault) || function (mod) {
     return (mod && mod.__esModule) ? mod : { "default": mod };
 };
diff --git a/tests/baselines/reference/nodeModulesTypesVersionPackageExports(module=node16).js b/tests/baselines/reference/nodeModulesTypesVersionPackageExports(module=node16).js
index 1553828a6ae5e..fe34ab0566b01 100644
--- a/tests/baselines/reference/nodeModulesTypesVersionPackageExports(module=node16).js
+++ b/tests/baselines/reference/nodeModulesTypesVersionPackageExports(module=node16).js
@@ -77,13 +77,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // cjs format file
 const mod = __importStar(require("inner"));
diff --git a/tests/baselines/reference/nodeModulesTypesVersionPackageExports(module=nodenext).js b/tests/baselines/reference/nodeModulesTypesVersionPackageExports(module=nodenext).js
index 1553828a6ae5e..fe34ab0566b01 100644
--- a/tests/baselines/reference/nodeModulesTypesVersionPackageExports(module=nodenext).js
+++ b/tests/baselines/reference/nodeModulesTypesVersionPackageExports(module=nodenext).js
@@ -77,13 +77,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // cjs format file
 const mod = __importStar(require("inner"));
diff --git a/tests/baselines/reference/nodePackageSelfName(module=node16).js b/tests/baselines/reference/nodePackageSelfName(module=node16).js
index 7061f58c6bb04..dc65d690cf617 100644
--- a/tests/baselines/reference/nodePackageSelfName(module=node16).js
+++ b/tests/baselines/reference/nodePackageSelfName(module=node16).js
@@ -46,13 +46,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // esm format file
 const self = __importStar(require("package"));
diff --git a/tests/baselines/reference/nodePackageSelfName(module=nodenext).js b/tests/baselines/reference/nodePackageSelfName(module=nodenext).js
index 7061f58c6bb04..dc65d690cf617 100644
--- a/tests/baselines/reference/nodePackageSelfName(module=nodenext).js
+++ b/tests/baselines/reference/nodePackageSelfName(module=nodenext).js
@@ -46,13 +46,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // esm format file
 const self = __importStar(require("package"));
diff --git a/tests/baselines/reference/nodePackageSelfNameScoped(module=node16).js b/tests/baselines/reference/nodePackageSelfNameScoped(module=node16).js
index 8738c8041a9b6..f9d633df6fc03 100644
--- a/tests/baselines/reference/nodePackageSelfNameScoped(module=node16).js
+++ b/tests/baselines/reference/nodePackageSelfNameScoped(module=node16).js
@@ -46,13 +46,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // cjs format file
 const self = __importStar(require("@scope/package"));
diff --git a/tests/baselines/reference/nodePackageSelfNameScoped(module=nodenext).js b/tests/baselines/reference/nodePackageSelfNameScoped(module=nodenext).js
index 8738c8041a9b6..f9d633df6fc03 100644
--- a/tests/baselines/reference/nodePackageSelfNameScoped(module=nodenext).js
+++ b/tests/baselines/reference/nodePackageSelfNameScoped(module=nodenext).js
@@ -46,13 +46,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 // cjs format file
 const self = __importStar(require("@scope/package"));
diff --git a/tests/baselines/reference/nonTSExtensions.js b/tests/baselines/reference/nonTSExtensions.js
new file mode 100644
index 0000000000000..117d199aa7df9
--- /dev/null
+++ b/tests/baselines/reference/nonTSExtensions.js
@@ -0,0 +1,14 @@
+//// [tests/cases/conformance/externalModules/rewriteRelativeImportExtensions/nonTSExtensions.ts] ////
+
+//// [example.json]
+{}
+
+//// [styles.d.css.ts]
+export {};
+
+//// [index.mts]
+import {} from "./example.json" with { type: "json" }; // Ok
+import {} from "./styles.css"; // Ok
+
+//// [index.mjs]
+export {};
diff --git a/tests/baselines/reference/parameterInitializersForwardReferencing1.types b/tests/baselines/reference/parameterInitializersForwardReferencing1.types
index 48f7f07c1caa2..f18d9ae0f4903 100644
--- a/tests/baselines/reference/parameterInitializersForwardReferencing1.types
+++ b/tests/baselines/reference/parameterInitializersForwardReferencing1.types
@@ -28,7 +28,7 @@ function f1 (bar = foo) { // unexpected compiler error; works at runtime
 
 function f2 (bar = (baz = foo) => baz) { // unexpected compiler error; works at runtime
 >f2 : (bar?: (baz?: number) => number) => number
->   : ^   ^^^^   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>   : ^   ^^^^   ^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >bar : (baz?: number) => number
 >    : ^   ^^^^^^^^^^^^^^^^^^^^
 >(baz = foo) => baz : (baz?: number) => number
diff --git a/tests/baselines/reference/parameterInitializersForwardReferencing1_es6.types b/tests/baselines/reference/parameterInitializersForwardReferencing1_es6.types
index 5ec0f47f3c71e..6f755605b1fd8 100644
--- a/tests/baselines/reference/parameterInitializersForwardReferencing1_es6.types
+++ b/tests/baselines/reference/parameterInitializersForwardReferencing1_es6.types
@@ -28,7 +28,7 @@ function f1 (bar = foo) { // unexpected compiler error; works at runtime
 
 function f2 (bar = (baz = foo) => baz) { // unexpected compiler error; works at runtime
 >f2 : (bar?: (baz?: string) => string) => string
->   : ^   ^^^^   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>   : ^   ^^^^   ^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >bar : (baz?: string) => string
 >    : ^   ^^^^^^^^^^^^^^^^^^^^
 >(baz = foo) => baz : (baz?: string) => string
diff --git a/tests/baselines/reference/parameterReferenceInInitializer2.types b/tests/baselines/reference/parameterReferenceInInitializer2.types
index 91a8db5fb4144..24a36124830fb 100644
--- a/tests/baselines/reference/parameterReferenceInInitializer2.types
+++ b/tests/baselines/reference/parameterReferenceInInitializer2.types
@@ -3,7 +3,7 @@
 === parameterReferenceInInitializer2.ts ===
 function Example(x = function(x: any) { return x; }) { // Error: parameter 'x' cannot be 
 >Example : (x?: (x: any) => any) => void
->        : ^ ^^^^ ^^   ^^^^^^^^^^^^^^^^^
+>        : ^ ^^^^      ^^^^^^^^^^^^^^^^^
 >x : (x: any) => any
 >  : ^ ^^   ^^^^^^^^
 >function(x: any) { return x; } : (x: any) => any
diff --git a/tests/baselines/reference/parseErrorIncorrectReturnToken.types b/tests/baselines/reference/parseErrorIncorrectReturnToken.types
index 1ded003a8f901..10f02608b06c2 100644
--- a/tests/baselines/reference/parseErrorIncorrectReturnToken.types
+++ b/tests/baselines/reference/parseErrorIncorrectReturnToken.types
@@ -20,9 +20,9 @@ type F2 = (n: number): string; // should be => not :
 // doesn't work in non-type contexts, where the return type is optional
 let f = (n: number) => string => n.toString();
 >f : (n: number) => (string: any) => string
->  : ^ ^^      ^^^^^^      ^^^^^^^^^^^^^^^^
+>  : ^ ^^      ^^^^^^        ^^^^^^^^^^^^^^
 >(n: number) => string => n.toString() : (n: number) => (string: any) => string
->                                      : ^ ^^      ^^^^^^      ^^^^^^^^^^^^^^^^
+>                                      : ^ ^^      ^^^^^^        ^^^^^^^^^^^^^^
 >n : number
 >  : ^^^^^^
 >string => n.toString() : (string: any) => string
diff --git a/tests/baselines/reference/predicateSemantics.errors.txt b/tests/baselines/reference/predicateSemantics.errors.txt
index 14251121358c4..c80dd47d19357 100644
--- a/tests/baselines/reference/predicateSemantics.errors.txt
+++ b/tests/baselines/reference/predicateSemantics.errors.txt
@@ -9,9 +9,14 @@ predicateSemantics.ts(33,8): error TS2872: This kind of expression is always tru
 predicateSemantics.ts(34,11): error TS2872: This kind of expression is always truthy.
 predicateSemantics.ts(35,8): error TS2872: This kind of expression is always truthy.
 predicateSemantics.ts(36,8): error TS2872: This kind of expression is always truthy.
+predicateSemantics.ts(51,14): error TS2869: Right operand of ?? is unreachable because the left operand is never nullish.
+predicateSemantics.ts(52,14): error TS2695: Left side of comma operator is unused and has no side effects.
+predicateSemantics.ts(52,14): error TS2869: Right operand of ?? is unreachable because the left operand is never nullish.
+predicateSemantics.ts(70,1): error TS2869: Right operand of ?? is unreachable because the left operand is never nullish.
+predicateSemantics.ts(71,1): error TS2869: Right operand of ?? is unreachable because the left operand is never nullish.
 
 
-==== predicateSemantics.ts (11 errors) ====
+==== predicateSemantics.ts (16 errors) ====
     declare let cond: any;
     
     // OK: One or other operand is possibly nullish
@@ -77,4 +82,42 @@ predicateSemantics.ts(36,8): error TS2872: This kind of expression is always tru
     function foo(this: Object | undefined) {
         // Should be OK
         return this ?? 0;
-    }
\ No newline at end of file
+    }
+    
+    // https://github.com/microsoft/TypeScript/issues/60401
+    {
+      const maybe = null as true | null;
+      let i = 0;
+      const d = (i++, maybe) ?? true; // ok
+      const e = (i++, i++) ?? true; // error
+                 ~~~~~~~~
+!!! error TS2869: Right operand of ?? is unreachable because the left operand is never nullish.
+      const f = (maybe, i++) ?? true; // error
+                 ~~~~~
+!!! error TS2695: Left side of comma operator is unused and has no side effects.
+                 ~~~~~~~~~~
+!!! error TS2869: Right operand of ?? is unreachable because the left operand is never nullish.
+    }
+    
+    // https://github.com/microsoft/TypeScript/issues/60439
+    class X {
+      constructor() {
+        const p = new.target ?? 32;
+      }
+    }
+    
+    // https://github.com/microsoft/TypeScript/issues/60614
+    declare function tag<T>(
+      strings: TemplateStringsArray,
+      ...values: number[]
+    ): T | null;
+    
+    tag`foo${1}` ?? 32; // ok
+    
+    `foo${1}` ?? 32; // error
+    ~~~~~~~~~
+!!! error TS2869: Right operand of ?? is unreachable because the left operand is never nullish.
+    `foo` ?? 32; // error
+    ~~~~~
+!!! error TS2869: Right operand of ?? is unreachable because the left operand is never nullish.
+    
\ No newline at end of file
diff --git a/tests/baselines/reference/predicateSemantics.js b/tests/baselines/reference/predicateSemantics.js
index eb0b66516b62c..30ada0d514d02 100644
--- a/tests/baselines/reference/predicateSemantics.js
+++ b/tests/baselines/reference/predicateSemantics.js
@@ -44,10 +44,42 @@ console.log((cond || undefined) && 1 / cond);
 function foo(this: Object | undefined) {
     // Should be OK
     return this ?? 0;
-}
+}
+
+// https://github.com/microsoft/TypeScript/issues/60401
+{
+  const maybe = null as true | null;
+  let i = 0;
+  const d = (i++, maybe) ?? true; // ok
+  const e = (i++, i++) ?? true; // error
+  const f = (maybe, i++) ?? true; // error
+}
+
+// https://github.com/microsoft/TypeScript/issues/60439
+class X {
+  constructor() {
+    const p = new.target ?? 32;
+  }
+}
+
+// https://github.com/microsoft/TypeScript/issues/60614
+declare function tag<T>(
+  strings: TemplateStringsArray,
+  ...values: number[]
+): T | null;
+
+tag`foo${1}` ?? 32; // ok
+
+`foo${1}` ?? 32; // error
+`foo` ?? 32; // error
+
 
 //// [predicateSemantics.js]
-var _a, _b, _c, _d, _e, _f;
+var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
+    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
+    return cooked;
+};
+var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
 // OK: One or other operand is possibly nullish
 var test1 = (_a = (cond ? undefined : 32)) !== null && _a !== void 0 ? _a : "possibly reached";
 // Not OK: Both operands nullish
@@ -88,3 +120,23 @@ function foo() {
     // Should be OK
     return this !== null && this !== void 0 ? this : 0;
 }
+// https://github.com/microsoft/TypeScript/issues/60401
+{
+    var maybe = null;
+    var i = 0;
+    var d = (_g = (i++, maybe)) !== null && _g !== void 0 ? _g : true; // ok
+    var e = (_h = (i++, i++)) !== null && _h !== void 0 ? _h : true; // error
+    var f = (_j = (maybe, i++)) !== null && _j !== void 0 ? _j : true; // error
+}
+// https://github.com/microsoft/TypeScript/issues/60439
+var X = /** @class */ (function () {
+    function X() {
+        var _newTarget = this.constructor;
+        var _a;
+        var p = (_a = _newTarget) !== null && _a !== void 0 ? _a : 32;
+    }
+    return X;
+}());
+(_k = tag(__makeTemplateObject(["foo", ""], ["foo", ""]), 1)) !== null && _k !== void 0 ? _k : 32; // ok
+(_l = "foo".concat(1)) !== null && _l !== void 0 ? _l : 32; // error
+"foo" !== null && "foo" !== void 0 ? "foo" : 32; // error
diff --git a/tests/baselines/reference/predicateSemantics.symbols b/tests/baselines/reference/predicateSemantics.symbols
index 790e965f988cc..f8ddf0fe5db87 100644
--- a/tests/baselines/reference/predicateSemantics.symbols
+++ b/tests/baselines/reference/predicateSemantics.symbols
@@ -79,3 +79,61 @@ function foo(this: Object | undefined) {
     return this ?? 0;
 >this : Symbol(this, Decl(predicateSemantics.ts, 40, 13))
 }
+
+// https://github.com/microsoft/TypeScript/issues/60401
+{
+  const maybe = null as true | null;
+>maybe : Symbol(maybe, Decl(predicateSemantics.ts, 47, 7))
+
+  let i = 0;
+>i : Symbol(i, Decl(predicateSemantics.ts, 48, 5))
+
+  const d = (i++, maybe) ?? true; // ok
+>d : Symbol(d, Decl(predicateSemantics.ts, 49, 7))
+>i : Symbol(i, Decl(predicateSemantics.ts, 48, 5))
+>maybe : Symbol(maybe, Decl(predicateSemantics.ts, 47, 7))
+
+  const e = (i++, i++) ?? true; // error
+>e : Symbol(e, Decl(predicateSemantics.ts, 50, 7))
+>i : Symbol(i, Decl(predicateSemantics.ts, 48, 5))
+>i : Symbol(i, Decl(predicateSemantics.ts, 48, 5))
+
+  const f = (maybe, i++) ?? true; // error
+>f : Symbol(f, Decl(predicateSemantics.ts, 51, 7))
+>maybe : Symbol(maybe, Decl(predicateSemantics.ts, 47, 7))
+>i : Symbol(i, Decl(predicateSemantics.ts, 48, 5))
+}
+
+// https://github.com/microsoft/TypeScript/issues/60439
+class X {
+>X : Symbol(X, Decl(predicateSemantics.ts, 52, 1))
+
+  constructor() {
+    const p = new.target ?? 32;
+>p : Symbol(p, Decl(predicateSemantics.ts, 57, 9))
+>new.target : Symbol(X, Decl(predicateSemantics.ts, 52, 1))
+>target : Symbol(X, Decl(predicateSemantics.ts, 52, 1))
+  }
+}
+
+// https://github.com/microsoft/TypeScript/issues/60614
+declare function tag<T>(
+>tag : Symbol(tag, Decl(predicateSemantics.ts, 59, 1))
+>T : Symbol(T, Decl(predicateSemantics.ts, 62, 21))
+
+  strings: TemplateStringsArray,
+>strings : Symbol(strings, Decl(predicateSemantics.ts, 62, 24))
+>TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.es5.d.ts, --, --))
+
+  ...values: number[]
+>values : Symbol(values, Decl(predicateSemantics.ts, 63, 32))
+
+): T | null;
+>T : Symbol(T, Decl(predicateSemantics.ts, 62, 21))
+
+tag`foo${1}` ?? 32; // ok
+>tag : Symbol(tag, Decl(predicateSemantics.ts, 59, 1))
+
+`foo${1}` ?? 32; // error
+`foo` ?? 32; // error
+
diff --git a/tests/baselines/reference/predicateSemantics.types b/tests/baselines/reference/predicateSemantics.types
index 3d3eba6683e25..b054c66ad43e7 100644
--- a/tests/baselines/reference/predicateSemantics.types
+++ b/tests/baselines/reference/predicateSemantics.types
@@ -234,3 +234,144 @@ function foo(this: Object | undefined) {
 >0 : 0
 >  : ^
 }
+
+// https://github.com/microsoft/TypeScript/issues/60401
+{
+  const maybe = null as true | null;
+>maybe : true
+>      : ^^^^
+>null as true | null : true
+>                    : ^^^^
+>true : true
+>     : ^^^^
+
+  let i = 0;
+>i : number
+>  : ^^^^^^
+>0 : 0
+>  : ^
+
+  const d = (i++, maybe) ?? true; // ok
+>d : true
+>  : ^^^^
+>(i++, maybe) ?? true : true
+>                     : ^^^^
+>(i++, maybe) : true
+>             : ^^^^
+>i++, maybe : true
+>           : ^^^^
+>i++ : number
+>    : ^^^^^^
+>i : number
+>  : ^^^^^^
+>maybe : true
+>      : ^^^^
+>true : true
+>     : ^^^^
+
+  const e = (i++, i++) ?? true; // error
+>e : number | true
+>  : ^^^^^^^^^^^^^
+>(i++, i++) ?? true : number | true
+>                   : ^^^^^^^^^^^^^
+>(i++, i++) : number
+>           : ^^^^^^
+>i++, i++ : number
+>         : ^^^^^^
+>i++ : number
+>    : ^^^^^^
+>i : number
+>  : ^^^^^^
+>i++ : number
+>    : ^^^^^^
+>i : number
+>  : ^^^^^^
+>true : true
+>     : ^^^^
+
+  const f = (maybe, i++) ?? true; // error
+>f : number | true
+>  : ^^^^^^^^^^^^^
+>(maybe, i++) ?? true : number | true
+>                     : ^^^^^^^^^^^^^
+>(maybe, i++) : number
+>             : ^^^^^^
+>maybe, i++ : number
+>           : ^^^^^^
+>maybe : true
+>      : ^^^^
+>i++ : number
+>    : ^^^^^^
+>i : number
+>  : ^^^^^^
+>true : true
+>     : ^^^^
+}
+
+// https://github.com/microsoft/TypeScript/issues/60439
+class X {
+>X : X
+>  : ^
+
+  constructor() {
+    const p = new.target ?? 32;
+>p : 32 | typeof X
+>  : ^^^^^^^^^^^^^
+>new.target ?? 32 : 32 | typeof X
+>                 : ^^^^^^^^^^^^^
+>new.target : typeof X
+>           : ^^^^^^^^
+>target : typeof X
+>       : ^^^^^^^^
+>32 : 32
+>   : ^^
+  }
+}
+
+// https://github.com/microsoft/TypeScript/issues/60614
+declare function tag<T>(
+>tag : <T>(strings: TemplateStringsArray, ...values: number[]) => T | null
+>    : ^ ^^       ^^                    ^^^^^      ^^        ^^^^^        
+
+  strings: TemplateStringsArray,
+>strings : TemplateStringsArray
+>        : ^^^^^^^^^^^^^^^^^^^^
+
+  ...values: number[]
+>values : number[]
+>       : ^^^^^^^^
+
+): T | null;
+
+tag`foo${1}` ?? 32; // ok
+>tag`foo${1}` ?? 32 : unknown
+>                   : ^^^^^^^
+>tag`foo${1}` : unknown
+>             : ^^^^^^^
+>tag : <T>(strings: TemplateStringsArray, ...values: number[]) => T | null
+>    : ^ ^^       ^^                    ^^^^^      ^^        ^^^^^        
+>`foo${1}` : string
+>          : ^^^^^^
+>1 : 1
+>  : ^
+>32 : 32
+>   : ^^
+
+`foo${1}` ?? 32; // error
+>`foo${1}` ?? 32 : 32 | "foo1"
+>                : ^^^^^^^^^^^
+>`foo${1}` : "foo1"
+>          : ^^^^^^
+>1 : 1
+>  : ^
+>32 : 32
+>   : ^^
+
+`foo` ?? 32; // error
+>`foo` ?? 32 : 32 | "foo"
+>            : ^^^^^^^^^^
+>`foo` : "foo"
+>      : ^^^^^
+>32 : 32
+>   : ^^
+
diff --git a/tests/baselines/reference/printerApi/printsNodeCorrectly.template string.js b/tests/baselines/reference/printerApi/printsNodeCorrectly.template string.js
new file mode 100644
index 0000000000000..7acaf247a15a0
--- /dev/null
+++ b/tests/baselines/reference/printerApi/printsNodeCorrectly.template string.js	
@@ -0,0 +1,2 @@
+`
+`
\ No newline at end of file
diff --git a/tests/baselines/reference/promiseTry.js b/tests/baselines/reference/promiseTry.js
new file mode 100644
index 0000000000000..28714c3413f56
--- /dev/null
+++ b/tests/baselines/reference/promiseTry.js
@@ -0,0 +1,64 @@
+//// [tests/cases/compiler/promiseTry.ts] ////
+
+//// [promiseTry.ts]
+Promise.try(() => {
+    return "Sync result";
+});
+
+Promise.try(async () => {
+    return "Async result";
+});
+
+const a = Promise.try(() => "Sync result");
+const b = Promise.try(async () => "Async result");
+
+// SINGLE PARAMETER
+Promise.try((foo: string) => "Async result", "foo");
+Promise.try((foo) => "Async result", "foo");
+// @ts-expect-error too few parameters
+Promise.try((foo) => "Async result");
+Promise.try((foo: string | undefined) => "Async result", undefined);
+Promise.try((foo: string | undefined) => "Async result", "foo");
+Promise.try((foo) => "Async result", undefined);
+// @ts-expect-error too many parameters
+Promise.try(() => "Async result", "foo");
+
+// MULTIPLE PARAMETERS
+Promise.try((foo: string, bar: number) => "Async result", "foo", 42);
+// @ts-expect-error too many parameters
+Promise.try((foo: string, bar: number) => "Async result", "foo", 42, "baz");
+// @ts-expect-error too few parameters
+Promise.try((foo: string, bar: number) => "Async result", "foo");
+Promise.try((foo: string, bar?: number) => "Async result", "foo");
+Promise.try((foo: string, bar?: number) => "Async result", "foo", undefined);
+Promise.try((foo: string, bar?: number) => "Async result", "foo", 42);
+
+
+//// [promiseTry.js]
+Promise.try(() => {
+    return "Sync result";
+});
+Promise.try(async () => {
+    return "Async result";
+});
+const a = Promise.try(() => "Sync result");
+const b = Promise.try(async () => "Async result");
+// SINGLE PARAMETER
+Promise.try((foo) => "Async result", "foo");
+Promise.try((foo) => "Async result", "foo");
+// @ts-expect-error too few parameters
+Promise.try((foo) => "Async result");
+Promise.try((foo) => "Async result", undefined);
+Promise.try((foo) => "Async result", "foo");
+Promise.try((foo) => "Async result", undefined);
+// @ts-expect-error too many parameters
+Promise.try(() => "Async result", "foo");
+// MULTIPLE PARAMETERS
+Promise.try((foo, bar) => "Async result", "foo", 42);
+// @ts-expect-error too many parameters
+Promise.try((foo, bar) => "Async result", "foo", 42, "baz");
+// @ts-expect-error too few parameters
+Promise.try((foo, bar) => "Async result", "foo");
+Promise.try((foo, bar) => "Async result", "foo");
+Promise.try((foo, bar) => "Async result", "foo", undefined);
+Promise.try((foo, bar) => "Async result", "foo", 42);
diff --git a/tests/baselines/reference/promiseTry.symbols b/tests/baselines/reference/promiseTry.symbols
new file mode 100644
index 0000000000000..1ceec7011e54c
--- /dev/null
+++ b/tests/baselines/reference/promiseTry.symbols
@@ -0,0 +1,123 @@
+//// [tests/cases/compiler/promiseTry.ts] ////
+
+=== promiseTry.ts ===
+Promise.try(() => {
+>Promise.try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --))
+>try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+
+    return "Sync result";
+});
+
+Promise.try(async () => {
+>Promise.try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --))
+>try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+
+    return "Async result";
+});
+
+const a = Promise.try(() => "Sync result");
+>a : Symbol(a, Decl(promiseTry.ts, 8, 5))
+>Promise.try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --))
+>try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+
+const b = Promise.try(async () => "Async result");
+>b : Symbol(b, Decl(promiseTry.ts, 9, 5))
+>Promise.try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --))
+>try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+
+// SINGLE PARAMETER
+Promise.try((foo: string) => "Async result", "foo");
+>Promise.try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --))
+>try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+>foo : Symbol(foo, Decl(promiseTry.ts, 12, 13))
+
+Promise.try((foo) => "Async result", "foo");
+>Promise.try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --))
+>try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+>foo : Symbol(foo, Decl(promiseTry.ts, 13, 13))
+
+// @ts-expect-error too few parameters
+Promise.try((foo) => "Async result");
+>Promise.try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --))
+>try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+>foo : Symbol(foo, Decl(promiseTry.ts, 15, 13))
+
+Promise.try((foo: string | undefined) => "Async result", undefined);
+>Promise.try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --))
+>try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+>foo : Symbol(foo, Decl(promiseTry.ts, 16, 13))
+>undefined : Symbol(undefined)
+
+Promise.try((foo: string | undefined) => "Async result", "foo");
+>Promise.try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --))
+>try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+>foo : Symbol(foo, Decl(promiseTry.ts, 17, 13))
+
+Promise.try((foo) => "Async result", undefined);
+>Promise.try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --))
+>try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+>foo : Symbol(foo, Decl(promiseTry.ts, 18, 13))
+>undefined : Symbol(undefined)
+
+// @ts-expect-error too many parameters
+Promise.try(() => "Async result", "foo");
+>Promise.try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --))
+>try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+
+// MULTIPLE PARAMETERS
+Promise.try((foo: string, bar: number) => "Async result", "foo", 42);
+>Promise.try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --))
+>try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+>foo : Symbol(foo, Decl(promiseTry.ts, 23, 13))
+>bar : Symbol(bar, Decl(promiseTry.ts, 23, 25))
+
+// @ts-expect-error too many parameters
+Promise.try((foo: string, bar: number) => "Async result", "foo", 42, "baz");
+>Promise.try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --))
+>try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+>foo : Symbol(foo, Decl(promiseTry.ts, 25, 13))
+>bar : Symbol(bar, Decl(promiseTry.ts, 25, 25))
+
+// @ts-expect-error too few parameters
+Promise.try((foo: string, bar: number) => "Async result", "foo");
+>Promise.try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --))
+>try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+>foo : Symbol(foo, Decl(promiseTry.ts, 27, 13))
+>bar : Symbol(bar, Decl(promiseTry.ts, 27, 25))
+
+Promise.try((foo: string, bar?: number) => "Async result", "foo");
+>Promise.try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --))
+>try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+>foo : Symbol(foo, Decl(promiseTry.ts, 28, 13))
+>bar : Symbol(bar, Decl(promiseTry.ts, 28, 25))
+
+Promise.try((foo: string, bar?: number) => "Async result", "foo", undefined);
+>Promise.try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --))
+>try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+>foo : Symbol(foo, Decl(promiseTry.ts, 29, 13))
+>bar : Symbol(bar, Decl(promiseTry.ts, 29, 25))
+>undefined : Symbol(undefined)
+
+Promise.try((foo: string, bar?: number) => "Async result", "foo", 42);
+>Promise.try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --))
+>try : Symbol(PromiseConstructor.try, Decl(lib.esnext.promise.d.ts, --, --))
+>foo : Symbol(foo, Decl(promiseTry.ts, 30, 13))
+>bar : Symbol(bar, Decl(promiseTry.ts, 30, 25))
+
diff --git a/tests/baselines/reference/promiseTry.types b/tests/baselines/reference/promiseTry.types
new file mode 100644
index 0000000000000..53f4ea90b683f
--- /dev/null
+++ b/tests/baselines/reference/promiseTry.types
@@ -0,0 +1,328 @@
+//// [tests/cases/compiler/promiseTry.ts] ////
+
+=== promiseTry.ts ===
+Promise.try(() => {
+>Promise.try(() => {    return "Sync result";}) : Promise<string>
+>                                               : ^^^^^^^^^^^^^^^
+>Promise.try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>            : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>Promise : PromiseConstructor
+>        : ^^^^^^^^^^^^^^^^^^
+>try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>    : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>() => {    return "Sync result";} : () => string
+>                                  : ^^^^^^^^^^^^
+
+    return "Sync result";
+>"Sync result" : "Sync result"
+>              : ^^^^^^^^^^^^^
+
+});
+
+Promise.try(async () => {
+>Promise.try(async () => {    return "Async result";}) : Promise<string>
+>                                                      : ^^^^^^^^^^^^^^^
+>Promise.try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>            : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>Promise : PromiseConstructor
+>        : ^^^^^^^^^^^^^^^^^^
+>try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>    : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>async () => {    return "Async result";} : () => Promise<string>
+>                                         : ^^^^^^^^^^^^^^^^^^^^^
+
+    return "Async result";
+>"Async result" : "Async result"
+>               : ^^^^^^^^^^^^^^
+
+});
+
+const a = Promise.try(() => "Sync result");
+>a : Promise<string>
+>  : ^^^^^^^^^^^^^^^
+>Promise.try(() => "Sync result") : Promise<string>
+>                                 : ^^^^^^^^^^^^^^^
+>Promise.try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>            : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>Promise : PromiseConstructor
+>        : ^^^^^^^^^^^^^^^^^^
+>try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>    : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>() => "Sync result" : () => string
+>                    : ^^^^^^^^^^^^
+>"Sync result" : "Sync result"
+>              : ^^^^^^^^^^^^^
+
+const b = Promise.try(async () => "Async result");
+>b : Promise<string>
+>  : ^^^^^^^^^^^^^^^
+>Promise.try(async () => "Async result") : Promise<string>
+>                                        : ^^^^^^^^^^^^^^^
+>Promise.try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>            : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>Promise : PromiseConstructor
+>        : ^^^^^^^^^^^^^^^^^^
+>try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>    : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>async () => "Async result" : () => Promise<string>
+>                           : ^^^^^^^^^^^^^^^^^^^^^
+>"Async result" : "Async result"
+>               : ^^^^^^^^^^^^^^
+
+// SINGLE PARAMETER
+Promise.try((foo: string) => "Async result", "foo");
+>Promise.try((foo: string) => "Async result", "foo") : Promise<string>
+>                                                    : ^^^^^^^^^^^^^^^
+>Promise.try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>            : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>Promise : PromiseConstructor
+>        : ^^^^^^^^^^^^^^^^^^
+>try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>    : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>(foo: string) => "Async result" : (foo: string) => string
+>                                : ^   ^^      ^^^^^^^^^^^
+>foo : string
+>    : ^^^^^^
+>"Async result" : "Async result"
+>               : ^^^^^^^^^^^^^^
+>"foo" : "foo"
+>      : ^^^^^
+
+Promise.try((foo) => "Async result", "foo");
+>Promise.try((foo) => "Async result", "foo") : Promise<string>
+>                                            : ^^^^^^^^^^^^^^^
+>Promise.try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>            : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>Promise : PromiseConstructor
+>        : ^^^^^^^^^^^^^^^^^^
+>try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>    : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>(foo) => "Async result" : (foo: string) => string
+>                        : ^   ^^^^^^^^^^^^^^^^^^^
+>foo : string
+>    : ^^^^^^
+>"Async result" : "Async result"
+>               : ^^^^^^^^^^^^^^
+>"foo" : "foo"
+>      : ^^^^^
+
+// @ts-expect-error too few parameters
+Promise.try((foo) => "Async result");
+>Promise.try((foo) => "Async result") : Promise<unknown>
+>                                     : ^^^^^^^^^^^^^^^^
+>Promise.try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>            : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>Promise : PromiseConstructor
+>        : ^^^^^^^^^^^^^^^^^^
+>try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>    : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>(foo) => "Async result" : (foo: U[0]) => string
+>                        : ^   ^^^^^^^^^^^^^^^^^
+>foo : U[0]
+>    : ^^^^
+>"Async result" : "Async result"
+>               : ^^^^^^^^^^^^^^
+
+Promise.try((foo: string | undefined) => "Async result", undefined);
+>Promise.try((foo: string | undefined) => "Async result", undefined) : Promise<string>
+>                                                                    : ^^^^^^^^^^^^^^^
+>Promise.try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>            : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>Promise : PromiseConstructor
+>        : ^^^^^^^^^^^^^^^^^^
+>try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>    : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>(foo: string | undefined) => "Async result" : (foo: string | undefined) => string
+>                                            : ^   ^^                  ^^^^^^^^^^^
+>foo : string
+>    : ^^^^^^
+>"Async result" : "Async result"
+>               : ^^^^^^^^^^^^^^
+>undefined : undefined
+>          : ^^^^^^^^^
+
+Promise.try((foo: string | undefined) => "Async result", "foo");
+>Promise.try((foo: string | undefined) => "Async result", "foo") : Promise<string>
+>                                                                : ^^^^^^^^^^^^^^^
+>Promise.try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>            : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>Promise : PromiseConstructor
+>        : ^^^^^^^^^^^^^^^^^^
+>try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>    : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>(foo: string | undefined) => "Async result" : (foo: string | undefined) => string
+>                                            : ^   ^^                  ^^^^^^^^^^^
+>foo : string
+>    : ^^^^^^
+>"Async result" : "Async result"
+>               : ^^^^^^^^^^^^^^
+>"foo" : "foo"
+>      : ^^^^^
+
+Promise.try((foo) => "Async result", undefined);
+>Promise.try((foo) => "Async result", undefined) : Promise<string>
+>                                                : ^^^^^^^^^^^^^^^
+>Promise.try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>            : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>Promise : PromiseConstructor
+>        : ^^^^^^^^^^^^^^^^^^
+>try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>    : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>(foo) => "Async result" : (foo: any) => string
+>                        : ^   ^^^^^^^^^^^^^^^^
+>foo : any
+>"Async result" : "Async result"
+>               : ^^^^^^^^^^^^^^
+>undefined : undefined
+>          : ^^^^^^^^^
+
+// @ts-expect-error too many parameters
+Promise.try(() => "Async result", "foo");
+>Promise.try(() => "Async result", "foo") : Promise<string>
+>                                         : ^^^^^^^^^^^^^^^
+>Promise.try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>            : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>Promise : PromiseConstructor
+>        : ^^^^^^^^^^^^^^^^^^
+>try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>    : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>() => "Async result" : () => string
+>                     : ^^^^^^^^^^^^
+>"Async result" : "Async result"
+>               : ^^^^^^^^^^^^^^
+>"foo" : "foo"
+>      : ^^^^^
+
+// MULTIPLE PARAMETERS
+Promise.try((foo: string, bar: number) => "Async result", "foo", 42);
+>Promise.try((foo: string, bar: number) => "Async result", "foo", 42) : Promise<string>
+>                                                                     : ^^^^^^^^^^^^^^^
+>Promise.try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>            : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>Promise : PromiseConstructor
+>        : ^^^^^^^^^^^^^^^^^^
+>try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>    : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>(foo: string, bar: number) => "Async result" : (foo: string, bar: number) => string
+>                                             : ^   ^^      ^^   ^^      ^^^^^^^^^^^
+>foo : string
+>    : ^^^^^^
+>bar : number
+>    : ^^^^^^
+>"Async result" : "Async result"
+>               : ^^^^^^^^^^^^^^
+>"foo" : "foo"
+>      : ^^^^^
+>42 : 42
+>   : ^^
+
+// @ts-expect-error too many parameters
+Promise.try((foo: string, bar: number) => "Async result", "foo", 42, "baz");
+>Promise.try((foo: string, bar: number) => "Async result", "foo", 42, "baz") : Promise<string>
+>                                                                            : ^^^^^^^^^^^^^^^
+>Promise.try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>            : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>Promise : PromiseConstructor
+>        : ^^^^^^^^^^^^^^^^^^
+>try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>    : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>(foo: string, bar: number) => "Async result" : (foo: string, bar: number) => string
+>                                             : ^   ^^      ^^   ^^      ^^^^^^^^^^^
+>foo : string
+>    : ^^^^^^
+>bar : number
+>    : ^^^^^^
+>"Async result" : "Async result"
+>               : ^^^^^^^^^^^^^^
+>"foo" : "foo"
+>      : ^^^^^
+>42 : 42
+>   : ^^
+>"baz" : "baz"
+>      : ^^^^^
+
+// @ts-expect-error too few parameters
+Promise.try((foo: string, bar: number) => "Async result", "foo");
+>Promise.try((foo: string, bar: number) => "Async result", "foo") : Promise<string>
+>                                                                 : ^^^^^^^^^^^^^^^
+>Promise.try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>            : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>Promise : PromiseConstructor
+>        : ^^^^^^^^^^^^^^^^^^
+>try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>    : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>(foo: string, bar: number) => "Async result" : (foo: string, bar: number) => string
+>                                             : ^   ^^      ^^   ^^      ^^^^^^^^^^^
+>foo : string
+>    : ^^^^^^
+>bar : number
+>    : ^^^^^^
+>"Async result" : "Async result"
+>               : ^^^^^^^^^^^^^^
+>"foo" : "foo"
+>      : ^^^^^
+
+Promise.try((foo: string, bar?: number) => "Async result", "foo");
+>Promise.try((foo: string, bar?: number) => "Async result", "foo") : Promise<string>
+>                                                                  : ^^^^^^^^^^^^^^^
+>Promise.try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>            : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>Promise : PromiseConstructor
+>        : ^^^^^^^^^^^^^^^^^^
+>try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>    : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>(foo: string, bar?: number) => "Async result" : (foo: string, bar?: number) => string
+>                                              : ^   ^^      ^^   ^^^      ^^^^^^^^^^^
+>foo : string
+>    : ^^^^^^
+>bar : number
+>    : ^^^^^^
+>"Async result" : "Async result"
+>               : ^^^^^^^^^^^^^^
+>"foo" : "foo"
+>      : ^^^^^
+
+Promise.try((foo: string, bar?: number) => "Async result", "foo", undefined);
+>Promise.try((foo: string, bar?: number) => "Async result", "foo", undefined) : Promise<string>
+>                                                                             : ^^^^^^^^^^^^^^^
+>Promise.try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>            : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>Promise : PromiseConstructor
+>        : ^^^^^^^^^^^^^^^^^^
+>try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>    : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>(foo: string, bar?: number) => "Async result" : (foo: string, bar?: number) => string
+>                                              : ^   ^^      ^^   ^^^      ^^^^^^^^^^^
+>foo : string
+>    : ^^^^^^
+>bar : number
+>    : ^^^^^^
+>"Async result" : "Async result"
+>               : ^^^^^^^^^^^^^^
+>"foo" : "foo"
+>      : ^^^^^
+>undefined : undefined
+>          : ^^^^^^^^^
+
+Promise.try((foo: string, bar?: number) => "Async result", "foo", 42);
+>Promise.try((foo: string, bar?: number) => "Async result", "foo", 42) : Promise<string>
+>                                                                      : ^^^^^^^^^^^^^^^
+>Promise.try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>            : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>Promise : PromiseConstructor
+>        : ^^^^^^^^^^^^^^^^^^
+>try : <T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U) => Promise<Awaited<T>>
+>    : ^ ^^ ^^^^^^^^^         ^^          ^^                                  ^^^^^    ^^ ^^^^^                   
+>(foo: string, bar?: number) => "Async result" : (foo: string, bar?: number) => string
+>                                              : ^   ^^      ^^   ^^^      ^^^^^^^^^^^
+>foo : string
+>    : ^^^^^^
+>bar : number
+>    : ^^^^^^
+>"Async result" : "Async result"
+>               : ^^^^^^^^^^^^^^
+>"foo" : "foo"
+>      : ^^^^^
+>42 : 42
+>   : ^^
+
diff --git a/tests/baselines/reference/quickinfoVerbosity1.baseline b/tests/baselines/reference/quickinfoVerbosity1.baseline
new file mode 100644
index 0000000000000..e41255cd67c1a
--- /dev/null
+++ b/tests/baselines/reference/quickinfoVerbosity1.baseline
@@ -0,0 +1,326 @@
+// === QuickInfo ===
+=== /tests/cases/fourslash/quickinfoVerbosity1.ts ===
+// type FooType = string | number;
+// const foo: FooType = 1;
+//       ^^^
+// | ----------------------------------------------------------------------
+// | const foo: string | number
+// | (verbosity level: 1)
+// | ----------------------------------------------------------------------
+//       ^^^
+// | ----------------------------------------------------------------------
+// | const foo: FooType
+// | (verbosity level: 0)
+// | ----------------------------------------------------------------------
+// type BarType = FooType | boolean;
+// const bar: BarType = 1;
+//       ^^^
+// | ----------------------------------------------------------------------
+// | const bar: boolean | (string | number)
+// | (verbosity level: 2)
+// | ----------------------------------------------------------------------
+//       ^^^
+// | ----------------------------------------------------------------------
+// | const bar: boolean | FooType
+// | (verbosity level: 1)
+// | ----------------------------------------------------------------------
+//       ^^^
+// | ----------------------------------------------------------------------
+// | const bar: BarType
+// | (verbosity level: 0)
+// | ----------------------------------------------------------------------
+
+[
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosity1.ts",
+      "position": 41,
+      "name": "a"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 38,
+        "length": 3
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "foo",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "FooType",
+          "kind": "aliasName"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 0
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosity1.ts",
+      "position": 41,
+      "name": "a"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 38,
+        "length": 3
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "foo",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "string",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "number",
+          "kind": "keyword"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": false,
+      "verbosityLevel": 1
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosity1.ts",
+      "position": 99,
+      "name": "b"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 96,
+        "length": 3
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "bar",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "BarType",
+          "kind": "aliasName"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 0
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosity1.ts",
+      "position": 99,
+      "name": "b"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 96,
+        "length": 3
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "bar",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "boolean",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "FooType",
+          "kind": "aliasName"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 1
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosity1.ts",
+      "position": 99,
+      "name": "b"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 96,
+        "length": 3
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "bar",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "boolean",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "string",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "number",
+          "kind": "keyword"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": false,
+      "verbosityLevel": 2
+    }
+  }
+]
\ No newline at end of file
diff --git a/tests/baselines/reference/quickinfoVerbosity2.baseline b/tests/baselines/reference/quickinfoVerbosity2.baseline
new file mode 100644
index 0000000000000..844d2f7663f34
--- /dev/null
+++ b/tests/baselines/reference/quickinfoVerbosity2.baseline
@@ -0,0 +1,431 @@
+// === QuickInfo ===
+=== /tests/cases/fourslash/quickinfoVerbosity2.ts ===
+// type Str = string | {};
+// type FooType = Str | number;
+// type Sym = symbol | (() => void);
+// type BarType = Sym | boolean;
+// type BothType = FooType | BarType;
+// const both: BothType = 1;
+//       ^^^^
+// | ----------------------------------------------------------------------
+// | const both: (number | (string | {})) | (boolean | (symbol | (() => void)))
+// | (verbosity level: 3)
+// | ----------------------------------------------------------------------
+//       ^^^^
+// | ----------------------------------------------------------------------
+// | const both: (number | Str) | (boolean | Sym)
+// | (verbosity level: 2)
+// | ----------------------------------------------------------------------
+//       ^^^^
+// | ----------------------------------------------------------------------
+// | const both: FooType | BarType
+// | (verbosity level: 1)
+// | ----------------------------------------------------------------------
+//       ^^^^
+// | ----------------------------------------------------------------------
+// | const both: BothType
+// | (verbosity level: 0)
+// | ----------------------------------------------------------------------
+
+[
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosity2.ts",
+      "position": 162,
+      "name": "b"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 158,
+        "length": 4
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "both",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "BothType",
+          "kind": "aliasName"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 0
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosity2.ts",
+      "position": 162,
+      "name": "b"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 158,
+        "length": 4
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "both",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "FooType",
+          "kind": "aliasName"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "BarType",
+          "kind": "aliasName"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 1
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosity2.ts",
+      "position": 162,
+      "name": "b"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 158,
+        "length": 4
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "both",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "number",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Str",
+          "kind": "aliasName"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "boolean",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Sym",
+          "kind": "aliasName"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 2
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosity2.ts",
+      "position": 162,
+      "name": "b"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 158,
+        "length": 4
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "both",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "number",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "string",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "boolean",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "symbol",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "=>",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "void",
+          "kind": "keyword"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": false,
+      "verbosityLevel": 3
+    }
+  }
+]
\ No newline at end of file
diff --git a/tests/baselines/reference/quickinfoVerbosityClass1.baseline b/tests/baselines/reference/quickinfoVerbosityClass1.baseline
new file mode 100644
index 0000000000000..cd101e72dbec8
--- /dev/null
+++ b/tests/baselines/reference/quickinfoVerbosityClass1.baseline
@@ -0,0 +1,1908 @@
+// === QuickInfo ===
+=== /tests/cases/fourslash/quickinfoVerbosityClass1.ts ===
+// {
+//     class Foo {
+//         a!: "a" | "c";
+//     }
+//     const f = new Foo();
+//           ^
+// | ----------------------------------------------------------------------
+// | const f: {
+// |     a: "a" | "c";
+// | }
+// | (verbosity level: 1)
+// | ----------------------------------------------------------------------
+//           ^
+// | ----------------------------------------------------------------------
+// | const f: Foo
+// | (verbosity level: 0)
+// | ----------------------------------------------------------------------
+// }
+// {
+//     type FooParam = "a" | "b";
+//     class Foo {
+//         constructor(public x: string) {
+//             this.x = "a";
+//         }
+//         foo(p: FooParam): void {}
+//     }
+//     const f = new Foo("");
+//           ^
+// | ----------------------------------------------------------------------
+// | const f: {
+// |     x: string;
+// |     foo(p: "a" | "b"): void;
+// | }
+// | (verbosity level: 2)
+// | ----------------------------------------------------------------------
+//           ^
+// | ----------------------------------------------------------------------
+// | const f: {
+// |     x: string;
+// |     foo(p: FooParam): void;
+// | }
+// | (verbosity level: 1)
+// | ----------------------------------------------------------------------
+//           ^
+// | ----------------------------------------------------------------------
+// | const f: Foo
+// | (verbosity level: 0)
+// | ----------------------------------------------------------------------
+// }
+// {
+//     class Bar {
+//         a!: string;
+//         bar(): void {}
+//         baz(param: string): void {}
+//     }
+//     class Foo extends Bar {
+//         b!: boolean;
+//         override baz(param: string | number): void {}
+//     }
+//     const f = new Foo();
+//           ^
+// | ----------------------------------------------------------------------
+// | const f: {
+// |     b: boolean;
+// |     baz(param: string | number): void;
+// |     a: string;
+// |     bar(): void;
+// | }
+// | (verbosity level: 1)
+// | ----------------------------------------------------------------------
+//           ^
+// | ----------------------------------------------------------------------
+// | const f: Foo
+// | (verbosity level: 0)
+// | ----------------------------------------------------------------------
+// }
+// {
+//     class Bar<B extends string> {
+//         bar(param: B): void {}
+//         baz(): this { return this; }
+//     }
+//     class Foo extends Bar<"foo"> {
+//         foo(): this { return this; }
+//     }
+//     const b = new Bar();
+//           ^
+// | ----------------------------------------------------------------------
+// | const b: {
+// |     bar(param: string): void;
+// |     baz(): Bar<string>;
+// | }
+// | (verbosity level: 2)
+// | ----------------------------------------------------------------------
+//           ^
+// | ----------------------------------------------------------------------
+// | const b: {
+// |     bar(param: string): void;
+// |     baz(): Bar<string>;
+// | }
+// | (verbosity level: 1)
+// | ----------------------------------------------------------------------
+//           ^
+// | ----------------------------------------------------------------------
+// | const b: Bar<string>
+// | (verbosity level: 0)
+// | ----------------------------------------------------------------------
+//     const f = new Foo();
+//           ^
+// | ----------------------------------------------------------------------
+// | const f: {
+// |     foo(): Foo;
+// |     bar(param: "foo"): void;
+// |     baz(): Foo;
+// | }
+// | (verbosity level: 1)
+// | ----------------------------------------------------------------------
+//           ^
+// | ----------------------------------------------------------------------
+// | const f: Foo
+// | (verbosity level: 0)
+// | ----------------------------------------------------------------------
+// }
+// {
+//     class Bar<B extends string> {
+//         bar(param: B): void {}
+//         baz(): this { return this; }
+//     }
+//     const noname = new (class extends Bar<"foo"> {
+//           ^^^^^^
+// | ----------------------------------------------------------------------
+// | const noname: {
+// |     foo(): (Anonymous class);
+// |     bar(param: "foo"): void;
+// |     baz(): (Anonymous class);
+// | }
+// | (verbosity level: 1)
+// | ----------------------------------------------------------------------
+//           ^^^^^^
+// | ----------------------------------------------------------------------
+// | const noname: (Anonymous class)
+// | (verbosity level: 0)
+// | ----------------------------------------------------------------------
+//         foo(): this { return this; }
+//     })();
+//     const klass = class extends Bar<"foo"> {
+//         foo(): this { return this; }
+//     };
+//     const k = new klass();
+//           ^
+// | ----------------------------------------------------------------------
+// | const k: {
+// |     foo(): klass;
+// |     bar(param: "foo"): void;
+// |     baz(): klass;
+// | }
+// | (verbosity level: 1)
+// | ----------------------------------------------------------------------
+//           ^
+// | ----------------------------------------------------------------------
+// | const k: klass
+// | (verbosity level: 0)
+// | ----------------------------------------------------------------------
+// }
+
+[
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts",
+      "position": 58,
+      "name": "f1"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 57,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "f",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Foo",
+          "kind": "className"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 0
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts",
+      "position": 58,
+      "name": "f1"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 57,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "f",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "a",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"a\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"c\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": false,
+      "verbosityLevel": 1
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts",
+      "position": 250,
+      "name": "f2"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 249,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "f",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Foo",
+          "kind": "className"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 0
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts",
+      "position": 250,
+      "name": "f2"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 249,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "f",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "x",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "string",
+          "kind": "keyword"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "foo",
+          "kind": "text"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "p",
+          "kind": "parameterName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "FooParam",
+          "kind": "aliasName"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "void",
+          "kind": "keyword"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 1
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts",
+      "position": 250,
+      "name": "f2"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 249,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "f",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "x",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "string",
+          "kind": "keyword"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "foo",
+          "kind": "text"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "p",
+          "kind": "parameterName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"a\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"b\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "void",
+          "kind": "keyword"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": false,
+      "verbosityLevel": 2
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts",
+      "position": 491,
+      "name": "f3"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 490,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "f",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Foo",
+          "kind": "className"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 0
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts",
+      "position": 491,
+      "name": "f3"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 490,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "f",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "b",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "boolean",
+          "kind": "keyword"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "baz",
+          "kind": "text"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "param",
+          "kind": "parameterName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "string",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "number",
+          "kind": "keyword"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "void",
+          "kind": "keyword"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "a",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "string",
+          "kind": "keyword"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "bar",
+          "kind": "text"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "void",
+          "kind": "keyword"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": false,
+      "verbosityLevel": 1
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts",
+      "position": 706,
+      "name": "b1"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 705,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "b",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Bar",
+          "kind": "className"
+        },
+        {
+          "text": "<",
+          "kind": "punctuation"
+        },
+        {
+          "text": "string",
+          "kind": "keyword"
+        },
+        {
+          "text": ">",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 0
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts",
+      "position": 706,
+      "name": "b1"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 705,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "b",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "bar",
+          "kind": "text"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "param",
+          "kind": "parameterName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "string",
+          "kind": "keyword"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "void",
+          "kind": "keyword"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "baz",
+          "kind": "text"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Bar",
+          "kind": "className"
+        },
+        {
+          "text": "<",
+          "kind": "punctuation"
+        },
+        {
+          "text": "string",
+          "kind": "keyword"
+        },
+        {
+          "text": ">",
+          "kind": "punctuation"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": false,
+      "verbosityLevel": 1
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts",
+      "position": 706,
+      "name": "b1"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 705,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "b",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "bar",
+          "kind": "text"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "param",
+          "kind": "parameterName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "string",
+          "kind": "keyword"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "void",
+          "kind": "keyword"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "baz",
+          "kind": "text"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Bar",
+          "kind": "className"
+        },
+        {
+          "text": "<",
+          "kind": "punctuation"
+        },
+        {
+          "text": "string",
+          "kind": "keyword"
+        },
+        {
+          "text": ">",
+          "kind": "punctuation"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": false,
+      "verbosityLevel": 2
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts",
+      "position": 731,
+      "name": "f4"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 730,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "f",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Foo",
+          "kind": "className"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 0
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts",
+      "position": 731,
+      "name": "f4"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 730,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "f",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "foo",
+          "kind": "text"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Foo",
+          "kind": "className"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "bar",
+          "kind": "text"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "param",
+          "kind": "parameterName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"foo\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "void",
+          "kind": "keyword"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "baz",
+          "kind": "text"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Foo",
+          "kind": "className"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": false,
+      "verbosityLevel": 1
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts",
+      "position": 873,
+      "name": "n1"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 867,
+        "length": 6
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "noname",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "(Anonymous class)",
+          "kind": "className"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 0
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts",
+      "position": 873,
+      "name": "n1"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 867,
+        "length": 6
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "noname",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "foo",
+          "kind": "text"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "(Anonymous class)",
+          "kind": "className"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "bar",
+          "kind": "text"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "param",
+          "kind": "parameterName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"foo\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "void",
+          "kind": "keyword"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "baz",
+          "kind": "text"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "(Anonymous class)",
+          "kind": "className"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": false,
+      "verbosityLevel": 1
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts",
+      "position": 1055,
+      "name": "k1"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 1054,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "k",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "klass",
+          "kind": "className"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 0
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts",
+      "position": 1055,
+      "name": "k1"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 1054,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "k",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "foo",
+          "kind": "text"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "klass",
+          "kind": "className"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "bar",
+          "kind": "text"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "param",
+          "kind": "parameterName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"foo\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "void",
+          "kind": "keyword"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "baz",
+          "kind": "text"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "klass",
+          "kind": "className"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": false,
+      "verbosityLevel": 1
+    }
+  }
+]
\ No newline at end of file
diff --git a/tests/baselines/reference/quickinfoVerbosityInterface1.baseline b/tests/baselines/reference/quickinfoVerbosityInterface1.baseline
new file mode 100644
index 0000000000000..7d0b66bc6b396
--- /dev/null
+++ b/tests/baselines/reference/quickinfoVerbosityInterface1.baseline
@@ -0,0 +1,2383 @@
+// === QuickInfo ===
+=== /tests/cases/fourslash/quickinfoVerbosityInterface1.ts ===
+// {
+//     interface Foo {
+//         a: "a" | "c";
+//     }
+//     const f: Foo = { a: "a" };
+//           ^
+// | ----------------------------------------------------------------------
+// | const f: {
+// |     a: "a" | "c";
+// | }
+// | (verbosity level: 1)
+// | ----------------------------------------------------------------------
+//           ^
+// | ----------------------------------------------------------------------
+// | const f: Foo
+// | (verbosity level: 0)
+// | ----------------------------------------------------------------------
+// }
+// {
+//     interface Bar {
+//         b: "b" | "d";
+//     }
+//     interface Foo extends Bar {
+//         a: "a" | "c";
+//     }
+//     const f: Foo = { a: "a", b: "b" };
+//           ^
+// | ----------------------------------------------------------------------
+// | const f: {
+// |     a: "a" | "c";
+// |     b: "b" | "d";
+// | }
+// | (verbosity level: 1)
+// | ----------------------------------------------------------------------
+//           ^
+// | ----------------------------------------------------------------------
+// | const f: Foo
+// | (verbosity level: 0)
+// | ----------------------------------------------------------------------
+// }
+// {
+//     type BarParam = "b" | "d";
+//     interface Bar {
+//         bar(b: BarParam): string;
+//     }
+//     type FooType = "a" | "c";
+//     interface FooParam {
+//         param: FooType;
+//     }
+//     interface Foo extends Bar {
+//         a: FooType;
+//         foo: (a: FooParam) => number;
+//     }
+//     const f: Foo = { a: "a", bar: () => "b", foo: () => 1 };
+//           ^
+// | ----------------------------------------------------------------------
+// | const f: {
+// |     a: "a" | "c";
+// |     foo: (a: {
+// |         param: "a" | "c";
+// |     }) => number;
+// |     bar(b: "b" | "d"): string;
+// | }
+// | (verbosity level: 3)
+// | ----------------------------------------------------------------------
+//           ^
+// | ----------------------------------------------------------------------
+// | const f: {
+// |     a: "a" | "c";
+// |     foo: (a: {
+// |         param: FooType;
+// |     }) => number;
+// |     bar(b: "b" | "d"): string;
+// | }
+// | (verbosity level: 2)
+// | ----------------------------------------------------------------------
+//           ^
+// | ----------------------------------------------------------------------
+// | const f: {
+// |     a: FooType;
+// |     foo: (a: FooParam) => number;
+// |     bar(b: BarParam): string;
+// | }
+// | (verbosity level: 1)
+// | ----------------------------------------------------------------------
+//           ^
+// | ----------------------------------------------------------------------
+// | const f: Foo
+// | (verbosity level: 0)
+// | ----------------------------------------------------------------------
+// }
+// {
+//     interface Bar<B> {
+//         bar(b: B): string;
+//     }
+//     interface FooParam {
+//         param: "a" | "c";
+//     }
+//     interface Foo extends Bar<FooParam> {
+//         a: "a" | "c";
+//         foo: (a: FooParam) => number;
+//     }
+//     const f: Foo = { a: "a", bar: () => "b", foo: () => 1 };
+//           ^
+// | ----------------------------------------------------------------------
+// | const f: {
+// |     a: "a" | "c";
+// |     foo: (a: {
+// |         param: "a" | "c";
+// |     }) => number;
+// |     bar(b: {
+// |         param: "a" | "c";
+// |     }): string;
+// | }
+// | (verbosity level: 2)
+// | ----------------------------------------------------------------------
+//           ^
+// | ----------------------------------------------------------------------
+// | const f: {
+// |     a: "a" | "c";
+// |     foo: (a: FooParam) => number;
+// |     bar(b: FooParam): string;
+// | }
+// | (verbosity level: 1)
+// | ----------------------------------------------------------------------
+//           ^
+// | ----------------------------------------------------------------------
+// | const f: Foo
+// | (verbosity level: 0)
+// | ----------------------------------------------------------------------
+//     const b: Bar<number> = { bar: () => "" };
+//           ^
+// | ----------------------------------------------------------------------
+// | const b: {
+// |     bar(b: number): string;
+// | }
+// | (verbosity level: 1)
+// | ----------------------------------------------------------------------
+//           ^
+// | ----------------------------------------------------------------------
+// | const b: Bar<number>
+// | (verbosity level: 0)
+// | ----------------------------------------------------------------------
+// }
+// {
+//     interface Foo<A> {
+//         a: A;
+//     }
+//     type Alias = Foo<string>;
+//     const a: Alias = { a: "a" };
+//           ^
+// | ----------------------------------------------------------------------
+// | const a: {
+// |     a: string;
+// | }
+// | (verbosity level: 2)
+// | ----------------------------------------------------------------------
+//           ^
+// | ----------------------------------------------------------------------
+// | const a: Foo<string>
+// | (verbosity level: 1)
+// | ----------------------------------------------------------------------
+//           ^
+// | ----------------------------------------------------------------------
+// | const a: Alias
+// | (verbosity level: 0)
+// | ----------------------------------------------------------------------
+// }
+// {
+//     interface Foo {
+//         a: "a";
+//     }
+//     interface Foo {
+//         b: "b";
+//     }
+//     const f: Foo = { a: "a", b: "b" };
+//           ^
+// | ----------------------------------------------------------------------
+// | const f: {
+// |     a: "a";
+// |     b: "b";
+// | }
+// | (verbosity level: 1)
+// | ----------------------------------------------------------------------
+//           ^
+// | ----------------------------------------------------------------------
+// | const f: Foo
+// | (verbosity level: 0)
+// | ----------------------------------------------------------------------
+// }
+
+[
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts",
+      "position": 61,
+      "name": "f1"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 60,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "f",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Foo",
+          "kind": "interfaceName"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 0
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts",
+      "position": 61,
+      "name": "f1"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 60,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "f",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "a",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"a\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"c\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": false,
+      "verbosityLevel": 1
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts",
+      "position": 204,
+      "name": "f2"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 203,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "f",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Foo",
+          "kind": "interfaceName"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 0
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts",
+      "position": 204,
+      "name": "f2"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 203,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "f",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "a",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"a\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"c\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "b",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"b\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"d\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": false,
+      "verbosityLevel": 1
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts",
+      "position": 519,
+      "name": "f3"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 518,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "f",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Foo",
+          "kind": "interfaceName"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 0
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts",
+      "position": 519,
+      "name": "f3"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 518,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "f",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "a",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "FooType",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "foo",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "a",
+          "kind": "parameterName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "FooParam",
+          "kind": "interfaceName"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "=>",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "number",
+          "kind": "keyword"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "bar",
+          "kind": "text"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "b",
+          "kind": "parameterName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "BarParam",
+          "kind": "aliasName"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "string",
+          "kind": "keyword"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 1
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts",
+      "position": 519,
+      "name": "f3"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 518,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "f",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "a",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"a\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"c\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "foo",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "a",
+          "kind": "parameterName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "        ",
+          "kind": "space"
+        },
+        {
+          "text": "param",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "FooType",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "=>",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "number",
+          "kind": "keyword"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "bar",
+          "kind": "text"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "b",
+          "kind": "parameterName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"b\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"d\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "string",
+          "kind": "keyword"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 2
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts",
+      "position": 519,
+      "name": "f3"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 518,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "f",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "a",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"a\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"c\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "foo",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "a",
+          "kind": "parameterName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "        ",
+          "kind": "space"
+        },
+        {
+          "text": "param",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"a\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"c\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "=>",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "number",
+          "kind": "keyword"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "bar",
+          "kind": "text"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "b",
+          "kind": "parameterName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"b\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"d\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "string",
+          "kind": "keyword"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": false,
+      "verbosityLevel": 3
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts",
+      "position": 805,
+      "name": "f4"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 804,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "f",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Foo",
+          "kind": "interfaceName"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 0
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts",
+      "position": 805,
+      "name": "f4"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 804,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "f",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "a",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"a\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"c\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "foo",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "a",
+          "kind": "parameterName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "FooParam",
+          "kind": "interfaceName"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "=>",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "number",
+          "kind": "keyword"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "bar",
+          "kind": "text"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "b",
+          "kind": "parameterName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "FooParam",
+          "kind": "interfaceName"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "string",
+          "kind": "keyword"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 1
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts",
+      "position": 805,
+      "name": "f4"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 804,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "f",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "a",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"a\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"c\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "foo",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "a",
+          "kind": "parameterName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "        ",
+          "kind": "space"
+        },
+        {
+          "text": "param",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"a\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"c\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "=>",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "number",
+          "kind": "keyword"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "bar",
+          "kind": "text"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "b",
+          "kind": "parameterName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "        ",
+          "kind": "space"
+        },
+        {
+          "text": "param",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"a\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"c\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "string",
+          "kind": "keyword"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": false,
+      "verbosityLevel": 2
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts",
+      "position": 866,
+      "name": "b1"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 865,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "b",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Bar",
+          "kind": "interfaceName"
+        },
+        {
+          "text": "<",
+          "kind": "punctuation"
+        },
+        {
+          "text": "number",
+          "kind": "keyword"
+        },
+        {
+          "text": ">",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 0
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts",
+      "position": 866,
+      "name": "b1"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 865,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "b",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "bar",
+          "kind": "text"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "b",
+          "kind": "parameterName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "number",
+          "kind": "keyword"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "string",
+          "kind": "keyword"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": false,
+      "verbosityLevel": 1
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts",
+      "position": 989,
+      "name": "a"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 988,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "a",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Alias",
+          "kind": "aliasName"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 0
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts",
+      "position": 989,
+      "name": "a"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 988,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "a",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Foo",
+          "kind": "interfaceName"
+        },
+        {
+          "text": "<",
+          "kind": "punctuation"
+        },
+        {
+          "text": "string",
+          "kind": "keyword"
+        },
+        {
+          "text": ">",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 1
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts",
+      "position": 989,
+      "name": "a"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 988,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "a",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "a",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "string",
+          "kind": "keyword"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": false,
+      "verbosityLevel": 2
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts",
+      "position": 1110,
+      "name": "f5"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 1109,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "f",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Foo",
+          "kind": "interfaceName"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 0
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts",
+      "position": 1110,
+      "name": "f5"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 1109,
+        "length": 1
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "f",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "a",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"a\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "b",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"b\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": false,
+      "verbosityLevel": 1
+    }
+  }
+]
\ No newline at end of file
diff --git a/tests/baselines/reference/quickinfoVerbosityIntersection1.baseline b/tests/baselines/reference/quickinfoVerbosityIntersection1.baseline
new file mode 100644
index 0000000000000..145792e628a26
--- /dev/null
+++ b/tests/baselines/reference/quickinfoVerbosityIntersection1.baseline
@@ -0,0 +1,357 @@
+// === QuickInfo ===
+=== /tests/cases/fourslash/quickinfoVerbosityIntersection1.ts ===
+// {
+//     type Foo = { a: "a" | "c" };
+//     type Bar = { a: "a" | "b" };
+//     const obj: Foo & Bar = { a: "a" };
+//           ^^^
+// | ----------------------------------------------------------------------
+// | const obj: {
+// |     a: "a" | "c";
+// | } & {
+// |     a: "a" | "b";
+// | }
+// | (verbosity level: 1)
+// | ----------------------------------------------------------------------
+//           ^^^
+// | ----------------------------------------------------------------------
+// | const obj: Foo & Bar
+// | (verbosity level: 0)
+// | ----------------------------------------------------------------------
+// }
+// {
+//     type Foo = { a: "c" };
+//     type Bar = { a: "b" };
+//     const obj: Foo & Bar = { a: "" };
+//           ^^^
+// | ----------------------------------------------------------------------
+// | const obj: never
+// | (verbosity level: 0)
+// | ----------------------------------------------------------------------
+// }
+// {
+//     type Foo = { a: "c" };
+//     type Bar = { a: "b" };
+//     type Never = Foo & Bar;
+//     const obj: Never = { a: "" };
+//           ^^^
+// | ----------------------------------------------------------------------
+// | const obj: never
+// | (verbosity level: 0)
+// | ----------------------------------------------------------------------
+// }
+
+[
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityIntersection1.ts",
+      "position": 81,
+      "name": "o1"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 78,
+        "length": 3
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "obj",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Foo",
+          "kind": "aliasName"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "&",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Bar",
+          "kind": "aliasName"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 0
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityIntersection1.ts",
+      "position": 81,
+      "name": "o1"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 78,
+        "length": 3
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "obj",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "a",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"a\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"c\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "&",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "a",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"a\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "\"b\"",
+          "kind": "stringLiteral"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": false,
+      "verbosityLevel": 1
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityIntersection1.ts",
+      "position": 178,
+      "name": "o2"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 175,
+        "length": 3
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "obj",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "never",
+          "kind": "keyword"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": false,
+      "verbosityLevel": 0
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityIntersection1.ts",
+      "position": 302,
+      "name": "o3"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 299,
+        "length": 3
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "obj",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "never",
+          "kind": "keyword"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": false,
+      "verbosityLevel": 0
+    }
+  }
+]
\ No newline at end of file
diff --git a/tests/baselines/reference/quickinfoVerbosityObjectType1.baseline b/tests/baselines/reference/quickinfoVerbosityObjectType1.baseline
new file mode 100644
index 0000000000000..2a4091f720292
--- /dev/null
+++ b/tests/baselines/reference/quickinfoVerbosityObjectType1.baseline
@@ -0,0 +1,1299 @@
+// === QuickInfo ===
+=== /tests/cases/fourslash/quickinfoVerbosityObjectType1.ts ===
+// type Str = string | {};
+// type FooType = Str | number;
+// type Sym = symbol | (() => void);
+// type BarType = Sym | boolean;
+// type Obj = { foo: FooType, bar: BarType, str: Str };
+// const obj1: Obj = { foo: 1, bar: true, str: "3"};
+//       ^^^^
+// | ----------------------------------------------------------------------
+// | const obj1: {
+// |     foo: number | (string | {});
+// |     bar: boolean | (symbol | (() => void));
+// |     str: string | {};
+// | }
+// | (verbosity level: 3)
+// | ----------------------------------------------------------------------
+//       ^^^^
+// | ----------------------------------------------------------------------
+// | const obj1: {
+// |     foo: number | Str;
+// |     bar: boolean | Sym;
+// |     str: string | {};
+// | }
+// | (verbosity level: 2)
+// | ----------------------------------------------------------------------
+//       ^^^^
+// | ----------------------------------------------------------------------
+// | const obj1: {
+// |     foo: FooType;
+// |     bar: BarType;
+// |     str: Str;
+// | }
+// | (verbosity level: 1)
+// | ----------------------------------------------------------------------
+//       ^^^^
+// | ----------------------------------------------------------------------
+// | const obj1: Obj
+// | (verbosity level: 0)
+// | ----------------------------------------------------------------------
+// const obj2: { foo: FooType, bar: BarType, str: Str } = { foo: 1, bar: true, str: "3"};
+//       ^^^^
+// | ----------------------------------------------------------------------
+// | const obj2: {
+// |     foo: number | (string | {});
+// |     bar: boolean | (symbol | (() => void));
+// |     str: string | {};
+// | }
+// | (verbosity level: 2)
+// | ----------------------------------------------------------------------
+//       ^^^^
+// | ----------------------------------------------------------------------
+// | const obj2: {
+// |     foo: number | Str;
+// |     bar: boolean | Sym;
+// |     str: string | {};
+// | }
+// | (verbosity level: 1)
+// | ----------------------------------------------------------------------
+//       ^^^^
+// | ----------------------------------------------------------------------
+// | const obj2: {
+// |     foo: FooType;
+// |     bar: BarType;
+// |     str: Str;
+// | }
+// | (verbosity level: 0)
+// | ----------------------------------------------------------------------
+
+[
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityObjectType1.ts",
+      "position": 180,
+      "name": "o1"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 176,
+        "length": 4
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "obj1",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Obj",
+          "kind": "aliasName"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 0
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityObjectType1.ts",
+      "position": 180,
+      "name": "o1"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 176,
+        "length": 4
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "obj1",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "foo",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "FooType",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "bar",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "BarType",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "str",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Str",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 1
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityObjectType1.ts",
+      "position": 180,
+      "name": "o1"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 176,
+        "length": 4
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "obj1",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "foo",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "number",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Str",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "bar",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "boolean",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Sym",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "str",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "string",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 2
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityObjectType1.ts",
+      "position": 180,
+      "name": "o1"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 176,
+        "length": 4
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "obj1",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "foo",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "number",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "string",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "bar",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "boolean",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "symbol",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "=>",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "void",
+          "kind": "keyword"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "str",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "string",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": false,
+      "verbosityLevel": 3
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityObjectType1.ts",
+      "position": 230,
+      "name": "o2"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 226,
+        "length": 4
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "obj2",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "foo",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "FooType",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "bar",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "BarType",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "str",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Str",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 0
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityObjectType1.ts",
+      "position": 230,
+      "name": "o2"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 226,
+        "length": 4
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "obj2",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "foo",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "number",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Str",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "bar",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "boolean",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Sym",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "str",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "string",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 1
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityObjectType1.ts",
+      "position": 230,
+      "name": "o2"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 226,
+        "length": 4
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "obj2",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "foo",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "number",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "string",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "bar",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "boolean",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "symbol",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "=>",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "void",
+          "kind": "keyword"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "str",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "string",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "|",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": false,
+      "verbosityLevel": 2
+    }
+  }
+]
\ No newline at end of file
diff --git a/tests/baselines/reference/quickinfoVerbosityServer.baseline b/tests/baselines/reference/quickinfoVerbosityServer.baseline
new file mode 100644
index 0000000000000..6bce07cf78b76
--- /dev/null
+++ b/tests/baselines/reference/quickinfoVerbosityServer.baseline
@@ -0,0 +1,79 @@
+// === QuickInfo ===
+=== /tests/cases/fourslash/server/quickinfoVerbosityServer.ts ===
+// type FooType = string | number
+// const foo: FooType = 1
+//       ^^^
+// | ----------------------------------------------------------------------
+// | const foo: string | number
+// | 
+// | (verbosity level: 1)
+// | ----------------------------------------------------------------------
+//       ^^^
+// | ----------------------------------------------------------------------
+// | const foo: FooType
+// | 
+// | (verbosity level: 0)
+// | ----------------------------------------------------------------------
+
+[
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/server/quickinfoVerbosityServer.ts",
+      "position": 40,
+      "name": "a"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 37,
+        "length": 3
+      },
+      "displayParts": [
+        {
+          "kind": "text",
+          "text": "const foo: FooType"
+        }
+      ],
+      "documentation": [
+        {
+          "kind": "text",
+          "text": ""
+        }
+      ],
+      "tags": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 0
+    }
+  },
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/server/quickinfoVerbosityServer.ts",
+      "position": 40,
+      "name": "a"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 37,
+        "length": 3
+      },
+      "displayParts": [
+        {
+          "kind": "text",
+          "text": "const foo: string | number"
+        }
+      ],
+      "documentation": [
+        {
+          "kind": "text",
+          "text": ""
+        }
+      ],
+      "tags": [],
+      "canIncreaseVerbosityLevel": false,
+      "verbosityLevel": 1
+    }
+  }
+]
\ No newline at end of file
diff --git a/tests/baselines/reference/quickinfoVerbosityTruncation.baseline b/tests/baselines/reference/quickinfoVerbosityTruncation.baseline
new file mode 100644
index 0000000000000..b65773e3c335d
--- /dev/null
+++ b/tests/baselines/reference/quickinfoVerbosityTruncation.baseline
@@ -0,0 +1,706 @@
+// === QuickInfo ===
+=== /tests/cases/fourslash/quickinfoVerbosityTruncation.ts ===
+// type Str = string | {};
+// type FooType = Str | number;
+// type Sym = symbol | (() => void);
+// type BarType = Sym | boolean;
+// interface LotsOfProps {
+//     someLongPropertyName1: Str;
+//     someLongPropertyName2: FooType;
+//     someLongPropertyName3: Sym;
+//     someLongPropertyName4: BarType;
+//     someLongPropertyName5: Str;
+//     someLongPropertyName6: FooType;
+//     someLongPropertyName7: Sym;
+//     someLongPropertyName8: BarType;
+//     someLongMethodName1(a: FooType, b: BarType): Sym;
+//     someLongPropertyName9: Str;
+//     someLongPropertyName10: FooType;
+//     someLongPropertyName11: Sym;
+//     someLongPropertyName12: BarType;
+//     someLongPropertyName13: Str;
+//     someLongPropertyName14: FooType;
+//     someLongPropertyName15: Sym;
+//     someLongPropertyName16: BarType;
+//     someLongMethodName2(a: FooType, b: BarType): Sym;
+// }
+// const obj1: LotsOfProps = undefined as any as LotsOfProps;
+//       ^^^^
+// | ----------------------------------------------------------------------
+// | const obj1: {
+// |     someLongPropertyName1: Str;
+// |     someLongPropertyName2: FooType;
+// |     someLongPropertyName3: Sym;
+// |     someLongPropertyName4: BarType;
+// |     someLongPropertyName5: Str;
+// |     someLongPropertyName6: FooType;
+// |     someLongPropertyName7: Sym;
+// |     someLongPropertyName8: BarType;
+// |     someLongMethodName1(a: FooType, b: BarType): Sym;
+// |     someLongPropertyName9: Str;
+// |     someLongPropertyName10: FooType;
+// |     someLongPropertyName11: Sym;
+// |     someLongPropertyName12: BarType;
+// |     someLongPropertyName13: Str;
+// |     someLongPropertyName14: FooType;
+// |     someLongPropertyName15: Sym;
+// |     someLongPropertyName16: BarType;
+// |     someLongMethodName2(a: FooType, b: BarType): Sym;
+// | }
+// | (verbosity level: 1)
+// | ----------------------------------------------------------------------
+
+[
+  {
+    "marker": {
+      "fileName": "/tests/cases/fourslash/quickinfoVerbosityTruncation.ts",
+      "position": 812,
+      "name": "o1"
+    },
+    "item": {
+      "kind": "const",
+      "kindModifiers": "",
+      "textSpan": {
+        "start": 808,
+        "length": 4
+      },
+      "displayParts": [
+        {
+          "text": "const",
+          "kind": "keyword"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "obj1",
+          "kind": "localName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "{",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "someLongPropertyName1",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Str",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "someLongPropertyName2",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "FooType",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "someLongPropertyName3",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Sym",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "someLongPropertyName4",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "BarType",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "someLongPropertyName5",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Str",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "someLongPropertyName6",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "FooType",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "someLongPropertyName7",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Sym",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "someLongPropertyName8",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "BarType",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "someLongMethodName1",
+          "kind": "text"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "a",
+          "kind": "parameterName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "FooType",
+          "kind": "aliasName"
+        },
+        {
+          "text": ",",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "b",
+          "kind": "parameterName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "BarType",
+          "kind": "aliasName"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Sym",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "someLongPropertyName9",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Str",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "someLongPropertyName10",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "FooType",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "someLongPropertyName11",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Sym",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "someLongPropertyName12",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "BarType",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "someLongPropertyName13",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Str",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "someLongPropertyName14",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "FooType",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "someLongPropertyName15",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Sym",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "someLongPropertyName16",
+          "kind": "propertyName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "BarType",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "    ",
+          "kind": "space"
+        },
+        {
+          "text": "someLongMethodName2",
+          "kind": "text"
+        },
+        {
+          "text": "(",
+          "kind": "punctuation"
+        },
+        {
+          "text": "a",
+          "kind": "parameterName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "FooType",
+          "kind": "aliasName"
+        },
+        {
+          "text": ",",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "b",
+          "kind": "parameterName"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "BarType",
+          "kind": "aliasName"
+        },
+        {
+          "text": ")",
+          "kind": "punctuation"
+        },
+        {
+          "text": ":",
+          "kind": "punctuation"
+        },
+        {
+          "text": " ",
+          "kind": "space"
+        },
+        {
+          "text": "Sym",
+          "kind": "aliasName"
+        },
+        {
+          "text": ";",
+          "kind": "punctuation"
+        },
+        {
+          "text": "\n",
+          "kind": "lineBreak"
+        },
+        {
+          "text": "}",
+          "kind": "punctuation"
+        }
+      ],
+      "documentation": [],
+      "canIncreaseVerbosityLevel": true,
+      "verbosityLevel": 1
+    }
+  }
+]
\ No newline at end of file
diff --git a/tests/baselines/reference/reactJsxReactResolvedNodeNext.trace.json b/tests/baselines/reference/reactJsxReactResolvedNodeNext.trace.json
index e1c0b4c0df3b4..404545e75e00a 100644
--- a/tests/baselines/reference/reactJsxReactResolvedNodeNext.trace.json
+++ b/tests/baselines/reference/reactJsxReactResolvedNodeNext.trace.json
@@ -1043,6 +1043,19 @@
     "======== Module name '@typescript/lib-esnext/iterator' was not resolved. ========",
     "File '/.ts/package.json' does not exist according to earlier cached lookups.",
     "File '/package.json' does not exist according to earlier cached lookups.",
+    "======== Resolving module '@typescript/lib-esnext/promise' from '/.src/__lib_node_modules_lookup_lib.esnext.promise.d.ts__.ts'. ========",
+    "Explicitly specified module resolution kind: 'Node10'.",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: TypeScript, Declaration.",
+    "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Directory '/node_modules' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: JavaScript.",
+    "Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
+    "Directory '/node_modules' does not exist, skipping all lookups in it.",
+    "======== Module name '@typescript/lib-esnext/promise' was not resolved. ========",
+    "File '/.ts/package.json' does not exist according to earlier cached lookups.",
+    "File '/package.json' does not exist according to earlier cached lookups.",
     "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========",
     "Explicitly specified module resolution kind: 'Node10'.",
     "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.",
diff --git a/tests/baselines/reference/reactJsxReactResolvedNodeNextEsm.trace.json b/tests/baselines/reference/reactJsxReactResolvedNodeNextEsm.trace.json
index 90c868c0dab84..b36c8b9d36612 100644
--- a/tests/baselines/reference/reactJsxReactResolvedNodeNextEsm.trace.json
+++ b/tests/baselines/reference/reactJsxReactResolvedNodeNextEsm.trace.json
@@ -1043,6 +1043,19 @@
     "======== Module name '@typescript/lib-esnext/iterator' was not resolved. ========",
     "File '/.ts/package.json' does not exist according to earlier cached lookups.",
     "File '/package.json' does not exist according to earlier cached lookups.",
+    "======== Resolving module '@typescript/lib-esnext/promise' from '/.src/__lib_node_modules_lookup_lib.esnext.promise.d.ts__.ts'. ========",
+    "Explicitly specified module resolution kind: 'Node10'.",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: TypeScript, Declaration.",
+    "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Directory '/node_modules' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: JavaScript.",
+    "Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
+    "Directory '/node_modules' does not exist, skipping all lookups in it.",
+    "======== Module name '@typescript/lib-esnext/promise' was not resolved. ========",
+    "File '/.ts/package.json' does not exist according to earlier cached lookups.",
+    "File '/package.json' does not exist according to earlier cached lookups.",
     "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========",
     "Explicitly specified module resolution kind: 'Node10'.",
     "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.",
diff --git a/tests/baselines/reference/reactReduxLikeDeferredInferenceAllowsAssignment.types b/tests/baselines/reference/reactReduxLikeDeferredInferenceAllowsAssignment.types
index 974be160ca61a..486c717c81c2c 100644
--- a/tests/baselines/reference/reactReduxLikeDeferredInferenceAllowsAssignment.types
+++ b/tests/baselines/reference/reactReduxLikeDeferredInferenceAllowsAssignment.types
@@ -280,9 +280,9 @@ const simpleAction = (payload: boolean) => ({
 });
 const thunkAction = (param1: number, param2: string) => async (
 >thunkAction : (param1: number, param2: string) => (dispatch: Dispatch, { foo }: OwnProps) => Promise<string>
->            : ^      ^^      ^^      ^^      ^^^^^^        ^^        ^^       ^^        ^^^^^^^^^^^^^^^^^^^^
+>            : ^      ^^      ^^      ^^      ^^^^^^                  ^^                 ^^^^^^^^^^^^^^^^^^^^
 >(param1: number, param2: string) => async (  dispatch: Dispatch,  { foo }: OwnProps) => {  return foo;} : (param1: number, param2: string) => (dispatch: Dispatch, { foo }: OwnProps) => Promise<string>
->                                                                                                        : ^      ^^      ^^      ^^      ^^^^^^        ^^        ^^       ^^        ^^^^^^^^^^^^^^^^^^^^
+>                                                                                                        : ^      ^^      ^^      ^^      ^^^^^^                  ^^                 ^^^^^^^^^^^^^^^^^^^^
 >param1 : number
 >       : ^^^^^^
 >param2 : string
@@ -332,13 +332,13 @@ class TestComponent extends Component<TestComponentProps> {}
 
 const mapDispatchToProps = { simpleAction, thunkAction };
 >mapDispatchToProps : { simpleAction: (payload: boolean) => { type: string; payload: boolean; }; thunkAction: (param1: number, param2: string) => (dispatch: Dispatch, { foo }: OwnProps) => Promise<string>; }
->                   : ^^^^^^^^^^^^^^^^^       ^^       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^      ^^      ^^      ^^      ^^^^^^        ^^        ^^       ^^        ^^^^^^^^^^^^^^^^^^^^^^^
+>                   : ^^^^^^^^^^^^^^^^^       ^^       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^      ^^      ^^      ^^      ^^^^^^                  ^^                 ^^^^^^^^^^^^^^^^^^^^^^^
 >{ simpleAction, thunkAction } : { simpleAction: (payload: boolean) => { type: string; payload: boolean; }; thunkAction: (param1: number, param2: string) => (dispatch: Dispatch, { foo }: OwnProps) => Promise<string>; }
->                              : ^^^^^^^^^^^^^^^^^       ^^       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^      ^^      ^^      ^^      ^^^^^^        ^^        ^^       ^^        ^^^^^^^^^^^^^^^^^^^^^^^
+>                              : ^^^^^^^^^^^^^^^^^       ^^       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^      ^^      ^^      ^^      ^^^^^^                  ^^                 ^^^^^^^^^^^^^^^^^^^^^^^
 >simpleAction : (payload: boolean) => { type: string; payload: boolean; }
 >             : ^       ^^       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >thunkAction : (param1: number, param2: string) => (dispatch: Dispatch, { foo }: OwnProps) => Promise<string>
->            : ^      ^^      ^^      ^^      ^^^^^^        ^^        ^^       ^^        ^^^^^^^^^^^^^^^^^^^^
+>            : ^      ^^      ^^      ^^      ^^^^^^                  ^^                 ^^^^^^^^^^^^^^^^^^^^
 
 type Q = HandleThunkActionCreator<typeof simpleAction>;
 >Q : (payload: boolean) => { type: string; payload: boolean; }
@@ -359,7 +359,7 @@ const Test1 = connect(
   null,
   mapDispatchToProps
 >mapDispatchToProps : { simpleAction: (payload: boolean) => { type: string; payload: boolean; }; thunkAction: (param1: number, param2: string) => (dispatch: Dispatch, { foo }: OwnProps) => Promise<string>; }
->                   : ^^^^^^^^^^^^^^^^^       ^^       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^      ^^      ^^      ^^      ^^^^^^        ^^        ^^       ^^        ^^^^^^^^^^^^^^^^^^^^^^^
+>                   : ^^^^^^^^^^^^^^^^^       ^^       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^      ^^      ^^      ^^      ^^^^^^                  ^^                 ^^^^^^^^^^^^^^^^^^^^^^^
 
 )(TestComponent);
 >TestComponent : typeof TestComponent
diff --git a/tests/baselines/reference/readonlyMembers.errors.txt b/tests/baselines/reference/readonlyMembers.errors.txt
index 565b38257733d..c3ac0ac353e01 100644
--- a/tests/baselines/reference/readonlyMembers.errors.txt
+++ b/tests/baselines/reference/readonlyMembers.errors.txt
@@ -4,18 +4,19 @@ readonlyMembers.ts(16,14): error TS2540: Cannot assign to 'c' because it is a re
 readonlyMembers.ts(18,18): error TS2540: Cannot assign to 'a' because it is a read-only property.
 readonlyMembers.ts(19,18): error TS2540: Cannot assign to 'b' because it is a read-only property.
 readonlyMembers.ts(20,18): error TS2540: Cannot assign to 'c' because it is a read-only property.
-readonlyMembers.ts(24,14): error TS2540: Cannot assign to 'a' because it is a read-only property.
-readonlyMembers.ts(25,14): error TS2540: Cannot assign to 'b' because it is a read-only property.
-readonlyMembers.ts(26,14): error TS2540: Cannot assign to 'c' because it is a read-only property.
-readonlyMembers.ts(35,3): error TS2540: Cannot assign to 'a' because it is a read-only property.
-readonlyMembers.ts(39,3): error TS2540: Cannot assign to 'a' because it is a read-only property.
-readonlyMembers.ts(48,3): error TS2540: Cannot assign to 'A' because it is a read-only property.
-readonlyMembers.ts(55,3): error TS2540: Cannot assign to 'a' because it is a read-only property.
-readonlyMembers.ts(61,1): error TS2542: Index signature in type '{ readonly [x: string]: string; }' only permits reading.
-readonlyMembers.ts(64,1): error TS2542: Index signature in type '{ readonly [x: number]: string; [x: string]: string; }' only permits reading.
+readonlyMembers.ts(25,18): error TS2540: Cannot assign to 'c' because it is a read-only property.
+readonlyMembers.ts(29,14): error TS2540: Cannot assign to 'a' because it is a read-only property.
+readonlyMembers.ts(30,14): error TS2540: Cannot assign to 'b' because it is a read-only property.
+readonlyMembers.ts(31,14): error TS2540: Cannot assign to 'c' because it is a read-only property.
+readonlyMembers.ts(40,3): error TS2540: Cannot assign to 'a' because it is a read-only property.
+readonlyMembers.ts(44,3): error TS2540: Cannot assign to 'a' because it is a read-only property.
+readonlyMembers.ts(53,3): error TS2540: Cannot assign to 'A' because it is a read-only property.
+readonlyMembers.ts(60,3): error TS2540: Cannot assign to 'a' because it is a read-only property.
+readonlyMembers.ts(66,1): error TS2542: Index signature in type '{ readonly [x: string]: string; }' only permits reading.
+readonlyMembers.ts(69,1): error TS2542: Index signature in type '{ readonly [x: number]: string; [x: string]: string; }' only permits reading.
 
 
-==== readonlyMembers.ts (15 errors) ====
+==== readonlyMembers.ts (16 errors) ====
     interface X {
         readonly a: number;
         readonly b?: number;
@@ -48,7 +49,14 @@ readonlyMembers.ts(64,1): error TS2542: Index signature in type '{ readonly [x:
                 this.c = 1;  // Error
                      ~
 !!! error TS2540: Cannot assign to 'c' because it is a read-only property.
-            }
+            };
+            (() => {
+                this.a = 1;  // Ok
+                this.b = 1;  // Ok
+                this.c = 1;  // Error
+                     ~
+!!! error TS2540: Cannot assign to 'c' because it is a read-only property.
+            })();
         }
         foo() {
             this.a = 1;  // Error
diff --git a/tests/baselines/reference/readonlyMembers.js b/tests/baselines/reference/readonlyMembers.js
index 7a3cb40d69a57..d17cc430b7e35 100644
--- a/tests/baselines/reference/readonlyMembers.js
+++ b/tests/baselines/reference/readonlyMembers.js
@@ -21,7 +21,12 @@ class C {
             this.a = 1;  // Error
             this.b = 1;  // Error
             this.c = 1;  // Error
-        }
+        };
+        (() => {
+            this.a = 1;  // Ok
+            this.b = 1;  // Ok
+            this.c = 1;  // Error
+        })();
     }
     foo() {
         this.a = 1;  // Error
@@ -83,6 +88,11 @@ var C = /** @class */ (function () {
             _this.b = 1; // Error
             _this.c = 1; // Error
         };
+        (function () {
+            _this.a = 1; // Ok
+            _this.b = 1; // Ok
+            _this.c = 1; // Error
+        })();
     }
     Object.defineProperty(C.prototype, "c", {
         get: function () { return 1; },
diff --git a/tests/baselines/reference/readonlyMembers.symbols b/tests/baselines/reference/readonlyMembers.symbols
index a62200bc2928e..a7e051096527e 100644
--- a/tests/baselines/reference/readonlyMembers.symbols
+++ b/tests/baselines/reference/readonlyMembers.symbols
@@ -70,10 +70,28 @@ class C {
 >this.c : Symbol(C.c, Decl(readonlyMembers.ts, 10, 19))
 >this : Symbol(C, Decl(readonlyMembers.ts, 6, 8))
 >c : Symbol(C.c, Decl(readonlyMembers.ts, 10, 19))
-        }
+
+        };
+        (() => {
+            this.a = 1;  // Ok
+>this.a : Symbol(C.a, Decl(readonlyMembers.ts, 8, 9))
+>this : Symbol(C, Decl(readonlyMembers.ts, 6, 8))
+>a : Symbol(C.a, Decl(readonlyMembers.ts, 8, 9))
+
+            this.b = 1;  // Ok
+>this.b : Symbol(C.b, Decl(readonlyMembers.ts, 9, 23))
+>this : Symbol(C, Decl(readonlyMembers.ts, 6, 8))
+>b : Symbol(C.b, Decl(readonlyMembers.ts, 9, 23))
+
+            this.c = 1;  // Error
+>this.c : Symbol(C.c, Decl(readonlyMembers.ts, 10, 19))
+>this : Symbol(C, Decl(readonlyMembers.ts, 6, 8))
+>c : Symbol(C.c, Decl(readonlyMembers.ts, 10, 19))
+
+        })();
     }
     foo() {
->foo : Symbol(C.foo, Decl(readonlyMembers.ts, 21, 5))
+>foo : Symbol(C.foo, Decl(readonlyMembers.ts, 26, 5))
 
         this.a = 1;  // Error
 >this.a : Symbol(C.a, Decl(readonlyMembers.ts, 8, 9))
@@ -93,121 +111,121 @@ class C {
 }
 
 var o = {
->o : Symbol(o, Decl(readonlyMembers.ts, 29, 3))
+>o : Symbol(o, Decl(readonlyMembers.ts, 34, 3))
 
     get a() { return 1 },
->a : Symbol(a, Decl(readonlyMembers.ts, 29, 9))
+>a : Symbol(a, Decl(readonlyMembers.ts, 34, 9))
 
     get b() { return 1 },
->b : Symbol(b, Decl(readonlyMembers.ts, 30, 25), Decl(readonlyMembers.ts, 31, 25))
+>b : Symbol(b, Decl(readonlyMembers.ts, 35, 25), Decl(readonlyMembers.ts, 36, 25))
 
     set b(value) { }
->b : Symbol(b, Decl(readonlyMembers.ts, 30, 25), Decl(readonlyMembers.ts, 31, 25))
->value : Symbol(value, Decl(readonlyMembers.ts, 32, 10))
+>b : Symbol(b, Decl(readonlyMembers.ts, 35, 25), Decl(readonlyMembers.ts, 36, 25))
+>value : Symbol(value, Decl(readonlyMembers.ts, 37, 10))
 
 };
 o.a = 1;  // Error
->o.a : Symbol(a, Decl(readonlyMembers.ts, 29, 9))
->o : Symbol(o, Decl(readonlyMembers.ts, 29, 3))
->a : Symbol(a, Decl(readonlyMembers.ts, 29, 9))
+>o.a : Symbol(a, Decl(readonlyMembers.ts, 34, 9))
+>o : Symbol(o, Decl(readonlyMembers.ts, 34, 3))
+>a : Symbol(a, Decl(readonlyMembers.ts, 34, 9))
 
 o.b = 1;
->o.b : Symbol(b, Decl(readonlyMembers.ts, 30, 25), Decl(readonlyMembers.ts, 31, 25))
->o : Symbol(o, Decl(readonlyMembers.ts, 29, 3))
->b : Symbol(b, Decl(readonlyMembers.ts, 30, 25), Decl(readonlyMembers.ts, 31, 25))
+>o.b : Symbol(b, Decl(readonlyMembers.ts, 35, 25), Decl(readonlyMembers.ts, 36, 25))
+>o : Symbol(o, Decl(readonlyMembers.ts, 34, 3))
+>b : Symbol(b, Decl(readonlyMembers.ts, 35, 25), Decl(readonlyMembers.ts, 36, 25))
 
 var p: { readonly a: number, b: number } = { a: 1, b: 1 };
->p : Symbol(p, Decl(readonlyMembers.ts, 37, 3))
->a : Symbol(a, Decl(readonlyMembers.ts, 37, 8))
->b : Symbol(b, Decl(readonlyMembers.ts, 37, 28))
->a : Symbol(a, Decl(readonlyMembers.ts, 37, 44))
->b : Symbol(b, Decl(readonlyMembers.ts, 37, 50))
+>p : Symbol(p, Decl(readonlyMembers.ts, 42, 3))
+>a : Symbol(a, Decl(readonlyMembers.ts, 42, 8))
+>b : Symbol(b, Decl(readonlyMembers.ts, 42, 28))
+>a : Symbol(a, Decl(readonlyMembers.ts, 42, 44))
+>b : Symbol(b, Decl(readonlyMembers.ts, 42, 50))
 
 p.a = 1;  // Error
->p.a : Symbol(a, Decl(readonlyMembers.ts, 37, 8))
->p : Symbol(p, Decl(readonlyMembers.ts, 37, 3))
->a : Symbol(a, Decl(readonlyMembers.ts, 37, 8))
+>p.a : Symbol(a, Decl(readonlyMembers.ts, 42, 8))
+>p : Symbol(p, Decl(readonlyMembers.ts, 42, 3))
+>a : Symbol(a, Decl(readonlyMembers.ts, 42, 8))
 
 p.b = 1;
->p.b : Symbol(b, Decl(readonlyMembers.ts, 37, 28))
->p : Symbol(p, Decl(readonlyMembers.ts, 37, 3))
->b : Symbol(b, Decl(readonlyMembers.ts, 37, 28))
+>p.b : Symbol(b, Decl(readonlyMembers.ts, 42, 28))
+>p : Symbol(p, Decl(readonlyMembers.ts, 42, 3))
+>b : Symbol(b, Decl(readonlyMembers.ts, 42, 28))
 
 var q: { a: number, b: number } = p;
->q : Symbol(q, Decl(readonlyMembers.ts, 40, 3))
->a : Symbol(a, Decl(readonlyMembers.ts, 40, 8))
->b : Symbol(b, Decl(readonlyMembers.ts, 40, 19))
->p : Symbol(p, Decl(readonlyMembers.ts, 37, 3))
+>q : Symbol(q, Decl(readonlyMembers.ts, 45, 3))
+>a : Symbol(a, Decl(readonlyMembers.ts, 45, 8))
+>b : Symbol(b, Decl(readonlyMembers.ts, 45, 19))
+>p : Symbol(p, Decl(readonlyMembers.ts, 42, 3))
 
 q.a = 1;
->q.a : Symbol(a, Decl(readonlyMembers.ts, 40, 8))
->q : Symbol(q, Decl(readonlyMembers.ts, 40, 3))
->a : Symbol(a, Decl(readonlyMembers.ts, 40, 8))
+>q.a : Symbol(a, Decl(readonlyMembers.ts, 45, 8))
+>q : Symbol(q, Decl(readonlyMembers.ts, 45, 3))
+>a : Symbol(a, Decl(readonlyMembers.ts, 45, 8))
 
 q.b = 1;
->q.b : Symbol(b, Decl(readonlyMembers.ts, 40, 19))
->q : Symbol(q, Decl(readonlyMembers.ts, 40, 3))
->b : Symbol(b, Decl(readonlyMembers.ts, 40, 19))
+>q.b : Symbol(b, Decl(readonlyMembers.ts, 45, 19))
+>q : Symbol(q, Decl(readonlyMembers.ts, 45, 3))
+>b : Symbol(b, Decl(readonlyMembers.ts, 45, 19))
 
 enum E {
->E : Symbol(E, Decl(readonlyMembers.ts, 42, 8))
+>E : Symbol(E, Decl(readonlyMembers.ts, 47, 8))
 
     A, B, C
->A : Symbol(E.A, Decl(readonlyMembers.ts, 44, 8))
->B : Symbol(E.B, Decl(readonlyMembers.ts, 45, 6))
->C : Symbol(E.C, Decl(readonlyMembers.ts, 45, 9))
+>A : Symbol(E.A, Decl(readonlyMembers.ts, 49, 8))
+>B : Symbol(E.B, Decl(readonlyMembers.ts, 50, 6))
+>C : Symbol(E.C, Decl(readonlyMembers.ts, 50, 9))
 }
 E.A = 1;  // Error
->E.A : Symbol(E.A, Decl(readonlyMembers.ts, 44, 8))
->E : Symbol(E, Decl(readonlyMembers.ts, 42, 8))
->A : Symbol(E.A, Decl(readonlyMembers.ts, 44, 8))
+>E.A : Symbol(E.A, Decl(readonlyMembers.ts, 49, 8))
+>E : Symbol(E, Decl(readonlyMembers.ts, 47, 8))
+>A : Symbol(E.A, Decl(readonlyMembers.ts, 49, 8))
 
 namespace N {
->N : Symbol(N, Decl(readonlyMembers.ts, 47, 8))
+>N : Symbol(N, Decl(readonlyMembers.ts, 52, 8))
 
     export const a = 1;
->a : Symbol(a, Decl(readonlyMembers.ts, 50, 16))
+>a : Symbol(a, Decl(readonlyMembers.ts, 55, 16))
 
     export let b = 1;
->b : Symbol(b, Decl(readonlyMembers.ts, 51, 14))
+>b : Symbol(b, Decl(readonlyMembers.ts, 56, 14))
 
     export var c = 1;
->c : Symbol(c, Decl(readonlyMembers.ts, 52, 14))
+>c : Symbol(c, Decl(readonlyMembers.ts, 57, 14))
 }
 N.a = 1;  // Error
->N.a : Symbol(N.a, Decl(readonlyMembers.ts, 50, 16))
->N : Symbol(N, Decl(readonlyMembers.ts, 47, 8))
->a : Symbol(N.a, Decl(readonlyMembers.ts, 50, 16))
+>N.a : Symbol(N.a, Decl(readonlyMembers.ts, 55, 16))
+>N : Symbol(N, Decl(readonlyMembers.ts, 52, 8))
+>a : Symbol(N.a, Decl(readonlyMembers.ts, 55, 16))
 
 N.b = 1;
->N.b : Symbol(N.b, Decl(readonlyMembers.ts, 51, 14))
->N : Symbol(N, Decl(readonlyMembers.ts, 47, 8))
->b : Symbol(N.b, Decl(readonlyMembers.ts, 51, 14))
+>N.b : Symbol(N.b, Decl(readonlyMembers.ts, 56, 14))
+>N : Symbol(N, Decl(readonlyMembers.ts, 52, 8))
+>b : Symbol(N.b, Decl(readonlyMembers.ts, 56, 14))
 
 N.c = 1;
->N.c : Symbol(N.c, Decl(readonlyMembers.ts, 52, 14))
->N : Symbol(N, Decl(readonlyMembers.ts, 47, 8))
->c : Symbol(N.c, Decl(readonlyMembers.ts, 52, 14))
+>N.c : Symbol(N.c, Decl(readonlyMembers.ts, 57, 14))
+>N : Symbol(N, Decl(readonlyMembers.ts, 52, 8))
+>c : Symbol(N.c, Decl(readonlyMembers.ts, 57, 14))
 
 let xx: { readonly [x: string]: string };
->xx : Symbol(xx, Decl(readonlyMembers.ts, 58, 3))
->x : Symbol(x, Decl(readonlyMembers.ts, 58, 20))
+>xx : Symbol(xx, Decl(readonlyMembers.ts, 63, 3))
+>x : Symbol(x, Decl(readonlyMembers.ts, 63, 20))
 
 let s = xx["foo"];
->s : Symbol(s, Decl(readonlyMembers.ts, 59, 3))
->xx : Symbol(xx, Decl(readonlyMembers.ts, 58, 3))
+>s : Symbol(s, Decl(readonlyMembers.ts, 64, 3))
+>xx : Symbol(xx, Decl(readonlyMembers.ts, 63, 3))
 
 xx["foo"] = "abc";  // Error
->xx : Symbol(xx, Decl(readonlyMembers.ts, 58, 3))
+>xx : Symbol(xx, Decl(readonlyMembers.ts, 63, 3))
 
 let yy: { readonly [x: number]: string, [x: string]: string };
->yy : Symbol(yy, Decl(readonlyMembers.ts, 62, 3))
->x : Symbol(x, Decl(readonlyMembers.ts, 62, 20))
->x : Symbol(x, Decl(readonlyMembers.ts, 62, 41))
+>yy : Symbol(yy, Decl(readonlyMembers.ts, 67, 3))
+>x : Symbol(x, Decl(readonlyMembers.ts, 67, 20))
+>x : Symbol(x, Decl(readonlyMembers.ts, 67, 41))
 
 yy[1] = "abc";  // Error
->yy : Symbol(yy, Decl(readonlyMembers.ts, 62, 3))
+>yy : Symbol(yy, Decl(readonlyMembers.ts, 67, 3))
 
 yy["foo"] = "abc";
->yy : Symbol(yy, Decl(readonlyMembers.ts, 62, 3))
+>yy : Symbol(yy, Decl(readonlyMembers.ts, 67, 3))
 
diff --git a/tests/baselines/reference/readonlyMembers.types b/tests/baselines/reference/readonlyMembers.types
index 0566106bdf4a9..852ed3e69251c 100644
--- a/tests/baselines/reference/readonlyMembers.types
+++ b/tests/baselines/reference/readonlyMembers.types
@@ -142,7 +142,53 @@ class C {
 >  : ^^^
 >1 : 1
 >  : ^
-        }
+
+        };
+        (() => {
+>(() => {            this.a = 1;  // Ok            this.b = 1;  // Ok            this.c = 1;  // Error        })() : void
+>                                                                                                                  : ^^^^
+>(() => {            this.a = 1;  // Ok            this.b = 1;  // Ok            this.c = 1;  // Error        }) : () => void
+>                                                                                                                : ^^^^^^^^^^
+>() => {            this.a = 1;  // Ok            this.b = 1;  // Ok            this.c = 1;  // Error        } : () => void
+>                                                                                                              : ^^^^^^^^^^
+
+            this.a = 1;  // Ok
+>this.a = 1 : 1
+>           : ^
+>this.a : number
+>       : ^^^^^^
+>this : this
+>     : ^^^^
+>a : number
+>  : ^^^^^^
+>1 : 1
+>  : ^
+
+            this.b = 1;  // Ok
+>this.b = 1 : 1
+>           : ^
+>this.b : 1
+>       : ^
+>this : this
+>     : ^^^^
+>b : 1
+>  : ^
+>1 : 1
+>  : ^
+
+            this.c = 1;  // Error
+>this.c = 1 : 1
+>           : ^
+>this.c : any
+>       : ^^^
+>this : this
+>     : ^^^^
+>c : any
+>  : ^^^
+>1 : 1
+>  : ^
+
+        })();
     }
     foo() {
 >foo : () => void
diff --git a/tests/baselines/reference/returnConditionalExpressionJSDocCast.symbols b/tests/baselines/reference/returnConditionalExpressionJSDocCast.symbols
new file mode 100644
index 0000000000000..1f49ce6b305cd
--- /dev/null
+++ b/tests/baselines/reference/returnConditionalExpressionJSDocCast.symbols
@@ -0,0 +1,35 @@
+//// [tests/cases/compiler/returnConditionalExpressionJSDocCast.ts] ////
+
+=== file.js ===
+// Don't peek into conditional return expression if it's wrapped in a cast
+/** @type {Map<string, string>} */
+const sources = new Map();
+>sources : Symbol(sources, Decl(file.js, 2, 5))
+>Map : Symbol(Map, 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, --, --))
+
+/**
+
+ * @param {string=} type the type of source that should be generated
+ * @returns {String}
+ */
+function source(type = "javascript") {
+>source : Symbol(source, Decl(file.js, 2, 26))
+>type : Symbol(type, Decl(file.js, 8, 16))
+
+    return /** @type {String} */ (
+        type
+>type : Symbol(type, Decl(file.js, 8, 16))
+
+            ? sources.get(type)
+>sources.get : Symbol(Map.get, Decl(lib.es2015.collection.d.ts, --, --))
+>sources : Symbol(sources, Decl(file.js, 2, 5))
+>get : Symbol(Map.get, Decl(lib.es2015.collection.d.ts, --, --))
+>type : Symbol(type, Decl(file.js, 8, 16))
+
+            : sources.get("some other thing")
+>sources.get : Symbol(Map.get, Decl(lib.es2015.collection.d.ts, --, --))
+>sources : Symbol(sources, Decl(file.js, 2, 5))
+>get : Symbol(Map.get, Decl(lib.es2015.collection.d.ts, --, --))
+
+    );
+}
diff --git a/tests/baselines/reference/returnConditionalExpressionJSDocCast.types b/tests/baselines/reference/returnConditionalExpressionJSDocCast.types
new file mode 100644
index 0000000000000..4b98f032cb8e9
--- /dev/null
+++ b/tests/baselines/reference/returnConditionalExpressionJSDocCast.types
@@ -0,0 +1,66 @@
+//// [tests/cases/compiler/returnConditionalExpressionJSDocCast.ts] ////
+
+=== Performance Stats ===
+Type Count: 1,000
+Instantiation count: 2,500
+
+=== file.js ===
+// Don't peek into conditional return expression if it's wrapped in a cast
+/** @type {Map<string, string>} */
+const sources = new Map();
+>sources : Map<string, string>
+>        : ^^^^^^^^^^^^^^^^^^^
+>new Map() : Map<any, any>
+>          : ^^^^^^^^^^^^^
+>Map : MapConstructor
+>    : ^^^^^^^^^^^^^^
+
+/**
+
+ * @param {string=} type the type of source that should be generated
+ * @returns {String}
+ */
+function source(type = "javascript") {
+>source : (type?: string | undefined) => string
+>       : ^    ^^^         ^^^^^^^^^^^^^^^^^^^^
+>type : string | undefined
+>     : ^^^^^^^^^^^^^^^^^^
+>"javascript" : "javascript"
+>             : ^^^^^^^^^^^^
+
+    return /** @type {String} */ (
+>(        type            ? sources.get(type)            : sources.get("some other thing")    ) : string
+>                                                                                               : ^^^^^^
+
+        type
+>type            ? sources.get(type)            : sources.get("some other thing") : string | undefined
+>                                                                                 : ^^^^^^^^^^^^^^^^^^
+>type : string
+>     : ^^^^^^
+
+            ? sources.get(type)
+>sources.get(type) : string | undefined
+>                  : ^^^^^^^^^^^^^^^^^^
+>sources.get : (key: string) => string | undefined
+>            : ^   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>sources : Map<string, string>
+>        : ^^^^^^^^^^^^^^^^^^^
+>get : (key: string) => string | undefined
+>    : ^   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>type : string
+>     : ^^^^^^
+
+            : sources.get("some other thing")
+>sources.get("some other thing") : string | undefined
+>                                : ^^^^^^^^^^^^^^^^^^
+>sources.get : (key: string) => string | undefined
+>            : ^   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>sources : Map<string, string>
+>        : ^^^^^^^^^^^^^^^^^^^
+>get : (key: string) => string | undefined
+>    : ^   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>"some other thing" : "some other thing"
+>                   : ^^^^^^^^^^^^^^^^^^
+
+    );
+}
diff --git a/tests/baselines/reference/returnStatement1.types b/tests/baselines/reference/returnStatement1.types
index 8759bb1025a1b..6aa617fcbff76 100644
--- a/tests/baselines/reference/returnStatement1.types
+++ b/tests/baselines/reference/returnStatement1.types
@@ -3,7 +3,7 @@
 === returnStatement1.ts ===
 function f() {
 >f : () => (s: any) => void
->  : ^^^^^^^ ^^^^^^^^^^^^^^
+>  : ^^^^^^^   ^^^^^^^^^^^^
 
     return function (s) {
 >function (s) {        var x = s;    } : (s: any) => void
diff --git a/tests/baselines/reference/returnStatementNoAsiAfterTransform(target=es5).js b/tests/baselines/reference/returnStatementNoAsiAfterTransform(target=es5).js
new file mode 100644
index 0000000000000..0485eb813e407
--- /dev/null
+++ b/tests/baselines/reference/returnStatementNoAsiAfterTransform(target=es5).js
@@ -0,0 +1,122 @@
+//// [tests/cases/conformance/statements/returnStatements/returnStatementNoAsiAfterTransform.ts] ////
+
+//// [returnStatementNoAsiAfterTransform.ts]
+declare var a: any;
+
+function t1() {
+    return (
+        // comment
+        a as any
+    );
+}
+function t2() {
+    return (
+        // comment
+        a as any
+    ) + 1;
+}
+function t3() {
+    return (
+        // comment
+        a as any
+    ) ? 0 : 1;
+}
+function t4() {
+    return (
+        // comment
+        a as any
+    ).b;
+}
+function t5() {
+    return (
+        // comment
+        a as any
+    )[a];
+}
+function t6() {
+    return (
+        // comment
+        a as any
+    )();
+}
+function t7() {
+    return (
+        // comment
+        a as any
+    )``;
+}
+function t8() {
+    return (
+        // comment
+        a as any
+    ) as any;
+}
+function t9() {
+    return (
+        // comment
+        a as any
+    ) satisfies any;
+}
+function t10() {
+    return (
+        // comment
+        a as any
+    )!;
+}
+
+
+//// [returnStatementNoAsiAfterTransform.js]
+var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
+    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
+    return cooked;
+};
+function t1() {
+    return (
+    // comment
+    a);
+}
+function t2() {
+    return (
+    // comment
+    a) + 1;
+}
+function t3() {
+    return (
+    // comment
+    a) ? 0 : 1;
+}
+function t4() {
+    return (
+    // comment
+    a).b;
+}
+function t5() {
+    return (
+    // comment
+    a)[a];
+}
+function t6() {
+    return (
+    // comment
+    a)();
+}
+function t7() {
+    return (
+    // comment
+    a)(__makeTemplateObject([""], [""]));
+}
+function t8() {
+    return (
+    // comment
+    a);
+}
+function t9() {
+    return (
+    // comment
+    a);
+}
+function t10() {
+    return (
+    // comment
+    a);
+}
diff --git a/tests/baselines/reference/returnStatementNoAsiAfterTransform(target=esnext).js b/tests/baselines/reference/returnStatementNoAsiAfterTransform(target=esnext).js
new file mode 100644
index 0000000000000..65e3b7057f673
--- /dev/null
+++ b/tests/baselines/reference/returnStatementNoAsiAfterTransform(target=esnext).js
@@ -0,0 +1,118 @@
+//// [tests/cases/conformance/statements/returnStatements/returnStatementNoAsiAfterTransform.ts] ////
+
+//// [returnStatementNoAsiAfterTransform.ts]
+declare var a: any;
+
+function t1() {
+    return (
+        // comment
+        a as any
+    );
+}
+function t2() {
+    return (
+        // comment
+        a as any
+    ) + 1;
+}
+function t3() {
+    return (
+        // comment
+        a as any
+    ) ? 0 : 1;
+}
+function t4() {
+    return (
+        // comment
+        a as any
+    ).b;
+}
+function t5() {
+    return (
+        // comment
+        a as any
+    )[a];
+}
+function t6() {
+    return (
+        // comment
+        a as any
+    )();
+}
+function t7() {
+    return (
+        // comment
+        a as any
+    )``;
+}
+function t8() {
+    return (
+        // comment
+        a as any
+    ) as any;
+}
+function t9() {
+    return (
+        // comment
+        a as any
+    ) satisfies any;
+}
+function t10() {
+    return (
+        // comment
+        a as any
+    )!;
+}
+
+
+//// [returnStatementNoAsiAfterTransform.js]
+function t1() {
+    return (
+    // comment
+    a);
+}
+function t2() {
+    return (
+    // comment
+    a) + 1;
+}
+function t3() {
+    return (
+    // comment
+    a) ? 0 : 1;
+}
+function t4() {
+    return (
+    // comment
+    a).b;
+}
+function t5() {
+    return (
+    // comment
+    a)[a];
+}
+function t6() {
+    return (
+    // comment
+    a)();
+}
+function t7() {
+    return (
+    // comment
+    a) ``;
+}
+function t8() {
+    return (
+    // comment
+    a);
+}
+function t9() {
+    return (
+    // comment
+    a);
+}
+function t10() {
+    return (
+    // comment
+    a);
+}
diff --git a/tests/baselines/reference/reverseMappedTypeIntersectionConstraint.types b/tests/baselines/reference/reverseMappedTypeIntersectionConstraint.types
index 656259e8eb96b..e68b26d70e4ac 100644
--- a/tests/baselines/reference/reverseMappedTypeIntersectionConstraint.types
+++ b/tests/baselines/reference/reverseMappedTypeIntersectionConstraint.types
@@ -128,9 +128,9 @@ const inferredParams2 = createMachine({
 
 const checkType = <T>() => <U extends T>(value: { [K in keyof U & keyof T]: U[K] }) => value;
 >checkType : <T>() => <U extends T>(value: { [K in keyof U & keyof T]: U[K]; }) => { [K in keyof U & keyof T]: U[K]; }
->          : ^ ^^^^^^^^ ^^^^^^^^^ ^^     ^^                                   ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>          : ^ ^^^^^^^^           ^^                                          ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 ><T>() => <U extends T>(value: { [K in keyof U & keyof T]: U[K] }) => value : <T>() => <U extends T>(value: { [K in keyof U & keyof T]: U[K]; }) => { [K in keyof U & keyof T]: U[K]; }
->                                                                           : ^ ^^^^^^^^ ^^^^^^^^^ ^^     ^^                                   ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>                                                                           : ^ ^^^^^^^^           ^^                                          ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 ><U extends T>(value: { [K in keyof U & keyof T]: U[K] }) => value : <U extends T>(value: { [K in keyof U & keyof T]: U[K]; }) => { [K in keyof U & keyof T]: U[K]; }
 >                                                                  : ^ ^^^^^^^^^ ^^     ^^                                   ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >value : { [K in keyof U & keyof T]: U[K]; }
@@ -146,7 +146,7 @@ const checked = checkType<{x: number, y: string}>()({
 >checkType<{x: number, y: string}>() : <U extends { x: number; y: string; }>(value: { [K in keyof U & ("x" | "y")]: U[K]; }) => { [K in keyof U & ("x" | "y")]: U[K]; }
 >                                    : ^ ^^^^^^^^^^^^^^      ^^^^^      ^^^^^     ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >checkType : <T>() => <U extends T>(value: { [K in keyof U & keyof T]: U[K]; }) => { [K in keyof U & keyof T]: U[K]; }
->          : ^ ^^^^^^^^ ^^^^^^^^^ ^^     ^^                                   ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>          : ^ ^^^^^^^^           ^^                                          ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >x : number
 >  : ^^^^^^
 >y : string
diff --git a/tests/baselines/reference/reverseMappedTypeLimitedConstraint.types b/tests/baselines/reference/reverseMappedTypeLimitedConstraint.types
index 62a5ce588c915..647b34f87f368 100644
--- a/tests/baselines/reference/reverseMappedTypeLimitedConstraint.types
+++ b/tests/baselines/reference/reverseMappedTypeLimitedConstraint.types
@@ -33,9 +33,9 @@ foo_({x: 1, y: 'foo'});
 
 const checkType_ = <T>() => <U extends T>(value: { [K in keyof U & keyof T]: U[K] }) => value;
 >checkType_ : <T>() => <U extends T>(value: { [K in keyof U & keyof T]: U[K]; }) => { [K in keyof U & keyof T]: U[K]; }
->           : ^ ^^^^^^^^ ^^^^^^^^^ ^^     ^^                                   ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>           : ^ ^^^^^^^^           ^^                                          ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 ><T>() => <U extends T>(value: { [K in keyof U & keyof T]: U[K] }) => value : <T>() => <U extends T>(value: { [K in keyof U & keyof T]: U[K]; }) => { [K in keyof U & keyof T]: U[K]; }
->                                                                           : ^ ^^^^^^^^ ^^^^^^^^^ ^^     ^^                                   ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>                                                                           : ^ ^^^^^^^^           ^^                                          ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 ><U extends T>(value: { [K in keyof U & keyof T]: U[K] }) => value : <U extends T>(value: { [K in keyof U & keyof T]: U[K]; }) => { [K in keyof U & keyof T]: U[K]; }
 >                                                                  : ^ ^^^^^^^^^ ^^     ^^                                   ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >value : { [K in keyof U & keyof T]: U[K]; }
@@ -51,7 +51,7 @@ const checked_ = checkType_<{x: number, y: string}>()({
 >checkType_<{x: number, y: string}>() : <U extends { x: number; y: string; }>(value: { [K in keyof U & ("x" | "y")]: U[K]; }) => { [K in keyof U & ("x" | "y")]: U[K]; }
 >                                     : ^ ^^^^^^^^^^^^^^      ^^^^^      ^^^^^     ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >checkType_ : <T>() => <U extends T>(value: { [K in keyof U & keyof T]: U[K]; }) => { [K in keyof U & keyof T]: U[K]; }
->           : ^ ^^^^^^^^ ^^^^^^^^^ ^^     ^^                                   ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+>           : ^ ^^^^^^^^           ^^                                          ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >x : number
 >  : ^^^^^^
 >y : string
diff --git a/tests/baselines/reference/signatureOverloadsWithComments.js b/tests/baselines/reference/signatureOverloadsWithComments.js
new file mode 100644
index 0000000000000..a66e4a1cadc8d
--- /dev/null
+++ b/tests/baselines/reference/signatureOverloadsWithComments.js
@@ -0,0 +1,45 @@
+//// [tests/cases/compiler/signatureOverloadsWithComments.ts] ////
+
+//// [signatureOverloadsWithComments.ts]
+/**
+ * Docs
+ */
+function Foo() {
+    return class Bar {
+        /**
+         * comment 1
+         */
+        foo(bar: string): void;
+        /**
+         * @deprecated This signature is deprecated
+         *
+         * comment 2
+         */
+        foo(): string;
+        foo(bar?: string): string | void {
+            return 'hi'
+        }
+    }
+}
+
+
+
+
+//// [signatureOverloadsWithComments.d.ts]
+/**
+ * Docs
+ */
+declare function Foo(): {
+    new (): {
+        /**
+         * comment 1
+         */
+        foo(bar: string): void;
+        /**
+         * @deprecated This signature is deprecated
+         *
+         * comment 2
+         */
+        foo(): string;
+    };
+};
diff --git a/tests/baselines/reference/signatureOverloadsWithComments.symbols b/tests/baselines/reference/signatureOverloadsWithComments.symbols
new file mode 100644
index 0000000000000..3d04d7bb43cc2
--- /dev/null
+++ b/tests/baselines/reference/signatureOverloadsWithComments.symbols
@@ -0,0 +1,36 @@
+//// [tests/cases/compiler/signatureOverloadsWithComments.ts] ////
+
+=== signatureOverloadsWithComments.ts ===
+/**
+ * Docs
+ */
+function Foo() {
+>Foo : Symbol(Foo, Decl(signatureOverloadsWithComments.ts, 0, 0))
+
+    return class Bar {
+>Bar : Symbol(Bar, Decl(signatureOverloadsWithComments.ts, 4, 10))
+
+        /**
+         * comment 1
+         */
+        foo(bar: string): void;
+>foo : Symbol(Bar.foo, Decl(signatureOverloadsWithComments.ts, 4, 22), Decl(signatureOverloadsWithComments.ts, 8, 31), Decl(signatureOverloadsWithComments.ts, 14, 22))
+>bar : Symbol(bar, Decl(signatureOverloadsWithComments.ts, 8, 12))
+
+        /**
+         * @deprecated This signature is deprecated
+         *
+         * comment 2
+         */
+        foo(): string;
+>foo : Symbol(Bar.foo, Decl(signatureOverloadsWithComments.ts, 4, 22), Decl(signatureOverloadsWithComments.ts, 8, 31), Decl(signatureOverloadsWithComments.ts, 14, 22))
+
+        foo(bar?: string): string | void {
+>foo : Symbol(Bar.foo, Decl(signatureOverloadsWithComments.ts, 4, 22), Decl(signatureOverloadsWithComments.ts, 8, 31), Decl(signatureOverloadsWithComments.ts, 14, 22))
+>bar : Symbol(bar, Decl(signatureOverloadsWithComments.ts, 15, 12))
+
+            return 'hi'
+        }
+    }
+}
+
diff --git a/tests/baselines/reference/signatureOverloadsWithComments.types b/tests/baselines/reference/signatureOverloadsWithComments.types
new file mode 100644
index 0000000000000..6742e001f3481
--- /dev/null
+++ b/tests/baselines/reference/signatureOverloadsWithComments.types
@@ -0,0 +1,47 @@
+//// [tests/cases/compiler/signatureOverloadsWithComments.ts] ////
+
+=== signatureOverloadsWithComments.ts ===
+/**
+ * Docs
+ */
+function Foo() {
+>Foo : () => typeof Bar
+>    : ^^^^^^^^^^^^^^^^
+
+    return class Bar {
+>class Bar {        /**         * comment 1         */        foo(bar: string): void;        /**         * @deprecated This signature is deprecated         *         * comment 2         */        foo(): string;        foo(bar?: string): string | void {            return 'hi'        }    } : typeof Bar
+>                                                                                                                                                                                                                                                                                                 : ^^^^^^^^^^
+>Bar : typeof Bar
+>    : ^^^^^^^^^^
+
+        /**
+         * comment 1
+         */
+        foo(bar: string): void;
+>foo : { (bar: string): void; (): string; }
+>    : ^^^   ^^      ^^^    ^^^^^^      ^^^
+>bar : string
+>    : ^^^^^^
+
+        /**
+         * @deprecated This signature is deprecated
+         *
+         * comment 2
+         */
+        foo(): string;
+>foo : { (bar: string): void; (): string; }
+>    : ^^^   ^^      ^^^    ^^^^^^      ^^^
+
+        foo(bar?: string): string | void {
+>foo : { (bar: string): void; (): string; }
+>    : ^^^   ^^      ^^^    ^^^^^^      ^^^
+>bar : string
+>    : ^^^^^^
+
+            return 'hi'
+>'hi' : "hi"
+>     : ^^^^
+        }
+    }
+}
+
diff --git a/tests/baselines/reference/spreadParameterTupleType.js b/tests/baselines/reference/spreadParameterTupleType.js
index 3d28fd976435b..bd1e2a324546c 100644
--- a/tests/baselines/reference/spreadParameterTupleType.js
+++ b/tests/baselines/reference/spreadParameterTupleType.js
@@ -5,7 +5,7 @@ function f1() {
     type A = [s: string];
     type C = [...A, ...A];
 
-    return function fn(...args: C) { }
+    return function fn(...args: C) { } satisfies any
 }
 
 function f2() {
@@ -14,7 +14,7 @@ function f2() {
     type C = [c: string];
     type D = [...A, ...A, ...B, ...A, ...B, ...B, ...A, ...C];
 
-    return function fn(...args: D) { }
+    return function fn(...args: D) { } satisfies any;
 }
 
 
diff --git a/tests/baselines/reference/spreadParameterTupleType.symbols b/tests/baselines/reference/spreadParameterTupleType.symbols
index 7ff72e7a3dce0..c966f3c166d23 100644
--- a/tests/baselines/reference/spreadParameterTupleType.symbols
+++ b/tests/baselines/reference/spreadParameterTupleType.symbols
@@ -12,7 +12,7 @@ function f1() {
 >A : Symbol(A, Decl(spreadParameterTupleType.ts, 0, 15))
 >A : Symbol(A, Decl(spreadParameterTupleType.ts, 0, 15))
 
-    return function fn(...args: C) { }
+    return function fn(...args: C) { } satisfies any
 >fn : Symbol(fn, Decl(spreadParameterTupleType.ts, 4, 10))
 >args : Symbol(args, Decl(spreadParameterTupleType.ts, 4, 23))
 >C : Symbol(C, Decl(spreadParameterTupleType.ts, 1, 25))
@@ -41,7 +41,7 @@ function f2() {
 >A : Symbol(A, Decl(spreadParameterTupleType.ts, 7, 15))
 >C : Symbol(C, Decl(spreadParameterTupleType.ts, 9, 25))
 
-    return function fn(...args: D) { }
+    return function fn(...args: D) { } satisfies any;
 >fn : Symbol(fn, Decl(spreadParameterTupleType.ts, 13, 10))
 >args : Symbol(args, Decl(spreadParameterTupleType.ts, 13, 23))
 >D : Symbol(D, Decl(spreadParameterTupleType.ts, 10, 25))
diff --git a/tests/baselines/reference/spreadParameterTupleType.types b/tests/baselines/reference/spreadParameterTupleType.types
index 99d8f1da4fa25..f4f0291a175c5 100644
--- a/tests/baselines/reference/spreadParameterTupleType.types
+++ b/tests/baselines/reference/spreadParameterTupleType.types
@@ -13,7 +13,9 @@ function f1() {
 >C : [s: string, s: string]
 >  : ^^^^^^^^^^^^^^^^^^^^^^
 
-    return function fn(...args: C) { }
+    return function fn(...args: C) { } satisfies any
+>function fn(...args: C) { } satisfies any : (s: string, s_1: string) => void
+>                                          : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >function fn(...args: C) { } : (s: string, s_1: string) => void
 >                            : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >fn : (s: string, s_1: string) => void
@@ -42,7 +44,9 @@ function f2() {
 >D : [a: string, a: string, b: string, a: string, b: string, b: string, a: string, c: string]
 >  : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-    return function fn(...args: D) { }
+    return function fn(...args: D) { } satisfies any;
+>function fn(...args: D) { } satisfies any : (a: string, a_1: string, b: string, a_2: string, b_1: string, b_2: string, a_3: string, c: string) => void
+>                                          : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >function fn(...args: D) { } : (a: string, a_1: string, b: string, a_2: string, b_1: string, b_2: string, a_3: string, c: string) => void
 >                            : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >fn : (a: string, a_1: string, b: string, a_2: string, b_1: string, b_2: string, a_3: string, c: string) => void
diff --git a/tests/baselines/reference/subtypingWithCallSignatures2.types b/tests/baselines/reference/subtypingWithCallSignatures2.types
index 092c2c532d2e3..f27c17e862fbe 100644
--- a/tests/baselines/reference/subtypingWithCallSignatures2.types
+++ b/tests/baselines/reference/subtypingWithCallSignatures2.types
@@ -719,9 +719,9 @@ var r6b = [r6arg2, r6arg1];
 
 var r7arg1 = <T extends Base, U extends Derived>(x: (arg: T) => U) => (r: T) => <U>null;
 >r7arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U) => (r: T) => U
->       : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^^^^^ ^^ ^^^^^ 
+>       : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^^^^^    ^^^^^ 
 ><T extends Base, U extends Derived>(x: (arg: T) => U) => (r: T) => <U>null : <T extends Base, U extends Derived>(x: (arg: T) => U) => (r: T) => U
->                                                                           : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^^^^^ ^^ ^^^^^ 
+>                                                                           : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^^^^^    ^^^^^ 
 >x : (arg: T) => U
 >  : ^   ^^ ^^^^^ 
 >arg : T
@@ -735,9 +735,9 @@ var r7arg1 = <T extends Base, U extends Derived>(x: (arg: T) => U) => (r: T) =>
 
 var r7arg2 = (x: (arg: Base) => Derived) => (r: Base) => <Derived>null;
 >r7arg2 : (x: (arg: Base) => Derived) => (r: Base) => Derived
->       : ^ ^^                      ^^^^^^ ^^    ^^^^^       
+>       : ^ ^^                      ^^^^^^       ^^^^^       
 >(x: (arg: Base) => Derived) => (r: Base) => <Derived>null : (x: (arg: Base) => Derived) => (r: Base) => Derived
->                                                          : ^ ^^                      ^^^^^^ ^^    ^^^^^       
+>                                                          : ^ ^^                      ^^^^^^       ^^^^^       
 >x : (arg: Base) => Derived
 >  : ^   ^^    ^^^^^       
 >arg : Base
@@ -757,33 +757,33 @@ var r7 = foo7(r7arg1); // any
 >foo7 : { (a: (x: (arg: Base) => Derived) => (r: Base) => Derived): typeof a; (a: any): any; }
 >     : ^^^ ^^                                                   ^^^        ^^^ ^^   ^^^   ^^^
 >r7arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U) => (r: T) => U
->       : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^^^^^ ^^ ^^^^^ 
+>       : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^^^^^    ^^^^^ 
 
 var r7a = [r7arg1, r7arg2];
 >r7a : ((x: (arg: Base) => Derived) => (r: Base) => Derived)[]
->    : ^^ ^^                      ^^^^^^ ^^    ^^^^^       ^^^
+>    : ^^ ^^                      ^^^^^^       ^^^^^       ^^^
 >[r7arg1, r7arg2] : ((x: (arg: Base) => Derived) => (r: Base) => Derived)[]
->                 : ^^ ^^                      ^^^^^^ ^^    ^^^^^       ^^^
+>                 : ^^ ^^                      ^^^^^^       ^^^^^       ^^^
 >r7arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U) => (r: T) => U
->       : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^^^^^ ^^ ^^^^^ 
+>       : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^^^^^    ^^^^^ 
 >r7arg2 : (x: (arg: Base) => Derived) => (r: Base) => Derived
->       : ^ ^^                      ^^^^^^ ^^    ^^^^^       
+>       : ^ ^^                      ^^^^^^       ^^^^^       
 
 var r7b = [r7arg2, r7arg1];
 >r7b : ((x: (arg: Base) => Derived) => (r: Base) => Derived)[]
->    : ^^ ^^                      ^^^^^^ ^^    ^^^^^       ^^^
+>    : ^^ ^^                      ^^^^^^       ^^^^^       ^^^
 >[r7arg2, r7arg1] : ((x: (arg: Base) => Derived) => (r: Base) => Derived)[]
->                 : ^^ ^^                      ^^^^^^ ^^    ^^^^^       ^^^
+>                 : ^^ ^^                      ^^^^^^       ^^^^^       ^^^
 >r7arg2 : (x: (arg: Base) => Derived) => (r: Base) => Derived
->       : ^ ^^                      ^^^^^^ ^^    ^^^^^       
+>       : ^ ^^                      ^^^^^^       ^^^^^       
 >r7arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U) => (r: T) => U
->       : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^^^^^ ^^ ^^^^^ 
+>       : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^^^^^    ^^^^^ 
 
 var r8arg1 = <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => <U>null;
 >r8arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U
->       : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^              ^^^^^^ ^^ ^^^^^ 
+>       : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^              ^^^^^^    ^^^^^ 
 ><T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => <U>null : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U
->                                                                                              : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^              ^^^^^^ ^^ ^^^^^ 
+>                                                                                              : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^              ^^^^^^    ^^^^^ 
 >x : (arg: T) => U
 >  : ^   ^^ ^^^^^ 
 >arg : T
@@ -801,9 +801,9 @@ var r8arg1 = <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: T)
 
 var r8arg2 = (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => <Derived>null;
 >r8arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
->       : ^ ^^                      ^^ ^^                       ^^^^^^ ^^    ^^^^^       
+>       : ^ ^^                      ^^ ^^                       ^^^^^^       ^^^^^       
 >(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => <Derived>null : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
->                                                                                      : ^ ^^                      ^^ ^^                       ^^^^^^ ^^    ^^^^^       
+>                                                                                      : ^ ^^                      ^^ ^^                       ^^^^^^       ^^^^^       
 >x : (arg: Base) => Derived
 >  : ^   ^^    ^^^^^       
 >arg : Base
@@ -827,33 +827,33 @@ var r8 = foo8(r8arg1); // any
 >foo8 : { (a: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): typeof a; (a: any): any; }
 >     : ^^^ ^^                                                                               ^^^        ^^^ ^^   ^^^   ^^^
 >r8arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U
->       : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^              ^^^^^^ ^^ ^^^^^ 
+>       : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^              ^^^^^^    ^^^^^ 
 
 var r8a = [r8arg1, r8arg2];
 >r8a : ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived)[]
->    : ^^ ^^                      ^^ ^^                       ^^^^^^ ^^    ^^^^^       ^^^
+>    : ^^ ^^                      ^^ ^^                       ^^^^^^       ^^^^^       ^^^
 >[r8arg1, r8arg2] : ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived)[]
->                 : ^^ ^^                      ^^ ^^                       ^^^^^^ ^^    ^^^^^       ^^^
+>                 : ^^ ^^                      ^^ ^^                       ^^^^^^       ^^^^^       ^^^
 >r8arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U
->       : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^              ^^^^^^ ^^ ^^^^^ 
+>       : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^              ^^^^^^    ^^^^^ 
 >r8arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
->       : ^ ^^                      ^^ ^^                       ^^^^^^ ^^    ^^^^^       
+>       : ^ ^^                      ^^ ^^                       ^^^^^^       ^^^^^       
 
 var r8b = [r8arg2, r8arg1];
 >r8b : ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived)[]
->    : ^^ ^^                      ^^ ^^                       ^^^^^^ ^^    ^^^^^       ^^^
+>    : ^^ ^^                      ^^ ^^                       ^^^^^^       ^^^^^       ^^^
 >[r8arg2, r8arg1] : ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived)[]
->                 : ^^ ^^                      ^^ ^^                       ^^^^^^ ^^    ^^^^^       ^^^
+>                 : ^^ ^^                      ^^ ^^                       ^^^^^^       ^^^^^       ^^^
 >r8arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
->       : ^ ^^                      ^^ ^^                       ^^^^^^ ^^    ^^^^^       
+>       : ^ ^^                      ^^ ^^                       ^^^^^^       ^^^^^       
 >r8arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U
->       : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^              ^^^^^^ ^^ ^^^^^ 
+>       : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^              ^^^^^^    ^^^^^ 
 
 var r9arg1 = <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => <U>null;
 >r9arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U
->       : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^                                           ^^^^^^ ^^ ^^^^^ 
+>       : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^                                           ^^^^^^    ^^^^^ 
 ><T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => <U>null : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U
->                                                                                                                          : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^                                           ^^^^^^ ^^ ^^^^^ 
+>                                                                                                                          : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^                                           ^^^^^^    ^^^^^ 
 >x : (arg: T) => U
 >  : ^   ^^ ^^^^^ 
 >arg : T
@@ -875,9 +875,9 @@ var r9arg1 = <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { f
 
 var r9arg2 = (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => <Derived>null;
 >r9arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
->       : ^ ^^                      ^^ ^^                       ^^^^^^ ^^    ^^^^^       
+>       : ^ ^^                      ^^ ^^                       ^^^^^^       ^^^^^       
 >(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => <Derived>null : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
->                                                                                      : ^ ^^                      ^^ ^^                       ^^^^^^ ^^    ^^^^^       
+>                                                                                      : ^ ^^                      ^^ ^^                       ^^^^^^       ^^^^^       
 >x : (arg: Base) => Derived
 >  : ^   ^^    ^^^^^       
 >arg : Base
@@ -901,27 +901,27 @@ var r9 = foo9(r9arg1); // any
 >foo9 : { (a: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): typeof a; (a: any): any; }
 >     : ^^^ ^^                                                                               ^^^        ^^^ ^^   ^^^   ^^^
 >r9arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U
->       : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^                                           ^^^^^^ ^^ ^^^^^ 
+>       : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^                                           ^^^^^^    ^^^^^ 
 
 var r9a = [r9arg1, r9arg2];
 >r9a : ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived)[]
->    : ^^ ^^                      ^^ ^^                       ^^^^^^ ^^    ^^^^^       ^^^
+>    : ^^ ^^                      ^^ ^^                       ^^^^^^       ^^^^^       ^^^
 >[r9arg1, r9arg2] : ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived)[]
->                 : ^^ ^^                      ^^ ^^                       ^^^^^^ ^^    ^^^^^       ^^^
+>                 : ^^ ^^                      ^^ ^^                       ^^^^^^       ^^^^^       ^^^
 >r9arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U
->       : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^                                           ^^^^^^ ^^ ^^^^^ 
+>       : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^                                           ^^^^^^    ^^^^^ 
 >r9arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
->       : ^ ^^                      ^^ ^^                       ^^^^^^ ^^    ^^^^^       
+>       : ^ ^^                      ^^ ^^                       ^^^^^^       ^^^^^       
 
 var r9b = [r9arg2, r9arg1];
 >r9b : ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived)[]
->    : ^^ ^^                      ^^ ^^                       ^^^^^^ ^^    ^^^^^       ^^^
+>    : ^^ ^^                      ^^ ^^                       ^^^^^^       ^^^^^       ^^^
 >[r9arg2, r9arg1] : ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived)[]
->                 : ^^ ^^                      ^^ ^^                       ^^^^^^ ^^    ^^^^^       ^^^
+>                 : ^^ ^^                      ^^ ^^                       ^^^^^^       ^^^^^       ^^^
 >r9arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
->       : ^ ^^                      ^^ ^^                       ^^^^^^ ^^    ^^^^^       
+>       : ^ ^^                      ^^ ^^                       ^^^^^^       ^^^^^       
 >r9arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U
->       : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^                                           ^^^^^^ ^^ ^^^^^ 
+>       : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^                                           ^^^^^^    ^^^^^ 
 
 var r10arg1 = <T extends Derived>(...x: T[]) => x[0];
 >r10arg1 : <T extends Derived>(...x: T[]) => T
diff --git a/tests/baselines/reference/subtypingWithCallSignatures3.types b/tests/baselines/reference/subtypingWithCallSignatures3.types
index 8e5ad84640194..5618553cd89b6 100644
--- a/tests/baselines/reference/subtypingWithCallSignatures3.types
+++ b/tests/baselines/reference/subtypingWithCallSignatures3.types
@@ -308,9 +308,9 @@ module Errors {
 
     var r2arg = <T extends Base, U extends Derived, V extends Derived2>(x: (arg: T) => U) => (r: T) => <V>null;
 >r2arg : <T extends Base, U extends Derived, V extends Derived2>(x: (arg: T) => U) => (r: T) => V
->      : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^^^^^^^^        ^^ ^^             ^^^^^^ ^^ ^^^^^ 
+>      : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^^^^^^^^        ^^ ^^             ^^^^^^    ^^^^^ 
 ><T extends Base, U extends Derived, V extends Derived2>(x: (arg: T) => U) => (r: T) => <V>null : <T extends Base, U extends Derived, V extends Derived2>(x: (arg: T) => U) => (r: T) => V
->                                                                                               : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^^^^^^^^        ^^ ^^             ^^^^^^ ^^ ^^^^^ 
+>                                                                                               : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^^^^^^^^        ^^ ^^             ^^^^^^    ^^^^^ 
 >x : (arg: T) => U
 >  : ^   ^^ ^^^^^ 
 >arg : T
@@ -324,9 +324,9 @@ module Errors {
 
     var r2arg2 = (x: (arg: Base) => Derived) => (r: Base) => <Derived2>null;
 >r2arg2 : (x: (arg: Base) => Derived) => (r: Base) => Derived2
->       : ^ ^^                      ^^^^^^ ^^    ^^^^^        
+>       : ^ ^^                      ^^^^^^       ^^^^^        
 >(x: (arg: Base) => Derived) => (r: Base) => <Derived2>null : (x: (arg: Base) => Derived) => (r: Base) => Derived2
->                                                           : ^ ^^                      ^^^^^^ ^^    ^^^^^        
+>                                                           : ^ ^^                      ^^^^^^       ^^^^^        
 >x : (arg: Base) => Derived
 >  : ^   ^^    ^^^^^       
 >arg : Base
@@ -346,33 +346,33 @@ module Errors {
 >foo7 : { (a2: (x: (arg: Base) => Derived) => (r: Base) => Derived2): typeof a2; (a2: any): any; }
 >     : ^^^  ^^                                                    ^^^         ^^^  ^^   ^^^   ^^^
 >r2arg : <T extends Base, U extends Derived, V extends Derived2>(x: (arg: T) => U) => (r: T) => V
->      : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^^^^^^^^        ^^ ^^             ^^^^^^ ^^ ^^^^^ 
+>      : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^^^^^^^^        ^^ ^^             ^^^^^^    ^^^^^ 
 
     var r2a = [r2arg2, r2arg];
 >r2a : ((x: (arg: Base) => Derived) => (r: Base) => Derived2)[]
->    : ^^ ^^                      ^^^^^^ ^^    ^^^^^        ^^^
+>    : ^^ ^^                      ^^^^^^       ^^^^^        ^^^
 >[r2arg2, r2arg] : ((x: (arg: Base) => Derived) => (r: Base) => Derived2)[]
->                : ^^ ^^                      ^^^^^^ ^^    ^^^^^        ^^^
+>                : ^^ ^^                      ^^^^^^       ^^^^^        ^^^
 >r2arg2 : (x: (arg: Base) => Derived) => (r: Base) => Derived2
->       : ^ ^^                      ^^^^^^ ^^    ^^^^^        
+>       : ^ ^^                      ^^^^^^       ^^^^^        
 >r2arg : <T extends Base, U extends Derived, V extends Derived2>(x: (arg: T) => U) => (r: T) => V
->      : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^^^^^^^^        ^^ ^^             ^^^^^^ ^^ ^^^^^ 
+>      : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^^^^^^^^        ^^ ^^             ^^^^^^    ^^^^^ 
 
     var r2b = [r2arg, r2arg2];
 >r2b : ((x: (arg: Base) => Derived) => (r: Base) => Derived2)[]
->    : ^^ ^^                      ^^^^^^ ^^    ^^^^^        ^^^
+>    : ^^ ^^                      ^^^^^^       ^^^^^        ^^^
 >[r2arg, r2arg2] : ((x: (arg: Base) => Derived) => (r: Base) => Derived2)[]
->                : ^^ ^^                      ^^^^^^ ^^    ^^^^^        ^^^
+>                : ^^ ^^                      ^^^^^^       ^^^^^        ^^^
 >r2arg : <T extends Base, U extends Derived, V extends Derived2>(x: (arg: T) => U) => (r: T) => V
->      : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^^^^^^^^        ^^ ^^             ^^^^^^ ^^ ^^^^^ 
+>      : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^^^^^^^^        ^^ ^^             ^^^^^^    ^^^^^ 
 >r2arg2 : (x: (arg: Base) => Derived) => (r: Base) => Derived2
->       : ^ ^^                      ^^^^^^ ^^    ^^^^^        
+>       : ^ ^^                      ^^^^^^       ^^^^^        
 
     var r3arg = <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => <U>null;
 >r3arg : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U
->      : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^                             ^^^^^^ ^^ ^^^^^ 
+>      : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^                             ^^^^^^    ^^^^^ 
 ><T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => <U>null : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U
->                                                                                                             : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^                             ^^^^^^ ^^ ^^^^^ 
+>                                                                                                             : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^                             ^^^^^^    ^^^^^ 
 >x : (arg: T) => U
 >  : ^   ^^ ^^^^^ 
 >arg : T
@@ -392,9 +392,9 @@ module Errors {
 
     var r3arg2 = (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => <Derived>null;
 >r3arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
->       : ^ ^^                      ^^ ^^                       ^^^^^^ ^^    ^^^^^       
+>       : ^ ^^                      ^^ ^^                       ^^^^^^       ^^^^^       
 >(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => <Derived>null : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
->                                                                                      : ^ ^^                      ^^ ^^                       ^^^^^^ ^^    ^^^^^       
+>                                                                                      : ^ ^^                      ^^ ^^                       ^^^^^^       ^^^^^       
 >x : (arg: Base) => Derived
 >  : ^   ^^    ^^^^^       
 >arg : Base
@@ -416,27 +416,27 @@ module Errors {
 >foo8 : { (a2: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): typeof a2; (a2: any): any; }
 >     : ^^^  ^^                                                                               ^^^         ^^^  ^^   ^^^   ^^^
 >r3arg : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U
->      : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^                             ^^^^^^ ^^ ^^^^^ 
+>      : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^                             ^^^^^^    ^^^^^ 
 
     var r3a = [r3arg2, r3arg];
 >r3a : ((<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U) | ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived))[]
->    : ^^^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^                             ^^^^^^ ^^ ^^^^^ ^^^^^^ ^^                      ^^ ^^                       ^^^^^^ ^^    ^^^^^       ^^^^
+>    : ^^^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^                             ^^^^^^    ^^^^^ ^^^^^^ ^^                      ^^ ^^                       ^^^^^^       ^^^^^       ^^^^
 >[r3arg2, r3arg] : ((<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U) | ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived))[]
->                : ^^^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^                             ^^^^^^ ^^ ^^^^^ ^^^^^^ ^^                      ^^ ^^                       ^^^^^^ ^^    ^^^^^       ^^^^
+>                : ^^^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^                             ^^^^^^    ^^^^^ ^^^^^^ ^^                      ^^ ^^                       ^^^^^^       ^^^^^       ^^^^
 >r3arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
->       : ^ ^^                      ^^ ^^                       ^^^^^^ ^^    ^^^^^       
+>       : ^ ^^                      ^^ ^^                       ^^^^^^       ^^^^^       
 >r3arg : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U
->      : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^                             ^^^^^^ ^^ ^^^^^ 
+>      : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^                             ^^^^^^    ^^^^^ 
 
     var r3b = [r3arg, r3arg2];
 >r3b : ((<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U) | ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived))[]
->    : ^^^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^                             ^^^^^^ ^^ ^^^^^ ^^^^^^ ^^                      ^^ ^^                       ^^^^^^ ^^    ^^^^^       ^^^^
+>    : ^^^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^                             ^^^^^^    ^^^^^ ^^^^^^ ^^                      ^^ ^^                       ^^^^^^       ^^^^^       ^^^^
 >[r3arg, r3arg2] : ((<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U) | ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived))[]
->                : ^^^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^                             ^^^^^^ ^^ ^^^^^ ^^^^^^ ^^                      ^^ ^^                       ^^^^^^ ^^    ^^^^^       ^^^^
+>                : ^^^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^                             ^^^^^^    ^^^^^ ^^^^^^ ^^                      ^^ ^^                       ^^^^^^       ^^^^^       ^^^^
 >r3arg : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U
->      : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^                             ^^^^^^ ^^ ^^^^^ 
+>      : ^ ^^^^^^^^^    ^^ ^^^^^^^^^       ^^ ^^             ^^ ^^                             ^^^^^^    ^^^^^ 
 >r3arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
->       : ^ ^^                      ^^ ^^                       ^^^^^^ ^^    ^^^^^       
+>       : ^ ^^                      ^^ ^^                       ^^^^^^       ^^^^^       
 
     var r4arg = <T extends Derived>(...x: T[]) => <T>null;
 >r4arg : <T extends Derived>(...x: T[]) => T
diff --git a/tests/baselines/reference/symlinkedWorkspaceDependenciesNoDirectLinkGeneratesDeepNonrelativeName.js b/tests/baselines/reference/symlinkedWorkspaceDependenciesNoDirectLinkGeneratesDeepNonrelativeName.js
index 3b1693123f427..551c470855230 100644
--- a/tests/baselines/reference/symlinkedWorkspaceDependenciesNoDirectLinkGeneratesDeepNonrelativeName.js
+++ b/tests/baselines/reference/symlinkedWorkspaceDependenciesNoDirectLinkGeneratesDeepNonrelativeName.js
@@ -57,13 +57,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.a = void 0;
 const pkg = __importStar(require("package-b"));
diff --git a/tests/baselines/reference/taggedTemplateStringsWithCurriedFunction.types b/tests/baselines/reference/taggedTemplateStringsWithCurriedFunction.types
index b704346279bd8..91bf8b50792b8 100644
--- a/tests/baselines/reference/taggedTemplateStringsWithCurriedFunction.types
+++ b/tests/baselines/reference/taggedTemplateStringsWithCurriedFunction.types
@@ -5,9 +5,9 @@
 
 const f = _ => (..._) => "";
 >f : (_: any) => (..._: any[]) => string
->  : ^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
+>  : ^ ^^^^^^^^^^^      ^^^^^^^^^^^^^^^^
 >_ => (..._) => "" : (_: any) => (..._: any[]) => string
->                  : ^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
+>                  : ^ ^^^^^^^^^^^      ^^^^^^^^^^^^^^^^
 >_ : any
 >(..._) => "" : (..._: any[]) => string
 >             : ^^^^ ^^^^^^^^^^^^^^^^^^
@@ -22,7 +22,7 @@ f({ ...{ x: 0 } })``;
 >f({ ...{ x: 0 } }) : (..._: any[]) => string
 >                   : ^^^^ ^^^^^^^^^^^^^^^^^^
 >f : (_: any) => (..._: any[]) => string
->  : ^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
+>  : ^ ^^^^^^^^^^^      ^^^^^^^^^^^^^^^^
 >{ ...{ x: 0 } } : { x: number; }
 >                : ^^^^^^^^^^^^^^
 >{ x: 0 } : { x: number; }
@@ -40,7 +40,7 @@ f({ ...{ x: 0 } })`x`;
 >f({ ...{ x: 0 } }) : (..._: any[]) => string
 >                   : ^^^^ ^^^^^^^^^^^^^^^^^^
 >f : (_: any) => (..._: any[]) => string
->  : ^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
+>  : ^ ^^^^^^^^^^^      ^^^^^^^^^^^^^^^^
 >{ ...{ x: 0 } } : { x: number; }
 >                : ^^^^^^^^^^^^^^
 >{ x: 0 } : { x: number; }
@@ -58,7 +58,7 @@ f({ ...{ x: 0 } })`x${f}x`;
 >f({ ...{ x: 0 } }) : (..._: any[]) => string
 >                   : ^^^^ ^^^^^^^^^^^^^^^^^^
 >f : (_: any) => (..._: any[]) => string
->  : ^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
+>  : ^ ^^^^^^^^^^^      ^^^^^^^^^^^^^^^^
 >{ ...{ x: 0 } } : { x: number; }
 >                : ^^^^^^^^^^^^^^
 >{ x: 0 } : { x: number; }
@@ -70,7 +70,7 @@ f({ ...{ x: 0 } })`x${f}x`;
 >`x${f}x` : string
 >         : ^^^^^^
 >f : (_: any) => (..._: any[]) => string
->  : ^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
+>  : ^ ^^^^^^^^^^^      ^^^^^^^^^^^^^^^^
 
 f({ ...{ x: 0 }, y: (() => 1)() })``;
 >f({ ...{ x: 0 }, y: (() => 1)() })`` : string
@@ -78,7 +78,7 @@ f({ ...{ x: 0 }, y: (() => 1)() })``;
 >f({ ...{ x: 0 }, y: (() => 1)() }) : (..._: any[]) => string
 >                                   : ^^^^ ^^^^^^^^^^^^^^^^^^
 >f : (_: any) => (..._: any[]) => string
->  : ^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
+>  : ^ ^^^^^^^^^^^      ^^^^^^^^^^^^^^^^
 >{ ...{ x: 0 }, y: (() => 1)() } : { y: number; x: number; }
 >                                : ^^^^^^^^^^^^^^^^^^^^^^^^^
 >{ x: 0 } : { x: number; }
@@ -106,7 +106,7 @@ f({ x: (() => 1)(), ...{ y: 1 } })``;
 >f({ x: (() => 1)(), ...{ y: 1 } }) : (..._: any[]) => string
 >                                   : ^^^^ ^^^^^^^^^^^^^^^^^^
 >f : (_: any) => (..._: any[]) => string
->  : ^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
+>  : ^ ^^^^^^^^^^^      ^^^^^^^^^^^^^^^^
 >{ x: (() => 1)(), ...{ y: 1 } } : { y: number; x: number; }
 >                                : ^^^^^^^^^^^^^^^^^^^^^^^^^
 >x : number
diff --git a/tests/baselines/reference/templateLiteralTypes1.types b/tests/baselines/reference/templateLiteralTypes1.types
index 499986b2d51d4..d29f030fcae67 100644
--- a/tests/baselines/reference/templateLiteralTypes1.types
+++ b/tests/baselines/reference/templateLiteralTypes1.types
@@ -9,9 +9,9 @@ Instantiation count: 2,500
 
 const createScopedActionType = <S extends string>(scope: S) => <T extends string>(type: T) => `${scope}/${type}` as `${S}/${T}`;
 >createScopedActionType : <S extends string>(scope: S) => <T extends string>(type: T) => `${S}/${T}`
->                       : ^ ^^^^^^^^^      ^^     ^^ ^^^^^^ ^^^^^^^^^      ^^    ^^ ^^^^^           
+>                       : ^ ^^^^^^^^^      ^^     ^^ ^^^^^^                ^^       ^^^^^           
 ><S extends string>(scope: S) => <T extends string>(type: T) => `${scope}/${type}` as `${S}/${T}` : <S extends string>(scope: S) => <T extends string>(type: T) => `${S}/${T}`
->                                                                                                 : ^ ^^^^^^^^^      ^^     ^^ ^^^^^^ ^^^^^^^^^      ^^    ^^ ^^^^^           
+>                                                                                                 : ^ ^^^^^^^^^      ^^     ^^ ^^^^^^                ^^       ^^^^^           
 >scope : S
 >      : ^
 ><T extends string>(type: T) => `${scope}/${type}` as `${S}/${T}` : <T extends string>(type: T) => `${S}/${T}`
@@ -33,7 +33,7 @@ const createActionInMyScope = createScopedActionType("MyScope");  // <T extends
 >createScopedActionType("MyScope") : <T extends string>(type: T) => `MyScope/${T}`
 >                                  : ^ ^^^^^^^^^      ^^    ^^^^^^^^^^^^^^^^^^^^^^
 >createScopedActionType : <S extends string>(scope: S) => <T extends string>(type: T) => `${S}/${T}`
->                       : ^ ^^^^^^^^^      ^^     ^^ ^^^^^^ ^^^^^^^^^      ^^    ^^ ^^^^^           
+>                       : ^ ^^^^^^^^^      ^^     ^^ ^^^^^^                ^^       ^^^^^           
 >"MyScope" : "MyScope"
 >          : ^^^^^^^^^
 
diff --git a/tests/baselines/reference/thisExpressionInIndexExpression.types b/tests/baselines/reference/thisExpressionInIndexExpression.types
index 2dcb728725de2..73bdb4d004b82 100644
--- a/tests/baselines/reference/thisExpressionInIndexExpression.types
+++ b/tests/baselines/reference/thisExpressionInIndexExpression.types
@@ -3,7 +3,7 @@
 === thisExpressionInIndexExpression.ts ===
 function f() {
 >f : () => (r: any) => any
->  : ^^^^^^^ ^^^^^^^^^^^^^
+>  : ^^^^^^^   ^^^^^^^^^^^
 
     return r => r[this];
 >r => r[this] : (r: any) => any
diff --git a/tests/baselines/reference/thisTypeInClasses.types b/tests/baselines/reference/thisTypeInClasses.types
index 699341a5cf997..fb3f724427533 100644
--- a/tests/baselines/reference/thisTypeInClasses.types
+++ b/tests/baselines/reference/thisTypeInClasses.types
@@ -132,9 +132,9 @@ class C5 {
 
         let f3 = (x: this) => (y: this) => this;
 >f3 : (x: this) => (y: this) => this
->   : ^ ^^    ^^^^^^ ^^    ^^^^^^^^^
+>   : ^ ^^    ^^^^^^       ^^^^^^^^^
 >(x: this) => (y: this) => this : (x: this) => (y: this) => this
->                               : ^ ^^    ^^^^^^ ^^    ^^^^^^^^^
+>                               : ^ ^^    ^^^^^^       ^^^^^^^^^
 >x : this
 >  : ^^^^
 >(y: this) => this : (y: this) => this
diff --git a/tests/baselines/reference/trackedSymbolsNoCrash.types b/tests/baselines/reference/trackedSymbolsNoCrash.types
index 02ee07d283a42..0b3a861418b5e 100644
--- a/tests/baselines/reference/trackedSymbolsNoCrash.types
+++ b/tests/baselines/reference/trackedSymbolsNoCrash.types
@@ -1019,11 +1019,11 @@ import * as ast from "./ast";
 
 export const isNodeOfType =
 >isNodeOfType : <NodeType extends ast.SyntaxKind>(nodeType: NodeType) => (node: ast.Node | null | undefined) => node is Extract<ast.Node, { kind: NodeType; }>
->             : ^        ^^^^^^^^^              ^^        ^^        ^^^^^^    ^^                           ^^^^^                                              
+>             : ^        ^^^^^^^^^              ^^        ^^        ^^^^^^                                 ^^^^^                                              
 
   <NodeType extends ast.SyntaxKind>(nodeType: NodeType) =>
 ><NodeType extends ast.SyntaxKind>(nodeType: NodeType) =>  (    node: ast.Node | null | undefined,  ): node is Extract<ast.Node, { kind: NodeType }> =>    node?.kind === nodeType : <NodeType extends ast.SyntaxKind>(nodeType: NodeType) => (node: ast.Node | null | undefined) => node is Extract<ast.Node, { kind: NodeType; }>
->                                                                                                                                                                                  : ^        ^^^^^^^^^              ^^        ^^        ^^^^^^    ^^                           ^^^^^                                              
+>                                                                                                                                                                                  : ^        ^^^^^^^^^              ^^        ^^        ^^^^^^                                 ^^^^^                                              
 >ast : any
 >    : ^^^
 >nodeType : NodeType
diff --git a/tests/baselines/reference/transpile/declarationRestParameters.d.ts b/tests/baselines/reference/transpile/declarationRestParameters.d.ts
index 46f2c56b7966b..eb411b39bc305 100644
--- a/tests/baselines/reference/transpile/declarationRestParameters.d.ts
+++ b/tests/baselines/reference/transpile/declarationRestParameters.d.ts
@@ -16,62 +16,35 @@ export const v2 = (...a: [n: "n", a: "a"]): {
     return null!
 }
 //// [v1.d.ts] ////
-export declare const v1: (n: "n", a: "a") => {
+export declare const v1: (...a: [n: "n", a: "a"]) => {
     /** r rest param */
-    a: [n: "n", a: "a"];
+    a: typeof a;
 };
-
-
-//// [Diagnostics reported]
-v1.ts(3,15): error TS9039: Type containing private name 'a' can't be used with --isolatedDeclarations.
-
-
-==== v1.ts (1 errors) ====
-    export const v1 = (...a: [n: "n", a: "a"]): {
-        /** r rest param */
-        a: typeof a,
-                  ~
-!!! error TS9039: Type containing private name 'a' can't be used with --isolatedDeclarations.
-!!! related TS9027 v1.ts:1:14: Add a type annotation to the variable v1.
-    } => {
-        return null!
-    }
-    
 //// [v2.d.ts] ////
-export declare const v2: (n: "n", a: "a") => {
+declare const n: unique symbol;
+export declare const v2: (...a: [n: "n", a: "a"]) => {
     /** r rest param */
-    a: [n: "n", a: "a"];
+    a: typeof a;
     /** module var */
-    n: unique symbol;
+    n: typeof n;
 };
+export {};
 
 
 //// [Diagnostics reported]
-v2.ts(2,14): error TS2527: The inferred type of 'v2' references an inaccessible 'unique symbol' type. A type annotation is necessary.
-v2.ts(4,15): error TS9039: Type containing private name 'a' can't be used with --isolatedDeclarations.
-v2.ts(6,5): error TS9013: Expression type can't be inferred with --isolatedDeclarations.
-v2.ts(6,15): error TS9039: Type containing private name 'n' can't be used with --isolatedDeclarations.
+v2.ts(1,7): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations.
 
 
-==== v2.ts (4 errors) ====
+==== v2.ts (1 errors) ====
     const n = Symbol();
+          ~
+!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations.
+!!! related TS9027 v2.ts:1:7: Add a type annotation to the variable n.
     export const v2 = (...a: [n: "n", a: "a"]): {
-                 ~~
-!!! error TS2527: The inferred type of 'v2' references an inaccessible 'unique symbol' type. A type annotation is necessary.
         /** r rest param */
         a: typeof a,
-                  ~
-!!! error TS9039: Type containing private name 'a' can't be used with --isolatedDeclarations.
-!!! related TS9027 v2.ts:2:14: Add a type annotation to the variable v2.
         /** module var */
         n: typeof n,
-        ~
-!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations.
-!!! related TS9027 v2.ts:2:14: Add a type annotation to the variable v2.
-!!! related TS9035 v2.ts:6:5: Add satisfies and a type assertion to this expression (satisfies T as T) to make the type explicit.
-                  ~
-!!! error TS9039: Type containing private name 'n' can't be used with --isolatedDeclarations.
-!!! related TS9027 v2.ts:2:14: Add a type annotation to the variable v2.
     } => {
         return null!
     }
diff --git a/tests/baselines/reference/tsbuild/sample1/when-esModuleInterop-option-changes.js b/tests/baselines/reference/tsbuild/sample1/when-esModuleInterop-option-changes.js
index c33ebfb05f0a2..e1ec679286e6f 100644
--- a/tests/baselines/reference/tsbuild/sample1/when-esModuleInterop-option-changes.js
+++ b/tests/baselines/reference/tsbuild/sample1/when-esModuleInterop-option-changes.js
@@ -513,13 +513,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.m = void 0;
 var c = __importStar(require("../core/index"));
diff --git a/tests/baselines/reference/tsc/commandLine/does-not-add-color-when-NO_COLOR-is-set.js b/tests/baselines/reference/tsc/commandLine/does-not-add-color-when-NO_COLOR-is-set.js
index 282b543e11298..18074462bfebd 100644
--- a/tests/baselines/reference/tsc/commandLine/does-not-add-color-when-NO_COLOR-is-set.js
+++ b/tests/baselines/reference/tsc/commandLine/does-not-add-color-when-NO_COLOR-is-set.js
@@ -115,7 +115,7 @@ default: undefined
 
 --lib
 Specify a set of bundled library declaration files that describe the target runtime environment.
-one or more: es5, es6/es2015, es7/es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, es2024, esnext, dom, dom.iterable, dom.asynciterable, webworker, webworker.importscripts, webworker.iterable, webworker.asynciterable, scripthost, es2015.core, es2015.collection, es2015.generator, es2015.iterable, es2015.promise, es2015.proxy, es2015.reflect, es2015.symbol, es2015.symbol.wellknown, es2016.array.include, es2016.intl, es2017.arraybuffer, es2017.date, es2017.object, es2017.sharedmemory, es2017.string, es2017.intl, es2017.typedarrays, es2018.asyncgenerator, es2018.asynciterable/esnext.asynciterable, es2018.intl, es2018.promise, es2018.regexp, es2019.array, es2019.object, es2019.string, es2019.symbol/esnext.symbol, es2019.intl, es2020.bigint/esnext.bigint, es2020.date, es2020.promise, es2020.sharedmemory, es2020.string, es2020.symbol.wellknown, es2020.intl, es2020.number, es2021.promise, es2021.string, es2021.weakref/esnext.weakref, es2021.intl, es2022.array, es2022.error, es2022.intl, es2022.object, es2022.string, es2022.regexp, es2023.array, es2023.collection, es2023.intl, es2024.arraybuffer, es2024.collection, es2024.object/esnext.object, es2024.promise/esnext.promise, es2024.regexp/esnext.regexp, es2024.sharedmemory, es2024.string/esnext.string, esnext.array, esnext.collection, esnext.intl, esnext.disposable, esnext.decorators, esnext.iterator, decorators, decorators.legacy
+one or more: es5, es6/es2015, es7/es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, es2024, esnext, dom, dom.iterable, dom.asynciterable, webworker, webworker.importscripts, webworker.iterable, webworker.asynciterable, scripthost, es2015.core, es2015.collection, es2015.generator, es2015.iterable, es2015.promise, es2015.proxy, es2015.reflect, es2015.symbol, es2015.symbol.wellknown, es2016.array.include, es2016.intl, es2017.arraybuffer, es2017.date, es2017.object, es2017.sharedmemory, es2017.string, es2017.intl, es2017.typedarrays, es2018.asyncgenerator, es2018.asynciterable/esnext.asynciterable, es2018.intl, es2018.promise, es2018.regexp, es2019.array, es2019.object, es2019.string, es2019.symbol/esnext.symbol, es2019.intl, es2020.bigint/esnext.bigint, es2020.date, es2020.promise, es2020.sharedmemory, es2020.string, es2020.symbol.wellknown, es2020.intl, es2020.number, es2021.promise, es2021.string, es2021.weakref/esnext.weakref, es2021.intl, es2022.array, es2022.error, es2022.intl, es2022.object, es2022.string, es2022.regexp, es2023.array, es2023.collection, es2023.intl, es2024.arraybuffer, es2024.collection, es2024.object/esnext.object, es2024.promise, es2024.regexp/esnext.regexp, es2024.sharedmemory, es2024.string/esnext.string, esnext.array, esnext.collection, esnext.intl, esnext.disposable, esnext.promise, esnext.decorators, esnext.iterator, decorators, decorators.legacy
 default: undefined
 
 --allowJs
diff --git a/tests/baselines/reference/tsc/commandLine/help-all.js b/tests/baselines/reference/tsc/commandLine/help-all.js
index 65d725168ba34..7f2aced1096ea 100644
--- a/tests/baselines/reference/tsc/commandLine/help-all.js
+++ b/tests/baselines/reference/tsc/commandLine/help-all.js
@@ -570,7 +570,7 @@ default: react
 
 --lib
 Specify a set of bundled library declaration files that describe the target runtime environment.
-one or more: es5, es6/es2015, es7/es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, es2024, esnext, dom, dom.iterable, dom.asynciterable, webworker, webworker.importscripts, webworker.iterable, webworker.asynciterable, scripthost, es2015.core, es2015.collection, es2015.generator, es2015.iterable, es2015.promise, es2015.proxy, es2015.reflect, es2015.symbol, es2015.symbol.wellknown, es2016.array.include, es2016.intl, es2017.arraybuffer, es2017.date, es2017.object, es2017.sharedmemory, es2017.string, es2017.intl, es2017.typedarrays, es2018.asyncgenerator, es2018.asynciterable/esnext.asynciterable, es2018.intl, es2018.promise, es2018.regexp, es2019.array, es2019.object, es2019.string, es2019.symbol/esnext.symbol, es2019.intl, es2020.bigint/esnext.bigint, es2020.date, es2020.promise, es2020.sharedmemory, es2020.string, es2020.symbol.wellknown, es2020.intl, es2020.number, es2021.promise, es2021.string, es2021.weakref/esnext.weakref, es2021.intl, es2022.array, es2022.error, es2022.intl, es2022.object, es2022.string, es2022.regexp, es2023.array, es2023.collection, es2023.intl, es2024.arraybuffer, es2024.collection, es2024.object/esnext.object, es2024.promise/esnext.promise, es2024.regexp/esnext.regexp, es2024.sharedmemory, es2024.string/esnext.string, esnext.array, esnext.collection, esnext.intl, esnext.disposable, esnext.decorators, esnext.iterator, decorators, decorators.legacy
+one or more: es5, es6/es2015, es7/es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, es2024, esnext, dom, dom.iterable, dom.asynciterable, webworker, webworker.importscripts, webworker.iterable, webworker.asynciterable, scripthost, es2015.core, es2015.collection, es2015.generator, es2015.iterable, es2015.promise, es2015.proxy, es2015.reflect, es2015.symbol, es2015.symbol.wellknown, es2016.array.include, es2016.intl, es2017.arraybuffer, es2017.date, es2017.object, es2017.sharedmemory, es2017.string, es2017.intl, es2017.typedarrays, es2018.asyncgenerator, es2018.asynciterable/esnext.asynciterable, es2018.intl, es2018.promise, es2018.regexp, es2019.array, es2019.object, es2019.string, es2019.symbol/esnext.symbol, es2019.intl, es2020.bigint/esnext.bigint, es2020.date, es2020.promise, es2020.sharedmemory, es2020.string, es2020.symbol.wellknown, es2020.intl, es2020.number, es2021.promise, es2021.string, es2021.weakref/esnext.weakref, es2021.intl, es2022.array, es2022.error, es2022.intl, es2022.object, es2022.string, es2022.regexp, es2023.array, es2023.collection, es2023.intl, es2024.arraybuffer, es2024.collection, es2024.object/esnext.object, es2024.promise, es2024.regexp/esnext.regexp, es2024.sharedmemory, es2024.string/esnext.string, esnext.array, esnext.collection, esnext.intl, esnext.disposable, esnext.promise, esnext.decorators, esnext.iterator, decorators, decorators.legacy
 default: undefined
 
 --moduleDetection
diff --git a/tests/baselines/reference/tsc/commandLine/help.js b/tests/baselines/reference/tsc/commandLine/help.js
index 731a70f107785..7832007b209a2 100644
--- a/tests/baselines/reference/tsc/commandLine/help.js
+++ b/tests/baselines/reference/tsc/commandLine/help.js
@@ -114,7 +114,7 @@ default: undefined
 
 --lib
 Specify a set of bundled library declaration files that describe the target runtime environment.
-one or more: es5, es6/es2015, es7/es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, es2024, esnext, dom, dom.iterable, dom.asynciterable, webworker, webworker.importscripts, webworker.iterable, webworker.asynciterable, scripthost, es2015.core, es2015.collection, es2015.generator, es2015.iterable, es2015.promise, es2015.proxy, es2015.reflect, es2015.symbol, es2015.symbol.wellknown, es2016.array.include, es2016.intl, es2017.arraybuffer, es2017.date, es2017.object, es2017.sharedmemory, es2017.string, es2017.intl, es2017.typedarrays, es2018.asyncgenerator, es2018.asynciterable/esnext.asynciterable, es2018.intl, es2018.promise, es2018.regexp, es2019.array, es2019.object, es2019.string, es2019.symbol/esnext.symbol, es2019.intl, es2020.bigint/esnext.bigint, es2020.date, es2020.promise, es2020.sharedmemory, es2020.string, es2020.symbol.wellknown, es2020.intl, es2020.number, es2021.promise, es2021.string, es2021.weakref/esnext.weakref, es2021.intl, es2022.array, es2022.error, es2022.intl, es2022.object, es2022.string, es2022.regexp, es2023.array, es2023.collection, es2023.intl, es2024.arraybuffer, es2024.collection, es2024.object/esnext.object, es2024.promise/esnext.promise, es2024.regexp/esnext.regexp, es2024.sharedmemory, es2024.string/esnext.string, esnext.array, esnext.collection, esnext.intl, esnext.disposable, esnext.decorators, esnext.iterator, decorators, decorators.legacy
+one or more: es5, es6/es2015, es7/es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, es2024, esnext, dom, dom.iterable, dom.asynciterable, webworker, webworker.importscripts, webworker.iterable, webworker.asynciterable, scripthost, es2015.core, es2015.collection, es2015.generator, es2015.iterable, es2015.promise, es2015.proxy, es2015.reflect, es2015.symbol, es2015.symbol.wellknown, es2016.array.include, es2016.intl, es2017.arraybuffer, es2017.date, es2017.object, es2017.sharedmemory, es2017.string, es2017.intl, es2017.typedarrays, es2018.asyncgenerator, es2018.asynciterable/esnext.asynciterable, es2018.intl, es2018.promise, es2018.regexp, es2019.array, es2019.object, es2019.string, es2019.symbol/esnext.symbol, es2019.intl, es2020.bigint/esnext.bigint, es2020.date, es2020.promise, es2020.sharedmemory, es2020.string, es2020.symbol.wellknown, es2020.intl, es2020.number, es2021.promise, es2021.string, es2021.weakref/esnext.weakref, es2021.intl, es2022.array, es2022.error, es2022.intl, es2022.object, es2022.string, es2022.regexp, es2023.array, es2023.collection, es2023.intl, es2024.arraybuffer, es2024.collection, es2024.object/esnext.object, es2024.promise, es2024.regexp/esnext.regexp, es2024.sharedmemory, es2024.string/esnext.string, esnext.array, esnext.collection, esnext.intl, esnext.disposable, esnext.promise, esnext.decorators, esnext.iterator, decorators, decorators.legacy
 default: undefined
 
 --allowJs
diff --git a/tests/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-can't-provide-terminal-width.js b/tests/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-can't-provide-terminal-width.js
index 77d316babafb1..3c47dc1ebc6d3 100644
--- a/tests/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-can't-provide-terminal-width.js
+++ b/tests/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-can't-provide-terminal-width.js
@@ -115,7 +115,7 @@ default: undefined
 
 --lib
 Specify a set of bundled library declaration files that describe the target runtime environment.
-one or more: es5, es6/es2015, es7/es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, es2024, esnext, dom, dom.iterable, dom.asynciterable, webworker, webworker.importscripts, webworker.iterable, webworker.asynciterable, scripthost, es2015.core, es2015.collection, es2015.generator, es2015.iterable, es2015.promise, es2015.proxy, es2015.reflect, es2015.symbol, es2015.symbol.wellknown, es2016.array.include, es2016.intl, es2017.arraybuffer, es2017.date, es2017.object, es2017.sharedmemory, es2017.string, es2017.intl, es2017.typedarrays, es2018.asyncgenerator, es2018.asynciterable/esnext.asynciterable, es2018.intl, es2018.promise, es2018.regexp, es2019.array, es2019.object, es2019.string, es2019.symbol/esnext.symbol, es2019.intl, es2020.bigint/esnext.bigint, es2020.date, es2020.promise, es2020.sharedmemory, es2020.string, es2020.symbol.wellknown, es2020.intl, es2020.number, es2021.promise, es2021.string, es2021.weakref/esnext.weakref, es2021.intl, es2022.array, es2022.error, es2022.intl, es2022.object, es2022.string, es2022.regexp, es2023.array, es2023.collection, es2023.intl, es2024.arraybuffer, es2024.collection, es2024.object/esnext.object, es2024.promise/esnext.promise, es2024.regexp/esnext.regexp, es2024.sharedmemory, es2024.string/esnext.string, esnext.array, esnext.collection, esnext.intl, esnext.disposable, esnext.decorators, esnext.iterator, decorators, decorators.legacy
+one or more: es5, es6/es2015, es7/es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, es2024, esnext, dom, dom.iterable, dom.asynciterable, webworker, webworker.importscripts, webworker.iterable, webworker.asynciterable, scripthost, es2015.core, es2015.collection, es2015.generator, es2015.iterable, es2015.promise, es2015.proxy, es2015.reflect, es2015.symbol, es2015.symbol.wellknown, es2016.array.include, es2016.intl, es2017.arraybuffer, es2017.date, es2017.object, es2017.sharedmemory, es2017.string, es2017.intl, es2017.typedarrays, es2018.asyncgenerator, es2018.asynciterable/esnext.asynciterable, es2018.intl, es2018.promise, es2018.regexp, es2019.array, es2019.object, es2019.string, es2019.symbol/esnext.symbol, es2019.intl, es2020.bigint/esnext.bigint, es2020.date, es2020.promise, es2020.sharedmemory, es2020.string, es2020.symbol.wellknown, es2020.intl, es2020.number, es2021.promise, es2021.string, es2021.weakref/esnext.weakref, es2021.intl, es2022.array, es2022.error, es2022.intl, es2022.object, es2022.string, es2022.regexp, es2023.array, es2023.collection, es2023.intl, es2024.arraybuffer, es2024.collection, es2024.object/esnext.object, es2024.promise, es2024.regexp/esnext.regexp, es2024.sharedmemory, es2024.string/esnext.string, esnext.array, esnext.collection, esnext.intl, esnext.disposable, esnext.promise, esnext.decorators, esnext.iterator, decorators, decorators.legacy
 default: undefined
 
 --allowJs
diff --git a/tests/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js b/tests/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js
index 77d316babafb1..3c47dc1ebc6d3 100644
--- a/tests/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js
+++ b/tests/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js
@@ -115,7 +115,7 @@ default: undefined
 
 --lib
 Specify a set of bundled library declaration files that describe the target runtime environment.
-one or more: es5, es6/es2015, es7/es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, es2024, esnext, dom, dom.iterable, dom.asynciterable, webworker, webworker.importscripts, webworker.iterable, webworker.asynciterable, scripthost, es2015.core, es2015.collection, es2015.generator, es2015.iterable, es2015.promise, es2015.proxy, es2015.reflect, es2015.symbol, es2015.symbol.wellknown, es2016.array.include, es2016.intl, es2017.arraybuffer, es2017.date, es2017.object, es2017.sharedmemory, es2017.string, es2017.intl, es2017.typedarrays, es2018.asyncgenerator, es2018.asynciterable/esnext.asynciterable, es2018.intl, es2018.promise, es2018.regexp, es2019.array, es2019.object, es2019.string, es2019.symbol/esnext.symbol, es2019.intl, es2020.bigint/esnext.bigint, es2020.date, es2020.promise, es2020.sharedmemory, es2020.string, es2020.symbol.wellknown, es2020.intl, es2020.number, es2021.promise, es2021.string, es2021.weakref/esnext.weakref, es2021.intl, es2022.array, es2022.error, es2022.intl, es2022.object, es2022.string, es2022.regexp, es2023.array, es2023.collection, es2023.intl, es2024.arraybuffer, es2024.collection, es2024.object/esnext.object, es2024.promise/esnext.promise, es2024.regexp/esnext.regexp, es2024.sharedmemory, es2024.string/esnext.string, esnext.array, esnext.collection, esnext.intl, esnext.disposable, esnext.decorators, esnext.iterator, decorators, decorators.legacy
+one or more: es5, es6/es2015, es7/es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, es2024, esnext, dom, dom.iterable, dom.asynciterable, webworker, webworker.importscripts, webworker.iterable, webworker.asynciterable, scripthost, es2015.core, es2015.collection, es2015.generator, es2015.iterable, es2015.promise, es2015.proxy, es2015.reflect, es2015.symbol, es2015.symbol.wellknown, es2016.array.include, es2016.intl, es2017.arraybuffer, es2017.date, es2017.object, es2017.sharedmemory, es2017.string, es2017.intl, es2017.typedarrays, es2018.asyncgenerator, es2018.asynciterable/esnext.asynciterable, es2018.intl, es2018.promise, es2018.regexp, es2019.array, es2019.object, es2019.string, es2019.symbol/esnext.symbol, es2019.intl, es2020.bigint/esnext.bigint, es2020.date, es2020.promise, es2020.sharedmemory, es2020.string, es2020.symbol.wellknown, es2020.intl, es2020.number, es2021.promise, es2021.string, es2021.weakref/esnext.weakref, es2021.intl, es2022.array, es2022.error, es2022.intl, es2022.object, es2022.string, es2022.regexp, es2023.array, es2023.collection, es2023.intl, es2024.arraybuffer, es2024.collection, es2024.object/esnext.object, es2024.promise, es2024.regexp/esnext.regexp, es2024.sharedmemory, es2024.string/esnext.string, esnext.array, esnext.collection, esnext.intl, esnext.disposable, esnext.promise, esnext.decorators, esnext.iterator, decorators, decorators.legacy
 default: undefined
 
 --allowJs
diff --git a/tests/baselines/reference/tscWatch/projectsWithReferences/on-sample-project-with-nodenext.js b/tests/baselines/reference/tscWatch/projectsWithReferences/on-sample-project-with-nodenext.js
index 80357339f2fc5..515748a97f6ad 100644
--- a/tests/baselines/reference/tscWatch/projectsWithReferences/on-sample-project-with-nodenext.js
+++ b/tests/baselines/reference/tscWatch/projectsWithReferences/on-sample-project-with-nodenext.js
@@ -216,7 +216,7 @@ export declare function multiply(a: number, b: number): number;
 }
 
 //// [/user/username/projects/sample1/logic/index.js.map]
-{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,0CAEC;AAHD,+CAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AACD,yDAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"}
+{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,0CAEC;AAHD,+CAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AACD,yDAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"}
 
 //// [/user/username/projects/sample1/logic/index.js]
 "use strict";
@@ -236,13 +236,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.m = void 0;
 exports.getSecondsInDay = getSecondsInDay;
@@ -361,13 +371,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.m = void 0;
 var c = __importStar(require("../core/index"));
@@ -675,7 +695,7 @@ export const m = mod;
 function foo() { }
 
 //// [/user/username/projects/sample1/logic/index.js.map]
-{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,0CAEC;AAHD,+CAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AACD,yDAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC;AACrB,SAAS,GAAG,KAAK,CAAC"}
+{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,0CAEC;AAHD,+CAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AACD,yDAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC;AACrB,SAAS,GAAG,KAAK,CAAC"}
 
 //// [/user/username/projects/sample1/logic/index.js]
 "use strict";
@@ -695,13 +715,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.m = void 0;
 exports.getSecondsInDay = getSecondsInDay;
@@ -814,7 +844,7 @@ export const m = mod;
 function foo() { }export function gfoo() { }
 
 //// [/user/username/projects/sample1/logic/index.js.map]
-{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,0CAEC;AAGiB,oBAA0B;AAN5C,+CAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AACD,yDAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC;AACrB,SAAS,GAAG,KAAK,CAAC;AAAA,SAAgB,IAAI,KAAK,CAAC"}
+{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,0CAEC;AAGiB,oBAA0B;AAN5C,+CAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AACD,yDAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC;AACrB,SAAS,GAAG,KAAK,CAAC;AAAA,SAAgB,IAAI,KAAK,CAAC"}
 
 //// [/user/username/projects/sample1/logic/index.js]
 "use strict";
@@ -834,13 +864,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.m = void 0;
 exports.getSecondsInDay = getSecondsInDay;
@@ -1204,13 +1244,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.m = void 0;
 exports.getSecondsInDay = getSecondsInDay;
diff --git a/tests/baselines/reference/tscWatch/symlinks/monorepo-style-sibling-packages-symlinked-Linux.js b/tests/baselines/reference/tscWatch/symlinks/monorepo-style-sibling-packages-symlinked-Linux.js
index ffb72b2778cdf..653144204cb89 100644
--- a/tests/baselines/reference/tscWatch/symlinks/monorepo-style-sibling-packages-symlinked-Linux.js
+++ b/tests/baselines/reference/tscWatch/symlinks/monorepo-style-sibling-packages-symlinked-Linux.js
@@ -215,12 +215,12 @@ Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/p
 
 //// [/home/src/tslibs/TS/Lib/lib.es2016.full.d.ts] *Lib* Inode:: 30
 
-//// [/home/src/projects/project/packages/package2/dist/index.js] Inode:: 117
+//// [/home/src/projects/project/packages/package2/dist/index.js] Inode:: 118
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 
 
-//// [/home/src/projects/project/packages/package2/dist/index.d.ts] Inode:: 118
+//// [/home/src/projects/project/packages/package2/dist/index.d.ts] Inode:: 119
 export {};
 
 
@@ -263,7 +263,7 @@ FsWatches::
 /home/src/projects/project/packages/package2: *new*
   {"inode":11}
 /home/src/projects/project/packages/package2/dist: *new*
-  {"inode":116}
+  {"inode":117}
 /home/src/projects/project/packages/package2/package.json: *new*
   {"inode":12}
 /home/src/projects/project/packages/package2/src: *new*
@@ -313,20 +313,20 @@ exitCode:: ExitStatus.undefined
 Change:: Build dependencies
 
 Input::
-//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 120
+//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 121
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 
 
-//// [/home/src/projects/project/packages/package1/dist/index.d.ts] Inode:: 121
+//// [/home/src/projects/project/packages/package1/dist/index.d.ts] Inode:: 122
 export type FooType = "foo";
 export type BarType = "bar";
 
 
-//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] Inode:: 122
+//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] Inode:: 123
 {"root":["./src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 123
+//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 124
 {
   "root": [
     "./src/index.ts"
@@ -397,7 +397,7 @@ FsWatches::
 /home/src/projects/project/packages/package1:
   {"inode":6}
 /home/src/projects/project/packages/package1/dist: *new*
-  {"inode":119}
+  {"inode":120}
 /home/src/projects/project/packages/package1/package.json:
   {"inode":7}
 /home/src/projects/project/packages/package1/src:
@@ -405,7 +405,7 @@ FsWatches::
 /home/src/projects/project/packages/package2:
   {"inode":11}
 /home/src/projects/project/packages/package2/dist:
-  {"inode":116}
+  {"inode":117}
 /home/src/projects/project/packages/package2/package.json:
   {"inode":12}
 /home/src/projects/project/packages/package2/src:
@@ -499,8 +499,8 @@ packages/package2/src/index.ts
 
 
 
-//// [/home/src/projects/project/packages/package2/dist/index.js] file written with same contents Inode:: 117
-//// [/home/src/projects/project/packages/package2/dist/index.d.ts] file written with same contents Inode:: 118
+//// [/home/src/projects/project/packages/package2/dist/index.js] file written with same contents Inode:: 118
+//// [/home/src/projects/project/packages/package2/dist/index.d.ts] file written with same contents Inode:: 119
 
 PolledWatches::
 /home/src/projects/node_modules/@types:
@@ -538,9 +538,9 @@ FsWatches::
 /home/src/projects/project/packages/package1:
   {"inode":6}
 /home/src/projects/project/packages/package1/dist:
-  {"inode":119}
+  {"inode":120}
 /home/src/projects/project/packages/package1/dist/index.d.ts: *new*
-  {"inode":121}
+  {"inode":122}
 /home/src/projects/project/packages/package1/package.json:
   {"inode":7}
 /home/src/projects/project/packages/package1/src:
@@ -548,7 +548,7 @@ FsWatches::
 /home/src/projects/project/packages/package2:
   {"inode":11}
 /home/src/projects/project/packages/package2/dist:
-  {"inode":116}
+  {"inode":117}
 /home/src/projects/project/packages/package2/package.json:
   {"inode":12}
 /home/src/projects/project/packages/package2/src:
@@ -653,7 +653,7 @@ FsWatches::
 /home/src/projects/project/packages/package2:
   {"inode":11}
 /home/src/projects/project/packages/package2/dist:
-  {"inode":116}
+  {"inode":117}
 /home/src/projects/project/packages/package2/package.json:
   {"inode":12}
 /home/src/projects/project/packages/package2/src:
@@ -667,9 +667,9 @@ FsWatches::
 
 FsWatches *deleted*::
 /home/src/projects/project/packages/package1/dist:
-  {"inode":119}
+  {"inode":120}
 /home/src/projects/project/packages/package1/dist/index.d.ts:
-  {"inode":121}
+  {"inode":122}
 
 Timeout callback:: count: 2
 10: timerToUpdateProgram *new*
@@ -794,8 +794,8 @@ Scheduling invalidateFailedLookup, Cancelled earlier one
 Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/node_modules/package1 :: WatchInfo: /home/src/projects/project/node_modules/package1 1 undefined Failed Lookup Locations
 
 
-//// [/home/src/projects/project/packages/package2/dist/index.js] file written with same contents Inode:: 117
-//// [/home/src/projects/project/packages/package2/dist/index.d.ts] file written with same contents Inode:: 118
+//// [/home/src/projects/project/packages/package2/dist/index.js] file written with same contents Inode:: 118
+//// [/home/src/projects/project/packages/package2/dist/index.d.ts] file written with same contents Inode:: 119
 
 PolledWatches::
 /home/src/projects/node_modules: *new*
@@ -843,7 +843,7 @@ FsWatches::
 /home/src/projects/project/packages/package2:
   {"inode":11}
 /home/src/projects/project/packages/package2/dist:
-  {"inode":116}
+  {"inode":117}
 /home/src/projects/project/packages/package2/package.json:
   {"inode":12}
 /home/src/projects/project/packages/package2/src:
@@ -1059,14 +1059,14 @@ exitCode:: ExitStatus.undefined
 Change:: Build dependencies
 
 Input::
-//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] file written with same contents Inode:: 122
-//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents Inode:: 123
-//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 125
+//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] file written with same contents Inode:: 123
+//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents Inode:: 124
+//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 126
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 
 
-//// [/home/src/projects/project/packages/package1/dist/index.d.ts] Inode:: 126
+//// [/home/src/projects/project/packages/package1/dist/index.d.ts] Inode:: 127
 export type FooType = "foo";
 export type BarType = "bar";
 
@@ -1132,7 +1132,7 @@ FsWatches::
 /home/src/projects/project/packages/package1:
   {"inode":6}
 /home/src/projects/project/packages/package1/dist: *new*
-  {"inode":124}
+  {"inode":125}
 /home/src/projects/project/packages/package1/package.json:
   {"inode":7}
 /home/src/projects/project/packages/package1/src:
@@ -1140,7 +1140,7 @@ FsWatches::
 /home/src/projects/project/packages/package2:
   {"inode":11}
 /home/src/projects/project/packages/package2/dist:
-  {"inode":116}
+  {"inode":117}
 /home/src/projects/project/packages/package2/package.json:
   {"inode":12}
 /home/src/projects/project/packages/package2/src:
@@ -1234,8 +1234,8 @@ packages/package2/src/index.ts
 
 
 
-//// [/home/src/projects/project/packages/package2/dist/index.js] file written with same contents Inode:: 117
-//// [/home/src/projects/project/packages/package2/dist/index.d.ts] file written with same contents Inode:: 118
+//// [/home/src/projects/project/packages/package2/dist/index.js] file written with same contents Inode:: 118
+//// [/home/src/projects/project/packages/package2/dist/index.d.ts] file written with same contents Inode:: 119
 
 PolledWatches::
 /home/src/projects/node_modules/@types:
@@ -1273,9 +1273,9 @@ FsWatches::
 /home/src/projects/project/packages/package1:
   {"inode":6}
 /home/src/projects/project/packages/package1/dist:
-  {"inode":124}
+  {"inode":125}
 /home/src/projects/project/packages/package1/dist/index.d.ts: *new*
-  {"inode":126}
+  {"inode":127}
 /home/src/projects/project/packages/package1/package.json:
   {"inode":7}
 /home/src/projects/project/packages/package1/src:
@@ -1283,7 +1283,7 @@ FsWatches::
 /home/src/projects/project/packages/package2:
   {"inode":11}
 /home/src/projects/project/packages/package2/dist:
-  {"inode":116}
+  {"inode":117}
 /home/src/projects/project/packages/package2/package.json:
   {"inode":12}
 /home/src/projects/project/packages/package2/src:
diff --git a/tests/baselines/reference/tscWatch/symlinks/monorepo-style-sibling-packages-symlinked-package1-built-Linux.js b/tests/baselines/reference/tscWatch/symlinks/monorepo-style-sibling-packages-symlinked-package1-built-Linux.js
index 55e8d0b7887a0..215fe54b3d72e 100644
--- a/tests/baselines/reference/tscWatch/symlinks/monorepo-style-sibling-packages-symlinked-package1-built-Linux.js
+++ b/tests/baselines/reference/tscWatch/symlinks/monorepo-style-sibling-packages-symlinked-package1-built-Linux.js
@@ -84,20 +84,20 @@ declare const console: { log(msg: any): void; };
 
 //// [/home/src/tslibs/TS/Lib/lib.es2016.full.d.ts] *Lib* Inode:: 30
 
-//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 117
+//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 118
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 
 
-//// [/home/src/projects/project/packages/package1/dist/index.d.ts] Inode:: 118
+//// [/home/src/projects/project/packages/package1/dist/index.d.ts] Inode:: 119
 export type FooType = "foo";
 export type BarType = "bar";
 
 
-//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] Inode:: 119
+//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] Inode:: 120
 {"root":["./src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 120
+//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 121
 {
   "root": [
     "./src/index.ts"
@@ -189,12 +189,12 @@ DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/packages/packag
 Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/packages/package2 1 undefined Wild card directory
 
 
-//// [/home/src/projects/project/packages/package2/dist/index.js] Inode:: 122
+//// [/home/src/projects/project/packages/package2/dist/index.js] Inode:: 123
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 
 
-//// [/home/src/projects/project/packages/package2/dist/index.d.ts] Inode:: 123
+//// [/home/src/projects/project/packages/package2/dist/index.d.ts] Inode:: 124
 export {};
 
 
@@ -231,9 +231,9 @@ FsWatches::
 /home/src/projects/project/packages/package1: *new*
   {"inode":6}
 /home/src/projects/project/packages/package1/dist: *new*
-  {"inode":116}
+  {"inode":117}
 /home/src/projects/project/packages/package1/dist/index.d.ts: *new*
-  {"inode":118}
+  {"inode":119}
 /home/src/projects/project/packages/package1/package.json: *new*
   {"inode":7}
 /home/src/projects/project/packages/package1/src: *new*
@@ -241,7 +241,7 @@ FsWatches::
 /home/src/projects/project/packages/package2: *new*
   {"inode":11}
 /home/src/projects/project/packages/package2/dist: *new*
-  {"inode":121}
+  {"inode":122}
 /home/src/projects/project/packages/package2/package.json: *new*
   {"inode":12}
 /home/src/projects/project/packages/package2/src: *new*
@@ -347,7 +347,7 @@ FsWatches::
 /home/src/projects/project/packages/package2:
   {"inode":11}
 /home/src/projects/project/packages/package2/dist:
-  {"inode":121}
+  {"inode":122}
 /home/src/projects/project/packages/package2/package.json:
   {"inode":12}
 /home/src/projects/project/packages/package2/src:
@@ -361,9 +361,9 @@ FsWatches::
 
 FsWatches *deleted*::
 /home/src/projects/project/packages/package1/dist:
-  {"inode":116}
+  {"inode":117}
 /home/src/projects/project/packages/package1/dist/index.d.ts:
-  {"inode":118}
+  {"inode":119}
 
 Timeout callback:: count: 2
 1: timerToUpdateProgram *new*
@@ -491,8 +491,8 @@ Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/node_
 sysLog:: Elapsed:: *ms:: onTimerToUpdateChildWatches:: 0 undefined
 
 
-//// [/home/src/projects/project/packages/package2/dist/index.js] file written with same contents Inode:: 122
-//// [/home/src/projects/project/packages/package2/dist/index.d.ts] file written with same contents Inode:: 123
+//// [/home/src/projects/project/packages/package2/dist/index.js] file written with same contents Inode:: 123
+//// [/home/src/projects/project/packages/package2/dist/index.d.ts] file written with same contents Inode:: 124
 
 PolledWatches::
 /home/src/projects/node_modules: *new*
@@ -540,7 +540,7 @@ FsWatches::
 /home/src/projects/project/packages/package2:
   {"inode":11}
 /home/src/projects/project/packages/package2/dist:
-  {"inode":121}
+  {"inode":122}
 /home/src/projects/project/packages/package2/package.json:
   {"inode":12}
 /home/src/projects/project/packages/package2/src:
@@ -756,14 +756,14 @@ exitCode:: ExitStatus.undefined
 Change:: Build dependencies
 
 Input::
-//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] file written with same contents Inode:: 119
-//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents Inode:: 120
-//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 125
+//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] file written with same contents Inode:: 120
+//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents Inode:: 121
+//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 126
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 
 
-//// [/home/src/projects/project/packages/package1/dist/index.d.ts] Inode:: 126
+//// [/home/src/projects/project/packages/package1/dist/index.d.ts] Inode:: 127
 export type FooType = "foo";
 export type BarType = "bar";
 
@@ -829,7 +829,7 @@ FsWatches::
 /home/src/projects/project/packages/package1:
   {"inode":6}
 /home/src/projects/project/packages/package1/dist: *new*
-  {"inode":124}
+  {"inode":125}
 /home/src/projects/project/packages/package1/package.json:
   {"inode":7}
 /home/src/projects/project/packages/package1/src:
@@ -837,7 +837,7 @@ FsWatches::
 /home/src/projects/project/packages/package2:
   {"inode":11}
 /home/src/projects/project/packages/package2/dist:
-  {"inode":121}
+  {"inode":122}
 /home/src/projects/project/packages/package2/package.json:
   {"inode":12}
 /home/src/projects/project/packages/package2/src:
@@ -931,8 +931,8 @@ packages/package2/src/index.ts
 
 
 
-//// [/home/src/projects/project/packages/package2/dist/index.js] file written with same contents Inode:: 122
-//// [/home/src/projects/project/packages/package2/dist/index.d.ts] file written with same contents Inode:: 123
+//// [/home/src/projects/project/packages/package2/dist/index.js] file written with same contents Inode:: 123
+//// [/home/src/projects/project/packages/package2/dist/index.d.ts] file written with same contents Inode:: 124
 
 PolledWatches::
 /home/src/projects/node_modules/@types:
@@ -970,9 +970,9 @@ FsWatches::
 /home/src/projects/project/packages/package1:
   {"inode":6}
 /home/src/projects/project/packages/package1/dist:
-  {"inode":124}
+  {"inode":125}
 /home/src/projects/project/packages/package1/dist/index.d.ts: *new*
-  {"inode":126}
+  {"inode":127}
 /home/src/projects/project/packages/package1/package.json:
   {"inode":7}
 /home/src/projects/project/packages/package1/src:
@@ -980,7 +980,7 @@ FsWatches::
 /home/src/projects/project/packages/package2:
   {"inode":11}
 /home/src/projects/project/packages/package2/dist:
-  {"inode":121}
+  {"inode":122}
 /home/src/projects/project/packages/package2/package.json:
   {"inode":12}
 /home/src/projects/project/packages/package2/src:
diff --git a/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-Linux.js b/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-Linux.js
index 254619758fe39..e78416e5dc472 100644
--- a/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-Linux.js
+++ b/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-Linux.js
@@ -230,7 +230,7 @@ DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/b/2/b-impl/b/src 1 unde
 Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/b/2/b-impl/b/src 1 undefined Wild card directory
 
 
-//// [/home/src/projects/b/2/b-impl/b/lib/index.js] Inode:: 138
+//// [/home/src/projects/b/2/b-impl/b/lib/index.js] Inode:: 139
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 
@@ -326,7 +326,7 @@ exitCode:: ExitStatus.undefined
 Change:: change in unrelated folder in a
 
 Input::
-//// [/home/src/projects/a/2/unrelated/somethingUnrelated.ts] Inode:: 139
+//// [/home/src/projects/a/2/unrelated/somethingUnrelated.ts] Inode:: 140
 export const a = 10;
 
 
@@ -344,7 +344,7 @@ exitCode:: ExitStatus.undefined
 Change:: change in unrelated folder in c
 
 Input::
-//// [/home/src/projects/c/4/unrelated/somethingUnrelated.ts] Inode:: 140
+//// [/home/src/projects/c/4/unrelated/somethingUnrelated.ts] Inode:: 141
 export const a = 10;
 
 
@@ -362,18 +362,18 @@ exitCode:: ExitStatus.undefined
 Change:: Build dependencies
 
 Input::
-//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 142
+//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 143
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.c = void 0;
 exports.c = 'test';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 143
+//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 144
 export declare const c: string;
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 144
+//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 145
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -393,14 +393,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
 __exportStar(require("./c"), exports);
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 145
+//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 146
 export * from './c';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 146
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 147
 {"root":["../src/c.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 147
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 148
 {
   "root": [
     "../src/c.ts",
@@ -410,18 +410,18 @@ export * from './c';
   "size": 68
 }
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 149
+//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 150
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.a = void 0;
 exports.a = 'test';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 150
+//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 151
 export declare const a: string;
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 151
+//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 152
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -442,15 +442,15 @@ __exportStar(require("./a"), exports);
 __exportStar(require("c"), exports);
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 152
+//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 153
 export * from './a';
 export * from 'c';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 153
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 154
 {"root":["../src/a.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 154
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 155
 {
   "root": [
     "../src/a.ts",
@@ -520,7 +520,7 @@ FsWatches::
 /home/src/projects/a/1/a-impl/a:
   {"inode":19}
 /home/src/projects/a/1/a-impl/a/lib: *new*
-  {"inode":148}
+  {"inode":149}
 /home/src/projects/a/1/a-impl/a/node_modules:
   {"inode":25}
 /home/src/projects/a/1/a-impl/a/package.json:
@@ -693,7 +693,7 @@ src/index.ts
 
 
 
-//// [/home/src/projects/b/2/b-impl/b/lib/index.js] file written with same contents Inode:: 138
+//// [/home/src/projects/b/2/b-impl/b/lib/index.js] file written with same contents Inode:: 139
 
 PolledWatches::
 /home/src/projects/a/1/a-impl/a/lib/node_modules: *new*
@@ -743,11 +743,11 @@ PolledWatches *deleted*::
 
 FsWatches::
 /home/src/projects/a/1/a-impl/a/lib:
-  {"inode":148}
+  {"inode":149}
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts: *new*
-  {"inode":150}
+  {"inode":151}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts: *new*
-  {"inode":152}
+  {"inode":153}
 /home/src/projects/a/1/a-impl/a/node_modules:
   {"inode":25}
 /home/src/projects/a/1/a-impl/a/package.json:
@@ -761,11 +761,11 @@ FsWatches::
 /home/src/projects/b/2/b-impl/b/tsconfig.json:
   {"inode":36}
 /home/src/projects/c/3/c-impl/c/lib: *new*
-  {"inode":141}
+  {"inode":142}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts: *new*
-  {"inode":143}
+  {"inode":144}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts: *new*
-  {"inode":145}
+  {"inode":146}
 /home/src/projects/c/3/c-impl/c/package.json: *new*
   {"inode":12}
 /home/src/tslibs/TS/Lib/lib.d.ts:
@@ -820,7 +820,7 @@ exitCode:: ExitStatus.undefined
 Change:: change in unrelated folder in a
 
 Input::
-//// [/home/src/projects/a/2/unrelated/anotherFile.ts] Inode:: 155
+//// [/home/src/projects/a/2/unrelated/anotherFile.ts] Inode:: 156
 export const a = 10;
 
 
@@ -838,7 +838,7 @@ exitCode:: ExitStatus.undefined
 Change:: change in unrelated folder in c
 
 Input::
-//// [/home/src/projects/c/4/unrelated/anotherFile.ts] Inode:: 156
+//// [/home/src/projects/c/4/unrelated/anotherFile.ts] Inode:: 157
 export const a = 10;
 
 
@@ -1000,17 +1000,17 @@ FsWatches::
 
 FsWatches *deleted*::
 /home/src/projects/a/1/a-impl/a/lib:
-  {"inode":148}
+  {"inode":149}
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts:
-  {"inode":150}
+  {"inode":151}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts:
-  {"inode":152}
+  {"inode":153}
 /home/src/projects/c/3/c-impl/c/lib:
-  {"inode":141}
+  {"inode":142}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts:
-  {"inode":143}
+  {"inode":144}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts:
-  {"inode":145}
+  {"inode":146}
 
 Timeout callback:: count: 2
 18: timerToUpdateProgram *new*
@@ -1152,7 +1152,7 @@ src/index.ts
 
 
 
-//// [/home/src/projects/b/2/b-impl/b/lib/index.js] file written with same contents Inode:: 138
+//// [/home/src/projects/b/2/b-impl/b/lib/index.js] file written with same contents Inode:: 139
 
 PolledWatches::
 /home/src/projects/b/2/b-impl/b/node_modules/@types:
@@ -1289,18 +1289,18 @@ exitCode:: ExitStatus.undefined
 Change:: Build dependencies
 
 Input::
-//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 158
+//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 159
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.c = void 0;
 exports.c = 'test';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 159
+//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 160
 export declare const c: string;
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 160
+//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 161
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -1320,14 +1320,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
 __exportStar(require("./c"), exports);
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 161
+//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 162
 export * from './c';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 162
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 163
 {"root":["../src/c.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 163
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 164
 {
   "root": [
     "../src/c.ts",
@@ -1337,18 +1337,18 @@ export * from './c';
   "size": 68
 }
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 165
+//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 166
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.a = void 0;
 exports.a = 'test';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 166
+//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 167
 export declare const a: string;
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 167
+//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 168
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -1369,15 +1369,15 @@ __exportStar(require("./a"), exports);
 __exportStar(require("c"), exports);
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 168
+//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 169
 export * from './a';
 export * from 'c';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 169
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 170
 {"root":["../src/a.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 170
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 171
 {
   "root": [
     "../src/a.ts",
@@ -1447,7 +1447,7 @@ FsWatches::
 /home/src/projects/a/1/a-impl/a:
   {"inode":19}
 /home/src/projects/a/1/a-impl/a/lib: *new*
-  {"inode":164}
+  {"inode":165}
 /home/src/projects/a/1/a-impl/a/node_modules:
   {"inode":25}
 /home/src/projects/a/1/a-impl/a/package.json:
@@ -1616,7 +1616,7 @@ src/index.ts
 
 
 
-//// [/home/src/projects/b/2/b-impl/b/lib/index.js] file written with same contents Inode:: 138
+//// [/home/src/projects/b/2/b-impl/b/lib/index.js] file written with same contents Inode:: 139
 
 PolledWatches::
 /home/src/projects/a/1/a-impl/a/lib/node_modules: *new*
@@ -1666,11 +1666,11 @@ PolledWatches *deleted*::
 
 FsWatches::
 /home/src/projects/a/1/a-impl/a/lib:
-  {"inode":164}
+  {"inode":165}
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts: *new*
-  {"inode":166}
+  {"inode":167}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts: *new*
-  {"inode":168}
+  {"inode":169}
 /home/src/projects/a/1/a-impl/a/node_modules:
   {"inode":25}
 /home/src/projects/a/1/a-impl/a/package.json:
@@ -1684,11 +1684,11 @@ FsWatches::
 /home/src/projects/b/2/b-impl/b/tsconfig.json:
   {"inode":36}
 /home/src/projects/c/3/c-impl/c/lib: *new*
-  {"inode":157}
+  {"inode":158}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts: *new*
-  {"inode":159}
+  {"inode":160}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts: *new*
-  {"inode":161}
+  {"inode":162}
 /home/src/projects/c/3/c-impl/c/package.json: *new*
   {"inode":12}
 /home/src/tslibs/TS/Lib/lib.d.ts:
diff --git a/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-MacOs.js b/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-MacOs.js
index 221bbd7970636..4ed2659891a18 100644
--- a/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-MacOs.js
+++ b/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-MacOs.js
@@ -230,7 +230,7 @@ DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/b/2/b-impl/b/src 1 unde
 Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/b/2/b-impl/b/src 1 undefined Wild card directory
 
 
-//// [/home/src/projects/b/2/b-impl/b/lib/index.js] Inode:: 138
+//// [/home/src/projects/b/2/b-impl/b/lib/index.js] Inode:: 139
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 
@@ -322,7 +322,7 @@ exitCode:: ExitStatus.undefined
 Change:: change in unrelated folder in a
 
 Input::
-//// [/home/src/projects/a/2/unrelated/somethingUnrelated.ts] Inode:: 139
+//// [/home/src/projects/a/2/unrelated/somethingUnrelated.ts] Inode:: 140
 export const a = 10;
 
 
@@ -340,7 +340,7 @@ exitCode:: ExitStatus.undefined
 Change:: change in unrelated folder in c
 
 Input::
-//// [/home/src/projects/c/4/unrelated/somethingUnrelated.ts] Inode:: 140
+//// [/home/src/projects/c/4/unrelated/somethingUnrelated.ts] Inode:: 141
 export const a = 10;
 
 
@@ -358,18 +358,18 @@ exitCode:: ExitStatus.undefined
 Change:: Build dependencies
 
 Input::
-//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 142
+//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 143
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.c = void 0;
 exports.c = 'test';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 143
+//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 144
 export declare const c: string;
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 144
+//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 145
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -389,14 +389,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
 __exportStar(require("./c"), exports);
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 145
+//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 146
 export * from './c';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 146
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 147
 {"root":["../src/c.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 147
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 148
 {
   "root": [
     "../src/c.ts",
@@ -406,18 +406,18 @@ export * from './c';
   "size": 68
 }
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 149
+//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 150
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.a = void 0;
 exports.a = 'test';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 150
+//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 151
 export declare const a: string;
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 151
+//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 152
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -438,15 +438,15 @@ __exportStar(require("./a"), exports);
 __exportStar(require("c"), exports);
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 152
+//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 153
 export * from './a';
 export * from 'c';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 153
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 154
 {"root":["../src/a.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 154
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 155
 {
   "root": [
     "../src/a.ts",
@@ -634,7 +634,7 @@ src/index.ts
 
 
 
-//// [/home/src/projects/b/2/b-impl/b/lib/index.js] file written with same contents Inode:: 138
+//// [/home/src/projects/b/2/b-impl/b/lib/index.js] file written with same contents Inode:: 139
 
 PolledWatches::
 /home/src/projects/a/1/a-impl/a/lib/node_modules: *new*
@@ -684,9 +684,9 @@ PolledWatches *deleted*::
 
 FsWatches::
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts: *new*
-  {"inode":150}
+  {"inode":151}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts: *new*
-  {"inode":152}
+  {"inode":153}
 /home/src/projects/a/1/a-impl/a/package.json:
   {"inode":24}
 /home/src/projects/b/2/b-impl/b/src/index.ts:
@@ -694,9 +694,9 @@ FsWatches::
 /home/src/projects/b/2/b-impl/b/tsconfig.json:
   {"inode":36}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts: *new*
-  {"inode":143}
+  {"inode":144}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts: *new*
-  {"inode":145}
+  {"inode":146}
 /home/src/projects/c/3/c-impl/c/package.json: *new*
   {"inode":12}
 /home/src/tslibs/TS/Lib/lib.d.ts:
@@ -763,7 +763,7 @@ exitCode:: ExitStatus.undefined
 Change:: change in unrelated folder in a
 
 Input::
-//// [/home/src/projects/a/2/unrelated/anotherFile.ts] Inode:: 155
+//// [/home/src/projects/a/2/unrelated/anotherFile.ts] Inode:: 156
 export const a = 10;
 
 
@@ -792,7 +792,7 @@ exitCode:: ExitStatus.undefined
 Change:: change in unrelated folder in c
 
 Input::
-//// [/home/src/projects/c/4/unrelated/anotherFile.ts] Inode:: 156
+//// [/home/src/projects/c/4/unrelated/anotherFile.ts] Inode:: 157
 export const a = 10;
 
 
@@ -953,13 +953,13 @@ FsWatches::
 
 FsWatches *deleted*::
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts:
-  {"inode":150}
+  {"inode":151}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts:
-  {"inode":152}
+  {"inode":153}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts:
-  {"inode":143}
+  {"inode":144}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts:
-  {"inode":145}
+  {"inode":146}
 
 FsWatchesRecursive::
 /home/src/projects/a:
@@ -1113,7 +1113,7 @@ src/index.ts
 
 
 
-//// [/home/src/projects/b/2/b-impl/b/lib/index.js] file written with same contents Inode:: 138
+//// [/home/src/projects/b/2/b-impl/b/lib/index.js] file written with same contents Inode:: 139
 
 PolledWatches::
 /home/src/projects/b/2/b-impl/b/node_modules/@types:
@@ -1231,18 +1231,18 @@ exitCode:: ExitStatus.undefined
 Change:: Build dependencies
 
 Input::
-//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 158
+//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 159
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.c = void 0;
 exports.c = 'test';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 159
+//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 160
 export declare const c: string;
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 160
+//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 161
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -1262,14 +1262,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
 __exportStar(require("./c"), exports);
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 161
+//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 162
 export * from './c';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 162
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 163
 {"root":["../src/c.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 163
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 164
 {
   "root": [
     "../src/c.ts",
@@ -1279,18 +1279,18 @@ export * from './c';
   "size": 68
 }
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 165
+//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 166
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.a = void 0;
 exports.a = 'test';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 166
+//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 167
 export declare const a: string;
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 167
+//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 168
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -1311,15 +1311,15 @@ __exportStar(require("./a"), exports);
 __exportStar(require("c"), exports);
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 168
+//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 169
 export * from './a';
 export * from 'c';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 169
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 170
 {"root":["../src/a.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 170
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 171
 {
   "root": [
     "../src/a.ts",
@@ -1503,7 +1503,7 @@ src/index.ts
 
 
 
-//// [/home/src/projects/b/2/b-impl/b/lib/index.js] file written with same contents Inode:: 138
+//// [/home/src/projects/b/2/b-impl/b/lib/index.js] file written with same contents Inode:: 139
 
 PolledWatches::
 /home/src/projects/a/1/a-impl/a/lib/node_modules: *new*
@@ -1553,9 +1553,9 @@ PolledWatches *deleted*::
 
 FsWatches::
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts: *new*
-  {"inode":166}
+  {"inode":167}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts: *new*
-  {"inode":168}
+  {"inode":169}
 /home/src/projects/a/1/a-impl/a/package.json:
   {"inode":24}
 /home/src/projects/b/2/b-impl/b/src/index.ts:
@@ -1563,9 +1563,9 @@ FsWatches::
 /home/src/projects/b/2/b-impl/b/tsconfig.json:
   {"inode":36}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts: *new*
-  {"inode":159}
+  {"inode":160}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts: *new*
-  {"inode":161}
+  {"inode":162}
 /home/src/projects/c/3/c-impl/c/package.json: *new*
   {"inode":12}
 /home/src/tslibs/TS/Lib/lib.d.ts:
diff --git a/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-built-Linux.js b/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-built-Linux.js
index bbe357c9b6733..d89813bcc94a6 100644
--- a/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-built-Linux.js
+++ b/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-built-Linux.js
@@ -88,18 +88,18 @@ interface Array<T> { length: number; [n: number]: T; }
 interface ReadonlyArray<T> {}
 declare const console: { log(msg: any): void; };
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 138
+//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 139
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.c = void 0;
 exports.c = 'test';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 139
+//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 140
 export declare const c: string;
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 140
+//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 141
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -119,14 +119,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
 __exportStar(require("./c"), exports);
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 141
+//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 142
 export * from './c';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 142
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 143
 {"root":["../src/c.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 143
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 144
 {
   "root": [
     "../src/c.ts",
@@ -136,18 +136,18 @@ export * from './c';
   "size": 68
 }
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 145
+//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 146
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.a = void 0;
 exports.a = 'test';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 146
+//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 147
 export declare const a: string;
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 147
+//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 148
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -168,15 +168,15 @@ __exportStar(require("./a"), exports);
 __exportStar(require("c"), exports);
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 148
+//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 149
 export * from './a';
 export * from 'c';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 149
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 150
 {"root":["../src/a.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 150
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 151
 {
   "root": [
     "../src/a.ts",
@@ -325,7 +325,7 @@ DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/b/2/b-impl/b/src 1 unde
 Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/b/2/b-impl/b/src 1 undefined Wild card directory
 
 
-//// [/home/src/projects/b/2/b-impl/b/lib/index.js] Inode:: 152
+//// [/home/src/projects/b/2/b-impl/b/lib/index.js] Inode:: 153
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 
@@ -369,11 +369,11 @@ PolledWatches::
 
 FsWatches::
 /home/src/projects/a/1/a-impl/a/lib: *new*
-  {"inode":144}
+  {"inode":145}
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts: *new*
-  {"inode":146}
+  {"inode":147}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts: *new*
-  {"inode":148}
+  {"inode":149}
 /home/src/projects/a/1/a-impl/a/node_modules: *new*
   {"inode":25}
 /home/src/projects/a/1/a-impl/a/package.json: *new*
@@ -387,11 +387,11 @@ FsWatches::
 /home/src/projects/b/2/b-impl/b/tsconfig.json: *new*
   {"inode":36}
 /home/src/projects/c/3/c-impl/c/lib: *new*
-  {"inode":137}
+  {"inode":138}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts: *new*
-  {"inode":139}
+  {"inode":140}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts: *new*
-  {"inode":141}
+  {"inode":142}
 /home/src/projects/c/3/c-impl/c/package.json: *new*
   {"inode":12}
 /home/src/tslibs/TS/Lib/lib.d.ts: *new*
@@ -439,7 +439,7 @@ exitCode:: ExitStatus.undefined
 Change:: change in unrelated folder in a
 
 Input::
-//// [/home/src/projects/a/2/unrelated/somethingUnrelated.ts] Inode:: 153
+//// [/home/src/projects/a/2/unrelated/somethingUnrelated.ts] Inode:: 154
 export const a = 10;
 
 
@@ -457,7 +457,7 @@ exitCode:: ExitStatus.undefined
 Change:: change in unrelated folder in c
 
 Input::
-//// [/home/src/projects/c/4/unrelated/somethingUnrelated.ts] Inode:: 154
+//// [/home/src/projects/c/4/unrelated/somethingUnrelated.ts] Inode:: 155
 export const a = 10;
 
 
@@ -475,7 +475,7 @@ exitCode:: ExitStatus.undefined
 Change:: change in unrelated folder in a
 
 Input::
-//// [/home/src/projects/a/2/unrelated/anotherFile.ts] Inode:: 155
+//// [/home/src/projects/a/2/unrelated/anotherFile.ts] Inode:: 156
 export const a = 10;
 
 
@@ -493,7 +493,7 @@ exitCode:: ExitStatus.undefined
 Change:: change in unrelated folder in c
 
 Input::
-//// [/home/src/projects/c/4/unrelated/anotherFile.ts] Inode:: 156
+//// [/home/src/projects/c/4/unrelated/anotherFile.ts] Inode:: 157
 export const a = 10;
 
 
@@ -655,17 +655,17 @@ FsWatches::
 
 FsWatches *deleted*::
 /home/src/projects/a/1/a-impl/a/lib:
-  {"inode":144}
+  {"inode":145}
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts:
-  {"inode":146}
+  {"inode":147}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts:
-  {"inode":148}
+  {"inode":149}
 /home/src/projects/c/3/c-impl/c/lib:
-  {"inode":137}
+  {"inode":138}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts:
-  {"inode":139}
+  {"inode":140}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts:
-  {"inode":141}
+  {"inode":142}
 
 Timeout callback:: count: 2
 13: timerToUpdateProgram *new*
@@ -807,7 +807,7 @@ src/index.ts
 
 
 
-//// [/home/src/projects/b/2/b-impl/b/lib/index.js] file written with same contents Inode:: 152
+//// [/home/src/projects/b/2/b-impl/b/lib/index.js] file written with same contents Inode:: 153
 
 PolledWatches::
 /home/src/projects/b/2/b-impl/b/node_modules/@types:
@@ -944,18 +944,18 @@ exitCode:: ExitStatus.undefined
 Change:: Build dependencies
 
 Input::
-//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 158
+//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 159
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.c = void 0;
 exports.c = 'test';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 159
+//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 160
 export declare const c: string;
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 160
+//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 161
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -975,14 +975,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
 __exportStar(require("./c"), exports);
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 161
+//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 162
 export * from './c';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 162
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 163
 {"root":["../src/c.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 163
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 164
 {
   "root": [
     "../src/c.ts",
@@ -992,18 +992,18 @@ export * from './c';
   "size": 68
 }
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 165
+//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 166
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.a = void 0;
 exports.a = 'test';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 166
+//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 167
 export declare const a: string;
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 167
+//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 168
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -1024,15 +1024,15 @@ __exportStar(require("./a"), exports);
 __exportStar(require("c"), exports);
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 168
+//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 169
 export * from './a';
 export * from 'c';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 169
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 170
 {"root":["../src/a.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 170
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 171
 {
   "root": [
     "../src/a.ts",
@@ -1102,7 +1102,7 @@ FsWatches::
 /home/src/projects/a/1/a-impl/a:
   {"inode":19}
 /home/src/projects/a/1/a-impl/a/lib: *new*
-  {"inode":164}
+  {"inode":165}
 /home/src/projects/a/1/a-impl/a/node_modules:
   {"inode":25}
 /home/src/projects/a/1/a-impl/a/package.json:
@@ -1271,7 +1271,7 @@ src/index.ts
 
 
 
-//// [/home/src/projects/b/2/b-impl/b/lib/index.js] file written with same contents Inode:: 152
+//// [/home/src/projects/b/2/b-impl/b/lib/index.js] file written with same contents Inode:: 153
 
 PolledWatches::
 /home/src/projects/a/1/a-impl/a/lib/node_modules: *new*
@@ -1321,11 +1321,11 @@ PolledWatches *deleted*::
 
 FsWatches::
 /home/src/projects/a/1/a-impl/a/lib:
-  {"inode":164}
+  {"inode":165}
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts: *new*
-  {"inode":166}
+  {"inode":167}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts: *new*
-  {"inode":168}
+  {"inode":169}
 /home/src/projects/a/1/a-impl/a/node_modules:
   {"inode":25}
 /home/src/projects/a/1/a-impl/a/package.json:
@@ -1339,11 +1339,11 @@ FsWatches::
 /home/src/projects/b/2/b-impl/b/tsconfig.json:
   {"inode":36}
 /home/src/projects/c/3/c-impl/c/lib: *new*
-  {"inode":157}
+  {"inode":158}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts: *new*
-  {"inode":159}
+  {"inode":160}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts: *new*
-  {"inode":161}
+  {"inode":162}
 /home/src/projects/c/3/c-impl/c/package.json: *new*
   {"inode":12}
 /home/src/tslibs/TS/Lib/lib.d.ts:
diff --git a/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-built-MacOs.js b/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-built-MacOs.js
index f6e210ab3918f..ebf3b088086f1 100644
--- a/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-built-MacOs.js
+++ b/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-built-MacOs.js
@@ -88,18 +88,18 @@ interface Array<T> { length: number; [n: number]: T; }
 interface ReadonlyArray<T> {}
 declare const console: { log(msg: any): void; };
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 138
+//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 139
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.c = void 0;
 exports.c = 'test';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 139
+//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 140
 export declare const c: string;
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 140
+//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 141
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -119,14 +119,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
 __exportStar(require("./c"), exports);
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 141
+//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 142
 export * from './c';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 142
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 143
 {"root":["../src/c.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 143
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 144
 {
   "root": [
     "../src/c.ts",
@@ -136,18 +136,18 @@ export * from './c';
   "size": 68
 }
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 145
+//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 146
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.a = void 0;
 exports.a = 'test';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 146
+//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 147
 export declare const a: string;
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 147
+//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 148
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -168,15 +168,15 @@ __exportStar(require("./a"), exports);
 __exportStar(require("c"), exports);
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 148
+//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 149
 export * from './a';
 export * from 'c';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 149
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 150
 {"root":["../src/a.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 150
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 151
 {
   "root": [
     "../src/a.ts",
@@ -325,7 +325,7 @@ DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/b/2/b-impl/b/src 1 unde
 Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/b/2/b-impl/b/src 1 undefined Wild card directory
 
 
-//// [/home/src/projects/b/2/b-impl/b/lib/index.js] Inode:: 152
+//// [/home/src/projects/b/2/b-impl/b/lib/index.js] Inode:: 153
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 
@@ -369,9 +369,9 @@ PolledWatches::
 
 FsWatches::
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts: *new*
-  {"inode":146}
+  {"inode":147}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts: *new*
-  {"inode":148}
+  {"inode":149}
 /home/src/projects/a/1/a-impl/a/package.json: *new*
   {"inode":24}
 /home/src/projects/b/2/b-impl/b/src/index.ts: *new*
@@ -379,9 +379,9 @@ FsWatches::
 /home/src/projects/b/2/b-impl/b/tsconfig.json: *new*
   {"inode":36}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts: *new*
-  {"inode":139}
+  {"inode":140}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts: *new*
-  {"inode":141}
+  {"inode":142}
 /home/src/projects/c/3/c-impl/c/package.json: *new*
   {"inode":12}
 /home/src/tslibs/TS/Lib/lib.d.ts: *new*
@@ -441,7 +441,7 @@ exitCode:: ExitStatus.undefined
 Change:: change in unrelated folder in a
 
 Input::
-//// [/home/src/projects/a/2/unrelated/somethingUnrelated.ts] Inode:: 153
+//// [/home/src/projects/a/2/unrelated/somethingUnrelated.ts] Inode:: 154
 export const a = 10;
 
 
@@ -470,7 +470,7 @@ exitCode:: ExitStatus.undefined
 Change:: change in unrelated folder in c
 
 Input::
-//// [/home/src/projects/c/4/unrelated/somethingUnrelated.ts] Inode:: 154
+//// [/home/src/projects/c/4/unrelated/somethingUnrelated.ts] Inode:: 155
 export const a = 10;
 
 
@@ -499,7 +499,7 @@ exitCode:: ExitStatus.undefined
 Change:: change in unrelated folder in a
 
 Input::
-//// [/home/src/projects/a/2/unrelated/anotherFile.ts] Inode:: 155
+//// [/home/src/projects/a/2/unrelated/anotherFile.ts] Inode:: 156
 export const a = 10;
 
 
@@ -528,7 +528,7 @@ exitCode:: ExitStatus.undefined
 Change:: change in unrelated folder in c
 
 Input::
-//// [/home/src/projects/c/4/unrelated/anotherFile.ts] Inode:: 156
+//// [/home/src/projects/c/4/unrelated/anotherFile.ts] Inode:: 157
 export const a = 10;
 
 
@@ -689,13 +689,13 @@ FsWatches::
 
 FsWatches *deleted*::
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts:
-  {"inode":146}
+  {"inode":147}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts:
-  {"inode":148}
+  {"inode":149}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts:
-  {"inode":139}
+  {"inode":140}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts:
-  {"inode":141}
+  {"inode":142}
 
 FsWatchesRecursive::
 /home/src/projects/a:
@@ -849,7 +849,7 @@ src/index.ts
 
 
 
-//// [/home/src/projects/b/2/b-impl/b/lib/index.js] file written with same contents Inode:: 152
+//// [/home/src/projects/b/2/b-impl/b/lib/index.js] file written with same contents Inode:: 153
 
 PolledWatches::
 /home/src/projects/b/2/b-impl/b/node_modules/@types:
@@ -967,18 +967,18 @@ exitCode:: ExitStatus.undefined
 Change:: Build dependencies
 
 Input::
-//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 158
+//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 159
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.c = void 0;
 exports.c = 'test';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 159
+//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 160
 export declare const c: string;
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 160
+//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 161
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -998,14 +998,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
 __exportStar(require("./c"), exports);
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 161
+//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 162
 export * from './c';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 162
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 163
 {"root":["../src/c.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 163
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 164
 {
   "root": [
     "../src/c.ts",
@@ -1015,18 +1015,18 @@ export * from './c';
   "size": 68
 }
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 165
+//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 166
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.a = void 0;
 exports.a = 'test';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 166
+//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 167
 export declare const a: string;
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 167
+//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 168
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -1047,15 +1047,15 @@ __exportStar(require("./a"), exports);
 __exportStar(require("c"), exports);
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 168
+//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 169
 export * from './a';
 export * from 'c';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 169
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 170
 {"root":["../src/a.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 170
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 171
 {
   "root": [
     "../src/a.ts",
@@ -1239,7 +1239,7 @@ src/index.ts
 
 
 
-//// [/home/src/projects/b/2/b-impl/b/lib/index.js] file written with same contents Inode:: 152
+//// [/home/src/projects/b/2/b-impl/b/lib/index.js] file written with same contents Inode:: 153
 
 PolledWatches::
 /home/src/projects/a/1/a-impl/a/lib/node_modules: *new*
@@ -1289,9 +1289,9 @@ PolledWatches *deleted*::
 
 FsWatches::
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts: *new*
-  {"inode":166}
+  {"inode":167}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts: *new*
-  {"inode":168}
+  {"inode":169}
 /home/src/projects/a/1/a-impl/a/package.json:
   {"inode":24}
 /home/src/projects/b/2/b-impl/b/src/index.ts:
@@ -1299,9 +1299,9 @@ FsWatches::
 /home/src/projects/b/2/b-impl/b/tsconfig.json:
   {"inode":36}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts: *new*
-  {"inode":159}
+  {"inode":160}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts: *new*
-  {"inode":161}
+  {"inode":162}
 /home/src/projects/c/3/c-impl/c/package.json: *new*
   {"inode":12}
 /home/src/tslibs/TS/Lib/lib.d.ts:
diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/fsWatchWithTimestamp-true-useFsEventsOnParentDirectory.js b/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/fsWatchWithTimestamp-true-useFsEventsOnParentDirectory.js
index 5c41beae55e6c..d2f91466631e8 100644
--- a/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/fsWatchWithTimestamp-true-useFsEventsOnParentDirectory.js
+++ b/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/fsWatchWithTimestamp-true-useFsEventsOnParentDirectory.js
@@ -51,7 +51,7 @@ Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node
 
 
 
-//// [/user/username/projects/myproject/main.js] Inode:: 107
+//// [/user/username/projects/myproject/main.js] Inode:: 108
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.x = void 0;
@@ -143,7 +143,7 @@ CreatingProgramWith::
 
 
 
-//// [/user/username/projects/myproject/main.js] Inode:: 107
+//// [/user/username/projects/myproject/main.js] Inode:: 108
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.y = exports.x = void 0;
diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/fsWatchWithTimestamp-true.js b/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/fsWatchWithTimestamp-true.js
index 9bc5edffb4d09..02bf24c77ec3f 100644
--- a/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/fsWatchWithTimestamp-true.js
+++ b/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/fsWatchWithTimestamp-true.js
@@ -51,7 +51,7 @@ Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node
 
 
 
-//// [/user/username/projects/myproject/main.js] Inode:: 107
+//// [/user/username/projects/myproject/main.js] Inode:: 108
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.x = void 0;
@@ -149,7 +149,7 @@ CreatingProgramWith::
 
 
 
-//// [/user/username/projects/myproject/main.js] Inode:: 107
+//// [/user/username/projects/myproject/main.js] Inode:: 108
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.y = exports.x = void 0;
diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/when-using-file-watching-thats-on-inode-when-rename-event-ends-with-tilde.js b/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/when-using-file-watching-thats-on-inode-when-rename-event-ends-with-tilde.js
index cda4c66894a1f..9a01ac49e4085 100644
--- a/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/when-using-file-watching-thats-on-inode-when-rename-event-ends-with-tilde.js
+++ b/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/when-using-file-watching-thats-on-inode-when-rename-event-ends-with-tilde.js
@@ -63,7 +63,7 @@ Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myprojec
 
 
 
-//// [/user/username/projects/myproject/main.js] Inode:: 108
+//// [/user/username/projects/myproject/main.js] Inode:: 109
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 var foo_1 = require("./foo");
@@ -129,7 +129,7 @@ exitCode:: ExitStatus.undefined
 Change:: Replace file with rename event that introduces error
 
 Input::
-//// [/user/username/projects/myproject/foo.d.ts] Inode:: 109
+//// [/user/username/projects/myproject/foo.d.ts] Inode:: 110
 export function foo2(): string;
 
 
@@ -188,7 +188,7 @@ FsWatches::
 /user/username/projects/myproject:
   {"inode":4}
 /user/username/projects/myproject/foo.d.ts:
-  {"inode":109} *new*
+  {"inode":110} *new*
 /user/username/projects/myproject/main.ts:
   {"inode":5}
 /user/username/projects/myproject/tsconfig.json:
@@ -229,7 +229,7 @@ CreatingProgramWith::
 
 
 
-//// [/user/username/projects/myproject/main.js] file written with same contents Inode:: 108
+//// [/user/username/projects/myproject/main.js] file written with same contents Inode:: 109
 
 Timeout callback:: count: 0
 9: timerToInvalidateFailedLookupResolutions *deleted*
@@ -263,7 +263,7 @@ exitCode:: ExitStatus.undefined
 Change:: Replace file with rename event that fixes error
 
 Input::
-//// [/user/username/projects/myproject/foo.d.ts] Inode:: 110
+//// [/user/username/projects/myproject/foo.d.ts] Inode:: 111
 export function foo(): string;
 
 
@@ -322,7 +322,7 @@ FsWatches::
 /user/username/projects/myproject:
   {"inode":4}
 /user/username/projects/myproject/foo.d.ts:
-  {"inode":110} *new*
+  {"inode":111} *new*
 /user/username/projects/myproject/main.ts:
   {"inode":5}
 /user/username/projects/myproject/tsconfig.json:
@@ -330,7 +330,7 @@ FsWatches::
 
 FsWatches *deleted*::
 /user/username/projects/myproject/foo.d.ts:
-  {"inode":109}
+  {"inode":110}
 
 Timeout callback:: count: 2
 16: timerToUpdateProgram *new*
@@ -353,7 +353,7 @@ CreatingProgramWith::
 
 
 
-//// [/user/username/projects/myproject/main.js] file written with same contents Inode:: 108
+//// [/user/username/projects/myproject/main.js] file written with same contents Inode:: 109
 
 Timeout callback:: count: 0
 18: timerToInvalidateFailedLookupResolutions *deleted*
diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/when-using-file-watching-thats-on-inode-when-rename-occurs-when-file-is-still-on-the-disk.js b/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/when-using-file-watching-thats-on-inode-when-rename-occurs-when-file-is-still-on-the-disk.js
index 1ee5cc81e1f09..ec1460d04870b 100644
--- a/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/when-using-file-watching-thats-on-inode-when-rename-occurs-when-file-is-still-on-the-disk.js
+++ b/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/when-using-file-watching-thats-on-inode-when-rename-occurs-when-file-is-still-on-the-disk.js
@@ -59,12 +59,12 @@ Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node
 
 
 
-//// [/user/username/projects/myproject/foo.js] Inode:: 108
+//// [/user/username/projects/myproject/foo.js] Inode:: 109
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 
 
-//// [/user/username/projects/myproject/main.js] Inode:: 109
+//// [/user/username/projects/myproject/main.js] Inode:: 110
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 var foo_1 = require("./foo");
@@ -128,7 +128,7 @@ exitCode:: ExitStatus.undefined
 Change:: Introduce error such that when callback happens file is already appeared
 
 Input::
-//// [/user/username/projects/myproject/foo.ts] Inode:: 110
+//// [/user/username/projects/myproject/foo.ts] Inode:: 111
 export declare function foo2(): string;
 
 
@@ -198,8 +198,8 @@ CreatingProgramWith::
 
 
 
-//// [/user/username/projects/myproject/foo.js] file written with same contents Inode:: 108
-//// [/user/username/projects/myproject/main.js] file written with same contents Inode:: 109
+//// [/user/username/projects/myproject/foo.js] file written with same contents Inode:: 109
+//// [/user/username/projects/myproject/main.js] file written with same contents Inode:: 110
 
 
 Program root files: [
@@ -230,7 +230,7 @@ exitCode:: ExitStatus.undefined
 Change:: Replace file with rename event that fixes error
 
 Input::
-//// [/user/username/projects/myproject/foo.ts] Inode:: 111
+//// [/user/username/projects/myproject/foo.ts] Inode:: 112
 export declare function foo(): string;
 
 
@@ -269,7 +269,7 @@ FsWatches::
 /home/src/tslibs/TS/Lib/lib.d.ts:
   {"inode":13}
 /user/username/projects/myproject/foo.ts:
-  {"inode":111} *new*
+  {"inode":112} *new*
 /user/username/projects/myproject/main.ts:
   {"inode":5}
 /user/username/projects/myproject/tsconfig.json:
@@ -298,8 +298,8 @@ CreatingProgramWith::
 
 
 
-//// [/user/username/projects/myproject/foo.js] file written with same contents Inode:: 108
-//// [/user/username/projects/myproject/main.js] file written with same contents Inode:: 109
+//// [/user/username/projects/myproject/foo.js] file written with same contents Inode:: 109
+//// [/user/username/projects/myproject/main.js] file written with same contents Inode:: 110
 
 
 Program root files: [
diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/when-using-file-watching-thats-on-inode.js b/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/when-using-file-watching-thats-on-inode.js
index ceda450520a47..3e22730e36b8d 100644
--- a/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/when-using-file-watching-thats-on-inode.js
+++ b/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/when-using-file-watching-thats-on-inode.js
@@ -63,7 +63,7 @@ Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myprojec
 
 
 
-//// [/user/username/projects/myproject/main.js] Inode:: 108
+//// [/user/username/projects/myproject/main.js] Inode:: 109
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 var foo_1 = require("./foo");
@@ -129,7 +129,7 @@ exitCode:: ExitStatus.undefined
 Change:: Replace file with rename event that introduces error
 
 Input::
-//// [/user/username/projects/myproject/foo.d.ts] Inode:: 109
+//// [/user/username/projects/myproject/foo.d.ts] Inode:: 110
 export function foo2(): string;
 
 
@@ -176,7 +176,7 @@ FsWatches::
 /user/username/projects/myproject:
   {"inode":4}
 /user/username/projects/myproject/foo.d.ts:
-  {"inode":109} *new*
+  {"inode":110} *new*
 /user/username/projects/myproject/main.ts:
   {"inode":5}
 /user/username/projects/myproject/tsconfig.json:
@@ -217,7 +217,7 @@ CreatingProgramWith::
 
 
 
-//// [/user/username/projects/myproject/main.js] file written with same contents Inode:: 108
+//// [/user/username/projects/myproject/main.js] file written with same contents Inode:: 109
 
 Timeout callback:: count: 0
 5: timerToInvalidateFailedLookupResolutions *deleted*
@@ -251,7 +251,7 @@ exitCode:: ExitStatus.undefined
 Change:: Replace file with rename event that fixes error
 
 Input::
-//// [/user/username/projects/myproject/foo.d.ts] Inode:: 110
+//// [/user/username/projects/myproject/foo.d.ts] Inode:: 111
 export function foo(): string;
 
 
@@ -298,7 +298,7 @@ FsWatches::
 /user/username/projects/myproject:
   {"inode":4}
 /user/username/projects/myproject/foo.d.ts:
-  {"inode":110} *new*
+  {"inode":111} *new*
 /user/username/projects/myproject/main.ts:
   {"inode":5}
 /user/username/projects/myproject/tsconfig.json:
@@ -306,7 +306,7 @@ FsWatches::
 
 FsWatches *deleted*::
 /user/username/projects/myproject/foo.d.ts:
-  {"inode":109}
+  {"inode":110}
 
 Timeout callback:: count: 2
 9: timerToUpdateProgram *new*
@@ -329,7 +329,7 @@ CreatingProgramWith::
 
 
 
-//// [/user/username/projects/myproject/main.js] file written with same contents Inode:: 108
+//// [/user/username/projects/myproject/main.js] file written with same contents Inode:: 109
 
 Timeout callback:: count: 0
 10: timerToInvalidateFailedLookupResolutions *deleted*
diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-non-recursive-dynamic-polling-when-renaming-file-in-subfolder.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-non-recursive-dynamic-polling-when-renaming-file-in-subfolder.js
index e34c835f4b994..e8c8aa3a65b42 100644
--- a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-non-recursive-dynamic-polling-when-renaming-file-in-subfolder.js
+++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-non-recursive-dynamic-polling-when-renaming-file-in-subfolder.js
@@ -35,7 +35,7 @@ Output::
 
 
 
-//// [/a/username/projects/project/src/file1.js] Inode:: 108
+//// [/a/username/projects/project/src/file1.js] Inode:: 109
 
 
 
@@ -89,7 +89,7 @@ exitCode:: ExitStatus.undefined
 Change:: Rename file1 to file2
 
 Input::
-//// [/a/username/projects/project/src/file2.ts] Inode:: 109
+//// [/a/username/projects/project/src/file2.ts] Inode:: 110
 
 
 //// [/a/username/projects/project/src/file1.ts] deleted
@@ -155,7 +155,7 @@ Output::
 
 
 
-//// [/a/username/projects/project/src/file2.js] Inode:: 110
+//// [/a/username/projects/project/src/file2.js] Inode:: 111
 
 
 
@@ -179,7 +179,7 @@ PolledWatches *deleted*::
 
 FsWatches::
 /a/username/projects/project/src/file2.ts: *new*
-  {"inode":109}
+  {"inode":110}
 /a/username/projects/project/tsconfig.json:
   {"inode":7}
 /home/src/tslibs/TS/Lib/lib.d.ts:
diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-non-recursive-watchDirectory-when-renaming-file-in-subfolder.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-non-recursive-watchDirectory-when-renaming-file-in-subfolder.js
index 49bfcbc774013..4f3e496ce406a 100644
--- a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-non-recursive-watchDirectory-when-renaming-file-in-subfolder.js
+++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-non-recursive-watchDirectory-when-renaming-file-in-subfolder.js
@@ -35,7 +35,7 @@ Output::
 
 
 
-//// [/a/username/projects/project/src/file1.js] Inode:: 108
+//// [/a/username/projects/project/src/file1.js] Inode:: 109
 
 
 
@@ -94,7 +94,7 @@ exitCode:: ExitStatus.undefined
 Change:: Rename file1 to file2
 
 Input::
-//// [/a/username/projects/project/src/file2.ts] Inode:: 109
+//// [/a/username/projects/project/src/file2.ts] Inode:: 110
 
 
 //// [/a/username/projects/project/src/file1.ts] deleted
@@ -153,7 +153,7 @@ Output::
 
 
 
-//// [/a/username/projects/project/src/file2.js] Inode:: 110
+//// [/a/username/projects/project/src/file2.js] Inode:: 111
 
 
 
@@ -185,7 +185,7 @@ FsWatches::
 /a/username/projects/project/src:
   {"inode":5}
 /a/username/projects/project/src/file2.ts: *new*
-  {"inode":109}
+  {"inode":110}
 /a/username/projects/project/tsconfig.json:
   {"inode":7}
 /home/src/tslibs/TS/Lib/lib.d.ts:
diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-watchFile-when-renaming-file-in-subfolder.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-watchFile-when-renaming-file-in-subfolder.js
index ff5b0f8b78875..db380e7d432d9 100644
--- a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-watchFile-when-renaming-file-in-subfolder.js
+++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-watchFile-when-renaming-file-in-subfolder.js
@@ -35,7 +35,7 @@ Output::
 
 
 
-//// [/a/username/projects/project/src/file1.js] Inode:: 108
+//// [/a/username/projects/project/src/file1.js] Inode:: 109
 
 
 
@@ -94,7 +94,7 @@ exitCode:: ExitStatus.undefined
 Change:: Rename file1 to file2
 
 Input::
-//// [/a/username/projects/project/src/file2.ts] Inode:: 109
+//// [/a/username/projects/project/src/file2.ts] Inode:: 110
 
 
 //// [/a/username/projects/project/src/file1.ts] deleted
@@ -153,7 +153,7 @@ Output::
 
 
 
-//// [/a/username/projects/project/src/file2.js] Inode:: 110
+//// [/a/username/projects/project/src/file2.js] Inode:: 111
 
 
 
@@ -185,7 +185,7 @@ PolledWatches *deleted*::
 
 FsWatches::
 /a/username/projects/project/src/file2.ts: *new*
-  {"inode":109}
+  {"inode":110}
 /a/username/projects/project/tsconfig.json:
   {"inode":7}
 /home/src/tslibs/TS/Lib/lib.d.ts:
diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/when-there-are-symlinks-to-folders-in-recursive-folders-with-synchronousWatchDirectory.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/when-there-are-symlinks-to-folders-in-recursive-folders-with-synchronousWatchDirectory.js
index 17ece9813c292..396a8b6a0107d 100644
--- a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/when-there-are-symlinks-to-folders-in-recursive-folders-with-synchronousWatchDirectory.js
+++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/when-there-are-symlinks-to-folders-in-recursive-folders-with-synchronousWatchDirectory.js
@@ -116,7 +116,7 @@ DirectoryWatcher:: Added:: WatchInfo: /home/user/projects/myproject 1 {"synchron
 Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/user/projects/myproject 1 {"synchronousWatchDirectory":true} Wild card directory
 
 
-//// [/home/user/projects/myproject/src/file.js] Inode:: 118
+//// [/home/user/projects/myproject/src/file.js] Inode:: 119
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 
@@ -363,7 +363,7 @@ FileWatcher:: Close:: WatchInfo: /home/user/projects/myproject/node_modules/pack
 
 
 
-//// [/home/user/projects/myproject/src/file.js] file written with same contents Inode:: 118
+//// [/home/user/projects/myproject/src/file.js] file written with same contents Inode:: 119
 
 PolledWatches::
 /home/src/tslibs/TS/Lib/package.json:
diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/when-there-are-symlinks-to-folders-in-recursive-folders.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/when-there-are-symlinks-to-folders-in-recursive-folders.js
index 6188b3271b655..0b77ea95adba4 100644
--- a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/when-there-are-symlinks-to-folders-in-recursive-folders.js
+++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/when-there-are-symlinks-to-folders-in-recursive-folders.js
@@ -111,7 +111,7 @@ DirectoryWatcher:: Added:: WatchInfo: /home/user/projects/myproject 1 undefined
 Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/user/projects/myproject 1 undefined Wild card directory
 
 
-//// [/home/user/projects/myproject/src/file.js] Inode:: 118
+//// [/home/user/projects/myproject/src/file.js] Inode:: 119
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 
@@ -369,7 +369,7 @@ Elapsed:: *ms DirectoryWatcher:: Triggered with /home/user/projects/myproject/no
 sysLog:: Elapsed:: *ms:: onTimerToUpdateChildWatches:: 0 undefined
 
 
-//// [/home/user/projects/myproject/src/file.js] file written with same contents Inode:: 118
+//// [/home/user/projects/myproject/src/file.js] file written with same contents Inode:: 119
 
 PolledWatches::
 /home/src/tslibs/TS/Lib/package.json:
diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory-renaming-a-file.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory-renaming-a-file.js
index 6d90cabe741b9..718602b628274 100644
--- a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory-renaming-a-file.js
+++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory-renaming-a-file.js
@@ -38,14 +38,14 @@ Output::
 
 
 
-//// [/user/username/projects/myproject/dist/file2.js] Inode:: 110
+//// [/user/username/projects/myproject/dist/file2.js] Inode:: 111
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.x = void 0;
 exports.x = 10;
 
 
-//// [/user/username/projects/myproject/dist/file1.js] Inode:: 111
+//// [/user/username/projects/myproject/dist/file1.js] Inode:: 112
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 
@@ -75,7 +75,7 @@ FsWatches::
 /user/username/projects/myproject: *new*
   {"inode":4}
 /user/username/projects/myproject/dist: *new*
-  {"inode":109}
+  {"inode":110}
 /user/username/projects/myproject/src: *new*
   {"inode":5}
 /user/username/projects/myproject/src/file1.ts: *new*
@@ -122,7 +122,7 @@ exitCode:: ExitStatus.undefined
 Change:: rename the file
 
 Input::
-//// [/user/username/projects/myproject/src/renamed.ts] Inode:: 112
+//// [/user/username/projects/myproject/src/renamed.ts] Inode:: 113
 export const x = 10;
 
 //// [/user/username/projects/myproject/src/file2.ts] deleted
@@ -157,7 +157,7 @@ FsWatches::
 /user/username/projects/myproject:
   {"inode":4}
 /user/username/projects/myproject/dist:
-  {"inode":109}
+  {"inode":110}
 /user/username/projects/myproject/src:
   {"inode":5}
 /user/username/projects/myproject/src/file1.ts:
@@ -191,7 +191,7 @@ Output::
 
 
 
-//// [/user/username/projects/myproject/dist/file1.js] file written with same contents Inode:: 111
+//// [/user/username/projects/myproject/dist/file1.js] file written with same contents Inode:: 112
 
 PolledWatches::
 /home/src/tslibs/TS/Lib/package.json:
@@ -223,7 +223,7 @@ FsWatches::
 /user/username/projects/myproject:
   {"inode":4}
 /user/username/projects/myproject/dist:
-  {"inode":109}
+  {"inode":110}
 /user/username/projects/myproject/src:
   {"inode":5}
 /user/username/projects/myproject/src/file1.ts:
@@ -286,7 +286,7 @@ Output::
 
 
 
-//// [/user/username/projects/myproject/dist/renamed.js] Inode:: 113
+//// [/user/username/projects/myproject/dist/renamed.js] Inode:: 114
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.x = void 0;
@@ -322,13 +322,13 @@ FsWatches::
 /user/username/projects/myproject:
   {"inode":4}
 /user/username/projects/myproject/dist:
-  {"inode":109}
+  {"inode":110}
 /user/username/projects/myproject/src:
   {"inode":5}
 /user/username/projects/myproject/src/file1.ts:
   {"inode":6}
 /user/username/projects/myproject/src/renamed.ts: *new*
-  {"inode":112}
+  {"inode":113}
 /user/username/projects/myproject/tsconfig.json:
   {"inode":8}
 
diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory-with-outDir-and-declaration-enabled.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory-with-outDir-and-declaration-enabled.js
index 388597f648e0d..e3434dda5accc 100644
--- a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory-with-outDir-and-declaration-enabled.js
+++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory-with-outDir-and-declaration-enabled.js
@@ -39,12 +39,12 @@ Output::
 
 
 
-//// [/user/username/projects/myproject/dist/file1.js] Inode:: 112
+//// [/user/username/projects/myproject/dist/file1.js] Inode:: 113
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 
 
-//// [/user/username/projects/myproject/dist/file1.d.ts] Inode:: 113
+//// [/user/username/projects/myproject/dist/file1.d.ts] Inode:: 114
 export {};
 
 
@@ -77,7 +77,7 @@ FsWatches::
 /user/username/projects/myproject: *new*
   {"inode":4}
 /user/username/projects/myproject/dist: *new*
-  {"inode":111}
+  {"inode":112}
 /user/username/projects/myproject/node_modules: *new*
   {"inode":7}
 /user/username/projects/myproject/node_modules/file2: *new*
@@ -128,7 +128,7 @@ exitCode:: ExitStatus.undefined
 Change:: Add new file, should schedule and run timeout to update directory watcher
 
 Input::
-//// [/user/username/projects/myproject/src/file3.ts] Inode:: 114
+//// [/user/username/projects/myproject/src/file3.ts] Inode:: 115
 export const y = 10;
 
 
@@ -166,14 +166,14 @@ Output::
 
 
 
-//// [/user/username/projects/myproject/dist/file3.js] Inode:: 115
+//// [/user/username/projects/myproject/dist/file3.js] Inode:: 116
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.y = void 0;
 exports.y = 10;
 
 
-//// [/user/username/projects/myproject/dist/file3.d.ts] Inode:: 116
+//// [/user/username/projects/myproject/dist/file3.d.ts] Inode:: 117
 export declare const y = 10;
 
 
@@ -206,7 +206,7 @@ FsWatches::
 /user/username/projects/myproject:
   {"inode":4}
 /user/username/projects/myproject/dist:
-  {"inode":111}
+  {"inode":112}
 /user/username/projects/myproject/node_modules:
   {"inode":7}
 /user/username/projects/myproject/node_modules/file2:
@@ -218,7 +218,7 @@ FsWatches::
 /user/username/projects/myproject/src/file1.ts:
   {"inode":6}
 /user/username/projects/myproject/src/file3.ts: *new*
-  {"inode":114}
+  {"inode":115}
 /user/username/projects/myproject/tsconfig.json:
   {"inode":10}
 
diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory.js
index 2257345c71a5e..8f9440565a15e 100644
--- a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory.js
+++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory.js
@@ -34,7 +34,7 @@ Output::
 
 
 
-//// [/user/username/projects/myproject/src/file1.js] Inode:: 111
+//// [/user/username/projects/myproject/src/file1.js] Inode:: 112
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 
@@ -203,7 +203,7 @@ Output::
 
 
 
-//// [/user/username/projects/myproject/src/file1.js] file written with same contents Inode:: 111
+//// [/user/username/projects/myproject/src/file1.js] file written with same contents Inode:: 112
 
 PolledWatches::
 /home/src/tslibs/TS/Lib/package.json:
@@ -373,7 +373,7 @@ FsWatches::
 /user/username/projects/myproject:
   {"inode":4}
 /user/username/projects/myproject/node_modules: *new*
-  {"inode":112}
+  {"inode":113}
 /user/username/projects/myproject/src:
   {"inode":5}
 /user/username/projects/myproject/src/file1.ts:
@@ -401,7 +401,7 @@ exitCode:: ExitStatus.undefined
 Change:: npm install index file in file2
 
 Input::
-//// [/user/username/projects/myproject/node_modules/file2/index.d.ts] Inode:: 114
+//// [/user/username/projects/myproject/node_modules/file2/index.d.ts] Inode:: 115
 export const x = 10;
 
 
@@ -443,9 +443,9 @@ FsWatches::
 /user/username/projects/myproject:
   {"inode":4}
 /user/username/projects/myproject/node_modules:
-  {"inode":112}
-/user/username/projects/myproject/node_modules/file2: *new*
   {"inode":113}
+/user/username/projects/myproject/node_modules/file2: *new*
+  {"inode":114}
 /user/username/projects/myproject/src:
   {"inode":5}
 /user/username/projects/myproject/src/file1.ts:
@@ -495,7 +495,7 @@ Output::
 
 
 
-//// [/user/username/projects/myproject/src/file1.js] file written with same contents Inode:: 111
+//// [/user/username/projects/myproject/src/file1.js] file written with same contents Inode:: 112
 
 PolledWatches::
 /home/src/tslibs/TS/Lib/package.json:
@@ -529,11 +529,11 @@ FsWatches::
 /user/username/projects/myproject:
   {"inode":4}
 /user/username/projects/myproject/node_modules:
-  {"inode":112}
-/user/username/projects/myproject/node_modules/file2:
   {"inode":113}
-/user/username/projects/myproject/node_modules/file2/index.d.ts: *new*
+/user/username/projects/myproject/node_modules/file2:
   {"inode":114}
+/user/username/projects/myproject/node_modules/file2/index.d.ts: *new*
+  {"inode":115}
 /user/username/projects/myproject/src:
   {"inode":5}
 /user/username/projects/myproject/src/file1.ts:
diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-excludeDirectories-option-with-recursive-directory-watching-extendedDiagnostics.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-excludeDirectories-option-with-recursive-directory-watching-extendedDiagnostics.js
index b684070fd1f2a..d6d946bfcb6ad 100644
--- a/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-excludeDirectories-option-with-recursive-directory-watching-extendedDiagnostics.js
+++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-excludeDirectories-option-with-recursive-directory-watching-extendedDiagnostics.js
@@ -79,7 +79,7 @@ DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"excl
 Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"excludeDirectories":["/user/username/projects/myproject/**/temp"]} Wild card directory
 
 
-//// [/user/username/projects/myproject/src/main.js] Inode:: 115
+//// [/user/username/projects/myproject/src/main.js] Inode:: 116
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 var bar_1 = require("bar");
@@ -187,7 +187,7 @@ exitCode:: ExitStatus.undefined
 Change:: add new folder to temp
 
 Input::
-//// [/user/username/projects/myproject/node_modules/bar/temp/fooBar/index.d.ts] Inode:: 117
+//// [/user/username/projects/myproject/node_modules/bar/temp/fooBar/index.d.ts] Inode:: 118
 export function temp(): string;
 
 
diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-excludeDirectories-option-with-recursive-directory-watching.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-excludeDirectories-option-with-recursive-directory-watching.js
index e744c1cd52837..650c881185e5b 100644
--- a/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-excludeDirectories-option-with-recursive-directory-watching.js
+++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-excludeDirectories-option-with-recursive-directory-watching.js
@@ -52,7 +52,7 @@ Output::
 
 
 
-//// [/user/username/projects/myproject/src/main.js] Inode:: 115
+//// [/user/username/projects/myproject/src/main.js] Inode:: 116
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 var bar_1 = require("bar");
@@ -148,7 +148,7 @@ exitCode:: ExitStatus.undefined
 Change:: add new folder to temp
 
 Input::
-//// [/user/username/projects/myproject/node_modules/bar/temp/fooBar/index.d.ts] Inode:: 117
+//// [/user/username/projects/myproject/node_modules/bar/temp/fooBar/index.d.ts] Inode:: 118
 export function temp(): string;
 
 
diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-fallbackPolling-option.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-fallbackPolling-option.js
index d89c3345e369e..e496116a47dfe 100644
--- a/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-fallbackPolling-option.js
+++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-fallbackPolling-option.js
@@ -43,11 +43,11 @@ sysLog:: /home/src/tslibs/TS/Lib/lib.d.ts:: Changing to watchFile
 sysLog:: /user/username/projects/project:: Changing to watchFile
 
 
-//// [/user/username/projects/project/commonFile1.js] Inode:: 108
+//// [/user/username/projects/project/commonFile1.js] Inode:: 109
 var x = 1;
 
 
-//// [/user/username/projects/project/commonFile2.js] Inode:: 109
+//// [/user/username/projects/project/commonFile2.js] Inode:: 110
 var y = 1;
 
 
diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-watchDirectory-option.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-watchDirectory-option.js
index bce2fa23d929d..8f1c762861ede 100644
--- a/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-watchDirectory-option.js
+++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-watchDirectory-option.js
@@ -38,11 +38,11 @@ Output::
 
 
 
-//// [/user/username/projects/project/commonFile1.js] Inode:: 108
+//// [/user/username/projects/project/commonFile1.js] Inode:: 109
 var x = 1;
 
 
-//// [/user/username/projects/project/commonFile2.js] Inode:: 109
+//// [/user/username/projects/project/commonFile2.js] Inode:: 110
 var y = 1;
 
 
diff --git a/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap1.js b/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap1.js
new file mode 100644
index 0000000000000..111dbf96618d4
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap1.js
@@ -0,0 +1,498 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/package.json]
+{
+  "type": "module",
+  "imports": {
+    "#is-browser": {
+      "browser": "./dist/env/browser.js",
+      "default": "./dist/env/node.js"
+    }
+  }
+}
+
+//// [/home/src/workspaces/project/src/a.ts]
+import {} from "";
+
+//// [/home/src/workspaces/project/src/env/browser.ts]
+export const isBrowser = true;
+
+//// [/home/src/workspaces/project/src/env/node.ts]
+export const isBrowser = false;
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{
+  "compilerOptions": {
+    "module": "nodenext",
+    "rootDir": "src",
+    "outDir": "dist"
+  }
+}
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/tsconfig.json"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/src/a.ts",
+  "/home/src/workspaces/project/src/env/browser.ts",
+  "/home/src/workspaces/project/src/env/node.ts"
+ ],
+ "options": {
+  "module": 199,
+  "rootDir": "/home/src/workspaces/project/src",
+  "outDir": "/home/src/workspaces/project/dist",
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/tsconfig.json to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/a.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/env/browser.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/env/node.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/env/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts 500 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Missing file
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (3)
+	/home/src/workspaces/project/src/a.ts Text-1 "import {} from \"\";"
+	/home/src/workspaces/project/src/env/browser.ts Text-1 "export const isBrowser = true;"
+	/home/src/workspaces/project/src/env/node.ts Text-1 "export const isBrowser = false;"
+
+
+	src/a.ts
+	  Matched by default include pattern '**/*'
+	  File is ECMAScript module because 'package.json' has field "type" with value "module"
+	src/env/browser.ts
+	  Matched by default include pattern '**/*'
+	  File is ECMAScript module because 'package.json' has field "type" with value "module"
+	src/env/node.ts
+	  Matched by default include pattern '**/*'
+	  File is ECMAScript module because 'package.json' has field "type" with value "module"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/tsconfig.json",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": [
+          {
+            "text": "File '/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts' not found.\n  The file is in the program because:\n    Default library for target 'esnext'",
+            "code": 6053,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Array'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Boolean'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Function'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'IArguments'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Number'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Object'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'RegExp'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'String'.",
+            "code": 2318,
+            "category": "error"
+          }
+        ]
+      }
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: undefined
+Info seq  [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n  \"compilerOptions\": {\n    \"module\": \"nodenext\",\n    \"rootDir\": \"src\",\n    \"outDir\": \"dist\"\n  }\n}"
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	tsconfig.json
+	  Root file specified for compilation
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 250 undefined WatchType: package.json file
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (3)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/a.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/env/browser.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/env/node.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/env/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+  {}
+/home/src/workspaces/project: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    noOpenRef: true
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/a.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/env/browser.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/env/node.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/workspaces/project/src/a.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/src/a.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (3)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/src/a.ts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 1,
+      "success": true
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json:
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/env/browser.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/env/node.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/env/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json:
+  {"pollingInterval":2000}
+
+watchedFiles *deleted*::
+/home/src/workspaces/project/src/a.ts:
+  {"pollingInterval":500}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules:
+  {}
+/home/src/workspaces/node_modules/@types:
+  {}
+  {}
+/home/src/workspaces/project:
+  {}
+/home/src/workspaces/project/node_modules:
+  {}
+/home/src/workspaces/project/node_modules/@types:
+  {}
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred)
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    noOpenRef: false *changed*
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/a.ts (Open) *changed*
+    open: true *changed*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/env/browser.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/env/node.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "preferences": {}
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 2,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 3,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 17
+      },
+      "command": "completionInfo"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "completionInfo",
+      "request_seq": 3,
+      "success": true,
+      "body": {
+        "isGlobalCompletion": false,
+        "isMemberCompletion": false,
+        "isNewIdentifierLocation": true,
+        "entries": [
+          {
+            "name": "#is-browser",
+            "kind": "script",
+            "kindModifiers": "",
+            "sortText": "11"
+          }
+        ],
+        "defaultCommitCharacters": []
+      }
+    }
\ No newline at end of file
diff --git a/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap2.js b/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap2.js
new file mode 100644
index 0000000000000..15e8d0ddd98c2
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap2.js
@@ -0,0 +1,539 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/package.json]
+{
+  "type": "module",
+  "imports": {
+    "#internal/*": "./dist/internal/*"
+  }
+}
+
+//// [/home/src/workspaces/project/src/a.ts]
+import {} from "";
+import {} from "#internal/";
+
+//// [/home/src/workspaces/project/src/internal/foo.ts]
+export function something(name: string) {}
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{
+  "compilerOptions": {
+    "module": "nodenext",
+    "rootDir": "src",
+    "outDir": "dist"
+  }
+}
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/tsconfig.json"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/src/a.ts",
+  "/home/src/workspaces/project/src/internal/foo.ts"
+ ],
+ "options": {
+  "module": 199,
+  "rootDir": "/home/src/workspaces/project/src",
+  "outDir": "/home/src/workspaces/project/dist",
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/tsconfig.json to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/a.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/internal/foo.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/internal/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts 500 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Missing file
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (2)
+	/home/src/workspaces/project/src/a.ts Text-1 "import {} from \"\";\nimport {} from \"#internal/\";"
+	/home/src/workspaces/project/src/internal/foo.ts Text-1 "export function something(name: string) {}"
+
+
+	src/a.ts
+	  Matched by default include pattern '**/*'
+	  File is ECMAScript module because 'package.json' has field "type" with value "module"
+	src/internal/foo.ts
+	  Matched by default include pattern '**/*'
+	  File is ECMAScript module because 'package.json' has field "type" with value "module"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/tsconfig.json",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": [
+          {
+            "text": "File '/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts' not found.\n  The file is in the program because:\n    Default library for target 'esnext'",
+            "code": 6053,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Array'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Boolean'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Function'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'IArguments'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Number'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Object'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'RegExp'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'String'.",
+            "code": 2318,
+            "category": "error"
+          }
+        ]
+      }
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: undefined
+Info seq  [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n  \"compilerOptions\": {\n    \"module\": \"nodenext\",\n    \"rootDir\": \"src\",\n    \"outDir\": \"dist\"\n  }\n}"
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	tsconfig.json
+	  Root file specified for compilation
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 250 undefined WatchType: package.json file
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (2)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/a.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/internal/foo.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/internal/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+  {}
+/home/src/workspaces/project: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+  {}
+/home/src/workspaces/project/src: *new*
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    noOpenRef: true
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/a.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/internal/foo.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/workspaces/project/src/a.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/src/a.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (2)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/src/a.ts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 1,
+      "success": true
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json:
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/internal/foo.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/internal/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json:
+  {"pollingInterval":2000}
+
+watchedFiles *deleted*::
+/home/src/workspaces/project/src/a.ts:
+  {"pollingInterval":500}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules:
+  {}
+  {}
+/home/src/workspaces/node_modules/@types:
+  {}
+  {}
+/home/src/workspaces/project:
+  {}
+/home/src/workspaces/project/node_modules:
+  {}
+  {}
+/home/src/workspaces/project/node_modules/@types:
+  {}
+  {}
+/home/src/workspaces/project/src:
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred)
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    noOpenRef: false *changed*
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/a.ts (Open) *changed*
+    open: true *changed*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/internal/foo.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "preferences": {}
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 2,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 3,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 17
+      },
+      "command": "completionInfo"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "completionInfo",
+      "request_seq": 3,
+      "success": true,
+      "body": {
+        "isGlobalCompletion": false,
+        "isMemberCompletion": false,
+        "isNewIdentifierLocation": true,
+        "entries": [
+          {
+            "name": "#internal",
+            "kind": "directory",
+            "kindModifiers": "",
+            "sortText": "11"
+          }
+        ],
+        "defaultCommitCharacters": []
+      }
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 4,
+      "type": "request",
+      "arguments": {
+        "preferences": {}
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 4,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 5,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 2,
+        "offset": 27
+      },
+      "command": "completionInfo"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "completionInfo",
+      "request_seq": 5,
+      "success": true,
+      "body": {
+        "isGlobalCompletion": false,
+        "isMemberCompletion": false,
+        "isNewIdentifierLocation": true,
+        "entries": [
+          {
+            "name": "foo.js",
+            "kind": "script",
+            "kindModifiers": ".js",
+            "sortText": "11"
+          }
+        ],
+        "defaultCommitCharacters": []
+      }
+    }
\ No newline at end of file
diff --git a/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap3.js b/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap3.js
new file mode 100644
index 0000000000000..05af7ad26608b
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap3.js
@@ -0,0 +1,539 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/package.json]
+{
+  "type": "module",
+  "imports": {
+    "#internal/": "./dist/internal/"
+  }
+}
+
+//// [/home/src/workspaces/project/src/a.ts]
+import {} from "";
+import {} from "#internal/";
+
+//// [/home/src/workspaces/project/src/internal/foo.ts]
+export function something(name: string) {}
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{
+  "compilerOptions": {
+    "module": "nodenext",
+    "rootDir": "src",
+    "outDir": "dist"
+  }
+}
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/tsconfig.json"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/src/a.ts",
+  "/home/src/workspaces/project/src/internal/foo.ts"
+ ],
+ "options": {
+  "module": 199,
+  "rootDir": "/home/src/workspaces/project/src",
+  "outDir": "/home/src/workspaces/project/dist",
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/tsconfig.json to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/a.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/internal/foo.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/internal/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts 500 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Missing file
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (2)
+	/home/src/workspaces/project/src/a.ts Text-1 "import {} from \"\";\nimport {} from \"#internal/\";"
+	/home/src/workspaces/project/src/internal/foo.ts Text-1 "export function something(name: string) {}"
+
+
+	src/a.ts
+	  Matched by default include pattern '**/*'
+	  File is ECMAScript module because 'package.json' has field "type" with value "module"
+	src/internal/foo.ts
+	  Matched by default include pattern '**/*'
+	  File is ECMAScript module because 'package.json' has field "type" with value "module"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/tsconfig.json",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": [
+          {
+            "text": "File '/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts' not found.\n  The file is in the program because:\n    Default library for target 'esnext'",
+            "code": 6053,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Array'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Boolean'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Function'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'IArguments'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Number'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Object'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'RegExp'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'String'.",
+            "code": 2318,
+            "category": "error"
+          }
+        ]
+      }
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: undefined
+Info seq  [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n  \"compilerOptions\": {\n    \"module\": \"nodenext\",\n    \"rootDir\": \"src\",\n    \"outDir\": \"dist\"\n  }\n}"
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	tsconfig.json
+	  Root file specified for compilation
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 250 undefined WatchType: package.json file
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (2)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/a.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/internal/foo.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/internal/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+  {}
+/home/src/workspaces/project: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+  {}
+/home/src/workspaces/project/src: *new*
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    noOpenRef: true
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/a.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/internal/foo.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/workspaces/project/src/a.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/src/a.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (2)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/src/a.ts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 1,
+      "success": true
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json:
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/internal/foo.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/internal/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json:
+  {"pollingInterval":2000}
+
+watchedFiles *deleted*::
+/home/src/workspaces/project/src/a.ts:
+  {"pollingInterval":500}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules:
+  {}
+  {}
+/home/src/workspaces/node_modules/@types:
+  {}
+  {}
+/home/src/workspaces/project:
+  {}
+/home/src/workspaces/project/node_modules:
+  {}
+  {}
+/home/src/workspaces/project/node_modules/@types:
+  {}
+  {}
+/home/src/workspaces/project/src:
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred)
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    noOpenRef: false *changed*
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/a.ts (Open) *changed*
+    open: true *changed*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/internal/foo.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "preferences": {}
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 2,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 3,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 17
+      },
+      "command": "completionInfo"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "completionInfo",
+      "request_seq": 3,
+      "success": true,
+      "body": {
+        "isGlobalCompletion": false,
+        "isMemberCompletion": false,
+        "isNewIdentifierLocation": true,
+        "entries": [
+          {
+            "name": "#internal",
+            "kind": "directory",
+            "kindModifiers": "",
+            "sortText": "11"
+          }
+        ],
+        "defaultCommitCharacters": []
+      }
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 4,
+      "type": "request",
+      "arguments": {
+        "preferences": {}
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 4,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 5,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 2,
+        "offset": 27
+      },
+      "command": "completionInfo"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "completionInfo",
+      "request_seq": 5,
+      "success": true,
+      "body": {
+        "isGlobalCompletion": false,
+        "isMemberCompletion": false,
+        "isNewIdentifierLocation": true,
+        "entries": [
+          {
+            "name": "foo.js",
+            "kind": "script",
+            "kindModifiers": ".js",
+            "sortText": "11"
+          }
+        ],
+        "defaultCommitCharacters": []
+      }
+    }
\ No newline at end of file
diff --git a/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap4.js b/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap4.js
new file mode 100644
index 0000000000000..8169f5045a7a7
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap4.js
@@ -0,0 +1,477 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/package.json]
+{
+  "type": "module",
+  "imports": {
+    "#is-browser": {
+      "types": "./dist/env/browser.d.ts",
+      "default": "./dist/env/browser.js"
+    }
+  }
+}
+
+//// [/home/src/workspaces/project/src/a.ts]
+import {} from "";
+
+//// [/home/src/workspaces/project/src/env/browser.ts]
+export const isBrowser = true;
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{
+  "compilerOptions": {
+    "module": "nodenext",
+    "rootDir": "src",
+    "outDir": "dist"
+  }
+}
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/tsconfig.json"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/src/a.ts",
+  "/home/src/workspaces/project/src/env/browser.ts"
+ ],
+ "options": {
+  "module": 199,
+  "rootDir": "/home/src/workspaces/project/src",
+  "outDir": "/home/src/workspaces/project/dist",
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/tsconfig.json to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/a.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/env/browser.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/env/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts 500 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Missing file
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (2)
+	/home/src/workspaces/project/src/a.ts Text-1 "import {} from \"\";"
+	/home/src/workspaces/project/src/env/browser.ts Text-1 "export const isBrowser = true;"
+
+
+	src/a.ts
+	  Matched by default include pattern '**/*'
+	  File is ECMAScript module because 'package.json' has field "type" with value "module"
+	src/env/browser.ts
+	  Matched by default include pattern '**/*'
+	  File is ECMAScript module because 'package.json' has field "type" with value "module"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/tsconfig.json",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": [
+          {
+            "text": "File '/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts' not found.\n  The file is in the program because:\n    Default library for target 'esnext'",
+            "code": 6053,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Array'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Boolean'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Function'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'IArguments'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Number'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Object'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'RegExp'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'String'.",
+            "code": 2318,
+            "category": "error"
+          }
+        ]
+      }
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: undefined
+Info seq  [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n  \"compilerOptions\": {\n    \"module\": \"nodenext\",\n    \"rootDir\": \"src\",\n    \"outDir\": \"dist\"\n  }\n}"
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	tsconfig.json
+	  Root file specified for compilation
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 250 undefined WatchType: package.json file
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (2)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/a.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/env/browser.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/env/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+  {}
+/home/src/workspaces/project: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    noOpenRef: true
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/a.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/env/browser.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/workspaces/project/src/a.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/src/a.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (2)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/src/a.ts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 1,
+      "success": true
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json:
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/env/browser.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/env/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json:
+  {"pollingInterval":2000}
+
+watchedFiles *deleted*::
+/home/src/workspaces/project/src/a.ts:
+  {"pollingInterval":500}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules:
+  {}
+/home/src/workspaces/node_modules/@types:
+  {}
+  {}
+/home/src/workspaces/project:
+  {}
+/home/src/workspaces/project/node_modules:
+  {}
+/home/src/workspaces/project/node_modules/@types:
+  {}
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred)
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    noOpenRef: false *changed*
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/a.ts (Open) *changed*
+    open: true *changed*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/env/browser.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "preferences": {}
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 2,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 3,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 17
+      },
+      "command": "completionInfo"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "completionInfo",
+      "request_seq": 3,
+      "success": true,
+      "body": {
+        "isGlobalCompletion": false,
+        "isMemberCompletion": false,
+        "isNewIdentifierLocation": true,
+        "entries": [
+          {
+            "name": "#is-browser",
+            "kind": "script",
+            "kindModifiers": "",
+            "sortText": "11"
+          }
+        ],
+        "defaultCommitCharacters": []
+      }
+    }
\ No newline at end of file
diff --git a/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap5.js b/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap5.js
new file mode 100644
index 0000000000000..5c7c64b22170c
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap5.js
@@ -0,0 +1,493 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/package.json]
+{
+  "type": "module",
+  "imports": {
+    "#is-browser": {
+      "types": "./types/env/browser.d.ts",
+      "default": "./not-dist-on-purpose/env/browser.js"
+    }
+  }
+}
+
+//// [/home/src/workspaces/project/src/a.ts]
+import {} from "";
+
+//// [/home/src/workspaces/project/src/env/browser.ts]
+export const isBrowser = true;
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{
+  "compilerOptions": {
+    "module": "nodenext",
+    "rootDir": "src",
+    "outDir": "dist",
+    "declarationDir": "types",
+  }
+}
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/tsconfig.json"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/src/a.ts",
+  "/home/src/workspaces/project/src/env/browser.ts"
+ ],
+ "options": {
+  "module": 199,
+  "rootDir": "/home/src/workspaces/project/src",
+  "outDir": "/home/src/workspaces/project/dist",
+  "declarationDir": "/home/src/workspaces/project/types",
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/tsconfig.json to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/a.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/env/browser.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/env/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts 500 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Missing file
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (2)
+	/home/src/workspaces/project/src/a.ts Text-1 "import {} from \"\";"
+	/home/src/workspaces/project/src/env/browser.ts Text-1 "export const isBrowser = true;"
+
+
+	src/a.ts
+	  Matched by default include pattern '**/*'
+	  File is ECMAScript module because 'package.json' has field "type" with value "module"
+	src/env/browser.ts
+	  Matched by default include pattern '**/*'
+	  File is ECMAScript module because 'package.json' has field "type" with value "module"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/tsconfig.json",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": [
+          {
+            "text": "File '/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts' not found.\n  The file is in the program because:\n    Default library for target 'esnext'",
+            "code": 6053,
+            "category": "error"
+          },
+          {
+            "start": {
+              "line": 6,
+              "offset": 5
+            },
+            "end": {
+              "line": 6,
+              "offset": 21
+            },
+            "text": "Option 'declarationDir' cannot be specified without specifying option 'declaration' or option 'composite'.",
+            "code": 5069,
+            "category": "error",
+            "fileName": "/home/src/workspaces/project/tsconfig.json"
+          },
+          {
+            "text": "Cannot find global type 'Array'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Boolean'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Function'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'IArguments'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Number'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Object'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'RegExp'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'String'.",
+            "code": 2318,
+            "category": "error"
+          }
+        ]
+      }
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: undefined
+Info seq  [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n  \"compilerOptions\": {\n    \"module\": \"nodenext\",\n    \"rootDir\": \"src\",\n    \"outDir\": \"dist\",\n    \"declarationDir\": \"types\",\n  }\n}"
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	tsconfig.json
+	  Root file specified for compilation
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 250 undefined WatchType: package.json file
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (2)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/a.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/env/browser.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/env/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+  {}
+/home/src/workspaces/project: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    noOpenRef: true
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/a.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/env/browser.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/workspaces/project/src/a.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/src/a.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (2)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/src/a.ts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 1,
+      "success": true
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json:
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/env/browser.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/env/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json:
+  {"pollingInterval":2000}
+
+watchedFiles *deleted*::
+/home/src/workspaces/project/src/a.ts:
+  {"pollingInterval":500}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules:
+  {}
+/home/src/workspaces/node_modules/@types:
+  {}
+  {}
+/home/src/workspaces/project:
+  {}
+/home/src/workspaces/project/node_modules:
+  {}
+/home/src/workspaces/project/node_modules/@types:
+  {}
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred)
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    noOpenRef: false *changed*
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/a.ts (Open) *changed*
+    open: true *changed*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/env/browser.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "preferences": {}
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 2,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 3,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 17
+      },
+      "command": "completionInfo"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "completionInfo",
+      "request_seq": 3,
+      "success": true,
+      "body": {
+        "isGlobalCompletion": false,
+        "isMemberCompletion": false,
+        "isNewIdentifierLocation": true,
+        "entries": [
+          {
+            "name": "#is-browser",
+            "kind": "script",
+            "kindModifiers": "",
+            "sortText": "11"
+          }
+        ],
+        "defaultCommitCharacters": []
+      }
+    }
\ No newline at end of file
diff --git a/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_blankTargetFile.js b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_blankTargetFile.js
index d4322e60fcace..e5155cc5c598f 100644
--- a/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_blankTargetFile.js
+++ b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_blankTargetFile.js
@@ -22,11 +22,11 @@ console.log(abc);
 
 console.log("abc");
 
-//// [/home/src/workspaces/project/c.ts]
+//// [/home/src/workspaces/project/folder/c.ts]
 
 
 //// [/home/src/workspaces/project/tsconfig.json]
-{ "files": ["c.ts", "a.ts", "b.ts"] }
+{ "files": ["folder/c.ts", "a.ts", "b.ts"] }
 
 
 Info seq  [hh:mm:ss:mss] request:
@@ -34,16 +34,16 @@ Info seq  [hh:mm:ss:mss] request:
       "seq": 0,
       "type": "request",
       "arguments": {
-        "file": "/home/src/workspaces/project/c.ts"
+        "file": "/home/src/workspaces/project/folder/c.ts"
       },
       "command": "open"
     }
-Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/c.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/folder/c.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
 Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
 Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
 Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
  "rootNames": [
-  "/home/src/workspaces/project/c.ts",
+  "/home/src/workspaces/project/folder/c.ts",
   "/home/src/workspaces/project/a.ts",
   "/home/src/workspaces/project/b.ts"
  ],
@@ -58,7 +58,7 @@ Info seq  [hh:mm:ss:mss] event:
       "event": "projectLoadingStart",
       "body": {
         "projectName": "/home/src/workspaces/project/tsconfig.json",
-        "reason": "Creating possible configured project for /home/src/workspaces/project/c.ts to open"
+        "reason": "Creating possible configured project for /home/src/workspaces/project/folder/c.ts to open"
       }
     }
 Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/a.ts 500 undefined WatchType: Closed Script info
@@ -74,6 +74,7 @@ Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Li
 Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
 Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
 Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/folder/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
 Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
 Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
 Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
@@ -86,7 +87,7 @@ Info seq  [hh:mm:ss:mss] 	Files (6)
 	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
 	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
 	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
-	/home/src/workspaces/project/c.ts SVC-1-0 ""
+	/home/src/workspaces/project/folder/c.ts SVC-1-0 ""
 	/home/src/workspaces/project/a.ts Text-1 "export const abc = 10;"
 	/home/src/workspaces/project/b.ts Text-1 "import { abc } from \"./a\";\n\nconsole.log(abc);\n\n\nconsole.log(\"abc\");"
 
@@ -97,7 +98,7 @@ Info seq  [hh:mm:ss:mss] 	Files (6)
 	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
 	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
 	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
-	c.ts
+	folder/c.ts
 	  Part of 'files' list in tsconfig.json
 	a.ts
 	  Part of 'files' list in tsconfig.json
@@ -121,7 +122,7 @@ Info seq  [hh:mm:ss:mss] event:
       "type": "event",
       "event": "configFileDiag",
       "body": {
-        "triggerFile": "/home/src/workspaces/project/c.ts",
+        "triggerFile": "/home/src/workspaces/project/folder/c.ts",
         "configFile": "/home/src/workspaces/project/tsconfig.json",
         "diagnostics": []
       }
@@ -131,7 +132,7 @@ Info seq  [hh:mm:ss:mss] 	Files (6)
 
 Info seq  [hh:mm:ss:mss] -----------------------------------------------
 Info seq  [hh:mm:ss:mss] Open files: 
-Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/c.ts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/folder/c.ts ProjectRootPath: undefined
 Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
 Info seq  [hh:mm:ss:mss] response:
     {
@@ -164,6 +165,8 @@ watchedFiles::
   {"pollingInterval":500}
 /home/src/workspaces/project/b.ts: *new*
   {"pollingInterval":500}
+/home/src/workspaces/project/folder/package.json: *new*
+  {"pollingInterval":2000}
 /home/src/workspaces/project/package.json: *new*
   {"pollingInterval":2000}
 /home/src/workspaces/project/tsconfig.json: *new*
@@ -206,7 +209,7 @@ ScriptInfos::
     version: Text-1
     containingProjects: 1
         /home/src/workspaces/project/tsconfig.json
-/home/src/workspaces/project/c.ts (Open) *new*
+/home/src/workspaces/project/folder/c.ts (Open) *new*
     version: SVC-1-0
     containingProjects: 1
         /home/src/workspaces/project/tsconfig.json *default*
@@ -257,7 +260,7 @@ Info seq  [hh:mm:ss:mss] request:
       "seq": 2,
       "type": "request",
       "arguments": {
-        "file": "/home/src/workspaces/project/c.ts",
+        "file": "/home/src/workspaces/project/folder/c.ts",
         "pastedText": [
           "console.log(abc);"
         ],
@@ -298,7 +301,7 @@ Info seq  [hh:mm:ss:mss] 	Files (6)
 	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
 	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
 	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
-	/home/src/workspaces/project/c.ts SVC-1-1 "console.log(abc);"
+	/home/src/workspaces/project/folder/c.ts SVC-1-1 "console.log(abc);"
 	/home/src/workspaces/project/a.ts Text-1 "export const abc = 10;"
 	/home/src/workspaces/project/b.ts Text-1 "import { abc } from \"./a\";\n\nconsole.log(abc);\n\n\nconsole.log(\"abc\");"
 
@@ -318,7 +321,7 @@ Info seq  [hh:mm:ss:mss] response:
       "body": {
         "edits": [
           {
-            "fileName": "/home/src/workspaces/project/c.ts",
+            "fileName": "/home/src/workspaces/project/folder/c.ts",
             "textChanges": [
               {
                 "start": {
@@ -329,7 +332,7 @@ Info seq  [hh:mm:ss:mss] response:
                   "line": 1,
                   "offset": 1
                 },
-                "newText": "import { abc } from \"./a\";\n\n"
+                "newText": "import { abc } from \"../a\";\n\n"
               },
               {
                 "start": {
@@ -377,7 +380,7 @@ ScriptInfos::
     version: Text-1
     containingProjects: 1
         /home/src/workspaces/project/tsconfig.json
-/home/src/workspaces/project/c.ts (Open) *changed*
+/home/src/workspaces/project/folder/c.ts (Open) *changed*
     version: SVC-1-2 *changed*
     containingProjects: 1
         /home/src/workspaces/project/tsconfig.json *default*
diff --git a/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_defaultExport1.js b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_defaultExport1.js
new file mode 100644
index 0000000000000..ee761dbcbea2e
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_defaultExport1.js
@@ -0,0 +1,384 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/a.ts]
+export default function foo(name: string): void {
+    console.log(name);
+}
+
+//// [/home/src/workspaces/project/b.ts]
+import foo from "./a";
+const b = foo("bar");
+
+//// [/home/src/workspaces/project/folder/c.ts]
+
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{ "files": ["folder/c.ts", "a.ts", "b.ts"] }
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/c.ts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/folder/c.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/folder/c.ts",
+  "/home/src/workspaces/project/a.ts",
+  "/home/src/workspaces/project/b.ts"
+ ],
+ "options": {
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/folder/c.ts to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/a.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/b.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/folder/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (6)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/folder/c.ts SVC-1-0 ""
+	/home/src/workspaces/project/a.ts Text-1 "export default function foo(name: string): void {\n    console.log(name);\n}"
+	/home/src/workspaces/project/b.ts Text-1 "import foo from \"./a\";\nconst b = foo(\"bar\");"
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	folder/c.ts
+	  Part of 'files' list in tsconfig.json
+	a.ts
+	  Part of 'files' list in tsconfig.json
+	  Imported via "./a" from file 'b.ts'
+	b.ts
+	  Part of 'files' list in tsconfig.json
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/folder/c.ts",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": []
+      }
+    }
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (6)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/folder/c.ts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/a.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/b.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/folder/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/a.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/b.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/folder/c.ts (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "formatOptions": {
+          "indentSize": 4,
+          "tabSize": 4,
+          "newLineCharacter": "\n",
+          "convertTabsToSpaces": true,
+          "indentStyle": 2,
+          "insertSpaceAfterConstructor": false,
+          "insertSpaceAfterCommaDelimiter": true,
+          "insertSpaceAfterSemicolonInForStatements": true,
+          "insertSpaceBeforeAndAfterBinaryOperators": true,
+          "insertSpaceAfterKeywordsInControlFlowStatements": true,
+          "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
+          "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
+          "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
+          "insertSpaceBeforeFunctionParenthesis": false,
+          "placeOpenBraceOnNewLineForFunctions": false,
+          "placeOpenBraceOnNewLineForControlBlocks": false,
+          "semicolons": "ignore",
+          "trimTrailingWhitespace": true,
+          "indentSwitchCase": true
+        }
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] Format host information updated
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 1,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/c.ts",
+        "pastedText": [
+          "const b = foo(\"bar\");"
+        ],
+        "pasteLocations": [
+          {
+            "start": {
+              "line": 1,
+              "offset": 1
+            },
+            "end": {
+              "line": 1,
+              "offset": 1
+            }
+          }
+        ],
+        "copiedFrom": {
+          "file": "/home/src/workspaces/project/b.ts",
+          "spans": [
+            {
+              "start": {
+                "line": 2,
+                "offset": 1
+              },
+              "end": {
+                "line": 2,
+                "offset": 22
+              }
+            }
+          ]
+        }
+      },
+      "command": "getPasteEdits"
+    }
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (6)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/folder/c.ts SVC-1-1 "const b = foo(\"bar\");"
+	/home/src/workspaces/project/a.ts Text-1 "export default function foo(name: string): void {\n    console.log(name);\n}"
+	/home/src/workspaces/project/b.ts Text-1 "import foo from \"./a\";\nconst b = foo(\"bar\");"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results
+Info seq  [hh:mm:ss:mss] getExportInfoMap: done in * ms
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "getPasteEdits",
+      "request_seq": 2,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      },
+      "body": {
+        "edits": [
+          {
+            "fileName": "/home/src/workspaces/project/folder/c.ts",
+            "textChanges": [
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "import foo from \"../a\";\n\n"
+              },
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "const b = foo(\"bar\");"
+              }
+            ]
+          }
+        ],
+        "fixId": "providePostPasteEdits"
+      }
+    }
+After Request
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 3 *changed*
+    projectProgramVersion: 1
+    dirty: true *changed*
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/a.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/b.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/folder/c.ts (Open) *changed*
+    version: SVC-1-2 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
diff --git a/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_defaultExport2.js b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_defaultExport2.js
new file mode 100644
index 0000000000000..b6183a0964426
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_defaultExport2.js
@@ -0,0 +1,362 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/a.ts]
+const b = foo("bar");
+ export default function foo(name: string): void {
+     console.log(name);
+ }
+
+//// [/home/src/workspaces/project/folder/c.ts]
+
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{ "files": ["folder/c.ts", "a.ts"] }
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/c.ts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/folder/c.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/folder/c.ts",
+  "/home/src/workspaces/project/a.ts"
+ ],
+ "options": {
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/folder/c.ts to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/a.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/folder/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/folder/c.ts SVC-1-0 ""
+	/home/src/workspaces/project/a.ts Text-1 "const b = foo(\"bar\");\n export default function foo(name: string): void {\n     console.log(name);\n }"
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	folder/c.ts
+	  Part of 'files' list in tsconfig.json
+	a.ts
+	  Part of 'files' list in tsconfig.json
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/folder/c.ts",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": []
+      }
+    }
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/folder/c.ts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/a.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/folder/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/a.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/folder/c.ts (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "formatOptions": {
+          "indentSize": 4,
+          "tabSize": 4,
+          "newLineCharacter": "\n",
+          "convertTabsToSpaces": true,
+          "indentStyle": 2,
+          "insertSpaceAfterConstructor": false,
+          "insertSpaceAfterCommaDelimiter": true,
+          "insertSpaceAfterSemicolonInForStatements": true,
+          "insertSpaceBeforeAndAfterBinaryOperators": true,
+          "insertSpaceAfterKeywordsInControlFlowStatements": true,
+          "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
+          "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
+          "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
+          "insertSpaceBeforeFunctionParenthesis": false,
+          "placeOpenBraceOnNewLineForFunctions": false,
+          "placeOpenBraceOnNewLineForControlBlocks": false,
+          "semicolons": "ignore",
+          "trimTrailingWhitespace": true,
+          "indentSwitchCase": true
+        }
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] Format host information updated
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 1,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/c.ts",
+        "pastedText": [
+          "const b = foo(\"bar\");"
+        ],
+        "pasteLocations": [
+          {
+            "start": {
+              "line": 1,
+              "offset": 1
+            },
+            "end": {
+              "line": 1,
+              "offset": 1
+            }
+          }
+        ],
+        "copiedFrom": {
+          "file": "/home/src/workspaces/project/a.ts",
+          "spans": [
+            {
+              "start": {
+                "line": 1,
+                "offset": 1
+              },
+              "end": {
+                "line": 1,
+                "offset": 22
+              }
+            }
+          ]
+        }
+      },
+      "command": "getPasteEdits"
+    }
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/folder/c.ts SVC-1-1 "const b = foo(\"bar\");"
+	/home/src/workspaces/project/a.ts Text-1 "const b = foo(\"bar\");\n export default function foo(name: string): void {\n     console.log(name);\n }"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "getPasteEdits",
+      "request_seq": 2,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      },
+      "body": {
+        "edits": [
+          {
+            "fileName": "/home/src/workspaces/project/folder/c.ts",
+            "textChanges": [
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "import foo from \"../a\";\n\n"
+              },
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "const b = foo(\"bar\");"
+              }
+            ]
+          }
+        ],
+        "fixId": "providePostPasteEdits"
+      }
+    }
+After Request
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 3 *changed*
+    projectProgramVersion: 1
+    dirty: true *changed*
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/a.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/folder/c.ts (Open) *changed*
+    version: SVC-1-2 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
diff --git a/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_defaultImport.js b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_defaultImport.js
new file mode 100644
index 0000000000000..a3d38c09021da
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_defaultImport.js
@@ -0,0 +1,387 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/folder/a.ts]
+const abc = 10;
+const def = 20;
+export interface testInterface {
+    abc: number;
+    def: number;
+}
+
+//// [/home/src/workspaces/project/folder/b.mts]
+import test from "./a.js";
+
+function foo(abc: test.testInterface, def: test.testInterface) {
+   console.log(abc);
+   console.log(def);
+}
+
+
+//// [/home/src/workspaces/project/folder/folder/c.ts]
+
+
+//// [/home/src/workspaces/project/folder/tsconfig.json]
+{ "compilerOptions": { "module": "nodenext" }, "files": ["folder/c.ts", "a.ts", "b.mts"] }
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/folder/c.ts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/folder/folder/c.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/folder/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/folder/tsconfig.json, currentDirectory: /home/src/workspaces/project/folder
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/folder/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/folder/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/folder/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/folder/folder/c.ts",
+  "/home/src/workspaces/project/folder/a.ts",
+  "/home/src/workspaces/project/folder/b.mts"
+ ],
+ "options": {
+  "module": 199,
+  "configFilePath": "/home/src/workspaces/project/folder/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/folder/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/folder/folder/c.ts to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/folder/a.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/folder/b.mts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/folder/tsconfig.json
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/folder/folder/package.json 2000 undefined Project: /home/src/workspaces/project/folder/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/folder/package.json 2000 undefined Project: /home/src/workspaces/project/folder/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/folder/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/package.json 2000 undefined Project: /home/src/workspaces/project/folder/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts 500 undefined Project: /home/src/workspaces/project/folder/tsconfig.json WatchType: Missing file
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/folder/node_modules/@types 1 undefined Project: /home/src/workspaces/project/folder/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/folder/node_modules/@types 1 undefined Project: /home/src/workspaces/project/folder/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/folder/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/folder/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/folder/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/folder/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/folder/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/folder/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (3)
+	/home/src/workspaces/project/folder/folder/c.ts SVC-1-0 ""
+	/home/src/workspaces/project/folder/a.ts Text-1 "const abc = 10;\nconst def = 20;\nexport interface testInterface {\n    abc: number;\n    def: number;\n}"
+	/home/src/workspaces/project/folder/b.mts Text-1 "import test from \"./a.js\";\n\nfunction foo(abc: test.testInterface, def: test.testInterface) {\n   console.log(abc);\n   console.log(def);\n}\n"
+
+
+	folder/c.ts
+	  Part of 'files' list in tsconfig.json
+	  File is CommonJS module because 'package.json' was not found
+	a.ts
+	  Part of 'files' list in tsconfig.json
+	  Imported via "./a.js" from file 'b.mts'
+	  File is CommonJS module because 'package.json' was not found
+	b.mts
+	  Part of 'files' list in tsconfig.json
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/folder/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/folder/folder/c.ts",
+        "configFile": "/home/src/workspaces/project/folder/tsconfig.json",
+        "diagnostics": [
+          {
+            "text": "File '/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts' not found.\n  The file is in the program because:\n    Default library for target 'esnext'",
+            "code": 6053,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Array'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Boolean'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Function'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'IArguments'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Number'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Object'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'RegExp'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'String'.",
+            "code": 2318,
+            "category": "error"
+          }
+        ]
+      }
+    }
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/folder/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (3)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/folder/folder/c.ts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/folder/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/folder/a.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/folder/b.mts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/folder/folder/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/folder/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/folder/tsconfig.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+/home/src/workspaces/project/folder/node_modules/@types: *new*
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+
+Projects::
+/home/src/workspaces/project/folder/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/workspaces/project/folder/a.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/folder/tsconfig.json
+/home/src/workspaces/project/folder/b.mts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/folder/tsconfig.json
+/home/src/workspaces/project/folder/folder/c.ts (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /home/src/workspaces/project/folder/tsconfig.json *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "formatOptions": {
+          "indentSize": 4,
+          "tabSize": 4,
+          "newLineCharacter": "\n",
+          "convertTabsToSpaces": true,
+          "indentStyle": 2,
+          "insertSpaceAfterConstructor": false,
+          "insertSpaceAfterCommaDelimiter": true,
+          "insertSpaceAfterSemicolonInForStatements": true,
+          "insertSpaceBeforeAndAfterBinaryOperators": true,
+          "insertSpaceAfterKeywordsInControlFlowStatements": true,
+          "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
+          "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
+          "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
+          "insertSpaceBeforeFunctionParenthesis": false,
+          "placeOpenBraceOnNewLineForFunctions": false,
+          "placeOpenBraceOnNewLineForControlBlocks": false,
+          "semicolons": "ignore",
+          "trimTrailingWhitespace": true,
+          "indentSwitchCase": true
+        }
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] Format host information updated
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 1,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/folder/c.ts",
+        "pastedText": [
+          "function foo(abc: test.abc, def: test.def) {\nconsole.log(abc);\nconsole.log(def);\n}"
+        ],
+        "pasteLocations": [
+          {
+            "start": {
+              "line": 1,
+              "offset": 1
+            },
+            "end": {
+              "line": 1,
+              "offset": 1
+            }
+          }
+        ],
+        "copiedFrom": {
+          "file": "/home/src/workspaces/project/folder/b.mts",
+          "spans": [
+            {
+              "start": {
+                "line": 3,
+                "offset": 1
+              },
+              "end": {
+                "line": 6,
+                "offset": 2
+              }
+            }
+          ]
+        }
+      },
+      "command": "getPasteEdits"
+    }
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/folder/tsconfig.json
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/folder/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/folder/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (3)
+	/home/src/workspaces/project/folder/folder/c.ts SVC-1-1 "function foo(abc: test.abc, def: test.def) {\nconsole.log(abc);\nconsole.log(def);\n}"
+	/home/src/workspaces/project/folder/a.ts Text-1 "const abc = 10;\nconst def = 20;\nexport interface testInterface {\n    abc: number;\n    def: number;\n}"
+	/home/src/workspaces/project/folder/b.mts Text-1 "import test from \"./a.js\";\n\nfunction foo(abc: test.testInterface, def: test.testInterface) {\n   console.log(abc);\n   console.log(def);\n}\n"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "getPasteEdits",
+      "request_seq": 2,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      },
+      "body": {
+        "edits": [
+          {
+            "fileName": "/home/src/workspaces/project/folder/folder/c.ts",
+            "textChanges": [
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "import test from \"../a\";\n\n"
+              },
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "function foo(abc: test.abc, def: test.def) {\nconsole.log(abc);\nconsole.log(def);\n}"
+              }
+            ]
+          }
+        ],
+        "fixId": "providePostPasteEdits"
+      }
+    }
+After Request
+Projects::
+/home/src/workspaces/project/folder/tsconfig.json (Configured) *changed*
+    projectStateVersion: 3 *changed*
+    projectProgramVersion: 1
+    dirty: true *changed*
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/workspaces/project/folder/a.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/folder/tsconfig.json
+/home/src/workspaces/project/folder/b.mts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/folder/tsconfig.json
+/home/src/workspaces/project/folder/folder/c.ts (Open) *changed*
+    version: SVC-1-2 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/folder/tsconfig.json *default*
diff --git a/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_globalAndLocal1.js b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_globalAndLocal1.js
new file mode 100644
index 0000000000000..883208a20b886
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_globalAndLocal1.js
@@ -0,0 +1,383 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/globals.d.ts]
+export {}; // Make this a module
+declare global {
+    interface Disposable {
+        [Symbol.dispose](): void;
+    }
+}
+
+//// [/home/src/workspaces/project/target.ts]
+
+
+//// [/home/src/workspaces/project/test.ts]
+export interface Disposable {
+    (): string;
+}
+export interface EditingService extends Disposable { }
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{ "files": ["target.ts", "globals.d.ts", "test.ts"] }
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/target.ts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/target.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/target.ts",
+  "/home/src/workspaces/project/globals.d.ts",
+  "/home/src/workspaces/project/test.ts"
+ ],
+ "options": {
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/target.ts to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/globals.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/test.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (6)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/target.ts SVC-1-0 ""
+	/home/src/workspaces/project/globals.d.ts Text-1 "export {}; // Make this a module\ndeclare global {\n    interface Disposable {\n        [Symbol.dispose](): void;\n    }\n}"
+	/home/src/workspaces/project/test.ts Text-1 "export interface Disposable {\n    (): string;\n}\nexport interface EditingService extends Disposable { }"
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	target.ts
+	  Part of 'files' list in tsconfig.json
+	globals.d.ts
+	  Part of 'files' list in tsconfig.json
+	test.ts
+	  Part of 'files' list in tsconfig.json
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/target.ts",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": []
+      }
+    }
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (6)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/target.ts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/globals.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/test.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/globals.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/target.ts (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/test.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "formatOptions": {
+          "indentSize": 4,
+          "tabSize": 4,
+          "newLineCharacter": "\n",
+          "convertTabsToSpaces": true,
+          "indentStyle": 2,
+          "insertSpaceAfterConstructor": false,
+          "insertSpaceAfterCommaDelimiter": true,
+          "insertSpaceAfterSemicolonInForStatements": true,
+          "insertSpaceBeforeAndAfterBinaryOperators": true,
+          "insertSpaceAfterKeywordsInControlFlowStatements": true,
+          "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
+          "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
+          "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
+          "insertSpaceBeforeFunctionParenthesis": false,
+          "placeOpenBraceOnNewLineForFunctions": false,
+          "placeOpenBraceOnNewLineForControlBlocks": false,
+          "semicolons": "ignore",
+          "trimTrailingWhitespace": true,
+          "indentSwitchCase": true
+        }
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] Format host information updated
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 1,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/target.ts",
+        "pastedText": [
+          "export interface EditingService extends Disposable { }"
+        ],
+        "pasteLocations": [
+          {
+            "start": {
+              "line": 1,
+              "offset": 1
+            },
+            "end": {
+              "line": 1,
+              "offset": 1
+            }
+          }
+        ],
+        "copiedFrom": {
+          "file": "/home/src/workspaces/project/test.ts",
+          "spans": [
+            {
+              "start": {
+                "line": 4,
+                "offset": 1
+              },
+              "end": {
+                "line": 4,
+                "offset": 55
+              }
+            }
+          ]
+        }
+      },
+      "command": "getPasteEdits"
+    }
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (6)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/target.ts SVC-1-1 "export interface EditingService extends Disposable { }"
+	/home/src/workspaces/project/globals.d.ts Text-1 "export {}; // Make this a module\ndeclare global {\n    interface Disposable {\n        [Symbol.dispose](): void;\n    }\n}"
+	/home/src/workspaces/project/test.ts Text-1 "export interface Disposable {\n    (): string;\n}\nexport interface EditingService extends Disposable { }"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "getPasteEdits",
+      "request_seq": 2,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      },
+      "body": {
+        "edits": [
+          {
+            "fileName": "/home/src/workspaces/project/target.ts",
+            "textChanges": [
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "import { Disposable } from \"./test\";\n\n"
+              },
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "export interface EditingService extends Disposable { }"
+              }
+            ]
+          }
+        ],
+        "fixId": "providePostPasteEdits"
+      }
+    }
+After Request
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 3 *changed*
+    projectProgramVersion: 1
+    dirty: true *changed*
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/globals.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/target.ts (Open) *changed*
+    version: SVC-1-2 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/test.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
diff --git a/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_globalAndLocal2.js b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_globalAndLocal2.js
new file mode 100644
index 0000000000000..d12906dc009b5
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_globalAndLocal2.js
@@ -0,0 +1,405 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/globals.d.ts]
+export {}; // Make this a module
+declare global {
+    interface Disposable {
+        [Symbol.dispose](): void;
+    }
+}
+
+//// [/home/src/workspaces/project/lifecycle.ts]
+export interface Disposable {
+	(): string;
+}
+
+//// [/home/src/workspaces/project/target.ts]
+
+
+//// [/home/src/workspaces/project/test.ts]
+import { Disposable } from './lifecycle';
+export interface EditingService extends Disposable { }
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{ "files": ["target.ts", "globals.d.ts", "test.ts", "lifecycle.ts"] }
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/target.ts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/target.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/target.ts",
+  "/home/src/workspaces/project/globals.d.ts",
+  "/home/src/workspaces/project/test.ts",
+  "/home/src/workspaces/project/lifecycle.ts"
+ ],
+ "options": {
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/target.ts to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/globals.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/test.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/lifecycle.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (7)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/target.ts SVC-1-0 ""
+	/home/src/workspaces/project/globals.d.ts Text-1 "export {}; // Make this a module\ndeclare global {\n    interface Disposable {\n        [Symbol.dispose](): void;\n    }\n}"
+	/home/src/workspaces/project/lifecycle.ts Text-1 "export interface Disposable {\n\t(): string;\n}"
+	/home/src/workspaces/project/test.ts Text-1 "import { Disposable } from './lifecycle';\nexport interface EditingService extends Disposable { }"
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	target.ts
+	  Part of 'files' list in tsconfig.json
+	globals.d.ts
+	  Part of 'files' list in tsconfig.json
+	lifecycle.ts
+	  Imported via './lifecycle' from file 'test.ts'
+	  Part of 'files' list in tsconfig.json
+	test.ts
+	  Part of 'files' list in tsconfig.json
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/target.ts",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": []
+      }
+    }
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (7)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/target.ts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/globals.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/lifecycle.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/test.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/globals.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/lifecycle.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/target.ts (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/test.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "formatOptions": {
+          "indentSize": 4,
+          "tabSize": 4,
+          "newLineCharacter": "\n",
+          "convertTabsToSpaces": true,
+          "indentStyle": 2,
+          "insertSpaceAfterConstructor": false,
+          "insertSpaceAfterCommaDelimiter": true,
+          "insertSpaceAfterSemicolonInForStatements": true,
+          "insertSpaceBeforeAndAfterBinaryOperators": true,
+          "insertSpaceAfterKeywordsInControlFlowStatements": true,
+          "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
+          "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
+          "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
+          "insertSpaceBeforeFunctionParenthesis": false,
+          "placeOpenBraceOnNewLineForFunctions": false,
+          "placeOpenBraceOnNewLineForControlBlocks": false,
+          "semicolons": "ignore",
+          "trimTrailingWhitespace": true,
+          "indentSwitchCase": true
+        }
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] Format host information updated
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 1,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/target.ts",
+        "pastedText": [
+          "export interface EditingService extends Disposable { }"
+        ],
+        "pasteLocations": [
+          {
+            "start": {
+              "line": 1,
+              "offset": 1
+            },
+            "end": {
+              "line": 1,
+              "offset": 1
+            }
+          }
+        ],
+        "copiedFrom": {
+          "file": "/home/src/workspaces/project/test.ts",
+          "spans": [
+            {
+              "start": {
+                "line": 2,
+                "offset": 1
+              },
+              "end": {
+                "line": 2,
+                "offset": 55
+              }
+            }
+          ]
+        }
+      },
+      "command": "getPasteEdits"
+    }
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (7)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/target.ts SVC-1-1 "export interface EditingService extends Disposable { }"
+	/home/src/workspaces/project/globals.d.ts Text-1 "export {}; // Make this a module\ndeclare global {\n    interface Disposable {\n        [Symbol.dispose](): void;\n    }\n}"
+	/home/src/workspaces/project/lifecycle.ts Text-1 "export interface Disposable {\n\t(): string;\n}"
+	/home/src/workspaces/project/test.ts Text-1 "import { Disposable } from './lifecycle';\nexport interface EditingService extends Disposable { }"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results
+Info seq  [hh:mm:ss:mss] getExportInfoMap: done in * ms
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "getPasteEdits",
+      "request_seq": 2,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      },
+      "body": {
+        "edits": [
+          {
+            "fileName": "/home/src/workspaces/project/target.ts",
+            "textChanges": [
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "import { Disposable } from './lifecycle';\n\n"
+              },
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "export interface EditingService extends Disposable { }"
+              }
+            ]
+          }
+        ],
+        "fixId": "providePostPasteEdits"
+      }
+    }
+After Request
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 3 *changed*
+    projectProgramVersion: 1
+    dirty: true *changed*
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/globals.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/lifecycle.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/target.ts (Open) *changed*
+    version: SVC-1-2 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/test.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
diff --git a/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_namespaceImport.js b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_namespaceImport.js
new file mode 100644
index 0000000000000..7ea5fc5cc1dbc
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_namespaceImport.js
@@ -0,0 +1,390 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/a.ts]
+const abc = 10;
+const def = 20;
+export interface testInterface {
+    abc: number;
+    def: number;
+}
+
+//// [/home/src/workspaces/project/b.ts]
+import * as test from "./a";
+
+function foo(abc: test.abc, def: test.def) {
+   console.log(abc);
+   console.log(def);
+}
+
+
+//// [/home/src/workspaces/project/folder/c.ts]
+
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{ "files": ["folder/c.ts", "a.ts", "b.ts"] }
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/c.ts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/folder/c.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/folder/c.ts",
+  "/home/src/workspaces/project/a.ts",
+  "/home/src/workspaces/project/b.ts"
+ ],
+ "options": {
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/folder/c.ts to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/a.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/b.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/folder/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (6)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/folder/c.ts SVC-1-0 ""
+	/home/src/workspaces/project/a.ts Text-1 "const abc = 10;\nconst def = 20;\nexport interface testInterface {\n    abc: number;\n    def: number;\n}"
+	/home/src/workspaces/project/b.ts Text-1 "import * as test from \"./a\";\n\nfunction foo(abc: test.abc, def: test.def) {\n   console.log(abc);\n   console.log(def);\n}\n"
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	folder/c.ts
+	  Part of 'files' list in tsconfig.json
+	a.ts
+	  Part of 'files' list in tsconfig.json
+	  Imported via "./a" from file 'b.ts'
+	b.ts
+	  Part of 'files' list in tsconfig.json
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/folder/c.ts",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": []
+      }
+    }
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (6)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/folder/c.ts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/a.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/b.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/folder/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/a.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/b.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/folder/c.ts (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "formatOptions": {
+          "indentSize": 4,
+          "tabSize": 4,
+          "newLineCharacter": "\n",
+          "convertTabsToSpaces": true,
+          "indentStyle": 2,
+          "insertSpaceAfterConstructor": false,
+          "insertSpaceAfterCommaDelimiter": true,
+          "insertSpaceAfterSemicolonInForStatements": true,
+          "insertSpaceBeforeAndAfterBinaryOperators": true,
+          "insertSpaceAfterKeywordsInControlFlowStatements": true,
+          "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
+          "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
+          "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
+          "insertSpaceBeforeFunctionParenthesis": false,
+          "placeOpenBraceOnNewLineForFunctions": false,
+          "placeOpenBraceOnNewLineForControlBlocks": false,
+          "semicolons": "ignore",
+          "trimTrailingWhitespace": true,
+          "indentSwitchCase": true
+        }
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] Format host information updated
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 1,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/c.ts",
+        "pastedText": [
+          "function foo(abc: test.abc, def: test.def) {\nconsole.log(abc);\nconsole.log(def);\n}"
+        ],
+        "pasteLocations": [
+          {
+            "start": {
+              "line": 1,
+              "offset": 1
+            },
+            "end": {
+              "line": 1,
+              "offset": 1
+            }
+          }
+        ],
+        "copiedFrom": {
+          "file": "/home/src/workspaces/project/b.ts",
+          "spans": [
+            {
+              "start": {
+                "line": 3,
+                "offset": 1
+              },
+              "end": {
+                "line": 6,
+                "offset": 2
+              }
+            }
+          ]
+        }
+      },
+      "command": "getPasteEdits"
+    }
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (6)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/folder/c.ts SVC-1-1 "function foo(abc: test.abc, def: test.def) {\nconsole.log(abc);\nconsole.log(def);\n}"
+	/home/src/workspaces/project/a.ts Text-1 "const abc = 10;\nconst def = 20;\nexport interface testInterface {\n    abc: number;\n    def: number;\n}"
+	/home/src/workspaces/project/b.ts Text-1 "import * as test from \"./a\";\n\nfunction foo(abc: test.abc, def: test.def) {\n   console.log(abc);\n   console.log(def);\n}\n"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "getPasteEdits",
+      "request_seq": 2,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      },
+      "body": {
+        "edits": [
+          {
+            "fileName": "/home/src/workspaces/project/folder/c.ts",
+            "textChanges": [
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "import * as test from \"../a\";\n\n"
+              },
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "function foo(abc: test.abc, def: test.def) {\nconsole.log(abc);\nconsole.log(def);\n}"
+              }
+            ]
+          }
+        ],
+        "fixId": "providePostPasteEdits"
+      }
+    }
+After Request
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 3 *changed*
+    projectProgramVersion: 1
+    dirty: true *changed*
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/a.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/b.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/folder/c.ts (Open) *changed*
+    version: SVC-1-2 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
diff --git a/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection0.js b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection0.js
new file mode 100644
index 0000000000000..b0aece6cc7896
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection0.js
@@ -0,0 +1,335 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/a.ts]
+function foo() { }
+const x = foo()
+
+foo()
+x
+
+//// [/home/src/workspaces/project/folder/target.ts]
+
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{ "files": ["a.ts", "folder/target.ts"] }
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/target.ts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/folder/target.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/a.ts",
+  "/home/src/workspaces/project/folder/target.ts"
+ ],
+ "options": {
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/folder/target.ts to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/a.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/folder/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/a.ts Text-1 "function foo() { }\nconst x = foo()\n\nfoo()\nx"
+	/home/src/workspaces/project/folder/target.ts SVC-1-0 ""
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	a.ts
+	  Part of 'files' list in tsconfig.json
+	folder/target.ts
+	  Part of 'files' list in tsconfig.json
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/folder/target.ts",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": []
+      }
+    }
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/folder/target.ts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/a.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/folder/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/a.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/folder/target.ts (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "formatOptions": {
+          "indentSize": 4,
+          "tabSize": 4,
+          "newLineCharacter": "\n",
+          "convertTabsToSpaces": true,
+          "indentStyle": 2,
+          "insertSpaceAfterConstructor": false,
+          "insertSpaceAfterCommaDelimiter": true,
+          "insertSpaceAfterSemicolonInForStatements": true,
+          "insertSpaceBeforeAndAfterBinaryOperators": true,
+          "insertSpaceAfterKeywordsInControlFlowStatements": true,
+          "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
+          "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
+          "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
+          "insertSpaceBeforeFunctionParenthesis": false,
+          "placeOpenBraceOnNewLineForFunctions": false,
+          "placeOpenBraceOnNewLineForControlBlocks": false,
+          "semicolons": "ignore",
+          "trimTrailingWhitespace": true,
+          "indentSwitchCase": true
+        }
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] Format host information updated
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 1,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/target.ts",
+        "pastedText": [
+          ""
+        ],
+        "pasteLocations": [
+          {
+            "start": {
+              "line": 1,
+              "offset": 1
+            },
+            "end": {
+              "line": 1,
+              "offset": 1
+            }
+          }
+        ],
+        "copiedFrom": {
+          "file": "/home/src/workspaces/project/a.ts",
+          "spans": [
+            {
+              "start": {
+                "line": 1,
+                "offset": 1
+              },
+              "end": {
+                "line": 1,
+                "offset": 1
+              }
+            }
+          ]
+        }
+      },
+      "command": "getPasteEdits"
+    }
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/a.ts Text-1 "function foo() { }\nconst x = foo()\n\nfoo()\nx"
+	/home/src/workspaces/project/folder/target.ts SVC-1-1 ""
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "getPasteEdits",
+      "request_seq": 2,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      },
+      "body": {
+        "edits": [],
+        "fixId": "providePostPasteEdits"
+      }
+    }
+After Request
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 3 *changed*
+    projectProgramVersion: 1
+    dirty: true *changed*
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/a.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/folder/target.ts (Open) *changed*
+    version: SVC-1-2 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
diff --git a/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection1.js b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection1.js
new file mode 100644
index 0000000000000..0beeb8b37adda
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection1.js
@@ -0,0 +1,379 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/a.ts]
+function foo() { }
+const x = foo()
+
+foo()
+x
+
+//// [/home/src/workspaces/project/folder/target.ts]
+
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{ "files": ["a.ts", "folder/target.ts"] }
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/target.ts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/folder/target.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/a.ts",
+  "/home/src/workspaces/project/folder/target.ts"
+ ],
+ "options": {
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/folder/target.ts to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/a.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/folder/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/a.ts Text-1 "function foo() { }\nconst x = foo()\n\nfoo()\nx"
+	/home/src/workspaces/project/folder/target.ts SVC-1-0 ""
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	a.ts
+	  Part of 'files' list in tsconfig.json
+	folder/target.ts
+	  Part of 'files' list in tsconfig.json
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/folder/target.ts",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": []
+      }
+    }
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/folder/target.ts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/a.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/folder/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/a.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/folder/target.ts (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "formatOptions": {
+          "indentSize": 4,
+          "tabSize": 4,
+          "newLineCharacter": "\n",
+          "convertTabsToSpaces": true,
+          "indentStyle": 2,
+          "insertSpaceAfterConstructor": false,
+          "insertSpaceAfterCommaDelimiter": true,
+          "insertSpaceAfterSemicolonInForStatements": true,
+          "insertSpaceBeforeAndAfterBinaryOperators": true,
+          "insertSpaceAfterKeywordsInControlFlowStatements": true,
+          "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
+          "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
+          "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
+          "insertSpaceBeforeFunctionParenthesis": false,
+          "placeOpenBraceOnNewLineForFunctions": false,
+          "placeOpenBraceOnNewLineForControlBlocks": false,
+          "semicolons": "ignore",
+          "trimTrailingWhitespace": true,
+          "indentSwitchCase": true
+        }
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] Format host information updated
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 1,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/target.ts",
+        "pastedText": [
+          "foo()"
+        ],
+        "pasteLocations": [
+          {
+            "start": {
+              "line": 1,
+              "offset": 1
+            },
+            "end": {
+              "line": 1,
+              "offset": 1
+            }
+          }
+        ],
+        "copiedFrom": {
+          "file": "/home/src/workspaces/project/a.ts",
+          "spans": [
+            {
+              "start": {
+                "line": 4,
+                "offset": 1
+              },
+              "end": {
+                "line": 4,
+                "offset": 6
+              }
+            }
+          ]
+        }
+      },
+      "command": "getPasteEdits"
+    }
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/a.ts Text-1 "function foo() { }\nconst x = foo()\n\nfoo()\nx"
+	/home/src/workspaces/project/folder/target.ts SVC-1-1 "foo()"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "getPasteEdits",
+      "request_seq": 2,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      },
+      "body": {
+        "edits": [
+          {
+            "fileName": "/home/src/workspaces/project/a.ts",
+            "textChanges": [
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "export "
+              }
+            ]
+          },
+          {
+            "fileName": "/home/src/workspaces/project/folder/target.ts",
+            "textChanges": [
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "import { foo } from \"../a\";\n\n"
+              },
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "foo()"
+              }
+            ]
+          }
+        ],
+        "fixId": "providePostPasteEdits"
+      }
+    }
+After Request
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 3 *changed*
+    projectProgramVersion: 1
+    dirty: true *changed*
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/a.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/folder/target.ts (Open) *changed*
+    version: SVC-1-2 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
diff --git a/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection2.js b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection2.js
new file mode 100644
index 0000000000000..bc89ac7613e96
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection2.js
@@ -0,0 +1,378 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/a.ts]
+function foo() { }
+
+// comment
+foo()
+
+//// [/home/src/workspaces/project/folder/target.ts]
+
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{ "files": ["a.ts", "folder/target.ts"] }
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/target.ts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/folder/target.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/a.ts",
+  "/home/src/workspaces/project/folder/target.ts"
+ ],
+ "options": {
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/folder/target.ts to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/a.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/folder/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/a.ts Text-1 "function foo() { }\n\n// comment\nfoo()"
+	/home/src/workspaces/project/folder/target.ts SVC-1-0 ""
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	a.ts
+	  Part of 'files' list in tsconfig.json
+	folder/target.ts
+	  Part of 'files' list in tsconfig.json
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/folder/target.ts",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": []
+      }
+    }
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/folder/target.ts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/a.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/folder/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/a.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/folder/target.ts (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "formatOptions": {
+          "indentSize": 4,
+          "tabSize": 4,
+          "newLineCharacter": "\n",
+          "convertTabsToSpaces": true,
+          "indentStyle": 2,
+          "insertSpaceAfterConstructor": false,
+          "insertSpaceAfterCommaDelimiter": true,
+          "insertSpaceAfterSemicolonInForStatements": true,
+          "insertSpaceBeforeAndAfterBinaryOperators": true,
+          "insertSpaceAfterKeywordsInControlFlowStatements": true,
+          "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
+          "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
+          "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
+          "insertSpaceBeforeFunctionParenthesis": false,
+          "placeOpenBraceOnNewLineForFunctions": false,
+          "placeOpenBraceOnNewLineForControlBlocks": false,
+          "semicolons": "ignore",
+          "trimTrailingWhitespace": true,
+          "indentSwitchCase": true
+        }
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] Format host information updated
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 1,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/target.ts",
+        "pastedText": [
+          "foo()"
+        ],
+        "pasteLocations": [
+          {
+            "start": {
+              "line": 1,
+              "offset": 1
+            },
+            "end": {
+              "line": 1,
+              "offset": 1
+            }
+          }
+        ],
+        "copiedFrom": {
+          "file": "/home/src/workspaces/project/a.ts",
+          "spans": [
+            {
+              "start": {
+                "line": 4,
+                "offset": 1
+              },
+              "end": {
+                "line": 4,
+                "offset": 6
+              }
+            }
+          ]
+        }
+      },
+      "command": "getPasteEdits"
+    }
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/a.ts Text-1 "function foo() { }\n\n// comment\nfoo()"
+	/home/src/workspaces/project/folder/target.ts SVC-1-1 "foo()"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "getPasteEdits",
+      "request_seq": 2,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      },
+      "body": {
+        "edits": [
+          {
+            "fileName": "/home/src/workspaces/project/a.ts",
+            "textChanges": [
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "export "
+              }
+            ]
+          },
+          {
+            "fileName": "/home/src/workspaces/project/folder/target.ts",
+            "textChanges": [
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "import { foo } from \"../a\";\n\n"
+              },
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "foo()"
+              }
+            ]
+          }
+        ],
+        "fixId": "providePostPasteEdits"
+      }
+    }
+After Request
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 3 *changed*
+    projectProgramVersion: 1
+    dirty: true *changed*
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/a.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/folder/target.ts (Open) *changed*
+    version: SVC-1-2 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
diff --git a/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection3.js b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection3.js
new file mode 100644
index 0000000000000..60b2bdc674e0b
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection3.js
@@ -0,0 +1,378 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/a.ts]
+function foo() { }
+
+/* comment */
+foo()
+
+//// [/home/src/workspaces/project/folder/target.ts]
+
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{ "files": ["a.ts", "folder/target.ts"] }
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/target.ts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/folder/target.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/a.ts",
+  "/home/src/workspaces/project/folder/target.ts"
+ ],
+ "options": {
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/folder/target.ts to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/a.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/folder/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/a.ts Text-1 "function foo() { }\n\n/* comment */\nfoo()"
+	/home/src/workspaces/project/folder/target.ts SVC-1-0 ""
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	a.ts
+	  Part of 'files' list in tsconfig.json
+	folder/target.ts
+	  Part of 'files' list in tsconfig.json
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/folder/target.ts",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": []
+      }
+    }
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/folder/target.ts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/a.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/folder/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/a.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/folder/target.ts (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "formatOptions": {
+          "indentSize": 4,
+          "tabSize": 4,
+          "newLineCharacter": "\n",
+          "convertTabsToSpaces": true,
+          "indentStyle": 2,
+          "insertSpaceAfterConstructor": false,
+          "insertSpaceAfterCommaDelimiter": true,
+          "insertSpaceAfterSemicolonInForStatements": true,
+          "insertSpaceBeforeAndAfterBinaryOperators": true,
+          "insertSpaceAfterKeywordsInControlFlowStatements": true,
+          "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
+          "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
+          "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
+          "insertSpaceBeforeFunctionParenthesis": false,
+          "placeOpenBraceOnNewLineForFunctions": false,
+          "placeOpenBraceOnNewLineForControlBlocks": false,
+          "semicolons": "ignore",
+          "trimTrailingWhitespace": true,
+          "indentSwitchCase": true
+        }
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] Format host information updated
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 1,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/target.ts",
+        "pastedText": [
+          "foo()"
+        ],
+        "pasteLocations": [
+          {
+            "start": {
+              "line": 1,
+              "offset": 1
+            },
+            "end": {
+              "line": 1,
+              "offset": 1
+            }
+          }
+        ],
+        "copiedFrom": {
+          "file": "/home/src/workspaces/project/a.ts",
+          "spans": [
+            {
+              "start": {
+                "line": 4,
+                "offset": 1
+              },
+              "end": {
+                "line": 4,
+                "offset": 6
+              }
+            }
+          ]
+        }
+      },
+      "command": "getPasteEdits"
+    }
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/a.ts Text-1 "function foo() { }\n\n/* comment */\nfoo()"
+	/home/src/workspaces/project/folder/target.ts SVC-1-1 "foo()"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "getPasteEdits",
+      "request_seq": 2,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      },
+      "body": {
+        "edits": [
+          {
+            "fileName": "/home/src/workspaces/project/a.ts",
+            "textChanges": [
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "export "
+              }
+            ]
+          },
+          {
+            "fileName": "/home/src/workspaces/project/folder/target.ts",
+            "textChanges": [
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "import { foo } from \"../a\";\n\n"
+              },
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "foo()"
+              }
+            ]
+          }
+        ],
+        "fixId": "providePostPasteEdits"
+      }
+    }
+After Request
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 3 *changed*
+    projectProgramVersion: 1
+    dirty: true *changed*
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/a.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/folder/target.ts (Open) *changed*
+    version: SVC-1-2 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
diff --git a/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection4.js b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection4.js
new file mode 100644
index 0000000000000..96a46bf462834
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection4.js
@@ -0,0 +1,381 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/a.ts]
+function foo() { }
+
+/*
+  comment
+  more comment
+*/
+foo()
+
+//// [/home/src/workspaces/project/folder/target.ts]
+
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{ "files": ["a.ts", "folder/target.ts"] }
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/target.ts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/folder/target.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/a.ts",
+  "/home/src/workspaces/project/folder/target.ts"
+ ],
+ "options": {
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/folder/target.ts to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/a.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/folder/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/a.ts Text-1 "function foo() { }\n\n/*\n  comment\n  more comment\n*/\nfoo()"
+	/home/src/workspaces/project/folder/target.ts SVC-1-0 ""
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	a.ts
+	  Part of 'files' list in tsconfig.json
+	folder/target.ts
+	  Part of 'files' list in tsconfig.json
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/folder/target.ts",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": []
+      }
+    }
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/folder/target.ts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/a.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/folder/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/a.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/folder/target.ts (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "formatOptions": {
+          "indentSize": 4,
+          "tabSize": 4,
+          "newLineCharacter": "\n",
+          "convertTabsToSpaces": true,
+          "indentStyle": 2,
+          "insertSpaceAfterConstructor": false,
+          "insertSpaceAfterCommaDelimiter": true,
+          "insertSpaceAfterSemicolonInForStatements": true,
+          "insertSpaceBeforeAndAfterBinaryOperators": true,
+          "insertSpaceAfterKeywordsInControlFlowStatements": true,
+          "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
+          "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
+          "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
+          "insertSpaceBeforeFunctionParenthesis": false,
+          "placeOpenBraceOnNewLineForFunctions": false,
+          "placeOpenBraceOnNewLineForControlBlocks": false,
+          "semicolons": "ignore",
+          "trimTrailingWhitespace": true,
+          "indentSwitchCase": true
+        }
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] Format host information updated
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 1,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/target.ts",
+        "pastedText": [
+          "  comment\n  more comment\n*/\nfoo()"
+        ],
+        "pasteLocations": [
+          {
+            "start": {
+              "line": 1,
+              "offset": 1
+            },
+            "end": {
+              "line": 1,
+              "offset": 1
+            }
+          }
+        ],
+        "copiedFrom": {
+          "file": "/home/src/workspaces/project/a.ts",
+          "spans": [
+            {
+              "start": {
+                "line": 4,
+                "offset": 1
+              },
+              "end": {
+                "line": 7,
+                "offset": 6
+              }
+            }
+          ]
+        }
+      },
+      "command": "getPasteEdits"
+    }
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/a.ts Text-1 "function foo() { }\n\n/*\n  comment\n  more comment\n*/\nfoo()"
+	/home/src/workspaces/project/folder/target.ts SVC-1-1 "  comment\n  more comment\n*/\nfoo()"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "getPasteEdits",
+      "request_seq": 2,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      },
+      "body": {
+        "edits": [
+          {
+            "fileName": "/home/src/workspaces/project/a.ts",
+            "textChanges": [
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "export "
+              }
+            ]
+          },
+          {
+            "fileName": "/home/src/workspaces/project/folder/target.ts",
+            "textChanges": [
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "import { foo } from \"../a\"\n\n"
+              },
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "  comment\n  more comment\n*/\nfoo()"
+              }
+            ]
+          }
+        ],
+        "fixId": "providePostPasteEdits"
+      }
+    }
+After Request
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 3 *changed*
+    projectProgramVersion: 1
+    dirty: true *changed*
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/a.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/folder/target.ts (Open) *changed*
+    version: SVC-1-2 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
diff --git a/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection5.js b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection5.js
new file mode 100644
index 0000000000000..dc9364efe66cd
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection5.js
@@ -0,0 +1,378 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/a.ts]
+function foo() { }
+
+// comment
+foo()
+
+//// [/home/src/workspaces/project/folder/target.ts]
+
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{ "files": ["a.ts", "folder/target.ts"] }
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/target.ts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/folder/target.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/a.ts",
+  "/home/src/workspaces/project/folder/target.ts"
+ ],
+ "options": {
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/folder/target.ts to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/a.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/folder/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/a.ts Text-1 "function foo() { }\n\n// comment\nfoo()"
+	/home/src/workspaces/project/folder/target.ts SVC-1-0 ""
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	a.ts
+	  Part of 'files' list in tsconfig.json
+	folder/target.ts
+	  Part of 'files' list in tsconfig.json
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/folder/target.ts",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": []
+      }
+    }
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/folder/target.ts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/a.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/folder/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/a.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/folder/target.ts (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "formatOptions": {
+          "indentSize": 4,
+          "tabSize": 4,
+          "newLineCharacter": "\n",
+          "convertTabsToSpaces": true,
+          "indentStyle": 2,
+          "insertSpaceAfterConstructor": false,
+          "insertSpaceAfterCommaDelimiter": true,
+          "insertSpaceAfterSemicolonInForStatements": true,
+          "insertSpaceBeforeAndAfterBinaryOperators": true,
+          "insertSpaceAfterKeywordsInControlFlowStatements": true,
+          "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
+          "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
+          "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
+          "insertSpaceBeforeFunctionParenthesis": false,
+          "placeOpenBraceOnNewLineForFunctions": false,
+          "placeOpenBraceOnNewLineForControlBlocks": false,
+          "semicolons": "ignore",
+          "trimTrailingWhitespace": true,
+          "indentSwitchCase": true
+        }
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] Format host information updated
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 1,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/target.ts",
+        "pastedText": [
+          "// comment\nfoo()"
+        ],
+        "pasteLocations": [
+          {
+            "start": {
+              "line": 1,
+              "offset": 1
+            },
+            "end": {
+              "line": 1,
+              "offset": 1
+            }
+          }
+        ],
+        "copiedFrom": {
+          "file": "/home/src/workspaces/project/a.ts",
+          "spans": [
+            {
+              "start": {
+                "line": 3,
+                "offset": 1
+              },
+              "end": {
+                "line": 4,
+                "offset": 6
+              }
+            }
+          ]
+        }
+      },
+      "command": "getPasteEdits"
+    }
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/a.ts Text-1 "function foo() { }\n\n// comment\nfoo()"
+	/home/src/workspaces/project/folder/target.ts SVC-1-1 "// comment\nfoo()"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "getPasteEdits",
+      "request_seq": 2,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      },
+      "body": {
+        "edits": [
+          {
+            "fileName": "/home/src/workspaces/project/a.ts",
+            "textChanges": [
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "export "
+              }
+            ]
+          },
+          {
+            "fileName": "/home/src/workspaces/project/folder/target.ts",
+            "textChanges": [
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "import { foo } from \"../a\";\n\n"
+              },
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "// comment\nfoo()"
+              }
+            ]
+          }
+        ],
+        "fixId": "providePostPasteEdits"
+      }
+    }
+After Request
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 3 *changed*
+    projectProgramVersion: 1
+    dirty: true *changed*
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/a.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/folder/target.ts (Open) *changed*
+    version: SVC-1-2 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
diff --git a/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection6.js b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection6.js
new file mode 100644
index 0000000000000..7b33796202ebe
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection6.js
@@ -0,0 +1,392 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/a.ts]
+function foo() { }
+const x = foo()
+
+// comment
+foo()
+/* another comment */
+x
+
+//// [/home/src/workspaces/project/folder/target.ts]
+
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{ "files": ["a.ts", "folder/target.ts"] }
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/target.ts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/folder/target.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/a.ts",
+  "/home/src/workspaces/project/folder/target.ts"
+ ],
+ "options": {
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/folder/target.ts to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/a.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/folder/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/a.ts Text-1 "function foo() { }\nconst x = foo()\n\n// comment\nfoo()\n/* another comment */\nx"
+	/home/src/workspaces/project/folder/target.ts SVC-1-0 ""
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	a.ts
+	  Part of 'files' list in tsconfig.json
+	folder/target.ts
+	  Part of 'files' list in tsconfig.json
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/folder/target.ts",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": []
+      }
+    }
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/folder/target.ts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/a.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/folder/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/a.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/folder/target.ts (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "formatOptions": {
+          "indentSize": 4,
+          "tabSize": 4,
+          "newLineCharacter": "\n",
+          "convertTabsToSpaces": true,
+          "indentStyle": 2,
+          "insertSpaceAfterConstructor": false,
+          "insertSpaceAfterCommaDelimiter": true,
+          "insertSpaceAfterSemicolonInForStatements": true,
+          "insertSpaceBeforeAndAfterBinaryOperators": true,
+          "insertSpaceAfterKeywordsInControlFlowStatements": true,
+          "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
+          "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
+          "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
+          "insertSpaceBeforeFunctionParenthesis": false,
+          "placeOpenBraceOnNewLineForFunctions": false,
+          "placeOpenBraceOnNewLineForControlBlocks": false,
+          "semicolons": "ignore",
+          "trimTrailingWhitespace": true,
+          "indentSwitchCase": true
+        }
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] Format host information updated
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 1,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/target.ts",
+        "pastedText": [
+          "foo()\n/* another comment */\nx"
+        ],
+        "pasteLocations": [
+          {
+            "start": {
+              "line": 1,
+              "offset": 1
+            },
+            "end": {
+              "line": 1,
+              "offset": 1
+            }
+          }
+        ],
+        "copiedFrom": {
+          "file": "/home/src/workspaces/project/a.ts",
+          "spans": [
+            {
+              "start": {
+                "line": 5,
+                "offset": 1
+              },
+              "end": {
+                "line": 7,
+                "offset": 2
+              }
+            }
+          ]
+        }
+      },
+      "command": "getPasteEdits"
+    }
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/a.ts Text-1 "function foo() { }\nconst x = foo()\n\n// comment\nfoo()\n/* another comment */\nx"
+	/home/src/workspaces/project/folder/target.ts SVC-1-1 "foo()\n/* another comment */\nx"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "getPasteEdits",
+      "request_seq": 2,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      },
+      "body": {
+        "edits": [
+          {
+            "fileName": "/home/src/workspaces/project/a.ts",
+            "textChanges": [
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "export "
+              },
+              {
+                "start": {
+                  "line": 2,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 2,
+                  "offset": 1
+                },
+                "newText": "export "
+              }
+            ]
+          },
+          {
+            "fileName": "/home/src/workspaces/project/folder/target.ts",
+            "textChanges": [
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "import { foo, x } from \"../a\"\n\n"
+              },
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "foo()\n/* another comment */\nx"
+              }
+            ]
+          }
+        ],
+        "fixId": "providePostPasteEdits"
+      }
+    }
+After Request
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 3 *changed*
+    projectProgramVersion: 1
+    dirty: true *changed*
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/a.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/folder/target.ts (Open) *changed*
+    version: SVC-1-2 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
diff --git a/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection7.js b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection7.js
new file mode 100644
index 0000000000000..999d6d3d36ea7
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection7.js
@@ -0,0 +1,381 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/a.ts]
+function foo() { }
+const x = foo()
+
+// comment
+foo
+/* another comment */
+x
+
+//// [/home/src/workspaces/project/folder/target.ts]
+
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{ "files": ["a.ts", "folder/target.ts"] }
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/target.ts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/folder/target.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/a.ts",
+  "/home/src/workspaces/project/folder/target.ts"
+ ],
+ "options": {
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/folder/target.ts to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/a.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/folder/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/a.ts Text-1 "function foo() { }\nconst x = foo()\n\n// comment\nfoo\n/* another comment */\nx"
+	/home/src/workspaces/project/folder/target.ts SVC-1-0 ""
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	a.ts
+	  Part of 'files' list in tsconfig.json
+	folder/target.ts
+	  Part of 'files' list in tsconfig.json
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/folder/target.ts",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": []
+      }
+    }
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/folder/target.ts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/a.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/folder/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/a.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/folder/target.ts (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "formatOptions": {
+          "indentSize": 4,
+          "tabSize": 4,
+          "newLineCharacter": "\n",
+          "convertTabsToSpaces": true,
+          "indentStyle": 2,
+          "insertSpaceAfterConstructor": false,
+          "insertSpaceAfterCommaDelimiter": true,
+          "insertSpaceAfterSemicolonInForStatements": true,
+          "insertSpaceBeforeAndAfterBinaryOperators": true,
+          "insertSpaceAfterKeywordsInControlFlowStatements": true,
+          "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
+          "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
+          "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
+          "insertSpaceBeforeFunctionParenthesis": false,
+          "placeOpenBraceOnNewLineForFunctions": false,
+          "placeOpenBraceOnNewLineForControlBlocks": false,
+          "semicolons": "ignore",
+          "trimTrailingWhitespace": true,
+          "indentSwitchCase": true
+        }
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] Format host information updated
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 1,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/target.ts",
+        "pastedText": [
+          "foo\n/* another comment */"
+        ],
+        "pasteLocations": [
+          {
+            "start": {
+              "line": 1,
+              "offset": 1
+            },
+            "end": {
+              "line": 1,
+              "offset": 1
+            }
+          }
+        ],
+        "copiedFrom": {
+          "file": "/home/src/workspaces/project/a.ts",
+          "spans": [
+            {
+              "start": {
+                "line": 5,
+                "offset": 1
+              },
+              "end": {
+                "line": 6,
+                "offset": 22
+              }
+            }
+          ]
+        }
+      },
+      "command": "getPasteEdits"
+    }
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/a.ts Text-1 "function foo() { }\nconst x = foo()\n\n// comment\nfoo\n/* another comment */\nx"
+	/home/src/workspaces/project/folder/target.ts SVC-1-1 "foo\n/* another comment */"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "getPasteEdits",
+      "request_seq": 2,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      },
+      "body": {
+        "edits": [
+          {
+            "fileName": "/home/src/workspaces/project/a.ts",
+            "textChanges": [
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "export "
+              }
+            ]
+          },
+          {
+            "fileName": "/home/src/workspaces/project/folder/target.ts",
+            "textChanges": [
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "import { foo } from \"../a\";\n\n"
+              },
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "foo\n/* another comment */"
+              }
+            ]
+          }
+        ],
+        "fixId": "providePostPasteEdits"
+      }
+    }
+After Request
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 3 *changed*
+    projectProgramVersion: 1
+    dirty: true *changed*
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/a.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/folder/target.ts (Open) *changed*
+    version: SVC-1-2 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
diff --git a/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection8.js b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection8.js
new file mode 100644
index 0000000000000..9c2764be404ed
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection8.js
@@ -0,0 +1,381 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/a.ts]
+function foo() { }
+const aaaa = foo()
+
+// comment
+foo
+/* another comment */
+aaaa
+
+//// [/home/src/workspaces/project/folder/target.ts]
+
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{ "files": ["a.ts", "folder/target.ts"] }
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/target.ts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/folder/target.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/a.ts",
+  "/home/src/workspaces/project/folder/target.ts"
+ ],
+ "options": {
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/folder/target.ts to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/a.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/folder/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/a.ts Text-1 "function foo() { }\nconst aaaa = foo()\n\n// comment\nfoo\n/* another comment */\naaaa"
+	/home/src/workspaces/project/folder/target.ts SVC-1-0 ""
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	a.ts
+	  Part of 'files' list in tsconfig.json
+	folder/target.ts
+	  Part of 'files' list in tsconfig.json
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/folder/target.ts",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": []
+      }
+    }
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/folder/target.ts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/a.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/folder/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/a.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/folder/target.ts (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "formatOptions": {
+          "indentSize": 4,
+          "tabSize": 4,
+          "newLineCharacter": "\n",
+          "convertTabsToSpaces": true,
+          "indentStyle": 2,
+          "insertSpaceAfterConstructor": false,
+          "insertSpaceAfterCommaDelimiter": true,
+          "insertSpaceAfterSemicolonInForStatements": true,
+          "insertSpaceBeforeAndAfterBinaryOperators": true,
+          "insertSpaceAfterKeywordsInControlFlowStatements": true,
+          "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
+          "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
+          "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
+          "insertSpaceBeforeFunctionParenthesis": false,
+          "placeOpenBraceOnNewLineForFunctions": false,
+          "placeOpenBraceOnNewLineForControlBlocks": false,
+          "semicolons": "ignore",
+          "trimTrailingWhitespace": true,
+          "indentSwitchCase": true
+        }
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] Format host information updated
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 1,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/target.ts",
+        "pastedText": [
+          "foo\n/* another comment */\na"
+        ],
+        "pasteLocations": [
+          {
+            "start": {
+              "line": 1,
+              "offset": 1
+            },
+            "end": {
+              "line": 1,
+              "offset": 1
+            }
+          }
+        ],
+        "copiedFrom": {
+          "file": "/home/src/workspaces/project/a.ts",
+          "spans": [
+            {
+              "start": {
+                "line": 5,
+                "offset": 1
+              },
+              "end": {
+                "line": 7,
+                "offset": 2
+              }
+            }
+          ]
+        }
+      },
+      "command": "getPasteEdits"
+    }
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/a.ts Text-1 "function foo() { }\nconst aaaa = foo()\n\n// comment\nfoo\n/* another comment */\naaaa"
+	/home/src/workspaces/project/folder/target.ts SVC-1-1 "foo\n/* another comment */\na"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "getPasteEdits",
+      "request_seq": 2,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      },
+      "body": {
+        "edits": [
+          {
+            "fileName": "/home/src/workspaces/project/a.ts",
+            "textChanges": [
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "export "
+              }
+            ]
+          },
+          {
+            "fileName": "/home/src/workspaces/project/folder/target.ts",
+            "textChanges": [
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "import { foo } from \"../a\"\n\n"
+              },
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "foo\n/* another comment */\na"
+              }
+            ]
+          }
+        ],
+        "fixId": "providePostPasteEdits"
+      }
+    }
+After Request
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 3 *changed*
+    projectProgramVersion: 1
+    dirty: true *changed*
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/a.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/folder/target.ts (Open) *changed*
+    version: SVC-1-2 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
diff --git a/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection9.js b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection9.js
new file mode 100644
index 0000000000000..90a1485b1cd85
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_rangeSelection9.js
@@ -0,0 +1,379 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/a.ts]
+function foo() { }
+
+// comment
+foo
+/* another comment */
+
+//// [/home/src/workspaces/project/folder/target.ts]
+
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{ "files": ["a.ts", "folder/target.ts"] }
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/target.ts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/folder/target.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/a.ts",
+  "/home/src/workspaces/project/folder/target.ts"
+ ],
+ "options": {
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/folder/target.ts to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/a.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/folder/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/a.ts Text-1 "function foo() { }\n\n// comment\nfoo\n/* another comment */"
+	/home/src/workspaces/project/folder/target.ts SVC-1-0 ""
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	a.ts
+	  Part of 'files' list in tsconfig.json
+	folder/target.ts
+	  Part of 'files' list in tsconfig.json
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/folder/target.ts",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": []
+      }
+    }
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/folder/target.ts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/a.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/folder/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/a.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/folder/target.ts (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "formatOptions": {
+          "indentSize": 4,
+          "tabSize": 4,
+          "newLineCharacter": "\n",
+          "convertTabsToSpaces": true,
+          "indentStyle": 2,
+          "insertSpaceAfterConstructor": false,
+          "insertSpaceAfterCommaDelimiter": true,
+          "insertSpaceAfterSemicolonInForStatements": true,
+          "insertSpaceBeforeAndAfterBinaryOperators": true,
+          "insertSpaceAfterKeywordsInControlFlowStatements": true,
+          "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
+          "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
+          "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
+          "insertSpaceBeforeFunctionParenthesis": false,
+          "placeOpenBraceOnNewLineForFunctions": false,
+          "placeOpenBraceOnNewLineForControlBlocks": false,
+          "semicolons": "ignore",
+          "trimTrailingWhitespace": true,
+          "indentSwitchCase": true
+        }
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] Format host information updated
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 1,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/target.ts",
+        "pastedText": [
+          "foo"
+        ],
+        "pasteLocations": [
+          {
+            "start": {
+              "line": 1,
+              "offset": 1
+            },
+            "end": {
+              "line": 1,
+              "offset": 1
+            }
+          }
+        ],
+        "copiedFrom": {
+          "file": "/home/src/workspaces/project/a.ts",
+          "spans": [
+            {
+              "start": {
+                "line": 4,
+                "offset": 1
+              },
+              "end": {
+                "line": 4,
+                "offset": 4
+              }
+            }
+          ]
+        }
+      },
+      "command": "getPasteEdits"
+    }
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/a.ts Text-1 "function foo() { }\n\n// comment\nfoo\n/* another comment */"
+	/home/src/workspaces/project/folder/target.ts SVC-1-1 "foo"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "getPasteEdits",
+      "request_seq": 2,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      },
+      "body": {
+        "edits": [
+          {
+            "fileName": "/home/src/workspaces/project/a.ts",
+            "textChanges": [
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "export "
+              }
+            ]
+          },
+          {
+            "fileName": "/home/src/workspaces/project/folder/target.ts",
+            "textChanges": [
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "import { foo } from \"../a\";\n\n"
+              },
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "foo"
+              }
+            ]
+          }
+        ],
+        "fixId": "providePostPasteEdits"
+      }
+    }
+After Request
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 3 *changed*
+    projectProgramVersion: 1
+    dirty: true *changed*
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/a.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/folder/target.ts (Open) *changed*
+    version: SVC-1-2 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
diff --git a/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_requireImportJsx.js b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_requireImportJsx.js
new file mode 100644
index 0000000000000..016043d689f0c
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/pasteEdits_requireImportJsx.js
@@ -0,0 +1,395 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/b.jsx]
+import React = require("./react");
+
+class MyComponent extends React.Component {
+    render() {
+        return <div />;
+    }
+}
+
+//// [/home/src/workspaces/project/folder/c.jsx]
+
+
+//// [/home/src/workspaces/project/react.d.ts]
+export = React;
+export as namespace React;
+declare namespace React {
+    class Component {}
+}
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{ "files": ["folder/c.jsx", "react.d.ts", "b.jsx"] }
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/c.jsx"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/folder/c.jsx ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/folder/c.jsx",
+  "/home/src/workspaces/project/react.d.ts",
+  "/home/src/workspaces/project/b.jsx"
+ ],
+ "options": {
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/folder/c.jsx to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/react.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/b.jsx 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 0 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 0 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/folder/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (6)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/folder/c.jsx SVC-1-0 ""
+	/home/src/workspaces/project/react.d.ts Text-1 "export = React;\nexport as namespace React;\ndeclare namespace React {\n    class Component {}\n}"
+	/home/src/workspaces/project/b.jsx Text-1 "import React = require(\"./react\");\n\nclass MyComponent extends React.Component {\n    render() {\n        return <div />;\n    }\n}"
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	folder/c.jsx
+	  Part of 'files' list in tsconfig.json
+	react.d.ts
+	  Part of 'files' list in tsconfig.json
+	  Imported via "./react" from file 'b.jsx'
+	b.jsx
+	  Part of 'files' list in tsconfig.json
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/folder/c.jsx",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": []
+      }
+    }
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (6)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/folder/c.jsx ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/b.jsx: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/folder/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/react.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectories::
+/home/src/workspaces/project: *new*
+  {}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/b.jsx *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/folder/c.jsx (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/react.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "formatOptions": {
+          "indentSize": 4,
+          "tabSize": 4,
+          "newLineCharacter": "\n",
+          "convertTabsToSpaces": true,
+          "indentStyle": 2,
+          "insertSpaceAfterConstructor": false,
+          "insertSpaceAfterCommaDelimiter": true,
+          "insertSpaceAfterSemicolonInForStatements": true,
+          "insertSpaceBeforeAndAfterBinaryOperators": true,
+          "insertSpaceAfterKeywordsInControlFlowStatements": true,
+          "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
+          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
+          "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
+          "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
+          "insertSpaceBeforeFunctionParenthesis": false,
+          "placeOpenBraceOnNewLineForFunctions": false,
+          "placeOpenBraceOnNewLineForControlBlocks": false,
+          "semicolons": "ignore",
+          "trimTrailingWhitespace": true,
+          "indentSwitchCase": true
+        }
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] Format host information updated
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 1,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/folder/c.jsx",
+        "pastedText": [
+          "class MyComponent extends React.Component {\n    render() {\n        return <div />;\n    }\n}"
+        ],
+        "pasteLocations": [
+          {
+            "start": {
+              "line": 1,
+              "offset": 1
+            },
+            "end": {
+              "line": 1,
+              "offset": 1
+            }
+          }
+        ],
+        "copiedFrom": {
+          "file": "/home/src/workspaces/project/b.jsx",
+          "spans": [
+            {
+              "start": {
+                "line": 3,
+                "offset": 1
+              },
+              "end": {
+                "line": 7,
+                "offset": 2
+              }
+            }
+          ]
+        }
+      },
+      "command": "getPasteEdits"
+    }
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (6)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/folder/c.jsx SVC-1-1 "class MyComponent extends React.Component {\n    render() {\n        return <div />;\n    }\n}"
+	/home/src/workspaces/project/react.d.ts Text-1 "export = React;\nexport as namespace React;\ndeclare namespace React {\n    class Component {}\n}"
+	/home/src/workspaces/project/b.jsx Text-1 "import React = require(\"./react\");\n\nclass MyComponent extends React.Component {\n    render() {\n        return <div />;\n    }\n}"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "getPasteEdits",
+      "request_seq": 2,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      },
+      "body": {
+        "edits": [
+          {
+            "fileName": "/home/src/workspaces/project/folder/c.jsx",
+            "textChanges": [
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "const React = require(\"../react\");\n\n"
+              },
+              {
+                "start": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "end": {
+                  "line": 1,
+                  "offset": 1
+                },
+                "newText": "class MyComponent extends React.Component {\n    render() {\n        return <div />;\n    }\n}"
+              }
+            ]
+          }
+        ],
+        "fixId": "providePostPasteEdits"
+      }
+    }
+After Request
+Projects::
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 3 *changed*
+    projectProgramVersion: 1
+    dirty: true *changed*
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/b.jsx
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/folder/c.jsx (Open) *changed*
+    version: SVC-1-2 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/react.d.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
diff --git a/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard1.js b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard1.js
new file mode 100644
index 0000000000000..d57bff6b5d2fb
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard1.js
@@ -0,0 +1,539 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/package.json]
+{
+  "name": "foo",
+  "main": "dist/index.js",
+  "module": "dist/index.mjs",
+  "types": "dist/index.d.ts",
+  "imports": {
+    "#*": {
+      "types": "./dist/*.d.ts",
+      "import": "./dist/*.mjs",
+      "default": "./dist/*.js"
+    },
+    "#arguments": {
+      "types": "./dist/arguments/index.d.ts",
+      "import": "./dist/arguments/index.mjs",
+      "default": "./dist/arguments/index.js"
+    }
+  }
+}
+
+//// [/home/src/workspaces/project/src/arguments/index.ts]
+export const arguments = 0;
+
+//// [/home/src/workspaces/project/src/blah.ts]
+export const blah = 0;
+
+//// [/home/src/workspaces/project/src/index.ts]
+export const index = 0;
+
+//// [/home/src/workspaces/project/src/m.mts]
+import { } from "";
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{
+  "compilerOptions": {
+    "module": "nodenext",
+    "rootDir": "src",
+    "outDir": "dist"
+  }
+}
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/tsconfig.json"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/src/blah.ts",
+  "/home/src/workspaces/project/src/index.ts",
+  "/home/src/workspaces/project/src/m.mts",
+  "/home/src/workspaces/project/src/arguments/index.ts"
+ ],
+ "options": {
+  "module": 199,
+  "rootDir": "/home/src/workspaces/project/src",
+  "outDir": "/home/src/workspaces/project/dist",
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/tsconfig.json to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/blah.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/index.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/m.mts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/arguments/index.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/arguments/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts 500 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Missing file
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+	/home/src/workspaces/project/src/blah.ts Text-1 "export const blah = 0;"
+	/home/src/workspaces/project/src/index.ts Text-1 "export const index = 0;"
+	/home/src/workspaces/project/src/m.mts Text-1 "import { } from \"\";"
+	/home/src/workspaces/project/src/arguments/index.ts Text-1 "export const arguments = 0;"
+
+
+	src/blah.ts
+	  Matched by default include pattern '**/*'
+	  File is CommonJS module because 'package.json' does not have field "type"
+	src/index.ts
+	  Matched by default include pattern '**/*'
+	  File is CommonJS module because 'package.json' does not have field "type"
+	src/m.mts
+	  Matched by default include pattern '**/*'
+	src/arguments/index.ts
+	  Matched by default include pattern '**/*'
+	  File is CommonJS module because 'package.json' does not have field "type"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/tsconfig.json",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": [
+          {
+            "text": "File '/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts' not found.\n  The file is in the program because:\n    Default library for target 'esnext'",
+            "code": 6053,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Array'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Boolean'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Function'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'IArguments'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Number'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Object'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'RegExp'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'String'.",
+            "code": 2318,
+            "category": "error"
+          }
+        ]
+      }
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: undefined
+Info seq  [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n  \"compilerOptions\": {\n    \"module\": \"nodenext\",\n    \"rootDir\": \"src\",\n    \"outDir\": \"dist\"\n  }\n}"
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	tsconfig.json
+	  Root file specified for compilation
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 250 undefined WatchType: package.json file
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/arguments/index.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/arguments/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/blah.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/index.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/m.mts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+  {}
+/home/src/workspaces/project: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    noOpenRef: true
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/arguments/index.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/blah.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/m.mts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/m.mts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/workspaces/project/src/m.mts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/src/m.mts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/src/m.mts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 1,
+      "success": true
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json:
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/arguments/index.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/arguments/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/blah.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/index.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json:
+  {"pollingInterval":2000}
+
+watchedFiles *deleted*::
+/home/src/workspaces/project/src/m.mts:
+  {"pollingInterval":500}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules:
+  {}
+/home/src/workspaces/node_modules/@types:
+  {}
+  {}
+/home/src/workspaces/project:
+  {}
+/home/src/workspaces/project/node_modules:
+  {}
+/home/src/workspaces/project/node_modules/@types:
+  {}
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred)
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    noOpenRef: false *changed*
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/arguments/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/m.mts (Open) *changed*
+    open: true *changed*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "preferences": {}
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 2,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 3,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/m.mts",
+        "line": 1,
+        "offset": 18
+      },
+      "command": "completionInfo"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "completionInfo",
+      "request_seq": 3,
+      "success": true,
+      "body": {
+        "isGlobalCompletion": false,
+        "isMemberCompletion": false,
+        "isNewIdentifierLocation": true,
+        "entries": [
+          {
+            "name": "#blah",
+            "kind": "script",
+            "kindModifiers": "",
+            "sortText": "11"
+          },
+          {
+            "name": "#index",
+            "kind": "script",
+            "kindModifiers": "",
+            "sortText": "11"
+          },
+          {
+            "name": "#arguments",
+            "kind": "script",
+            "kindModifiers": "",
+            "sortText": "11"
+          }
+        ],
+        "defaultCommitCharacters": []
+      }
+    }
\ No newline at end of file
diff --git a/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard2.js b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard2.js
new file mode 100644
index 0000000000000..49564765dcd47
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard2.js
@@ -0,0 +1,2203 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/package.json]
+{
+  "name": "salesforce-pageobjects",
+  "version": "1.0.0",
+  "imports": {
+    "#*": {
+      "types": "./dist/*.d.ts",
+      "import": "./dist/*.mjs",
+      "default": "./dist/*.js"
+    }
+  }
+}
+
+//// [/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts]
+export const actionRenderer = 0;
+
+//// [/home/src/workspaces/project/src/index.mts]
+import { } from "";
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{
+  "compilerOptions": {
+    "module": "nodenext",
+    "rootDir": "src",
+    "outDir": "dist"
+  }
+}
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/tsconfig.json"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/src/index.mts",
+  "/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts"
+ ],
+ "options": {
+  "module": 199,
+  "rootDir": "/home/src/workspaces/project/src",
+  "outDir": "/home/src/workspaces/project/dist",
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/tsconfig.json to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/index.mts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/action/pageObjects/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/action/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts 500 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Missing file
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (2)
+	/home/src/workspaces/project/src/index.mts Text-1 "import { } from \"\";"
+	/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts Text-1 "export const actionRenderer = 0;"
+
+
+	src/index.mts
+	  Matched by default include pattern '**/*'
+	src/action/pageObjects/actionRenderer.ts
+	  Matched by default include pattern '**/*'
+	  File is CommonJS module because 'package.json' does not have field "type"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/tsconfig.json",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": [
+          {
+            "text": "File '/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts' not found.\n  The file is in the program because:\n    Default library for target 'esnext'",
+            "code": 6053,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Array'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Boolean'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Function'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'IArguments'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Number'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Object'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'RegExp'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'String'.",
+            "code": 2318,
+            "category": "error"
+          }
+        ]
+      }
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: undefined
+Info seq  [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n  \"compilerOptions\": {\n    \"module\": \"nodenext\",\n    \"rootDir\": \"src\",\n    \"outDir\": \"dist\"\n  }\n}"
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	tsconfig.json
+	  Root file specified for compilation
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 250 undefined WatchType: package.json file
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (2)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/action/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/action/pageObjects/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/index.mts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+  {}
+/home/src/workspaces/project: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    noOpenRef: true
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/workspaces/project/src/index.mts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/src/index.mts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (2)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/src/index.mts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 1,
+      "success": true
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json:
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/action/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/action/pageObjects/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json:
+  {"pollingInterval":2000}
+
+watchedFiles *deleted*::
+/home/src/workspaces/project/src/index.mts:
+  {"pollingInterval":500}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules:
+  {}
+/home/src/workspaces/node_modules/@types:
+  {}
+  {}
+/home/src/workspaces/project:
+  {}
+/home/src/workspaces/project/node_modules:
+  {}
+/home/src/workspaces/project/node_modules/@types:
+  {}
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred)
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    noOpenRef: false *changed*
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts (Open) *changed*
+    open: true *changed*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "preferences": {}
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 2,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 3,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 18
+      },
+      "command": "completionInfo"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "completionInfo",
+      "request_seq": 3,
+      "success": true,
+      "body": {
+        "isGlobalCompletion": false,
+        "isMemberCompletion": false,
+        "isNewIdentifierLocation": true,
+        "entries": [
+          {
+            "name": "#action",
+            "kind": "directory",
+            "kindModifiers": "",
+            "sortText": "11"
+          }
+        ],
+        "defaultCommitCharacters": []
+      }
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 4,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 18,
+        "endLine": 1,
+        "endOffset": 18,
+        "insertString": ""
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 4,
+      "success": true
+    }
+After Request
+Projects::
+/dev/null/inferredProject1* (Inferred)
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 2 *changed*
+    projectProgramVersion: 1
+    dirty: true *changed*
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts (Open) *changed*
+    version: SVC-2-1 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 5,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 18,
+        "endLine": 1,
+        "endOffset": 18,
+        "insertString": "#"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 5,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts (Open) *changed*
+    version: SVC-2-2 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 6,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 19,
+        "key": "#"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 6,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 7,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 19,
+        "endLine": 1,
+        "endOffset": 19,
+        "insertString": "a"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 7,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts (Open) *changed*
+    version: SVC-2-3 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 8,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 20,
+        "key": "a"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 8,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 9,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 20,
+        "endLine": 1,
+        "endOffset": 20,
+        "insertString": "c"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 9,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts (Open) *changed*
+    version: SVC-2-4 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 10,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 21,
+        "key": "c"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 10,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 11,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 21,
+        "endLine": 1,
+        "endOffset": 21,
+        "insertString": "t"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 11,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts (Open) *changed*
+    version: SVC-2-5 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 12,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 22,
+        "key": "t"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 12,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 13,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 22,
+        "endLine": 1,
+        "endOffset": 22,
+        "insertString": "i"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 13,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts (Open) *changed*
+    version: SVC-2-6 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 14,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 23,
+        "key": "i"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 14,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 15,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 23,
+        "endLine": 1,
+        "endOffset": 23,
+        "insertString": "o"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 15,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts (Open) *changed*
+    version: SVC-2-7 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 16,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 24,
+        "key": "o"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 16,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 17,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 24,
+        "endLine": 1,
+        "endOffset": 24,
+        "insertString": "n"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 17,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts (Open) *changed*
+    version: SVC-2-8 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 18,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 25,
+        "key": "n"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 18,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 19,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 25,
+        "endLine": 1,
+        "endOffset": 25,
+        "insertString": "/"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 19,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts (Open) *changed*
+    version: SVC-2-9 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 20,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 26,
+        "key": "/"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 20,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 21,
+      "type": "request",
+      "arguments": {
+        "preferences": {}
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 21,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 22,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 26
+      },
+      "command": "completionInfo"
+    }
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/dist 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/dist 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (2)
+	/home/src/workspaces/project/src/index.mts SVC-2-9 "import { } from \"#action/\";"
+	/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts Text-1 "export const actionRenderer = 0;"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "completionInfo",
+      "request_seq": 22,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      },
+      "body": {
+        "isGlobalCompletion": false,
+        "isMemberCompletion": false,
+        "isNewIdentifierLocation": true,
+        "entries": [
+          {
+            "name": "pageObjects",
+            "kind": "directory",
+            "kindModifiers": "",
+            "sortText": "11"
+          }
+        ],
+        "defaultCommitCharacters": []
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json:
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/action/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/action/pageObjects/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json:
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules:
+  {}
+  {} *new*
+/home/src/workspaces/node_modules/@types:
+  {}
+  {}
+/home/src/workspaces/project:
+  {}
+/home/src/workspaces/project/dist: *new*
+  {}
+/home/src/workspaces/project/node_modules:
+  {}
+  {} *new*
+/home/src/workspaces/project/node_modules/@types:
+  {}
+  {}
+/home/src/workspaces/project/src: *new*
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred)
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 2
+    projectProgramVersion: 2 *changed*
+    dirty: false *changed*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 23,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 26,
+        "endLine": 1,
+        "endOffset": 26,
+        "insertString": ""
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 23,
+      "success": true
+    }
+After Request
+Projects::
+/dev/null/inferredProject1* (Inferred)
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 3 *changed*
+    projectProgramVersion: 2
+    dirty: true *changed*
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts (Open) *changed*
+    version: SVC-2-10 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 24,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 26,
+        "endLine": 1,
+        "endOffset": 26,
+        "insertString": "p"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 24,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts (Open) *changed*
+    version: SVC-2-11 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 25,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 27,
+        "key": "p"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 25,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 26,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 27,
+        "endLine": 1,
+        "endOffset": 27,
+        "insertString": "a"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 26,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts (Open) *changed*
+    version: SVC-2-12 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 27,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 28,
+        "key": "a"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 27,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 28,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 28,
+        "endLine": 1,
+        "endOffset": 28,
+        "insertString": "g"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 28,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts (Open) *changed*
+    version: SVC-2-13 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 29,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 29,
+        "key": "g"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 29,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 30,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 29,
+        "endLine": 1,
+        "endOffset": 29,
+        "insertString": "e"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 30,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts (Open) *changed*
+    version: SVC-2-14 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 31,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 30,
+        "key": "e"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 31,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 32,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 30,
+        "endLine": 1,
+        "endOffset": 30,
+        "insertString": "O"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 32,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts (Open) *changed*
+    version: SVC-2-15 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 33,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 31,
+        "key": "O"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 33,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 34,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 31,
+        "endLine": 1,
+        "endOffset": 31,
+        "insertString": "b"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 34,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts (Open) *changed*
+    version: SVC-2-16 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 35,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 32,
+        "key": "b"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 35,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 36,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 32,
+        "endLine": 1,
+        "endOffset": 32,
+        "insertString": "j"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 36,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts (Open) *changed*
+    version: SVC-2-17 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 37,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 33,
+        "key": "j"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 37,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 38,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 33,
+        "endLine": 1,
+        "endOffset": 33,
+        "insertString": "e"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 38,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts (Open) *changed*
+    version: SVC-2-18 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 39,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 34,
+        "key": "e"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 39,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 40,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 34,
+        "endLine": 1,
+        "endOffset": 34,
+        "insertString": "c"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 40,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts (Open) *changed*
+    version: SVC-2-19 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 41,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 35,
+        "key": "c"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 41,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 42,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 35,
+        "endLine": 1,
+        "endOffset": 35,
+        "insertString": "t"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 42,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts (Open) *changed*
+    version: SVC-2-20 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 43,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 36,
+        "key": "t"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 43,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 44,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 36,
+        "endLine": 1,
+        "endOffset": 36,
+        "insertString": "s"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 44,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts (Open) *changed*
+    version: SVC-2-21 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 45,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 37,
+        "key": "s"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 45,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 46,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 37,
+        "endLine": 1,
+        "endOffset": 37,
+        "insertString": "/"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 46,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts (Open) *changed*
+    version: SVC-2-22 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 47,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 38,
+        "key": "/"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 47,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 48,
+      "type": "request",
+      "arguments": {
+        "preferences": {}
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 48,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 49,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 38
+      },
+      "command": "completionInfo"
+    }
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (2)
+	/home/src/workspaces/project/src/index.mts SVC-2-22 "import { } from \"#action/pageObjects/\";"
+	/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts Text-1 "export const actionRenderer = 0;"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "completionInfo",
+      "request_seq": 49,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      },
+      "body": {
+        "isGlobalCompletion": false,
+        "isMemberCompletion": false,
+        "isNewIdentifierLocation": true,
+        "entries": [
+          {
+            "name": "actionRenderer",
+            "kind": "script",
+            "kindModifiers": "",
+            "sortText": "11"
+          }
+        ],
+        "defaultCommitCharacters": []
+      }
+    }
+After Request
+Projects::
+/dev/null/inferredProject1* (Inferred)
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 3
+    projectProgramVersion: 3 *changed*
+    dirty: false *changed*
diff --git a/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard3.js b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard3.js
new file mode 100644
index 0000000000000..051e47a8d8fa7
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard3.js
@@ -0,0 +1,2505 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/nope.ts]
+export const nope = 0;
+
+//// [/home/src/workspaces/project/package.json]
+{
+  "types": "index.d.ts",
+  "imports": {
+    "#component-*": {
+      "types@>=4.3.5": "types/components/*.d.ts"
+    }
+  }
+}
+
+//// [/home/src/workspaces/project/src/a.ts]
+import { } from "";
+
+//// [/home/src/workspaces/project/src/components/blah.ts]
+export const blah = 0;
+
+//// [/home/src/workspaces/project/src/components/index.ts]
+export const index = 0;
+
+//// [/home/src/workspaces/project/src/components/subfolder/one.ts]
+export const one = 0;
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{
+  "compilerOptions": {
+    "module": "nodenext",
+    "rootDir": "src",
+    "outDir": "dist",
+    "declarationDir": "types"
+  }
+}
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/tsconfig.json"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/nope.ts",
+  "/home/src/workspaces/project/src/a.ts",
+  "/home/src/workspaces/project/src/components/blah.ts",
+  "/home/src/workspaces/project/src/components/index.ts",
+  "/home/src/workspaces/project/src/components/subfolder/one.ts"
+ ],
+ "options": {
+  "module": 199,
+  "rootDir": "/home/src/workspaces/project/src",
+  "outDir": "/home/src/workspaces/project/dist",
+  "declarationDir": "/home/src/workspaces/project/types",
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/tsconfig.json to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/nope.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/a.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/components/blah.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/components/index.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/components/subfolder/one.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/components/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/components/subfolder/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts 500 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Missing file
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+	/home/src/workspaces/project/nope.ts Text-1 "export const nope = 0;"
+	/home/src/workspaces/project/src/a.ts Text-1 "import { } from \"\";"
+	/home/src/workspaces/project/src/components/blah.ts Text-1 "export const blah = 0;"
+	/home/src/workspaces/project/src/components/index.ts Text-1 "export const index = 0;"
+	/home/src/workspaces/project/src/components/subfolder/one.ts Text-1 "export const one = 0;"
+
+
+	nope.ts
+	  Matched by default include pattern '**/*'
+	  File is CommonJS module because 'package.json' does not have field "type"
+	src/a.ts
+	  Matched by default include pattern '**/*'
+	  File is CommonJS module because 'package.json' does not have field "type"
+	src/components/blah.ts
+	  Matched by default include pattern '**/*'
+	  File is CommonJS module because 'package.json' does not have field "type"
+	src/components/index.ts
+	  Matched by default include pattern '**/*'
+	  File is CommonJS module because 'package.json' does not have field "type"
+	src/components/subfolder/one.ts
+	  Matched by default include pattern '**/*'
+	  File is CommonJS module because 'package.json' does not have field "type"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/tsconfig.json",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": [
+          {
+            "text": "File '/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts' not found.\n  The file is in the program because:\n    Default library for target 'esnext'",
+            "code": 6053,
+            "category": "error"
+          },
+          {
+            "text": "File '/home/src/workspaces/project/nope.ts' is not under 'rootDir' '/home/src/workspaces/project/src'. 'rootDir' is expected to contain all source files.\n  The file is in the program because:\n    Matched by default include pattern '**/*'\n  File is CommonJS module because '/home/src/workspaces/project/package.json' does not have field \"type\"",
+            "code": 6059,
+            "category": "error"
+          },
+          {
+            "start": {
+              "line": 6,
+              "offset": 5
+            },
+            "end": {
+              "line": 6,
+              "offset": 21
+            },
+            "text": "Option 'declarationDir' cannot be specified without specifying option 'declaration' or option 'composite'.",
+            "code": 5069,
+            "category": "error",
+            "fileName": "/home/src/workspaces/project/tsconfig.json"
+          },
+          {
+            "text": "Cannot find global type 'Array'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Boolean'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Function'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'IArguments'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Number'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Object'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'RegExp'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'String'.",
+            "code": 2318,
+            "category": "error"
+          }
+        ]
+      }
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: undefined
+Info seq  [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n  \"compilerOptions\": {\n    \"module\": \"nodenext\",\n    \"rootDir\": \"src\",\n    \"outDir\": \"dist\",\n    \"declarationDir\": \"types\"\n  }\n}"
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	tsconfig.json
+	  Root file specified for compilation
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 250 undefined WatchType: package.json file
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/nope.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/a.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/components/blah.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/components/index.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/components/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/components/subfolder/one.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/components/subfolder/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+  {}
+/home/src/workspaces/project: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    noOpenRef: true
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/blah.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/index.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/subfolder/one.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/workspaces/project/src/a.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/src/a.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/src/a.ts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 1,
+      "success": true
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/nope.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/package.json:
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/components/blah.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/components/index.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/components/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/components/subfolder/one.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/components/subfolder/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json:
+  {"pollingInterval":2000}
+
+watchedFiles *deleted*::
+/home/src/workspaces/project/src/a.ts:
+  {"pollingInterval":500}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules:
+  {}
+/home/src/workspaces/node_modules/@types:
+  {}
+  {}
+/home/src/workspaces/project:
+  {}
+/home/src/workspaces/project/node_modules:
+  {}
+/home/src/workspaces/project/node_modules/@types:
+  {}
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred)
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    noOpenRef: false *changed*
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.ts (Open) *changed*
+    open: true *changed*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/components/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "preferences": {}
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 2,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 3,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 18
+      },
+      "command": "completionInfo"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "completionInfo",
+      "request_seq": 3,
+      "success": true,
+      "body": {
+        "isGlobalCompletion": false,
+        "isMemberCompletion": false,
+        "isNewIdentifierLocation": true,
+        "entries": [
+          {
+            "name": "#component-blah",
+            "kind": "script",
+            "kindModifiers": "",
+            "sortText": "11"
+          },
+          {
+            "name": "#component-index",
+            "kind": "script",
+            "kindModifiers": "",
+            "sortText": "11"
+          },
+          {
+            "name": "#component-subfolder",
+            "kind": "directory",
+            "kindModifiers": "",
+            "sortText": "11"
+          }
+        ],
+        "defaultCommitCharacters": []
+      }
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 4,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 18,
+        "endLine": 1,
+        "endOffset": 18,
+        "insertString": ""
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 4,
+      "success": true
+    }
+After Request
+Projects::
+/dev/null/inferredProject1* (Inferred)
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 2 *changed*
+    projectProgramVersion: 1
+    dirty: true *changed*
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.ts (Open) *changed*
+    version: SVC-2-1 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/components/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 5,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 18,
+        "endLine": 1,
+        "endOffset": 18,
+        "insertString": "#"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 5,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.ts (Open) *changed*
+    version: SVC-2-2 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/components/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 6,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 19,
+        "key": "#"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 6,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 7,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 19,
+        "endLine": 1,
+        "endOffset": 19,
+        "insertString": "c"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 7,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.ts (Open) *changed*
+    version: SVC-2-3 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/components/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 8,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 20,
+        "key": "c"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 8,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 9,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 20,
+        "endLine": 1,
+        "endOffset": 20,
+        "insertString": "o"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 9,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.ts (Open) *changed*
+    version: SVC-2-4 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/components/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 10,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 21,
+        "key": "o"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 10,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 11,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 21,
+        "endLine": 1,
+        "endOffset": 21,
+        "insertString": "m"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 11,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.ts (Open) *changed*
+    version: SVC-2-5 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/components/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 12,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 22,
+        "key": "m"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 12,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 13,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 22,
+        "endLine": 1,
+        "endOffset": 22,
+        "insertString": "p"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 13,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.ts (Open) *changed*
+    version: SVC-2-6 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/components/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 14,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 23,
+        "key": "p"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 14,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 15,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 23,
+        "endLine": 1,
+        "endOffset": 23,
+        "insertString": "o"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 15,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.ts (Open) *changed*
+    version: SVC-2-7 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/components/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 16,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 24,
+        "key": "o"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 16,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 17,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 24,
+        "endLine": 1,
+        "endOffset": 24,
+        "insertString": "n"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 17,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.ts (Open) *changed*
+    version: SVC-2-8 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/components/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 18,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 25,
+        "key": "n"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 18,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 19,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 25,
+        "endLine": 1,
+        "endOffset": 25,
+        "insertString": "e"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 19,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.ts (Open) *changed*
+    version: SVC-2-9 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/components/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 20,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 26,
+        "key": "e"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 20,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 21,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 26,
+        "endLine": 1,
+        "endOffset": 26,
+        "insertString": "n"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 21,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.ts (Open) *changed*
+    version: SVC-2-10 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/components/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 22,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 27,
+        "key": "n"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 22,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 23,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 27,
+        "endLine": 1,
+        "endOffset": 27,
+        "insertString": "t"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 23,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.ts (Open) *changed*
+    version: SVC-2-11 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/components/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 24,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 28,
+        "key": "t"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 24,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 25,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 28,
+        "endLine": 1,
+        "endOffset": 28,
+        "insertString": "-"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 25,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.ts (Open) *changed*
+    version: SVC-2-12 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/components/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 26,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 29,
+        "key": "-"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 26,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 27,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 29,
+        "endLine": 1,
+        "endOffset": 29,
+        "insertString": "s"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 27,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.ts (Open) *changed*
+    version: SVC-2-13 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/components/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 28,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 30,
+        "key": "s"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 28,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 29,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 30,
+        "endLine": 1,
+        "endOffset": 30,
+        "insertString": "u"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 29,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.ts (Open) *changed*
+    version: SVC-2-14 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/components/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 30,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 31,
+        "key": "u"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 30,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 31,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 31,
+        "endLine": 1,
+        "endOffset": 31,
+        "insertString": "b"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 31,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.ts (Open) *changed*
+    version: SVC-2-15 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/components/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 32,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 32,
+        "key": "b"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 32,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 33,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 32,
+        "endLine": 1,
+        "endOffset": 32,
+        "insertString": "f"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 33,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.ts (Open) *changed*
+    version: SVC-2-16 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/components/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 34,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 33,
+        "key": "f"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 34,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 35,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 33,
+        "endLine": 1,
+        "endOffset": 33,
+        "insertString": "o"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 35,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.ts (Open) *changed*
+    version: SVC-2-17 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/components/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 36,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 34,
+        "key": "o"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 36,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 37,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 34,
+        "endLine": 1,
+        "endOffset": 34,
+        "insertString": "l"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 37,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.ts (Open) *changed*
+    version: SVC-2-18 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/components/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 38,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 35,
+        "key": "l"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 38,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 39,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 35,
+        "endLine": 1,
+        "endOffset": 35,
+        "insertString": "d"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 39,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.ts (Open) *changed*
+    version: SVC-2-19 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/components/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 40,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 36,
+        "key": "d"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 40,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 41,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 36,
+        "endLine": 1,
+        "endOffset": 36,
+        "insertString": "e"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 41,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.ts (Open) *changed*
+    version: SVC-2-20 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/components/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 42,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 37,
+        "key": "e"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 42,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 43,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 37,
+        "endLine": 1,
+        "endOffset": 37,
+        "insertString": "r"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 43,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.ts (Open) *changed*
+    version: SVC-2-21 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/components/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 44,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 38,
+        "key": "r"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 44,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 45,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 38,
+        "endLine": 1,
+        "endOffset": 38,
+        "insertString": "/"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 45,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.ts (Open) *changed*
+    version: SVC-2-22 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/components/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/components/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 46,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 39,
+        "key": "/"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 46,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 47,
+      "type": "request",
+      "arguments": {
+        "preferences": {}
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 47,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 48,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.ts",
+        "line": 1,
+        "offset": 39
+      },
+      "command": "completionInfo"
+    }
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+	/home/src/workspaces/project/nope.ts Text-1 "export const nope = 0;"
+	/home/src/workspaces/project/src/a.ts SVC-2-22 "import { } from \"#component-subfolder/\";"
+	/home/src/workspaces/project/src/components/blah.ts Text-1 "export const blah = 0;"
+	/home/src/workspaces/project/src/components/index.ts Text-1 "export const index = 0;"
+	/home/src/workspaces/project/src/components/subfolder/one.ts Text-1 "export const one = 0;"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "completionInfo",
+      "request_seq": 48,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      },
+      "body": {
+        "isGlobalCompletion": false,
+        "isMemberCompletion": false,
+        "isNewIdentifierLocation": true,
+        "entries": [
+          {
+            "name": "one",
+            "kind": "script",
+            "kindModifiers": "",
+            "sortText": "11"
+          }
+        ],
+        "defaultCommitCharacters": []
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/nope.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/package.json:
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/components/blah.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/components/index.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/components/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/components/subfolder/one.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/components/subfolder/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json:
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules:
+  {}
+  {} *new*
+/home/src/workspaces/node_modules/@types:
+  {}
+  {}
+/home/src/workspaces/project:
+  {}
+/home/src/workspaces/project/node_modules:
+  {}
+  {} *new*
+/home/src/workspaces/project/node_modules/@types:
+  {}
+  {}
+/home/src/workspaces/project/src: *new*
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred)
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 2
+    projectProgramVersion: 2 *changed*
+    dirty: false *changed*
diff --git a/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard4.js b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard4.js
new file mode 100644
index 0000000000000..264b70a434faa
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard4.js
@@ -0,0 +1,1768 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/nope.ts]
+export const nope = 0;
+
+//// [/home/src/workspaces/project/package.json]
+{
+  "types": "index.d.ts",
+  "imports": {
+    "#*": "dist/*",
+    "#foo/*": "dist/*",
+    "#bar/*": "dist/*",
+    "#exact-match": "dist/index.d.ts"
+  }
+}
+
+//// [/home/src/workspaces/project/src/a.mts]
+import { } from "";
+
+//// [/home/src/workspaces/project/src/blah.ts]
+export const blah = 0;
+
+//// [/home/src/workspaces/project/src/foo/onlyInFooFolder.ts]
+export const foo = 0;
+
+//// [/home/src/workspaces/project/src/index.ts]
+export const index = 0;
+
+//// [/home/src/workspaces/project/src/subfolder/one.ts]
+export const one = 0;
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{
+  "compilerOptions": {
+    "module": "nodenext",
+    "rootDir": "src",
+    "outDir": "dist"
+  }
+}
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/tsconfig.json"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/nope.ts",
+  "/home/src/workspaces/project/src/a.mts",
+  "/home/src/workspaces/project/src/blah.ts",
+  "/home/src/workspaces/project/src/index.ts",
+  "/home/src/workspaces/project/src/foo/onlyInFooFolder.ts",
+  "/home/src/workspaces/project/src/subfolder/one.ts"
+ ],
+ "options": {
+  "module": 199,
+  "rootDir": "/home/src/workspaces/project/src",
+  "outDir": "/home/src/workspaces/project/dist",
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/tsconfig.json to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/nope.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/a.mts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/blah.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/index.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/foo/onlyInFooFolder.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/subfolder/one.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/foo/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/subfolder/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts 500 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Missing file
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (6)
+	/home/src/workspaces/project/nope.ts Text-1 "export const nope = 0;"
+	/home/src/workspaces/project/src/a.mts Text-1 "import { } from \"\";"
+	/home/src/workspaces/project/src/blah.ts Text-1 "export const blah = 0;"
+	/home/src/workspaces/project/src/index.ts Text-1 "export const index = 0;"
+	/home/src/workspaces/project/src/foo/onlyInFooFolder.ts Text-1 "export const foo = 0;"
+	/home/src/workspaces/project/src/subfolder/one.ts Text-1 "export const one = 0;"
+
+
+	nope.ts
+	  Matched by default include pattern '**/*'
+	  File is CommonJS module because 'package.json' does not have field "type"
+	src/a.mts
+	  Matched by default include pattern '**/*'
+	src/blah.ts
+	  Matched by default include pattern '**/*'
+	  File is CommonJS module because 'package.json' does not have field "type"
+	src/index.ts
+	  Matched by default include pattern '**/*'
+	  File is CommonJS module because 'package.json' does not have field "type"
+	src/foo/onlyInFooFolder.ts
+	  Matched by default include pattern '**/*'
+	  File is CommonJS module because 'package.json' does not have field "type"
+	src/subfolder/one.ts
+	  Matched by default include pattern '**/*'
+	  File is CommonJS module because 'package.json' does not have field "type"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/tsconfig.json",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": [
+          {
+            "text": "File '/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts' not found.\n  The file is in the program because:\n    Default library for target 'esnext'",
+            "code": 6053,
+            "category": "error"
+          },
+          {
+            "text": "File '/home/src/workspaces/project/nope.ts' is not under 'rootDir' '/home/src/workspaces/project/src'. 'rootDir' is expected to contain all source files.\n  The file is in the program because:\n    Matched by default include pattern '**/*'\n  File is CommonJS module because '/home/src/workspaces/project/package.json' does not have field \"type\"",
+            "code": 6059,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Array'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Boolean'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Function'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'IArguments'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Number'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Object'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'RegExp'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'String'.",
+            "code": 2318,
+            "category": "error"
+          }
+        ]
+      }
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: undefined
+Info seq  [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n  \"compilerOptions\": {\n    \"module\": \"nodenext\",\n    \"rootDir\": \"src\",\n    \"outDir\": \"dist\"\n  }\n}"
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	tsconfig.json
+	  Root file specified for compilation
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 250 undefined WatchType: package.json file
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (6)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/nope.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/a.mts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/blah.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/foo/onlyInFooFolder.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/foo/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/index.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/subfolder/one.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/subfolder/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+  {}
+/home/src/workspaces/project: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    noOpenRef: true
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.mts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/blah.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/foo/onlyInFooFolder.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/subfolder/one.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.mts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/workspaces/project/src/a.mts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/src/a.mts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (6)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/src/a.mts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 1,
+      "success": true
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/nope.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/package.json:
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/blah.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/foo/onlyInFooFolder.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/foo/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/index.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/subfolder/one.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/subfolder/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json:
+  {"pollingInterval":2000}
+
+watchedFiles *deleted*::
+/home/src/workspaces/project/src/a.mts:
+  {"pollingInterval":500}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules:
+  {}
+/home/src/workspaces/node_modules/@types:
+  {}
+  {}
+/home/src/workspaces/project:
+  {}
+/home/src/workspaces/project/node_modules:
+  {}
+/home/src/workspaces/project/node_modules/@types:
+  {}
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred)
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    noOpenRef: false *changed*
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.mts (Open) *changed*
+    open: true *changed*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/foo/onlyInFooFolder.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "preferences": {}
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 2,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 3,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.mts",
+        "line": 1,
+        "offset": 18
+      },
+      "command": "completionInfo"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "completionInfo",
+      "request_seq": 3,
+      "success": true,
+      "body": {
+        "isGlobalCompletion": false,
+        "isMemberCompletion": false,
+        "isNewIdentifierLocation": true,
+        "entries": [
+          {
+            "name": "#a.mjs",
+            "kind": "script",
+            "kindModifiers": ".mjs",
+            "sortText": "11"
+          },
+          {
+            "name": "#blah.js",
+            "kind": "script",
+            "kindModifiers": ".js",
+            "sortText": "11"
+          },
+          {
+            "name": "#index.js",
+            "kind": "script",
+            "kindModifiers": ".js",
+            "sortText": "11"
+          },
+          {
+            "name": "#foo",
+            "kind": "directory",
+            "kindModifiers": "",
+            "sortText": "11"
+          },
+          {
+            "name": "#subfolder",
+            "kind": "directory",
+            "kindModifiers": "",
+            "sortText": "11"
+          },
+          {
+            "name": "#bar",
+            "kind": "directory",
+            "kindModifiers": "",
+            "sortText": "11"
+          },
+          {
+            "name": "#exact-match",
+            "kind": "script",
+            "kindModifiers": "",
+            "sortText": "11"
+          }
+        ],
+        "defaultCommitCharacters": []
+      }
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 4,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.mts",
+        "line": 1,
+        "offset": 18,
+        "endLine": 1,
+        "endOffset": 18,
+        "insertString": ""
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 4,
+      "success": true
+    }
+After Request
+Projects::
+/dev/null/inferredProject1* (Inferred)
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 2 *changed*
+    projectProgramVersion: 1
+    dirty: true *changed*
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.mts (Open) *changed*
+    version: SVC-2-1 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/foo/onlyInFooFolder.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 5,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.mts",
+        "line": 1,
+        "offset": 18,
+        "endLine": 1,
+        "endOffset": 18,
+        "insertString": "#"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 5,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.mts (Open) *changed*
+    version: SVC-2-2 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/foo/onlyInFooFolder.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 6,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.mts",
+        "line": 1,
+        "offset": 19,
+        "key": "#"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 6,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 7,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.mts",
+        "line": 1,
+        "offset": 19,
+        "endLine": 1,
+        "endOffset": 19,
+        "insertString": "f"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 7,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.mts (Open) *changed*
+    version: SVC-2-3 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/foo/onlyInFooFolder.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 8,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.mts",
+        "line": 1,
+        "offset": 20,
+        "key": "f"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 8,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 9,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.mts",
+        "line": 1,
+        "offset": 20,
+        "endLine": 1,
+        "endOffset": 20,
+        "insertString": "o"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 9,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.mts (Open) *changed*
+    version: SVC-2-4 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/foo/onlyInFooFolder.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 10,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.mts",
+        "line": 1,
+        "offset": 21,
+        "key": "o"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 10,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 11,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.mts",
+        "line": 1,
+        "offset": 21,
+        "endLine": 1,
+        "endOffset": 21,
+        "insertString": "o"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 11,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.mts (Open) *changed*
+    version: SVC-2-5 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/foo/onlyInFooFolder.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 12,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.mts",
+        "line": 1,
+        "offset": 22,
+        "key": "o"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 12,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 13,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.mts",
+        "line": 1,
+        "offset": 22,
+        "endLine": 1,
+        "endOffset": 22,
+        "insertString": "/"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 13,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.mts (Open) *changed*
+    version: SVC-2-6 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/foo/onlyInFooFolder.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 14,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.mts",
+        "line": 1,
+        "offset": 23,
+        "key": "/"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 14,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 15,
+      "type": "request",
+      "arguments": {
+        "preferences": {}
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 15,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 16,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.mts",
+        "line": 1,
+        "offset": 23
+      },
+      "command": "completionInfo"
+    }
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (6)
+	/home/src/workspaces/project/nope.ts Text-1 "export const nope = 0;"
+	/home/src/workspaces/project/src/a.mts SVC-2-6 "import { } from \"#foo/\";"
+	/home/src/workspaces/project/src/blah.ts Text-1 "export const blah = 0;"
+	/home/src/workspaces/project/src/index.ts Text-1 "export const index = 0;"
+	/home/src/workspaces/project/src/foo/onlyInFooFolder.ts Text-1 "export const foo = 0;"
+	/home/src/workspaces/project/src/subfolder/one.ts Text-1 "export const one = 0;"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "completionInfo",
+      "request_seq": 16,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      },
+      "body": {
+        "isGlobalCompletion": false,
+        "isMemberCompletion": false,
+        "isNewIdentifierLocation": true,
+        "entries": [
+          {
+            "name": "a.mjs",
+            "kind": "script",
+            "kindModifiers": ".mjs",
+            "sortText": "11"
+          },
+          {
+            "name": "blah.js",
+            "kind": "script",
+            "kindModifiers": ".js",
+            "sortText": "11"
+          },
+          {
+            "name": "index.js",
+            "kind": "script",
+            "kindModifiers": ".js",
+            "sortText": "11"
+          },
+          {
+            "name": "foo",
+            "kind": "directory",
+            "kindModifiers": "",
+            "sortText": "11"
+          },
+          {
+            "name": "subfolder",
+            "kind": "directory",
+            "kindModifiers": "",
+            "sortText": "11"
+          }
+        ],
+        "defaultCommitCharacters": []
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/nope.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/package.json:
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/blah.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/foo/onlyInFooFolder.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/foo/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/index.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/subfolder/one.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/subfolder/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json:
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules:
+  {}
+  {} *new*
+/home/src/workspaces/node_modules/@types:
+  {}
+  {}
+/home/src/workspaces/project:
+  {}
+/home/src/workspaces/project/node_modules:
+  {}
+  {} *new*
+/home/src/workspaces/project/node_modules/@types:
+  {}
+  {}
+/home/src/workspaces/project/src: *new*
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred)
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 2
+    projectProgramVersion: 2 *changed*
+    dirty: false *changed*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 17,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.mts",
+        "line": 1,
+        "offset": 23,
+        "endLine": 1,
+        "endOffset": 23,
+        "insertString": ""
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 17,
+      "success": true
+    }
+After Request
+Projects::
+/dev/null/inferredProject1* (Inferred)
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 3 *changed*
+    projectProgramVersion: 2
+    dirty: true *changed*
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.mts (Open) *changed*
+    version: SVC-2-7 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/foo/onlyInFooFolder.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 18,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.mts",
+        "line": 1,
+        "offset": 23,
+        "endLine": 1,
+        "endOffset": 23,
+        "insertString": "f"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 18,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.mts (Open) *changed*
+    version: SVC-2-8 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/foo/onlyInFooFolder.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 19,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.mts",
+        "line": 1,
+        "offset": 24,
+        "key": "f"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 19,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 20,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.mts",
+        "line": 1,
+        "offset": 24,
+        "endLine": 1,
+        "endOffset": 24,
+        "insertString": "o"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 20,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.mts (Open) *changed*
+    version: SVC-2-9 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/foo/onlyInFooFolder.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 21,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.mts",
+        "line": 1,
+        "offset": 25,
+        "key": "o"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 21,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 22,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.mts",
+        "line": 1,
+        "offset": 25,
+        "endLine": 1,
+        "endOffset": 25,
+        "insertString": "o"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 22,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.mts (Open) *changed*
+    version: SVC-2-10 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/foo/onlyInFooFolder.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 23,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.mts",
+        "line": 1,
+        "offset": 26,
+        "key": "o"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 23,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 24,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.mts",
+        "line": 1,
+        "offset": 26,
+        "endLine": 1,
+        "endOffset": 26,
+        "insertString": "/"
+      },
+      "command": "change"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "change",
+      "request_seq": 24,
+      "success": true
+    }
+After Request
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/nope.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/a.mts (Open) *changed*
+    version: SVC-2-11 *changed*
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/foo/onlyInFooFolder.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/subfolder/one.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 25,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.mts",
+        "line": 1,
+        "offset": 27,
+        "key": "/"
+      },
+      "command": "formatonkey"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "formatonkey",
+      "request_seq": 25,
+      "success": true,
+      "body": []
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 26,
+      "type": "request",
+      "arguments": {
+        "preferences": {}
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 26,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 27,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/a.mts",
+        "line": 1,
+        "offset": 27
+      },
+      "command": "completionInfo"
+    }
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (6)
+	/home/src/workspaces/project/nope.ts Text-1 "export const nope = 0;"
+	/home/src/workspaces/project/src/a.mts SVC-2-11 "import { } from \"#foo/foo/\";"
+	/home/src/workspaces/project/src/blah.ts Text-1 "export const blah = 0;"
+	/home/src/workspaces/project/src/index.ts Text-1 "export const index = 0;"
+	/home/src/workspaces/project/src/foo/onlyInFooFolder.ts Text-1 "export const foo = 0;"
+	/home/src/workspaces/project/src/subfolder/one.ts Text-1 "export const one = 0;"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "completionInfo",
+      "request_seq": 27,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      },
+      "body": {
+        "isGlobalCompletion": false,
+        "isMemberCompletion": false,
+        "isNewIdentifierLocation": true,
+        "entries": [
+          {
+            "name": "onlyInFooFolder.js",
+            "kind": "script",
+            "kindModifiers": ".js",
+            "sortText": "11"
+          }
+        ],
+        "defaultCommitCharacters": []
+      }
+    }
+After Request
+Projects::
+/dev/null/inferredProject1* (Inferred)
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 3
+    projectProgramVersion: 3 *changed*
+    dirty: false *changed*
diff --git a/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard5.js b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard5.js
new file mode 100644
index 0000000000000..577d0c58f2d10
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard5.js
@@ -0,0 +1,575 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/package.json]
+{
+  "name": "foo",
+  "main": "dist/index.js",
+  "module": "dist/index.mjs",
+  "types": "dist/index.d.ts",
+  "imports": {
+    "#*": {
+      "import": {
+        "types": "./dist/types/*.d.mts",
+        "default": "./dist/esm/*.mjs"
+      },
+      "default": {
+        "types": "./dist/types/*.d.ts",
+        "default": "./dist/cjs/*.js"
+      }
+    },
+    "#only-in-cjs": {
+      "require": {
+        "types": "./dist/types/only-in-cjs/index.d.ts",
+        "default": "./dist/cjs/only-in-cjs/index.js"
+      }
+    }
+  }
+}
+
+//// [/home/src/workspaces/project/src/blah.mts]
+export const blah = 0;
+
+//// [/home/src/workspaces/project/src/blah.ts]
+export const blah = 0;
+
+//// [/home/src/workspaces/project/src/index.mts]
+import { } from "";
+
+//// [/home/src/workspaces/project/src/index.ts]
+export const index = 0;
+
+//// [/home/src/workspaces/project/src/only-in-cjs/index.ts]
+export const onlyInCjs = 0;
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{
+  "compilerOptions": {
+    "module": "nodenext",
+    "rootDir": "src",
+    "outDir": "dist/esm",
+    "declarationDir": "dist/types"
+  }
+}
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/tsconfig.json"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/src/blah.mts",
+  "/home/src/workspaces/project/src/blah.ts",
+  "/home/src/workspaces/project/src/index.mts",
+  "/home/src/workspaces/project/src/index.ts",
+  "/home/src/workspaces/project/src/only-in-cjs/index.ts"
+ ],
+ "options": {
+  "module": 199,
+  "rootDir": "/home/src/workspaces/project/src",
+  "outDir": "/home/src/workspaces/project/dist/esm",
+  "declarationDir": "/home/src/workspaces/project/dist/types",
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/tsconfig.json to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/blah.mts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/blah.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/index.mts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/index.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/only-in-cjs/index.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/only-in-cjs/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts 500 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Missing file
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+	/home/src/workspaces/project/src/blah.mts Text-1 "export const blah = 0;"
+	/home/src/workspaces/project/src/blah.ts Text-1 "export const blah = 0;"
+	/home/src/workspaces/project/src/index.mts Text-1 "import { } from \"\";"
+	/home/src/workspaces/project/src/index.ts Text-1 "export const index = 0;"
+	/home/src/workspaces/project/src/only-in-cjs/index.ts Text-1 "export const onlyInCjs = 0;"
+
+
+	src/blah.mts
+	  Matched by default include pattern '**/*'
+	src/blah.ts
+	  Matched by default include pattern '**/*'
+	  File is CommonJS module because 'package.json' does not have field "type"
+	src/index.mts
+	  Matched by default include pattern '**/*'
+	src/index.ts
+	  Matched by default include pattern '**/*'
+	  File is CommonJS module because 'package.json' does not have field "type"
+	src/only-in-cjs/index.ts
+	  Matched by default include pattern '**/*'
+	  File is CommonJS module because 'package.json' does not have field "type"
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/tsconfig.json",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": [
+          {
+            "text": "File '/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts' not found.\n  The file is in the program because:\n    Default library for target 'esnext'",
+            "code": 6053,
+            "category": "error"
+          },
+          {
+            "start": {
+              "line": 6,
+              "offset": 5
+            },
+            "end": {
+              "line": 6,
+              "offset": 21
+            },
+            "text": "Option 'declarationDir' cannot be specified without specifying option 'declaration' or option 'composite'.",
+            "code": 5069,
+            "category": "error",
+            "fileName": "/home/src/workspaces/project/tsconfig.json"
+          },
+          {
+            "text": "Cannot find global type 'Array'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Boolean'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Function'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'IArguments'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Number'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Object'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'RegExp'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'String'.",
+            "code": 2318,
+            "category": "error"
+          }
+        ]
+      }
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: undefined
+Info seq  [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n  \"compilerOptions\": {\n    \"module\": \"nodenext\",\n    \"rootDir\": \"src\",\n    \"outDir\": \"dist/esm\",\n    \"declarationDir\": \"dist/types\"\n  }\n}"
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	tsconfig.json
+	  Root file specified for compilation
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 250 undefined WatchType: package.json file
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/blah.mts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/blah.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/index.mts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/index.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/only-in-cjs/index.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/only-in-cjs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+  {}
+/home/src/workspaces/project: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    noOpenRef: true
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/blah.mts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/blah.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/only-in-cjs/index.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/workspaces/project/src/index.mts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/src/index.mts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (5)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/src/index.mts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 1,
+      "success": true
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json:
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/blah.mts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/blah.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/index.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/only-in-cjs/index.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/only-in-cjs/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/src/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json:
+  {"pollingInterval":2000}
+
+watchedFiles *deleted*::
+/home/src/workspaces/project/src/index.mts:
+  {"pollingInterval":500}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules:
+  {}
+/home/src/workspaces/node_modules/@types:
+  {}
+  {}
+/home/src/workspaces/project:
+  {}
+/home/src/workspaces/project/node_modules:
+  {}
+/home/src/workspaces/project/node_modules/@types:
+  {}
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred)
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    noOpenRef: false *changed*
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/blah.mts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts (Open) *changed*
+    open: true *changed*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/src/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/only-in-cjs/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "preferences": {}
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 2,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 3,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 18
+      },
+      "command": "completionInfo"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "completionInfo",
+      "request_seq": 3,
+      "success": true,
+      "body": {
+        "isGlobalCompletion": false,
+        "isMemberCompletion": false,
+        "isNewIdentifierLocation": true,
+        "entries": [
+          {
+            "name": "#blah",
+            "kind": "script",
+            "kindModifiers": "",
+            "sortText": "11"
+          },
+          {
+            "name": "#index",
+            "kind": "script",
+            "kindModifiers": "",
+            "sortText": "11"
+          }
+        ],
+        "defaultCommitCharacters": []
+      }
+    }
\ No newline at end of file
diff --git a/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard6.js b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard6.js
new file mode 100644
index 0000000000000..db83e37702fdf
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard6.js
@@ -0,0 +1,492 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/package.json]
+{
+  "name": "foo",
+  "main": "dist/index.js",
+  "module": "dist/index.mjs",
+  "types": "dist/index.d.ts",
+  "imports": {
+    "#*": "./dist/*?.d.ts"
+  }
+}
+
+//// [/home/src/workspaces/project/src/blah?.ts]
+export const blah = 0;
+
+//// [/home/src/workspaces/project/src/index.ts]
+export const index = 0;
+
+//// [/home/src/workspaces/project/src/m.mts]
+import { } from "";
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{
+  "compilerOptions": {
+    "module": "nodenext",
+    "rootDir": "src",
+    "outDir": "dist"
+  }
+}
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/tsconfig.json"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/src/blah?.ts",
+  "/home/src/workspaces/project/src/index.ts",
+  "/home/src/workspaces/project/src/m.mts"
+ ],
+ "options": {
+  "module": 199,
+  "rootDir": "/home/src/workspaces/project/src",
+  "outDir": "/home/src/workspaces/project/dist",
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/tsconfig.json to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/blah?.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/index.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/m.mts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts 500 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Missing file
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (3)
+	/home/src/workspaces/project/src/blah?.ts Text-1 "export const blah = 0;"
+	/home/src/workspaces/project/src/index.ts Text-1 "export const index = 0;"
+	/home/src/workspaces/project/src/m.mts Text-1 "import { } from \"\";"
+
+
+	src/blah?.ts
+	  Matched by default include pattern '**/*'
+	  File is CommonJS module because 'package.json' does not have field "type"
+	src/index.ts
+	  Matched by default include pattern '**/*'
+	  File is CommonJS module because 'package.json' does not have field "type"
+	src/m.mts
+	  Matched by default include pattern '**/*'
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/tsconfig.json",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": [
+          {
+            "text": "File '/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts' not found.\n  The file is in the program because:\n    Default library for target 'esnext'",
+            "code": 6053,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Array'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Boolean'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Function'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'IArguments'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Number'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Object'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'RegExp'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'String'.",
+            "code": 2318,
+            "category": "error"
+          }
+        ]
+      }
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: undefined
+Info seq  [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n  \"compilerOptions\": {\n    \"module\": \"nodenext\",\n    \"rootDir\": \"src\",\n    \"outDir\": \"dist\"\n  }\n}"
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	tsconfig.json
+	  Root file specified for compilation
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 250 undefined WatchType: package.json file
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (3)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/blah?.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/index.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/m.mts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+  {}
+/home/src/workspaces/project: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    noOpenRef: true
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/blah?.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/m.mts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/m.mts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/workspaces/project/src/m.mts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/src/m.mts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (3)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/src/m.mts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 1,
+      "success": true
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json:
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/blah?.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/index.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json:
+  {"pollingInterval":2000}
+
+watchedFiles *deleted*::
+/home/src/workspaces/project/src/m.mts:
+  {"pollingInterval":500}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules:
+  {}
+/home/src/workspaces/node_modules/@types:
+  {}
+  {}
+/home/src/workspaces/project:
+  {}
+/home/src/workspaces/project/node_modules:
+  {}
+/home/src/workspaces/project/node_modules/@types:
+  {}
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred)
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    noOpenRef: false *changed*
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/blah?.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/m.mts (Open) *changed*
+    open: true *changed*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "preferences": {}
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 2,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 3,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/m.mts",
+        "line": 1,
+        "offset": 18
+      },
+      "command": "completionInfo"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "completionInfo",
+      "request_seq": 3,
+      "success": true,
+      "body": {
+        "isGlobalCompletion": false,
+        "isMemberCompletion": false,
+        "isNewIdentifierLocation": true,
+        "entries": [
+          {
+            "name": "#blah",
+            "kind": "script",
+            "kindModifiers": "",
+            "sortText": "11"
+          }
+        ],
+        "defaultCommitCharacters": []
+      }
+    }
\ No newline at end of file
diff --git a/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard7.js b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard7.js
new file mode 100644
index 0000000000000..dc4713d351b5c
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard7.js
@@ -0,0 +1,468 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/package.json]
+{
+  "name": "foo",
+  "imports": {
+    "#*": "./dist/*.js"
+  }
+}
+
+//// [/home/src/workspaces/project/src/blah.ts]
+export const blah = 0;
+
+//// [/home/src/workspaces/project/src/index.mts]
+import { } from "";
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{
+  "compilerOptions": {
+    "module": "nodenext",
+    "rootDir": "src",
+    "outDir": "dist"
+  }
+}
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/tsconfig.json"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/src/blah.ts",
+  "/home/src/workspaces/project/src/index.mts"
+ ],
+ "options": {
+  "module": 199,
+  "rootDir": "/home/src/workspaces/project/src",
+  "outDir": "/home/src/workspaces/project/dist",
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/tsconfig.json to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/blah.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/index.mts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts 500 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Missing file
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (2)
+	/home/src/workspaces/project/src/blah.ts Text-1 "export const blah = 0;"
+	/home/src/workspaces/project/src/index.mts Text-1 "import { } from \"\";"
+
+
+	src/blah.ts
+	  Matched by default include pattern '**/*'
+	  File is CommonJS module because 'package.json' does not have field "type"
+	src/index.mts
+	  Matched by default include pattern '**/*'
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/tsconfig.json",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": [
+          {
+            "text": "File '/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts' not found.\n  The file is in the program because:\n    Default library for target 'esnext'",
+            "code": 6053,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Array'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Boolean'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Function'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'IArguments'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Number'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Object'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'RegExp'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'String'.",
+            "code": 2318,
+            "category": "error"
+          }
+        ]
+      }
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: undefined
+Info seq  [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n  \"compilerOptions\": {\n    \"module\": \"nodenext\",\n    \"rootDir\": \"src\",\n    \"outDir\": \"dist\"\n  }\n}"
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	tsconfig.json
+	  Root file specified for compilation
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 250 undefined WatchType: package.json file
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (2)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/blah.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/index.mts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+  {}
+/home/src/workspaces/project: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    noOpenRef: true
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/blah.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/workspaces/project/src/index.mts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/src/index.mts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (2)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/src/index.mts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 1,
+      "success": true
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json:
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/blah.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json:
+  {"pollingInterval":2000}
+
+watchedFiles *deleted*::
+/home/src/workspaces/project/src/index.mts:
+  {"pollingInterval":500}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules:
+  {}
+/home/src/workspaces/node_modules/@types:
+  {}
+  {}
+/home/src/workspaces/project:
+  {}
+/home/src/workspaces/project/node_modules:
+  {}
+/home/src/workspaces/project/node_modules/@types:
+  {}
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred)
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    noOpenRef: false *changed*
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts (Open) *changed*
+    open: true *changed*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "preferences": {}
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 2,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 3,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 18
+      },
+      "command": "completionInfo"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "completionInfo",
+      "request_seq": 3,
+      "success": true,
+      "body": {
+        "isGlobalCompletion": false,
+        "isMemberCompletion": false,
+        "isNewIdentifierLocation": true,
+        "entries": [
+          {
+            "name": "#blah",
+            "kind": "script",
+            "kindModifiers": "",
+            "sortText": "11"
+          }
+        ],
+        "defaultCommitCharacters": []
+      }
+    }
\ No newline at end of file
diff --git a/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard8.js b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard8.js
new file mode 100644
index 0000000000000..dc4713d351b5c
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard8.js
@@ -0,0 +1,468 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/package.json]
+{
+  "name": "foo",
+  "imports": {
+    "#*": "./dist/*.js"
+  }
+}
+
+//// [/home/src/workspaces/project/src/blah.ts]
+export const blah = 0;
+
+//// [/home/src/workspaces/project/src/index.mts]
+import { } from "";
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{
+  "compilerOptions": {
+    "module": "nodenext",
+    "rootDir": "src",
+    "outDir": "dist"
+  }
+}
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/tsconfig.json"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/src/blah.ts",
+  "/home/src/workspaces/project/src/index.mts"
+ ],
+ "options": {
+  "module": 199,
+  "rootDir": "/home/src/workspaces/project/src",
+  "outDir": "/home/src/workspaces/project/dist",
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/tsconfig.json to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/blah.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/index.mts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts 500 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Missing file
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (2)
+	/home/src/workspaces/project/src/blah.ts Text-1 "export const blah = 0;"
+	/home/src/workspaces/project/src/index.mts Text-1 "import { } from \"\";"
+
+
+	src/blah.ts
+	  Matched by default include pattern '**/*'
+	  File is CommonJS module because 'package.json' does not have field "type"
+	src/index.mts
+	  Matched by default include pattern '**/*'
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/tsconfig.json",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": [
+          {
+            "text": "File '/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts' not found.\n  The file is in the program because:\n    Default library for target 'esnext'",
+            "code": 6053,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Array'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Boolean'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Function'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'IArguments'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Number'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Object'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'RegExp'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'String'.",
+            "code": 2318,
+            "category": "error"
+          }
+        ]
+      }
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: undefined
+Info seq  [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n  \"compilerOptions\": {\n    \"module\": \"nodenext\",\n    \"rootDir\": \"src\",\n    \"outDir\": \"dist\"\n  }\n}"
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	tsconfig.json
+	  Root file specified for compilation
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 250 undefined WatchType: package.json file
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (2)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/blah.ts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/index.mts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+  {}
+/home/src/workspaces/project: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    noOpenRef: true
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/blah.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/workspaces/project/src/index.mts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/src/index.mts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (2)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/src/index.mts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 1,
+      "success": true
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json:
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/blah.ts:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json:
+  {"pollingInterval":2000}
+
+watchedFiles *deleted*::
+/home/src/workspaces/project/src/index.mts:
+  {"pollingInterval":500}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules:
+  {}
+/home/src/workspaces/node_modules/@types:
+  {}
+  {}
+/home/src/workspaces/project:
+  {}
+/home/src/workspaces/project/node_modules:
+  {}
+/home/src/workspaces/project/node_modules/@types:
+  {}
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred)
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    noOpenRef: false *changed*
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/blah.ts
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts (Open) *changed*
+    open: true *changed*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "preferences": {}
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 2,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 3,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 18
+      },
+      "command": "completionInfo"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "completionInfo",
+      "request_seq": 3,
+      "success": true,
+      "body": {
+        "isGlobalCompletion": false,
+        "isMemberCompletion": false,
+        "isNewIdentifierLocation": true,
+        "entries": [
+          {
+            "name": "#blah",
+            "kind": "script",
+            "kindModifiers": "",
+            "sortText": "11"
+          }
+        ],
+        "defaultCommitCharacters": []
+      }
+    }
\ No newline at end of file
diff --git a/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard9.js b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard9.js
new file mode 100644
index 0000000000000..d84b199ced8cf
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard9.js
@@ -0,0 +1,470 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/home/src/workspaces/project/package.json]
+{
+  "name": "foo",
+  "imports": {
+    "#*": "./dist/*.js"
+  }
+}
+
+//// [/home/src/workspaces/project/src/blah.js]
+export const blah = 0;
+
+//// [/home/src/workspaces/project/src/index.mts]
+import { } from "";
+
+//// [/home/src/workspaces/project/tsconfig.json]
+{
+  "compilerOptions": {
+    "module": "nodenext",
+    "rootDir": "src",
+    "outDir": "dist",
+    "allowJs": true
+  }
+}
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/tsconfig.json"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file
+Info seq  [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
+ "rootNames": [
+  "/home/src/workspaces/project/src/blah.js",
+  "/home/src/workspaces/project/src/index.mts"
+ ],
+ "options": {
+  "module": 199,
+  "rootDir": "/home/src/workspaces/project/src",
+  "outDir": "/home/src/workspaces/project/dist",
+  "allowJs": true,
+  "configFilePath": "/home/src/workspaces/project/tsconfig.json"
+ }
+}
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingStart",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json",
+        "reason": "Creating possible configured project for /home/src/workspaces/project/tsconfig.json to open"
+      }
+    }
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/blah.js 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/index.mts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts 500 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Missing file
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (2)
+	/home/src/workspaces/project/src/blah.js Text-1 "export const blah = 0;"
+	/home/src/workspaces/project/src/index.mts Text-1 "import { } from \"\";"
+
+
+	src/blah.js
+	  Matched by default include pattern '**/*'
+	  File is CommonJS module because 'package.json' does not have field "type"
+	src/index.mts
+	  Matched by default include pattern '**/*'
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "projectLoadingFinish",
+      "body": {
+        "projectName": "/home/src/workspaces/project/tsconfig.json"
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "configFileDiag",
+      "body": {
+        "triggerFile": "/home/src/workspaces/project/tsconfig.json",
+        "configFile": "/home/src/workspaces/project/tsconfig.json",
+        "diagnostics": [
+          {
+            "text": "File '/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts' not found.\n  The file is in the program because:\n    Default library for target 'esnext'",
+            "code": 6053,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Array'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Boolean'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Function'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'IArguments'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Number'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'Object'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'RegExp'.",
+            "code": 2318,
+            "category": "error"
+          },
+          {
+            "text": "Cannot find global type 'String'.",
+            "code": 2318,
+            "category": "error"
+          }
+        ]
+      }
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: undefined
+Info seq  [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /home/src/workspaces/project
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n  \"compilerOptions\": {\n    \"module\": \"nodenext\",\n    \"rootDir\": \"src\",\n    \"outDir\": \"dist\",\n    \"allowJs\": true\n  }\n}"
+
+
+	../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts'
+	../../tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts'
+	tsconfig.json
+	  Root file specified for compilation
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 250 undefined WatchType: package.json file
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (2)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json: *new*
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/blah.js: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/index.mts: *new*
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules: *new*
+  {}
+/home/src/workspaces/node_modules/@types: *new*
+  {}
+  {}
+/home/src/workspaces/project: *new*
+  {}
+/home/src/workspaces/project/node_modules: *new*
+  {}
+/home/src/workspaces/project/node_modules/@types: *new*
+  {}
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    noOpenRef: true
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/blah.js *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts *new*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/tsconfig.json (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/workspaces/project/src/index.mts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/src/index.mts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured)
+Info seq  [hh:mm:ss:mss] 	Files (2)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] 	FileName: /home/src/workspaces/project/src/index.mts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /home/src/workspaces/project/tsconfig.json
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 1,
+      "success": true
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts:
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json:
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/jsconfig.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/package.json:
+  {"pollingInterval":2000}
+  {"pollingInterval":250}
+/home/src/workspaces/project/src/blah.js:
+  {"pollingInterval":500}
+/home/src/workspaces/project/src/package.json:
+  {"pollingInterval":2000}
+/home/src/workspaces/project/tsconfig.json:
+  {"pollingInterval":2000}
+
+watchedFiles *deleted*::
+/home/src/workspaces/project/src/index.mts:
+  {"pollingInterval":500}
+
+watchedDirectoriesRecursive::
+/home/src/workspaces/node_modules:
+  {}
+/home/src/workspaces/node_modules/@types:
+  {}
+  {}
+/home/src/workspaces/project:
+  {}
+/home/src/workspaces/project/node_modules:
+  {}
+/home/src/workspaces/project/node_modules/@types:
+  {}
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred)
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+/home/src/workspaces/project/tsconfig.json (Configured) *changed*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    noOpenRef: false *changed*
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/workspaces/project/src/blah.js
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json
+/home/src/workspaces/project/src/index.mts (Open) *changed*
+    open: true *changed*
+    version: Text-1
+    containingProjects: 1
+        /home/src/workspaces/project/tsconfig.json *default*
+/home/src/workspaces/project/tsconfig.json (Open)
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "preferences": {}
+      },
+      "command": "configure"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "configure",
+      "request_seq": 2,
+      "success": true
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 3,
+      "type": "request",
+      "arguments": {
+        "file": "/home/src/workspaces/project/src/index.mts",
+        "line": 1,
+        "offset": 18
+      },
+      "command": "completionInfo"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "completionInfo",
+      "request_seq": 3,
+      "success": true,
+      "body": {
+        "isGlobalCompletion": false,
+        "isMemberCompletion": false,
+        "isNewIdentifierLocation": true,
+        "entries": [
+          {
+            "name": "#blah",
+            "kind": "script",
+            "kindModifiers": "",
+            "sortText": "11"
+          }
+        ],
+        "defaultCommitCharacters": []
+      }
+    }
\ No newline at end of file
diff --git a/tests/baselines/reference/tsserver/fourslashServer/quickinfoVerbosityServer.js b/tests/baselines/reference/tsserver/fourslashServer/quickinfoVerbosityServer.js
new file mode 100644
index 0000000000000..f248975df9bb6
--- /dev/null
+++ b/tests/baselines/reference/tsserver/fourslashServer/quickinfoVerbosityServer.js
@@ -0,0 +1,214 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+lib.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts]
+lib.decorators.d.ts-Text
+
+//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts]
+lib.decorators.legacy.d.ts-Text
+
+//// [/tests/cases/fourslash/server/quickinfoVerbosityServer.ts]
+type FooType = string | number
+const foo: FooType = 1
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 0,
+      "type": "request",
+      "arguments": {
+        "file": "/tests/cases/fourslash/server/quickinfoVerbosityServer.ts"
+      },
+      "command": "open"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tests/cases/fourslash/server/quickinfoVerbosityServer.ts ProjectRootPath: undefined:: Result: undefined
+Info seq  [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /tests/cases/fourslash/server
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
+	/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
+	/tests/cases/fourslash/server/quickinfoVerbosityServer.ts SVC-1-0 "type FooType = string | number\nconst foo: FooType = 1"
+
+
+	../../../../home/src/tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	../../../../home/src/tslibs/TS/Lib/lib.decorators.d.ts
+	  Library referenced via 'decorators' from file '../../../../home/src/tslibs/TS/Lib/lib.d.ts'
+	../../../../home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts
+	  Library referenced via 'decorators.legacy' from file '../../../../home/src/tslibs/TS/Lib/lib.d.ts'
+	quickinfoVerbosityServer.ts
+	  Root file specified for compilation
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (4)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: /tests/cases/fourslash/server/quickinfoVerbosityServer.ts ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "open",
+      "request_seq": 0,
+      "success": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After Request
+watchedFiles::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+/tests/cases/fourslash/package.json: *new*
+  {"pollingInterval":2000}
+/tests/cases/fourslash/server/jsconfig.json: *new*
+  {"pollingInterval":2000}
+/tests/cases/fourslash/server/package.json: *new*
+  {"pollingInterval":2000}
+/tests/cases/fourslash/server/tsconfig.json: *new*
+  {"pollingInterval":2000}
+
+watchedDirectoriesRecursive::
+/tests/cases/fourslash/node_modules: *new*
+  {}
+/tests/cases/fourslash/node_modules/@types: *new*
+  {}
+/tests/cases/fourslash/server/node_modules: *new*
+  {}
+/tests/cases/fourslash/server/node_modules/@types: *new*
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+/tests/cases/fourslash/server/quickinfoVerbosityServer.ts (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 1,
+      "type": "request",
+      "arguments": {
+        "file": "/tests/cases/fourslash/server/quickinfoVerbosityServer.ts",
+        "line": 2,
+        "offset": 10,
+        "verbosityLevel": 0
+      },
+      "command": "quickinfo"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "quickinfo",
+      "request_seq": 1,
+      "success": true,
+      "body": {
+        "kind": "const",
+        "kindModifiers": "",
+        "start": {
+          "line": 2,
+          "offset": 7
+        },
+        "end": {
+          "line": 2,
+          "offset": 10
+        },
+        "displayString": "const foo: FooType",
+        "documentation": "",
+        "tags": [],
+        "canIncreaseVerbosityLevel": true
+      }
+    }
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "seq": 2,
+      "type": "request",
+      "arguments": {
+        "file": "/tests/cases/fourslash/server/quickinfoVerbosityServer.ts",
+        "line": 2,
+        "offset": 10,
+        "verbosityLevel": 1
+      },
+      "command": "quickinfo"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "seq": 0,
+      "type": "response",
+      "command": "quickinfo",
+      "request_seq": 2,
+      "success": true,
+      "body": {
+        "kind": "const",
+        "kindModifiers": "",
+        "start": {
+          "line": 2,
+          "offset": 7
+        },
+        "end": {
+          "line": 2,
+          "offset": 10
+        },
+        "displayString": "const foo: string | number",
+        "documentation": "",
+        "tags": [],
+        "canIncreaseVerbosityLevel": false
+      }
+    }
\ No newline at end of file
diff --git a/tests/baselines/reference/tsserver/pasteEdits/should-not-error.js b/tests/baselines/reference/tsserver/pasteEdits/should-not-error.js
new file mode 100644
index 0000000000000..da67a877a0d9b
--- /dev/null
+++ b/tests/baselines/reference/tsserver/pasteEdits/should-not-error.js
@@ -0,0 +1,257 @@
+Info seq  [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false
+Info seq  [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib
+Info seq  [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript
+Info seq  [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist
+Before request
+//// [/home/src/projects/project/file1.ts]
+export const r = 1;
+console.log(r);
+
+//// [/home/src/projects/project/tsconfig.json]
+{}
+
+//// [/home/src/tslibs/TS/Lib/lib.d.ts]
+/// <reference no-default-lib="true"/>
+interface Boolean {}
+interface Function {}
+interface CallableFunction {}
+interface NewableFunction {}
+interface IArguments {}
+interface Number { toExponential: any; }
+interface Object {}
+interface RegExp {}
+interface String { charAt: any; }
+interface Array<T> { length: number; [n: number]: T; }
+interface ReadonlyArray<T> {}
+declare const console: { log(msg: any): void; };
+
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "command": "updateOpen",
+      "arguments": {
+        "changedFiles": [],
+        "closedFiles": [],
+        "openFiles": [
+          {
+            "file": "^/untitled/ts-nul-authority/Untitled-1",
+            "fileContent": "function foo(){}\r\n     \r\n",
+            "scriptKindName": "TS"
+          }
+        ]
+      },
+      "seq": 1,
+      "type": "request"
+    }
+Info seq  [hh:mm:ss:mss] getConfigFileNameForFile:: File: ^/untitled/ts-nul-authority/Untitled-1 ProjectRootPath: undefined:: Result: undefined
+Info seq  [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /home/src/Vscode/Projects/bin
+Info seq  [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/Vscode/Projects/bin/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/Vscode/Projects/bin/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/Vscode/Projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/Vscode/Projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/Vscode/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/Vscode/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
+Info seq  [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (2)
+	/home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };"
+	^/untitled/ts-nul-authority/Untitled-1 SVC-1-0 "function foo(){}\r\n     \r\n"
+
+
+	../../../tslibs/TS/Lib/lib.d.ts
+	  Default library for target 'es5'
+	^/untitled/ts-nul-authority/Untitled-1
+	  Root file specified for compilation
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
+Info seq  [hh:mm:ss:mss] 	Files (2)
+
+Info seq  [hh:mm:ss:mss] -----------------------------------------------
+Info seq  [hh:mm:ss:mss] Open files: 
+Info seq  [hh:mm:ss:mss] 	FileName: ^/untitled/ts-nul-authority/Untitled-1 ProjectRootPath: undefined
+Info seq  [hh:mm:ss:mss] 		Projects: /dev/null/inferredProject1*
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "response": true,
+      "responseRequired": true,
+      "performanceData": {
+        "updateGraphDurationMs": *
+      }
+    }
+After request
+
+PolledWatches::
+/home/src/Vscode/Projects/bin/node_modules/@types: *new*
+  {"pollingInterval":500}
+/home/src/Vscode/Projects/node_modules/@types: *new*
+  {"pollingInterval":500}
+/home/src/Vscode/node_modules/@types: *new*
+  {"pollingInterval":500}
+/home/src/tslibs/TS/Lib/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/TS/package.json: *new*
+  {"pollingInterval":2000}
+/home/src/tslibs/package.json: *new*
+  {"pollingInterval":2000}
+
+FsWatches::
+/home/src/tslibs/TS/Lib/lib.d.ts: *new*
+  {}
+
+Projects::
+/dev/null/inferredProject1* (Inferred) *new*
+    projectStateVersion: 1
+    projectProgramVersion: 1
+    autoImportProviderHost: false
+
+ScriptInfos::
+/home/src/tslibs/TS/Lib/lib.d.ts *new*
+    version: Text-1
+    containingProjects: 1
+        /dev/null/inferredProject1*
+^/untitled/ts-nul-authority/Untitled-1 (Dynamic) (Open) *new*
+    version: SVC-1-0
+    containingProjects: 1
+        /dev/null/inferredProject1* *default*
+
+Before request
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "command": "getPasteEdits",
+      "arguments": {
+        "file": "^/untitled/ts-nul-authority/Untitled-1",
+        "pastedText": [
+          "console.log(r);"
+        ],
+        "pasteLocations": [
+          {
+            "start": {
+              "line": 1,
+              "offset": 0
+            },
+            "end": {
+              "line": 1,
+              "offset": 0
+            }
+          }
+        ],
+        "copiedFrom": {
+          "file": "/home/src/projects/project/file1.ts",
+          "spans": [
+            {
+              "start": {
+                "line": 2,
+                "offset": 0
+              },
+              "end": {
+                "line": 2,
+                "offset": 13
+              }
+            }
+          ]
+        }
+      },
+      "seq": 2,
+      "type": "request"
+    }
+Info seq  [hh:mm:ss:mss] response:
+    {
+      "responseRequired": true
+    }
+After request
+
+Before request
+
+Info seq  [hh:mm:ss:mss] request:
+    {
+      "command": "geterr",
+      "arguments": {
+        "delay": 0,
+        "files": [
+          "^/untitled/ts-nul-authority/Untitled-1"
+        ]
+      },
+      "seq": 3,
+      "type": "request"
+    }
+After request
+
+Timeout callback:: count: 1
+1: checkOne *new*
+
+Before running Timeout callback:: count: 1
+1: checkOne
+
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "syntaxDiag",
+      "body": {
+        "file": "^/untitled/ts-nul-authority/Untitled-1",
+        "diagnostics": []
+      }
+    }
+After running Timeout callback:: count: 0
+
+Immedidate callback:: count: 1
+1: semanticCheck *new*
+
+Before running Immedidate callback:: count: 1
+1: semanticCheck
+
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "semanticDiag",
+      "body": {
+        "file": "^/untitled/ts-nul-authority/Untitled-1",
+        "diagnostics": []
+      }
+    }
+After running Immedidate callback:: count: 1
+
+Immedidate callback:: count: 1
+2: suggestionCheck *new*
+
+Before running Immedidate callback:: count: 1
+2: suggestionCheck
+
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "suggestionDiag",
+      "body": {
+        "file": "^/untitled/ts-nul-authority/Untitled-1",
+        "diagnostics": []
+      }
+    }
+Info seq  [hh:mm:ss:mss] event:
+    {
+      "seq": 0,
+      "type": "event",
+      "event": "requestCompleted",
+      "body": {
+        "request_seq": 3,
+        "performanceData": {
+          "diagnosticsDuration": [
+            {
+              "syntaxDiag": *,
+              "semanticDiag": *,
+              "suggestionDiag": *,
+              "file": "^/untitled/ts-nul-authority/Untitled-1"
+            }
+          ]
+        }
+      }
+    }
+After running Immedidate callback:: count: 0
diff --git a/tests/baselines/reference/tsserver/projectErrors/file-rename-on-wsl2.js b/tests/baselines/reference/tsserver/projectErrors/file-rename-on-wsl2.js
index 00fe141b30807..fc6dedcf935c6 100644
--- a/tests/baselines/reference/tsserver/projectErrors/file-rename-on-wsl2.js
+++ b/tests/baselines/reference/tsserver/projectErrors/file-rename-on-wsl2.js
@@ -235,7 +235,7 @@ Info seq  [hh:mm:ss:mss] Scheduled: /home/username/workspaces/project/tsconfig.j
 Info seq  [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*
 Info seq  [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/username/workspaces/project/src/b.ts 2:: WatchInfo: /home/username/workspaces/project/src/b.ts 500 undefined WatchType: Closed Script info
 Before request
-//// [/home/username/workspaces/project/src/c.ts] Inode:: 111
+//// [/home/username/workspaces/project/src/c.ts] Inode:: 112
 export const b = 10;
 
 //// [/home/username/workspaces/project/src/b.ts] deleted
@@ -549,7 +549,7 @@ FsWatches::
 /home/username/workspaces/project/src:
   {"inode":5}
 /home/username/workspaces/project/src/c.ts: *new*
-  {"inode":111}
+  {"inode":112}
 /home/username/workspaces/project/tsconfig.json:
   {"inode":8}
 
diff --git a/tests/baselines/reference/tsserver/resolutionCache/when-resolution-fails-in-global-typings-location-with-currentDirectory-at-root.js b/tests/baselines/reference/tsserver/resolutionCache/when-resolution-fails-in-global-typings-location-with-currentDirectory-at-root.js
index eb48a691416bd..fa5e8d9e0d450 100644
--- a/tests/baselines/reference/tsserver/resolutionCache/when-resolution-fails-in-global-typings-location-with-currentDirectory-at-root.js
+++ b/tests/baselines/reference/tsserver/resolutionCache/when-resolution-fails-in-global-typings-location-with-currentDirectory-at-root.js
@@ -136,10 +136,10 @@ TI:: [hh:mm:ss:mss] Updating types-registry npm package...
 TI:: [hh:mm:ss:mss] npm install --ignore-scripts types-registry@latest
 TI:: [hh:mm:ss:mss] Updated types-registry npm package
 TI:: typing installer creation complete
-//// [/home/src/Library/Caches/typescript/package.json] Inode:: 104
+//// [/home/src/Library/Caches/typescript/package.json] Inode:: 105
 { "private": true }
 
-//// [/home/src/Library/Caches/typescript/node_modules/types-registry/index.json] Inode:: 107
+//// [/home/src/Library/Caches/typescript/node_modules/types-registry/index.json] Inode:: 108
 {
   "entries": {}
 }
diff --git a/tests/baselines/reference/tsserver/resolutionCache/when-resolution-fails-in-global-typings-location.js b/tests/baselines/reference/tsserver/resolutionCache/when-resolution-fails-in-global-typings-location.js
index 275237dc28147..5f92045a88e85 100644
--- a/tests/baselines/reference/tsserver/resolutionCache/when-resolution-fails-in-global-typings-location.js
+++ b/tests/baselines/reference/tsserver/resolutionCache/when-resolution-fails-in-global-typings-location.js
@@ -191,10 +191,10 @@ TI:: [hh:mm:ss:mss] Updating types-registry npm package...
 TI:: [hh:mm:ss:mss] npm install --ignore-scripts types-registry@latest
 TI:: [hh:mm:ss:mss] Updated types-registry npm package
 TI:: typing installer creation complete
-//// [/home/src/Library/Caches/typescript/package.json] Inode:: 107
+//// [/home/src/Library/Caches/typescript/package.json] Inode:: 108
 { "private": true }
 
-//// [/home/src/Library/Caches/typescript/node_modules/types-registry/index.json] Inode:: 110
+//// [/home/src/Library/Caches/typescript/node_modules/types-registry/index.json] Inode:: 111
 {
   "entries": {}
 }
diff --git a/tests/baselines/reference/tsserver/resolutionCache/when-resolution-is-succeeds-in-global-typings-location-with-import-from-the-cache-file-failing-with-currentDirectory-at-root.js b/tests/baselines/reference/tsserver/resolutionCache/when-resolution-is-succeeds-in-global-typings-location-with-import-from-the-cache-file-failing-with-currentDirectory-at-root.js
index 2bf31e7a3cd52..8ae35c6485d3c 100644
--- a/tests/baselines/reference/tsserver/resolutionCache/when-resolution-is-succeeds-in-global-typings-location-with-import-from-the-cache-file-failing-with-currentDirectory-at-root.js
+++ b/tests/baselines/reference/tsserver/resolutionCache/when-resolution-is-succeeds-in-global-typings-location-with-import-from-the-cache-file-failing-with-currentDirectory-at-root.js
@@ -23,10 +23,10 @@ interface Array<T> { length: number; [n: number]: T; }
 interface ReadonlyArray<T> {}
 declare const console: { log(msg: any): void; };
 
-//// [/home/src/Library/Caches/typescript/package.json] Inode:: 108
+//// [/home/src/Library/Caches/typescript/package.json] Inode:: 109
 { "private": true }
 
-//// [/home/src/Library/Caches/typescript/node_modules/types-registry/index.json] Inode:: 110
+//// [/home/src/Library/Caches/typescript/node_modules/types-registry/index.json] Inode:: 111
 {
   "entries": {}
 }
@@ -169,7 +169,7 @@ PolledWatches::
 
 FsWatches::
 /home/src/Library/Caches/typescript/package.json: *new*
-  {"inode":108}
+  {"inode":109}
 /home/src/tslibs/TS/Lib/lib.es2020.full.d.ts: *new*
   {"inode":18}
 
diff --git a/tests/baselines/reference/tsserver/resolutionCache/when-resolution-is-succeeds-in-global-typings-location-with-import-from-the-cache-file-failing.js b/tests/baselines/reference/tsserver/resolutionCache/when-resolution-is-succeeds-in-global-typings-location-with-import-from-the-cache-file-failing.js
index 35777d817f138..054dee7d58019 100644
--- a/tests/baselines/reference/tsserver/resolutionCache/when-resolution-is-succeeds-in-global-typings-location-with-import-from-the-cache-file-failing.js
+++ b/tests/baselines/reference/tsserver/resolutionCache/when-resolution-is-succeeds-in-global-typings-location-with-import-from-the-cache-file-failing.js
@@ -23,10 +23,10 @@ interface Array<T> { length: number; [n: number]: T; }
 interface ReadonlyArray<T> {}
 declare const console: { log(msg: any): void; };
 
-//// [/home/src/Library/Caches/typescript/package.json] Inode:: 111
+//// [/home/src/Library/Caches/typescript/package.json] Inode:: 112
 { "private": true }
 
-//// [/home/src/Library/Caches/typescript/node_modules/types-registry/index.json] Inode:: 113
+//// [/home/src/Library/Caches/typescript/node_modules/types-registry/index.json] Inode:: 114
 {
   "entries": {}
 }
@@ -218,7 +218,7 @@ PolledWatches::
 
 FsWatches::
 /home/src/Library/Caches/typescript/package.json: *new*
-  {"inode":111}
+  {"inode":112}
 /home/src/Vscode: *new*
   {"inode":10}
 /home/src/Vscode/Projects: *new*
@@ -424,7 +424,7 @@ PolledWatches::
 
 FsWatches::
 /home/src/Library/Caches/typescript/package.json:
-  {"inode":111}
+  {"inode":112}
 /home/src/Vscode:
   {"inode":10}
 /home/src/Vscode/Projects:
diff --git a/tests/baselines/reference/tsserver/resolutionCache/when-resolution-is-succeeds-in-global-typings-location-with-import-from-the-cache-file-with-currentDirectory-at-root.js b/tests/baselines/reference/tsserver/resolutionCache/when-resolution-is-succeeds-in-global-typings-location-with-import-from-the-cache-file-with-currentDirectory-at-root.js
index edf6ff1290c81..38c8184d1b80b 100644
--- a/tests/baselines/reference/tsserver/resolutionCache/when-resolution-is-succeeds-in-global-typings-location-with-import-from-the-cache-file-with-currentDirectory-at-root.js
+++ b/tests/baselines/reference/tsserver/resolutionCache/when-resolution-is-succeeds-in-global-typings-location-with-import-from-the-cache-file-with-currentDirectory-at-root.js
@@ -27,10 +27,10 @@ interface Array<T> { length: number; [n: number]: T; }
 interface ReadonlyArray<T> {}
 declare const console: { log(msg: any): void; };
 
-//// [/home/src/Library/Caches/typescript/package.json] Inode:: 110
+//// [/home/src/Library/Caches/typescript/package.json] Inode:: 111
 { "private": true }
 
-//// [/home/src/Library/Caches/typescript/node_modules/types-registry/index.json] Inode:: 112
+//// [/home/src/Library/Caches/typescript/node_modules/types-registry/index.json] Inode:: 113
 {
   "entries": {}
 }
@@ -179,7 +179,7 @@ PolledWatches::
 
 FsWatches::
 /home/src/Library/Caches/typescript/package.json: *new*
-  {"inode":110}
+  {"inode":111}
 /home/src/tslibs/TS/Lib/lib.es2020.full.d.ts: *new*
   {"inode":20}
 
diff --git a/tests/baselines/reference/tsserver/resolutionCache/when-resolution-is-succeeds-in-global-typings-location-with-import-from-the-cache-file.js b/tests/baselines/reference/tsserver/resolutionCache/when-resolution-is-succeeds-in-global-typings-location-with-import-from-the-cache-file.js
index f061f9ec53cf1..99bc69aeb9154 100644
--- a/tests/baselines/reference/tsserver/resolutionCache/when-resolution-is-succeeds-in-global-typings-location-with-import-from-the-cache-file.js
+++ b/tests/baselines/reference/tsserver/resolutionCache/when-resolution-is-succeeds-in-global-typings-location-with-import-from-the-cache-file.js
@@ -27,10 +27,10 @@ interface Array<T> { length: number; [n: number]: T; }
 interface ReadonlyArray<T> {}
 declare const console: { log(msg: any): void; };
 
-//// [/home/src/Library/Caches/typescript/package.json] Inode:: 113
+//// [/home/src/Library/Caches/typescript/package.json] Inode:: 114
 { "private": true }
 
-//// [/home/src/Library/Caches/typescript/node_modules/types-registry/index.json] Inode:: 115
+//// [/home/src/Library/Caches/typescript/node_modules/types-registry/index.json] Inode:: 116
 {
   "entries": {}
 }
@@ -228,7 +228,7 @@ PolledWatches::
 
 FsWatches::
 /home/src/Library/Caches/typescript/package.json: *new*
-  {"inode":113}
+  {"inode":114}
 /home/src/Vscode: *new*
   {"inode":12}
 /home/src/Vscode/Projects: *new*
@@ -430,7 +430,7 @@ PolledWatches::
 
 FsWatches::
 /home/src/Library/Caches/typescript/package.json:
-  {"inode":113}
+  {"inode":114}
 /home/src/Vscode:
   {"inode":12}
 /home/src/Vscode/Projects:
diff --git a/tests/baselines/reference/tsserver/resolutionCache/when-resolution-is-succeeds-in-global-typings-location-with-relative-import-from-the-cache-file-with-currentDirectory-at-root.js b/tests/baselines/reference/tsserver/resolutionCache/when-resolution-is-succeeds-in-global-typings-location-with-relative-import-from-the-cache-file-with-currentDirectory-at-root.js
index c7025d3309633..183614e7b6a4a 100644
--- a/tests/baselines/reference/tsserver/resolutionCache/when-resolution-is-succeeds-in-global-typings-location-with-relative-import-from-the-cache-file-with-currentDirectory-at-root.js
+++ b/tests/baselines/reference/tsserver/resolutionCache/when-resolution-is-succeeds-in-global-typings-location-with-relative-import-from-the-cache-file-with-currentDirectory-at-root.js
@@ -27,10 +27,10 @@ interface Array<T> { length: number; [n: number]: T; }
 interface ReadonlyArray<T> {}
 declare const console: { log(msg: any): void; };
 
-//// [/home/src/Library/Caches/typescript/package.json] Inode:: 109
+//// [/home/src/Library/Caches/typescript/package.json] Inode:: 110
 { "private": true }
 
-//// [/home/src/Library/Caches/typescript/node_modules/types-registry/index.json] Inode:: 111
+//// [/home/src/Library/Caches/typescript/node_modules/types-registry/index.json] Inode:: 112
 {
   "entries": {}
 }
@@ -166,7 +166,7 @@ PolledWatches::
 
 FsWatches::
 /home/src/Library/Caches/typescript/package.json: *new*
-  {"inode":109}
+  {"inode":110}
 /home/src/tslibs/TS/Lib/lib.es2020.full.d.ts: *new*
   {"inode":19}
 
diff --git a/tests/baselines/reference/tsserver/resolutionCache/when-resolution-is-succeeds-in-global-typings-location-with-relative-import-from-the-cache-file.js b/tests/baselines/reference/tsserver/resolutionCache/when-resolution-is-succeeds-in-global-typings-location-with-relative-import-from-the-cache-file.js
index f92fe69fb7aec..3f607a2a7f85f 100644
--- a/tests/baselines/reference/tsserver/resolutionCache/when-resolution-is-succeeds-in-global-typings-location-with-relative-import-from-the-cache-file.js
+++ b/tests/baselines/reference/tsserver/resolutionCache/when-resolution-is-succeeds-in-global-typings-location-with-relative-import-from-the-cache-file.js
@@ -27,10 +27,10 @@ interface Array<T> { length: number; [n: number]: T; }
 interface ReadonlyArray<T> {}
 declare const console: { log(msg: any): void; };
 
-//// [/home/src/Library/Caches/typescript/package.json] Inode:: 112
+//// [/home/src/Library/Caches/typescript/package.json] Inode:: 113
 { "private": true }
 
-//// [/home/src/Library/Caches/typescript/node_modules/types-registry/index.json] Inode:: 114
+//// [/home/src/Library/Caches/typescript/node_modules/types-registry/index.json] Inode:: 115
 {
   "entries": {}
 }
@@ -215,7 +215,7 @@ PolledWatches::
 
 FsWatches::
 /home/src/Library/Caches/typescript/package.json: *new*
-  {"inode":112}
+  {"inode":113}
 /home/src/Vscode: *new*
   {"inode":11}
 /home/src/Vscode/Projects: *new*
@@ -415,7 +415,7 @@ PolledWatches::
 
 FsWatches::
 /home/src/Library/Caches/typescript/package.json:
-  {"inode":112}
+  {"inode":113}
 /home/src/Vscode:
   {"inode":11}
 /home/src/Vscode/Projects:
diff --git a/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked-Linux-canUseWatchEvents.js b/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked-Linux-canUseWatchEvents.js
index 7da00e51f9e83..ce633328d158f 100644
--- a/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked-Linux-canUseWatchEvents.js
+++ b/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked-Linux-canUseWatchEvents.js
@@ -772,20 +772,20 @@ Custom watchDirectory:: Triggered Ignored:: {"id":8,"path":"/home/src/projects/p
 Custom watchDirectory:: Triggered Ignored:: {"id":8,"path":"/home/src/projects/project/node_modules/package1","recursive":true,"ignoreUpdate":true}:: /home/src/projects/project/node_modules/package1/tsconfig.tsbuildinfo.readable.baseline.txt created
 Custom watchDirectory:: Triggered Ignored:: {"id":8,"path":"/home/src/projects/project/node_modules/package1","recursive":true,"ignoreUpdate":true}:: /home/src/projects/project/node_modules/package1/tsconfig.tsbuildinfo.readable.baseline.txt updated
 Before request
-//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 120
+//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 121
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 
 
-//// [/home/src/projects/project/packages/package1/dist/index.d.ts] Inode:: 121
+//// [/home/src/projects/project/packages/package1/dist/index.d.ts] Inode:: 122
 export type FooType = "foo";
 export type BarType = "bar";
 
 
-//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] Inode:: 122
+//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] Inode:: 123
 {"root":["./src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 123
+//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 124
 {
   "root": [
     "./src/index.ts"
@@ -1614,14 +1614,14 @@ Custom watchDirectory:: Triggered Ignored:: {"id":8,"path":"/home/src/projects/p
 Custom watchDirectory:: Triggered Ignored:: {"id":8,"path":"/home/src/projects/project/node_modules/package1","recursive":true,"ignoreUpdate":true}:: /home/src/projects/project/node_modules/package1/tsconfig.tsbuildinfo updated
 Custom watchDirectory:: Triggered Ignored:: {"id":8,"path":"/home/src/projects/project/node_modules/package1","recursive":true,"ignoreUpdate":true}:: /home/src/projects/project/node_modules/package1/tsconfig.tsbuildinfo.readable.baseline.txt updated
 Before request
-//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] file written with same contents Inode:: 122
-//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents Inode:: 123
-//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 125
+//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] file written with same contents Inode:: 123
+//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents Inode:: 124
+//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 126
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 
 
-//// [/home/src/projects/project/packages/package1/dist/index.d.ts] Inode:: 126
+//// [/home/src/projects/project/packages/package1/dist/index.d.ts] Inode:: 127
 export type FooType = "foo";
 export type BarType = "bar";
 
diff --git a/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked-Linux.js b/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked-Linux.js
index 2d4b5f507d874..ce94ad125a629 100644
--- a/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked-Linux.js
+++ b/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked-Linux.js
@@ -538,20 +538,20 @@ After running Immedidate callback:: count: 0
 Build dependencies
 Before running Timeout callback:: count: 1
 7: timerToUpdateChildWatches
-//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 120
+//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 121
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 
 
-//// [/home/src/projects/project/packages/package1/dist/index.d.ts] Inode:: 121
+//// [/home/src/projects/project/packages/package1/dist/index.d.ts] Inode:: 122
 export type FooType = "foo";
 export type BarType = "bar";
 
 
-//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] Inode:: 122
+//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] Inode:: 123
 {"root":["./src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 123
+//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 124
 {
   "root": [
     "./src/index.ts"
@@ -605,7 +605,7 @@ FsWatches::
 /home/src/projects/project/packages/package1:
   {"inode":6}
 /home/src/projects/project/packages/package1/dist: *new*
-  {"inode":119}
+  {"inode":120}
 /home/src/projects/project/packages/package1/package.json:
   {"inode":7}
 /home/src/projects/project/packages/package1/src:
@@ -776,9 +776,9 @@ FsWatches::
 /home/src/projects/project/packages/package1:
   {"inode":6}
 /home/src/projects/project/packages/package1/dist:
-  {"inode":119}
+  {"inode":120}
 /home/src/projects/project/packages/package1/dist/index.d.ts: *new*
-  {"inode":121}
+  {"inode":122}
 /home/src/projects/project/packages/package1/package.json:
   {"inode":7}
 /home/src/projects/project/packages/package1/src:
@@ -997,9 +997,9 @@ FsWatches::
 
 FsWatches *deleted*::
 /home/src/projects/project/packages/package1/dist:
-  {"inode":119}
+  {"inode":120}
 /home/src/projects/project/packages/package1/dist/index.d.ts:
-  {"inode":121}
+  {"inode":122}
 
 Timeout callback:: count: 3
 13: /home/src/projects/project/packages/package2/tsconfig.json *new*
@@ -1522,14 +1522,14 @@ Info seq  [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project
 Info seq  [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/packages/package1/dist/index.d.ts 0:: WatchInfo: /home/src/projects/project/packages/package1/dist/index.d.ts 500 undefined WatchType: Closed Script info
 Before running Timeout callback:: count: 1
 25: timerToUpdateChildWatches
-//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] file written with same contents Inode:: 122
-//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents Inode:: 123
-//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 125
+//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] file written with same contents Inode:: 123
+//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents Inode:: 124
+//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 126
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 
 
-//// [/home/src/projects/project/packages/package1/dist/index.d.ts] Inode:: 126
+//// [/home/src/projects/project/packages/package1/dist/index.d.ts] Inode:: 127
 export type FooType = "foo";
 export type BarType = "bar";
 
@@ -1571,7 +1571,7 @@ FsWatches::
 /home/src/projects/project/packages/package1:
   {"inode":6}
 /home/src/projects/project/packages/package1/dist/index.d.ts: *new*
-  {"inode":126}
+  {"inode":127}
 /home/src/projects/project/packages/package1/package.json:
   {"inode":7}
 /home/src/projects/project/packages/package1/src:
@@ -1645,9 +1645,9 @@ FsWatches::
 /home/src/projects/project/packages/package1:
   {"inode":6}
 /home/src/projects/project/packages/package1/dist: *new*
-  {"inode":124}
+  {"inode":125}
 /home/src/projects/project/packages/package1/dist/index.d.ts:
-  {"inode":126}
+  {"inode":127}
 /home/src/projects/project/packages/package1/package.json:
   {"inode":7}
 /home/src/projects/project/packages/package1/src:
@@ -1816,9 +1816,9 @@ FsWatches::
 /home/src/projects/project/packages/package1:
   {"inode":6}
 /home/src/projects/project/packages/package1/dist:
-  {"inode":124}
+  {"inode":125}
 /home/src/projects/project/packages/package1/dist/index.d.ts:
-  {"inode":126}
+  {"inode":127}
 /home/src/projects/project/packages/package1/package.json:
   {"inode":7}
 /home/src/projects/project/packages/package1/src:
diff --git a/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked-package1-built-Linux-canUseWatchEvents.js b/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked-package1-built-Linux-canUseWatchEvents.js
index 9ad8448e932c6..f755079673175 100644
--- a/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked-package1-built-Linux-canUseWatchEvents.js
+++ b/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked-package1-built-Linux-canUseWatchEvents.js
@@ -87,20 +87,20 @@ declare const console: { log(msg: any): void; };
 
 //// [/home/src/tslibs/TS/Lib/lib.es2016.full.d.ts] *Lib* Inode:: 33
 
-//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 120
+//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 121
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 
 
-//// [/home/src/projects/project/packages/package1/dist/index.d.ts] Inode:: 121
+//// [/home/src/projects/project/packages/package1/dist/index.d.ts] Inode:: 122
 export type FooType = "foo";
 export type BarType = "bar";
 
 
-//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] Inode:: 122
+//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] Inode:: 123
 {"root":["./src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 123
+//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 124
 {
   "root": [
     "./src/index.ts"
@@ -1186,14 +1186,14 @@ Custom watchDirectory:: Triggered Ignored:: {"id":9,"path":"/home/src/projects/p
 Custom watchDirectory:: Triggered Ignored:: {"id":9,"path":"/home/src/projects/project/node_modules/package1","recursive":true,"ignoreUpdate":true}:: /home/src/projects/project/node_modules/package1/tsconfig.tsbuildinfo updated
 Custom watchDirectory:: Triggered Ignored:: {"id":9,"path":"/home/src/projects/project/node_modules/package1","recursive":true,"ignoreUpdate":true}:: /home/src/projects/project/node_modules/package1/tsconfig.tsbuildinfo.readable.baseline.txt updated
 Before request
-//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] file written with same contents Inode:: 122
-//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents Inode:: 123
-//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 125
+//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] file written with same contents Inode:: 123
+//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents Inode:: 124
+//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 126
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 
 
-//// [/home/src/projects/project/packages/package1/dist/index.d.ts] Inode:: 126
+//// [/home/src/projects/project/packages/package1/dist/index.d.ts] Inode:: 127
 export type FooType = "foo";
 export type BarType = "bar";
 
diff --git a/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked-package1-built-Linux.js b/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked-package1-built-Linux.js
index 82f15a7c2462e..a8d4f6517a323 100644
--- a/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked-package1-built-Linux.js
+++ b/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked-package1-built-Linux.js
@@ -87,20 +87,20 @@ declare const console: { log(msg: any): void; };
 
 //// [/home/src/tslibs/TS/Lib/lib.es2016.full.d.ts] *Lib* Inode:: 33
 
-//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 120
+//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 121
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 
 
-//// [/home/src/projects/project/packages/package1/dist/index.d.ts] Inode:: 121
+//// [/home/src/projects/project/packages/package1/dist/index.d.ts] Inode:: 122
 export type FooType = "foo";
 export type BarType = "bar";
 
 
-//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] Inode:: 122
+//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] Inode:: 123
 {"root":["./src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 123
+//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 124
 {
   "root": [
     "./src/index.ts"
@@ -353,9 +353,9 @@ FsWatches::
 /home/src/projects/project/packages/package1: *new*
   {"inode":6}
 /home/src/projects/project/packages/package1/dist: *new*
-  {"inode":119}
+  {"inode":120}
 /home/src/projects/project/packages/package1/dist/index.d.ts: *new*
-  {"inode":121}
+  {"inode":122}
 /home/src/projects/project/packages/package1/package.json: *new*
   {"inode":7}
 /home/src/projects/project/packages/package1/src: *new*
@@ -573,9 +573,9 @@ FsWatches::
 
 FsWatches *deleted*::
 /home/src/projects/project/packages/package1/dist:
-  {"inode":119}
+  {"inode":120}
 /home/src/projects/project/packages/package1/dist/index.d.ts:
-  {"inode":121}
+  {"inode":122}
 
 Timeout callback:: count: 3
 2: /home/src/projects/project/packages/package2/tsconfig.json *new*
@@ -1103,14 +1103,14 @@ Info seq  [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project
 Info seq  [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/packages/package1/dist/index.d.ts 0:: WatchInfo: /home/src/projects/project/packages/package1/dist/index.d.ts 500 undefined WatchType: Closed Script info
 Before running Timeout callback:: count: 1
 14: timerToUpdateChildWatches
-//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] file written with same contents Inode:: 122
-//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents Inode:: 123
-//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 125
+//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] file written with same contents Inode:: 123
+//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents Inode:: 124
+//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 126
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 
 
-//// [/home/src/projects/project/packages/package1/dist/index.d.ts] Inode:: 126
+//// [/home/src/projects/project/packages/package1/dist/index.d.ts] Inode:: 127
 export type FooType = "foo";
 export type BarType = "bar";
 
@@ -1152,7 +1152,7 @@ FsWatches::
 /home/src/projects/project/packages/package1:
   {"inode":6}
 /home/src/projects/project/packages/package1/dist/index.d.ts: *new*
-  {"inode":126}
+  {"inode":127}
 /home/src/projects/project/packages/package1/package.json:
   {"inode":7}
 /home/src/projects/project/packages/package1/src:
@@ -1226,9 +1226,9 @@ FsWatches::
 /home/src/projects/project/packages/package1:
   {"inode":6}
 /home/src/projects/project/packages/package1/dist: *new*
-  {"inode":124}
+  {"inode":125}
 /home/src/projects/project/packages/package1/dist/index.d.ts:
-  {"inode":126}
+  {"inode":127}
 /home/src/projects/project/packages/package1/package.json:
   {"inode":7}
 /home/src/projects/project/packages/package1/src:
@@ -1397,9 +1397,9 @@ FsWatches::
 /home/src/projects/project/packages/package1:
   {"inode":6}
 /home/src/projects/project/packages/package1/dist:
-  {"inode":124}
+  {"inode":125}
 /home/src/projects/project/packages/package1/dist/index.d.ts:
-  {"inode":126}
+  {"inode":127}
 /home/src/projects/project/packages/package1/package.json:
   {"inode":7}
 /home/src/projects/project/packages/package1/src:
diff --git a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-Linux-canUseWatchEvents.js b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-Linux-canUseWatchEvents.js
index 5a056a74ac33c..8281b99bd35f5 100644
--- a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-Linux-canUseWatchEvents.js
+++ b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-Linux-canUseWatchEvents.js
@@ -728,7 +728,7 @@ After running Immedidate callback:: count: 0
 
 change in unrelated folder in a
 Before running Timeout callback:: count: 0
-//// [/home/src/projects/a/2/unrelated/somethingUnrelated.ts] Inode:: 140
+//// [/home/src/projects/a/2/unrelated/somethingUnrelated.ts] Inode:: 141
 export const a = 10;
 
 
@@ -858,7 +858,7 @@ After running Immedidate callback:: count: 0
 
 change in unrelated folder in c
 Before running Timeout callback:: count: 0
-//// [/home/src/projects/c/4/unrelated/somethingUnrelated.ts] Inode:: 141
+//// [/home/src/projects/c/4/unrelated/somethingUnrelated.ts] Inode:: 142
 export const a = 10;
 
 
@@ -1008,18 +1008,18 @@ Custom watchDirectory:: Triggered Ignored:: {"id":5,"path":"/home/src/projects/b
 Custom watchDirectory:: Triggered Ignored:: {"id":5,"path":"/home/src/projects/b/2/b-impl/b/node_modules/a","recursive":true,"ignoreUpdate":true}:: /home/src/projects/b/2/b-impl/b/node_modules/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt updated
 Custom watchDirectory:: Triggered Ignored:: {"id":5,"path":"/home/src/projects/b/2/b-impl/b/node_modules/a","recursive":true,"ignoreUpdate":true}:: /home/src/projects/b/2/b-impl/b/node_modules/a/lib updated
 Before request
-//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 143
+//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 144
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.c = void 0;
 exports.c = 'test';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 144
+//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 145
 export declare const c: string;
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 145
+//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 146
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -1039,14 +1039,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
 __exportStar(require("./c"), exports);
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 146
+//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 147
 export * from './c';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 147
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 148
 {"root":["../src/c.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 148
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 149
 {
   "root": [
     "../src/c.ts",
@@ -1056,18 +1056,18 @@ export * from './c';
   "size": 68
 }
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 150
+//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 151
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.a = void 0;
 exports.a = 'test';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 151
+//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 152
 export declare const a: string;
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 152
+//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 153
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -1088,15 +1088,15 @@ __exportStar(require("./a"), exports);
 __exportStar(require("c"), exports);
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 153
+//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 154
 export * from './a';
 export * from 'c';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 154
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 155
 {"root":["../src/a.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 155
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 156
 {
   "root": [
     "../src/a.ts",
@@ -1655,7 +1655,7 @@ After running Immedidate callback:: count: 0
 
 change in unrelated folder in a
 Before running Timeout callback:: count: 0
-//// [/home/src/projects/a/2/unrelated/anotherFile.ts] Inode:: 156
+//// [/home/src/projects/a/2/unrelated/anotherFile.ts] Inode:: 157
 export const a = 10;
 
 
@@ -1771,7 +1771,7 @@ After running Immedidate callback:: count: 0
 
 change in unrelated folder in c
 Before running Timeout callback:: count: 0
-//// [/home/src/projects/c/4/unrelated/anotherFile.ts] Inode:: 157
+//// [/home/src/projects/c/4/unrelated/anotherFile.ts] Inode:: 158
 export const a = 10;
 
 
@@ -2511,18 +2511,18 @@ Custom watchDirectory:: Triggered Ignored:: {"id":36,"path":"/home/src/projects/
 Custom watchDirectory:: Triggered Ignored:: {"id":36,"path":"/home/src/projects/b/2/b-impl/b/node_modules/a","recursive":true,"ignoreUpdate":true}:: /home/src/projects/b/2/b-impl/b/node_modules/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt updated
 Custom watchDirectory:: Triggered Ignored:: {"id":36,"path":"/home/src/projects/b/2/b-impl/b/node_modules/a","recursive":true,"ignoreUpdate":true}:: /home/src/projects/b/2/b-impl/b/node_modules/a/lib updated
 Before request
-//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 159
+//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 160
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.c = void 0;
 exports.c = 'test';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 160
+//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 161
 export declare const c: string;
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 161
+//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 162
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -2542,14 +2542,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
 __exportStar(require("./c"), exports);
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 162
+//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 163
 export * from './c';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 163
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 164
 {"root":["../src/c.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 164
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 165
 {
   "root": [
     "../src/c.ts",
@@ -2559,18 +2559,18 @@ export * from './c';
   "size": 68
 }
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 166
+//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 167
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.a = void 0;
 exports.a = 'test';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 167
+//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 168
 export declare const a: string;
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 168
+//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 169
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -2591,15 +2591,15 @@ __exportStar(require("./a"), exports);
 __exportStar(require("c"), exports);
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 169
+//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 170
 export * from './a';
 export * from 'c';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 170
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 171
 {"root":["../src/a.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 171
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 172
 {
   "root": [
     "../src/a.ts",
diff --git a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-Linux.js b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-Linux.js
index b1f358b399794..822b935098ee4 100644
--- a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-Linux.js
+++ b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-Linux.js
@@ -451,7 +451,7 @@ After running Immedidate callback:: count: 0
 
 change in unrelated folder in a
 Before running Timeout callback:: count: 0
-//// [/home/src/projects/a/2/unrelated/somethingUnrelated.ts] Inode:: 140
+//// [/home/src/projects/a/2/unrelated/somethingUnrelated.ts] Inode:: 141
 export const a = 10;
 
 
@@ -581,7 +581,7 @@ After running Immedidate callback:: count: 0
 
 change in unrelated folder in c
 Before running Timeout callback:: count: 0
-//// [/home/src/projects/c/4/unrelated/somethingUnrelated.ts] Inode:: 141
+//// [/home/src/projects/c/4/unrelated/somethingUnrelated.ts] Inode:: 142
 export const a = 10;
 
 
@@ -712,18 +712,18 @@ After running Immedidate callback:: count: 0
 Build dependencies
 Before running Timeout callback:: count: 1
 5: timerToUpdateChildWatches
-//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 143
+//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 144
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.c = void 0;
 exports.c = 'test';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 144
+//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 145
 export declare const c: string;
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 145
+//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 146
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -743,14 +743,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
 __exportStar(require("./c"), exports);
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 146
+//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 147
 export * from './c';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 147
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 148
 {"root":["../src/c.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 148
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 149
 {
   "root": [
     "../src/c.ts",
@@ -760,18 +760,18 @@ export * from './c';
   "size": 68
 }
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 150
+//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 151
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.a = void 0;
 exports.a = 'test';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 151
+//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 152
 export declare const a: string;
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 152
+//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 153
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -792,15 +792,15 @@ __exportStar(require("./a"), exports);
 __exportStar(require("c"), exports);
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 153
+//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 154
 export * from './a';
 export * from 'c';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 154
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 155
 {"root":["../src/a.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 155
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 156
 {
   "root": [
     "../src/a.ts",
@@ -864,7 +864,7 @@ FsWatches::
 /home/src/projects/a/1/a-impl/a:
   {"inode":19}
 /home/src/projects/a/1/a-impl/a/lib: *new*
-  {"inode":149}
+  {"inode":150}
 /home/src/projects/a/1/a-impl/a/node_modules:
   {"inode":25}
 /home/src/projects/a/1/a-impl/a/package.json:
@@ -1039,11 +1039,11 @@ PolledWatches *deleted*::
 
 FsWatches::
 /home/src/projects/a/1/a-impl/a/lib:
-  {"inode":149}
+  {"inode":150}
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts: *new*
-  {"inode":151}
+  {"inode":152}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts: *new*
-  {"inode":153}
+  {"inode":154}
 /home/src/projects/a/1/a-impl/a/node_modules:
   {"inode":25}
 /home/src/projects/a/1/a-impl/a/package.json:
@@ -1055,11 +1055,11 @@ FsWatches::
 /home/src/projects/b/2/b-impl/b/tsconfig.json:
   {"inode":36}
 /home/src/projects/c/3/c-impl/c/lib: *new*
-  {"inode":142}
+  {"inode":143}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts: *new*
-  {"inode":144}
+  {"inode":145}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts: *new*
-  {"inode":146}
+  {"inode":147}
 /home/src/projects/c/3/c-impl/c/package.json: *new*
   {"inode":12}
 /home/src/tslibs/TS/Lib/lib.d.ts:
@@ -1212,7 +1212,7 @@ After running Immedidate callback:: count: 0
 
 change in unrelated folder in a
 Before running Timeout callback:: count: 0
-//// [/home/src/projects/a/2/unrelated/anotherFile.ts] Inode:: 156
+//// [/home/src/projects/a/2/unrelated/anotherFile.ts] Inode:: 157
 export const a = 10;
 
 
@@ -1328,7 +1328,7 @@ After running Immedidate callback:: count: 0
 
 change in unrelated folder in c
 Before running Timeout callback:: count: 0
-//// [/home/src/projects/c/4/unrelated/anotherFile.ts] Inode:: 157
+//// [/home/src/projects/c/4/unrelated/anotherFile.ts] Inode:: 158
 export const a = 10;
 
 
@@ -1584,17 +1584,17 @@ FsWatches::
 
 FsWatches *deleted*::
 /home/src/projects/a/1/a-impl/a/lib:
-  {"inode":149}
+  {"inode":150}
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts:
-  {"inode":151}
+  {"inode":152}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts:
-  {"inode":153}
+  {"inode":154}
 /home/src/projects/c/3/c-impl/c/lib:
-  {"inode":142}
+  {"inode":143}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts:
-  {"inode":144}
+  {"inode":145}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts:
-  {"inode":146}
+  {"inode":147}
 
 Timeout callback:: count: 3
 28: /home/src/projects/b/2/b-impl/b/tsconfig.json *new*
@@ -1944,18 +1944,18 @@ Info seq  [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/a/1/a-i
 Info seq  [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/a/1/a-impl/a/lib/index.d.ts 0:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/index.d.ts 500 undefined WatchType: Closed Script info
 Before running Timeout callback:: count: 1
 37: timerToUpdateChildWatches
-//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 159
+//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 160
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.c = void 0;
 exports.c = 'test';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 160
+//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 161
 export declare const c: string;
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 161
+//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 162
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -1975,14 +1975,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
 __exportStar(require("./c"), exports);
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 162
+//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 163
 export * from './c';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 163
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 164
 {"root":["../src/c.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 164
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 165
 {
   "root": [
     "../src/c.ts",
@@ -1992,18 +1992,18 @@ export * from './c';
   "size": 68
 }
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 166
+//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 167
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.a = void 0;
 exports.a = 'test';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 167
+//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 168
 export declare const a: string;
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 168
+//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 169
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -2024,15 +2024,15 @@ __exportStar(require("./a"), exports);
 __exportStar(require("c"), exports);
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 169
+//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 170
 export * from './a';
 export * from 'c';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 170
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 171
 {"root":["../src/a.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 171
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 172
 {
   "root": [
     "../src/a.ts",
@@ -2095,9 +2095,9 @@ FsWatches::
 /home/src/projects/a/1/a-impl/a:
   {"inode":19}
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts: *new*
-  {"inode":167}
+  {"inode":168}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts: *new*
-  {"inode":169}
+  {"inode":170}
 /home/src/projects/a/1/a-impl/a/node_modules:
   {"inode":25}
 /home/src/projects/a/1/a-impl/a/package.json:
@@ -2113,9 +2113,9 @@ FsWatches::
 /home/src/projects/b/2/b-impl/b/tsconfig.json:
   {"inode":36}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts: *new*
-  {"inode":160}
+  {"inode":161}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts: *new*
-  {"inode":162}
+  {"inode":163}
 /home/src/tslibs/TS/Lib/lib.d.ts:
   {"inode":45}
 
@@ -2202,11 +2202,11 @@ FsWatches::
 /home/src/projects/a/1/a-impl/a:
   {"inode":19}
 /home/src/projects/a/1/a-impl/a/lib: *new*
-  {"inode":165}
+  {"inode":166}
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts:
-  {"inode":167}
+  {"inode":168}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts:
-  {"inode":169}
+  {"inode":170}
 /home/src/projects/a/1/a-impl/a/node_modules:
   {"inode":25}
 /home/src/projects/a/1/a-impl/a/package.json:
@@ -2222,9 +2222,9 @@ FsWatches::
 /home/src/projects/b/2/b-impl/b/tsconfig.json:
   {"inode":36}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts:
-  {"inode":160}
+  {"inode":161}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts:
-  {"inode":162}
+  {"inode":163}
 /home/src/tslibs/TS/Lib/lib.d.ts:
   {"inode":45}
 
@@ -2380,11 +2380,11 @@ PolledWatches *deleted*::
 
 FsWatches::
 /home/src/projects/a/1/a-impl/a/lib:
-  {"inode":165}
+  {"inode":166}
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts:
-  {"inode":167}
+  {"inode":168}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts:
-  {"inode":169}
+  {"inode":170}
 /home/src/projects/a/1/a-impl/a/node_modules:
   {"inode":25}
 /home/src/projects/a/1/a-impl/a/package.json:
@@ -2396,11 +2396,11 @@ FsWatches::
 /home/src/projects/b/2/b-impl/b/tsconfig.json:
   {"inode":36}
 /home/src/projects/c/3/c-impl/c/lib: *new*
-  {"inode":158}
+  {"inode":159}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts:
-  {"inode":160}
+  {"inode":161}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts:
-  {"inode":162}
+  {"inode":163}
 /home/src/projects/c/3/c-impl/c/package.json: *new*
   {"inode":12}
 /home/src/tslibs/TS/Lib/lib.d.ts:
diff --git a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-MacOs-canUseWatchEvents.js b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-MacOs-canUseWatchEvents.js
index c440e5966d5a2..b143a347af2f3 100644
--- a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-MacOs-canUseWatchEvents.js
+++ b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-MacOs-canUseWatchEvents.js
@@ -728,7 +728,7 @@ After running Immedidate callback:: count: 0
 
 change in unrelated folder in a
 Before running Timeout callback:: count: 0
-//// [/home/src/projects/a/2/unrelated/somethingUnrelated.ts] Inode:: 140
+//// [/home/src/projects/a/2/unrelated/somethingUnrelated.ts] Inode:: 141
 export const a = 10;
 
 
@@ -858,7 +858,7 @@ After running Immedidate callback:: count: 0
 
 change in unrelated folder in c
 Before running Timeout callback:: count: 0
-//// [/home/src/projects/c/4/unrelated/somethingUnrelated.ts] Inode:: 141
+//// [/home/src/projects/c/4/unrelated/somethingUnrelated.ts] Inode:: 142
 export const a = 10;
 
 
@@ -995,18 +995,18 @@ Custom watchDirectory:: Triggered Ignored:: {"id":5,"path":"/home/src/projects/b
 Custom watchDirectory:: Triggered Ignored:: {"id":5,"path":"/home/src/projects/b/2/b-impl/b/node_modules/a","recursive":true,"ignoreUpdate":true}:: /home/src/projects/b/2/b-impl/b/node_modules/a/lib/tsconfig.tsbuildinfo created
 Custom watchDirectory:: Triggered Ignored:: {"id":5,"path":"/home/src/projects/b/2/b-impl/b/node_modules/a","recursive":true,"ignoreUpdate":true}:: /home/src/projects/b/2/b-impl/b/node_modules/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt created
 Before request
-//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 143
+//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 144
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.c = void 0;
 exports.c = 'test';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 144
+//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 145
 export declare const c: string;
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 145
+//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 146
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -1026,14 +1026,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
 __exportStar(require("./c"), exports);
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 146
+//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 147
 export * from './c';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 147
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 148
 {"root":["../src/c.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 148
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 149
 {
   "root": [
     "../src/c.ts",
@@ -1043,18 +1043,18 @@ export * from './c';
   "size": 68
 }
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 150
+//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 151
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.a = void 0;
 exports.a = 'test';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 151
+//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 152
 export declare const a: string;
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 152
+//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 153
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -1075,15 +1075,15 @@ __exportStar(require("./a"), exports);
 __exportStar(require("c"), exports);
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 153
+//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 154
 export * from './a';
 export * from 'c';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 154
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 155
 {"root":["../src/a.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 155
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 156
 {
   "root": [
     "../src/a.ts",
@@ -1642,7 +1642,7 @@ After running Immedidate callback:: count: 0
 
 change in unrelated folder in a
 Before running Timeout callback:: count: 0
-//// [/home/src/projects/a/2/unrelated/anotherFile.ts] Inode:: 156
+//// [/home/src/projects/a/2/unrelated/anotherFile.ts] Inode:: 157
 export const a = 10;
 
 
@@ -1758,7 +1758,7 @@ After running Immedidate callback:: count: 0
 
 change in unrelated folder in c
 Before running Timeout callback:: count: 0
-//// [/home/src/projects/c/4/unrelated/anotherFile.ts] Inode:: 157
+//// [/home/src/projects/c/4/unrelated/anotherFile.ts] Inode:: 158
 export const a = 10;
 
 
@@ -2485,18 +2485,18 @@ Custom watchDirectory:: Triggered Ignored:: {"id":36,"path":"/home/src/projects/
 Custom watchDirectory:: Triggered Ignored:: {"id":36,"path":"/home/src/projects/b/2/b-impl/b/node_modules/a","recursive":true,"ignoreUpdate":true}:: /home/src/projects/b/2/b-impl/b/node_modules/a/lib/tsconfig.tsbuildinfo created
 Custom watchDirectory:: Triggered Ignored:: {"id":36,"path":"/home/src/projects/b/2/b-impl/b/node_modules/a","recursive":true,"ignoreUpdate":true}:: /home/src/projects/b/2/b-impl/b/node_modules/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt created
 Before request
-//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 159
+//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 160
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.c = void 0;
 exports.c = 'test';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 160
+//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 161
 export declare const c: string;
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 161
+//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 162
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -2516,14 +2516,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
 __exportStar(require("./c"), exports);
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 162
+//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 163
 export * from './c';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 163
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 164
 {"root":["../src/c.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 164
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 165
 {
   "root": [
     "../src/c.ts",
@@ -2533,18 +2533,18 @@ export * from './c';
   "size": 68
 }
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 166
+//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 167
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.a = void 0;
 exports.a = 'test';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 167
+//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 168
 export declare const a: string;
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 168
+//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 169
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -2565,15 +2565,15 @@ __exportStar(require("./a"), exports);
 __exportStar(require("c"), exports);
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 169
+//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 170
 export * from './a';
 export * from 'c';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 170
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 171
 {"root":["../src/a.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 171
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 172
 {
   "root": [
     "../src/a.ts",
diff --git a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-MacOs.js b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-MacOs.js
index 9719813b8fb98..7afb50ea720c8 100644
--- a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-MacOs.js
+++ b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-MacOs.js
@@ -447,7 +447,7 @@ After running Immedidate callback:: count: 0
 
 change in unrelated folder in a
 Before running Timeout callback:: count: 0
-//// [/home/src/projects/a/2/unrelated/somethingUnrelated.ts] Inode:: 140
+//// [/home/src/projects/a/2/unrelated/somethingUnrelated.ts] Inode:: 141
 export const a = 10;
 
 
@@ -577,7 +577,7 @@ After running Immedidate callback:: count: 0
 
 change in unrelated folder in c
 Before running Timeout callback:: count: 0
-//// [/home/src/projects/c/4/unrelated/somethingUnrelated.ts] Inode:: 141
+//// [/home/src/projects/c/4/unrelated/somethingUnrelated.ts] Inode:: 142
 export const a = 10;
 
 
@@ -729,18 +729,18 @@ Info seq  [hh:mm:ss:mss] Scheduled: /home/src/projects/b/2/b-impl/b/tsconfig.jso
 Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/b/2/b-impl/b/node_modules/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt :: WatchInfo: /home/src/projects/b/2/b-impl/b/node_modules/a 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations
 Before running Timeout callback:: count: 1
 10: /home/src/projects/b/2/b-impl/b/tsconfig.jsonFailedLookupInvalidation
-//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 143
+//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 144
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.c = void 0;
 exports.c = 'test';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 144
+//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 145
 export declare const c: string;
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 145
+//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 146
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -760,14 +760,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
 __exportStar(require("./c"), exports);
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 146
+//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 147
 export * from './c';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 147
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 148
 {"root":["../src/c.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 148
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 149
 {
   "root": [
     "../src/c.ts",
@@ -777,18 +777,18 @@ export * from './c';
   "size": 68
 }
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 150
+//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 151
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.a = void 0;
 exports.a = 'test';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 151
+//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 152
 export declare const a: string;
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 152
+//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 153
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -809,15 +809,15 @@ __exportStar(require("./a"), exports);
 __exportStar(require("c"), exports);
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 153
+//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 154
 export * from './a';
 export * from 'c';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 154
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 155
 {"root":["../src/a.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 155
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 156
 {
   "root": [
     "../src/a.ts",
@@ -982,17 +982,17 @@ PolledWatches *deleted*::
 
 FsWatches::
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts: *new*
-  {"inode":151}
+  {"inode":152}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts: *new*
-  {"inode":153}
+  {"inode":154}
 /home/src/projects/a/1/a-impl/a/package.json:
   {"inode":24}
 /home/src/projects/b/2/b-impl/b/tsconfig.json:
   {"inode":36}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts: *new*
-  {"inode":144}
+  {"inode":145}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts: *new*
-  {"inode":146}
+  {"inode":147}
 /home/src/projects/c/3/c-impl/c/package.json: *new*
   {"inode":12}
 /home/src/tslibs/TS/Lib/lib.d.ts:
@@ -1161,7 +1161,7 @@ Info seq  [hh:mm:ss:mss] Scheduled: /home/src/projects/b/2/b-impl/b/tsconfig.jso
 Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/a/2/unrelated/anotherFile.ts :: WatchInfo: /home/src/projects/a 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations
 Before running Timeout callback:: count: 1
 14: /home/src/projects/b/2/b-impl/b/tsconfig.jsonFailedLookupInvalidation
-//// [/home/src/projects/a/2/unrelated/anotherFile.ts] Inode:: 156
+//// [/home/src/projects/a/2/unrelated/anotherFile.ts] Inode:: 157
 export const a = 10;
 
 
@@ -1285,7 +1285,7 @@ Info seq  [hh:mm:ss:mss] Scheduled: /home/src/projects/b/2/b-impl/b/tsconfig.jso
 Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/c/4/unrelated/anotherFile.ts :: WatchInfo: /home/src/projects/c 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations
 Before running Timeout callback:: count: 1
 16: /home/src/projects/b/2/b-impl/b/tsconfig.jsonFailedLookupInvalidation
-//// [/home/src/projects/c/4/unrelated/anotherFile.ts] Inode:: 157
+//// [/home/src/projects/c/4/unrelated/anotherFile.ts] Inode:: 158
 export const a = 10;
 
 
@@ -1535,13 +1535,13 @@ FsWatches::
 
 FsWatches *deleted*::
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts:
-  {"inode":151}
+  {"inode":152}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts:
-  {"inode":153}
+  {"inode":154}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts:
-  {"inode":144}
+  {"inode":145}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts:
-  {"inode":146}
+  {"inode":147}
 
 FsWatchesRecursive::
 /home/src/projects/a:
@@ -1924,18 +1924,18 @@ Info seq  [hh:mm:ss:mss] Scheduled: /home/src/projects/b/2/b-impl/b/tsconfig.jso
 Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/b/2/b-impl/b/node_modules/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt :: WatchInfo: /home/src/projects/b/2/b-impl/b/node_modules/a 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations
 Before running Timeout callback:: count: 1
 47: /home/src/projects/b/2/b-impl/b/tsconfig.jsonFailedLookupInvalidation
-//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 159
+//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 160
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.c = void 0;
 exports.c = 'test';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 160
+//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 161
 export declare const c: string;
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 161
+//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 162
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -1955,14 +1955,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
 __exportStar(require("./c"), exports);
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 162
+//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 163
 export * from './c';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 163
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 164
 {"root":["../src/c.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 164
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 165
 {
   "root": [
     "../src/c.ts",
@@ -1972,18 +1972,18 @@ export * from './c';
   "size": 68
 }
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 166
+//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 167
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.a = void 0;
 exports.a = 'test';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 167
+//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 168
 export declare const a: string;
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 168
+//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 169
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -2004,15 +2004,15 @@ __exportStar(require("./a"), exports);
 __exportStar(require("c"), exports);
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 169
+//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 170
 export * from './a';
 export * from 'c';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 170
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 171
 {"root":["../src/a.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 171
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 172
 {
   "root": [
     "../src/a.ts",
@@ -2073,17 +2073,17 @@ PolledWatches *deleted*::
 
 FsWatches::
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts: *new*
-  {"inode":167}
+  {"inode":168}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts: *new*
-  {"inode":169}
+  {"inode":170}
 /home/src/projects/a/1/a-impl/a/package.json:
   {"inode":24}
 /home/src/projects/b/2/b-impl/b/tsconfig.json:
   {"inode":36}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts: *new*
-  {"inode":160}
+  {"inode":161}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts: *new*
-  {"inode":162}
+  {"inode":163}
 /home/src/tslibs/TS/Lib/lib.d.ts:
   {"inode":45}
 
@@ -2274,17 +2274,17 @@ PolledWatches *deleted*::
 
 FsWatches::
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts:
-  {"inode":167}
+  {"inode":168}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts:
-  {"inode":169}
+  {"inode":170}
 /home/src/projects/a/1/a-impl/a/package.json:
   {"inode":24}
 /home/src/projects/b/2/b-impl/b/tsconfig.json:
   {"inode":36}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts:
-  {"inode":160}
+  {"inode":161}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts:
-  {"inode":162}
+  {"inode":163}
 /home/src/projects/c/3/c-impl/c/package.json: *new*
   {"inode":12}
 /home/src/tslibs/TS/Lib/lib.d.ts:
diff --git a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-Linux-canUseWatchEvents.js b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-Linux-canUseWatchEvents.js
index fa5c232913338..fdeca9c6e2247 100644
--- a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-Linux-canUseWatchEvents.js
+++ b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-Linux-canUseWatchEvents.js
@@ -91,18 +91,18 @@ interface Array<T> { length: number; [n: number]: T; }
 interface ReadonlyArray<T> {}
 declare const console: { log(msg: any): void; };
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 141
+//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 142
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.c = void 0;
 exports.c = 'test';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 142
+//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 143
 export declare const c: string;
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 143
+//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 144
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -122,14 +122,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
 __exportStar(require("./c"), exports);
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 144
+//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 145
 export * from './c';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 145
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 146
 {"root":["../src/c.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 146
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 147
 {
   "root": [
     "../src/c.ts",
@@ -139,18 +139,18 @@ export * from './c';
   "size": 68
 }
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 148
+//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 149
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.a = void 0;
 exports.a = 'test';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 149
+//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 150
 export declare const a: string;
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 150
+//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 151
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -171,15 +171,15 @@ __exportStar(require("./a"), exports);
 __exportStar(require("c"), exports);
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 151
+//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 152
 export * from './a';
 export * from 'c';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 152
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 153
 {"root":["../src/a.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 153
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 154
 {
   "root": [
     "../src/a.ts",
@@ -925,7 +925,7 @@ After running Immedidate callback:: count: 0
 
 change in unrelated folder in a
 Before running Timeout callback:: count: 0
-//// [/home/src/projects/a/2/unrelated/somethingUnrelated.ts] Inode:: 154
+//// [/home/src/projects/a/2/unrelated/somethingUnrelated.ts] Inode:: 155
 export const a = 10;
 
 
@@ -1041,7 +1041,7 @@ After running Immedidate callback:: count: 0
 
 change in unrelated folder in c
 Before running Timeout callback:: count: 0
-//// [/home/src/projects/c/4/unrelated/somethingUnrelated.ts] Inode:: 155
+//// [/home/src/projects/c/4/unrelated/somethingUnrelated.ts] Inode:: 156
 export const a = 10;
 
 
@@ -1157,7 +1157,7 @@ After running Immedidate callback:: count: 0
 
 change in unrelated folder in a
 Before running Timeout callback:: count: 0
-//// [/home/src/projects/a/2/unrelated/anotherFile.ts] Inode:: 156
+//// [/home/src/projects/a/2/unrelated/anotherFile.ts] Inode:: 157
 export const a = 10;
 
 
@@ -1273,7 +1273,7 @@ After running Immedidate callback:: count: 0
 
 change in unrelated folder in c
 Before running Timeout callback:: count: 0
-//// [/home/src/projects/c/4/unrelated/anotherFile.ts] Inode:: 157
+//// [/home/src/projects/c/4/unrelated/anotherFile.ts] Inode:: 158
 export const a = 10;
 
 
@@ -2015,18 +2015,18 @@ Custom watchDirectory:: Triggered Ignored:: {"id":31,"path":"/home/src/projects/
 Custom watchDirectory:: Triggered Ignored:: {"id":31,"path":"/home/src/projects/b/2/b-impl/b/node_modules/a","recursive":true,"ignoreUpdate":true}:: /home/src/projects/b/2/b-impl/b/node_modules/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt updated
 Custom watchDirectory:: Triggered Ignored:: {"id":31,"path":"/home/src/projects/b/2/b-impl/b/node_modules/a","recursive":true,"ignoreUpdate":true}:: /home/src/projects/b/2/b-impl/b/node_modules/a/lib updated
 Before request
-//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 159
+//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 160
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.c = void 0;
 exports.c = 'test';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 160
+//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 161
 export declare const c: string;
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 161
+//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 162
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -2046,14 +2046,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
 __exportStar(require("./c"), exports);
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 162
+//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 163
 export * from './c';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 163
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 164
 {"root":["../src/c.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 164
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 165
 {
   "root": [
     "../src/c.ts",
@@ -2063,18 +2063,18 @@ export * from './c';
   "size": 68
 }
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 166
+//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 167
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.a = void 0;
 exports.a = 'test';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 167
+//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 168
 export declare const a: string;
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 168
+//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 169
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -2095,15 +2095,15 @@ __exportStar(require("./a"), exports);
 __exportStar(require("c"), exports);
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 169
+//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 170
 export * from './a';
 export * from 'c';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 170
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 171
 {"root":["../src/a.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 171
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 172
 {
   "root": [
     "../src/a.ts",
diff --git a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-Linux.js b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-Linux.js
index 3ec539561c2da..2f072f50ed765 100644
--- a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-Linux.js
+++ b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-Linux.js
@@ -91,18 +91,18 @@ interface Array<T> { length: number; [n: number]: T; }
 interface ReadonlyArray<T> {}
 declare const console: { log(msg: any): void; };
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 141
+//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 142
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.c = void 0;
 exports.c = 'test';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 142
+//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 143
 export declare const c: string;
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 143
+//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 144
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -122,14 +122,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
 __exportStar(require("./c"), exports);
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 144
+//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 145
 export * from './c';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 145
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 146
 {"root":["../src/c.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 146
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 147
 {
   "root": [
     "../src/c.ts",
@@ -139,18 +139,18 @@ export * from './c';
   "size": 68
 }
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 148
+//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 149
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.a = void 0;
 exports.a = 'test';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 149
+//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 150
 export declare const a: string;
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 150
+//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 151
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -171,15 +171,15 @@ __exportStar(require("./a"), exports);
 __exportStar(require("c"), exports);
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 151
+//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 152
 export * from './a';
 export * from 'c';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 152
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 153
 {"root":["../src/a.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 153
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 154
 {
   "root": [
     "../src/a.ts",
@@ -410,11 +410,11 @@ PolledWatches::
 
 FsWatches::
 /home/src/projects/a/1/a-impl/a/lib: *new*
-  {"inode":147}
+  {"inode":148}
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts: *new*
-  {"inode":149}
+  {"inode":150}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts: *new*
-  {"inode":151}
+  {"inode":152}
 /home/src/projects/a/1/a-impl/a/node_modules: *new*
   {"inode":25}
 /home/src/projects/a/1/a-impl/a/package.json: *new*
@@ -426,11 +426,11 @@ FsWatches::
 /home/src/projects/b/2/b-impl/b/tsconfig.json: *new*
   {"inode":36}
 /home/src/projects/c/3/c-impl/c/lib: *new*
-  {"inode":140}
+  {"inode":141}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts: *new*
-  {"inode":142}
+  {"inode":143}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts: *new*
-  {"inode":144}
+  {"inode":145}
 /home/src/projects/c/3/c-impl/c/package.json: *new*
   {"inode":12}
 /home/src/tslibs/TS/Lib/lib.d.ts: *new*
@@ -574,7 +574,7 @@ After running Immedidate callback:: count: 0
 
 change in unrelated folder in a
 Before running Timeout callback:: count: 0
-//// [/home/src/projects/a/2/unrelated/somethingUnrelated.ts] Inode:: 154
+//// [/home/src/projects/a/2/unrelated/somethingUnrelated.ts] Inode:: 155
 export const a = 10;
 
 
@@ -690,7 +690,7 @@ After running Immedidate callback:: count: 0
 
 change in unrelated folder in c
 Before running Timeout callback:: count: 0
-//// [/home/src/projects/c/4/unrelated/somethingUnrelated.ts] Inode:: 155
+//// [/home/src/projects/c/4/unrelated/somethingUnrelated.ts] Inode:: 156
 export const a = 10;
 
 
@@ -806,7 +806,7 @@ After running Immedidate callback:: count: 0
 
 change in unrelated folder in a
 Before running Timeout callback:: count: 0
-//// [/home/src/projects/a/2/unrelated/anotherFile.ts] Inode:: 156
+//// [/home/src/projects/a/2/unrelated/anotherFile.ts] Inode:: 157
 export const a = 10;
 
 
@@ -922,7 +922,7 @@ After running Immedidate callback:: count: 0
 
 change in unrelated folder in c
 Before running Timeout callback:: count: 0
-//// [/home/src/projects/c/4/unrelated/anotherFile.ts] Inode:: 157
+//// [/home/src/projects/c/4/unrelated/anotherFile.ts] Inode:: 158
 export const a = 10;
 
 
@@ -1178,17 +1178,17 @@ FsWatches::
 
 FsWatches *deleted*::
 /home/src/projects/a/1/a-impl/a/lib:
-  {"inode":147}
+  {"inode":148}
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts:
-  {"inode":149}
+  {"inode":150}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts:
-  {"inode":151}
+  {"inode":152}
 /home/src/projects/c/3/c-impl/c/lib:
-  {"inode":140}
+  {"inode":141}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts:
-  {"inode":142}
+  {"inode":143}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts:
-  {"inode":144}
+  {"inode":145}
 
 Timeout callback:: count: 3
 21: /home/src/projects/b/2/b-impl/b/tsconfig.json *new*
@@ -1540,18 +1540,18 @@ Info seq  [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/a/1/a-i
 Info seq  [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/a/1/a-impl/a/lib/index.d.ts 0:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/index.d.ts 500 undefined WatchType: Closed Script info
 Before running Timeout callback:: count: 1
 30: timerToUpdateChildWatches
-//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 159
+//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 160
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.c = void 0;
 exports.c = 'test';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 160
+//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 161
 export declare const c: string;
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 161
+//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 162
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -1571,14 +1571,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
 __exportStar(require("./c"), exports);
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 162
+//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 163
 export * from './c';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 163
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 164
 {"root":["../src/c.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 164
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 165
 {
   "root": [
     "../src/c.ts",
@@ -1588,18 +1588,18 @@ export * from './c';
   "size": 68
 }
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 166
+//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 167
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.a = void 0;
 exports.a = 'test';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 167
+//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 168
 export declare const a: string;
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 168
+//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 169
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -1620,15 +1620,15 @@ __exportStar(require("./a"), exports);
 __exportStar(require("c"), exports);
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 169
+//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 170
 export * from './a';
 export * from 'c';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 170
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 171
 {"root":["../src/a.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 171
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 172
 {
   "root": [
     "../src/a.ts",
@@ -1691,9 +1691,9 @@ FsWatches::
 /home/src/projects/a/1/a-impl/a:
   {"inode":19}
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts: *new*
-  {"inode":167}
+  {"inode":168}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts: *new*
-  {"inode":169}
+  {"inode":170}
 /home/src/projects/a/1/a-impl/a/node_modules:
   {"inode":25}
 /home/src/projects/a/1/a-impl/a/package.json:
@@ -1709,9 +1709,9 @@ FsWatches::
 /home/src/projects/b/2/b-impl/b/tsconfig.json:
   {"inode":36}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts: *new*
-  {"inode":160}
+  {"inode":161}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts: *new*
-  {"inode":162}
+  {"inode":163}
 /home/src/tslibs/TS/Lib/lib.d.ts:
   {"inode":45}
 
@@ -1798,11 +1798,11 @@ FsWatches::
 /home/src/projects/a/1/a-impl/a:
   {"inode":19}
 /home/src/projects/a/1/a-impl/a/lib: *new*
-  {"inode":165}
+  {"inode":166}
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts:
-  {"inode":167}
+  {"inode":168}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts:
-  {"inode":169}
+  {"inode":170}
 /home/src/projects/a/1/a-impl/a/node_modules:
   {"inode":25}
 /home/src/projects/a/1/a-impl/a/package.json:
@@ -1818,9 +1818,9 @@ FsWatches::
 /home/src/projects/b/2/b-impl/b/tsconfig.json:
   {"inode":36}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts:
-  {"inode":160}
+  {"inode":161}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts:
-  {"inode":162}
+  {"inode":163}
 /home/src/tslibs/TS/Lib/lib.d.ts:
   {"inode":45}
 
@@ -1976,11 +1976,11 @@ PolledWatches *deleted*::
 
 FsWatches::
 /home/src/projects/a/1/a-impl/a/lib:
-  {"inode":165}
+  {"inode":166}
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts:
-  {"inode":167}
+  {"inode":168}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts:
-  {"inode":169}
+  {"inode":170}
 /home/src/projects/a/1/a-impl/a/node_modules:
   {"inode":25}
 /home/src/projects/a/1/a-impl/a/package.json:
@@ -1992,11 +1992,11 @@ FsWatches::
 /home/src/projects/b/2/b-impl/b/tsconfig.json:
   {"inode":36}
 /home/src/projects/c/3/c-impl/c/lib: *new*
-  {"inode":158}
+  {"inode":159}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts:
-  {"inode":160}
+  {"inode":161}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts:
-  {"inode":162}
+  {"inode":163}
 /home/src/projects/c/3/c-impl/c/package.json: *new*
   {"inode":12}
 /home/src/tslibs/TS/Lib/lib.d.ts:
diff --git a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-MacOs-canUseWatchEvents.js b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-MacOs-canUseWatchEvents.js
index 1b47a7f7a8027..eca78dcbc5a8f 100644
--- a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-MacOs-canUseWatchEvents.js
+++ b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-MacOs-canUseWatchEvents.js
@@ -91,18 +91,18 @@ interface Array<T> { length: number; [n: number]: T; }
 interface ReadonlyArray<T> {}
 declare const console: { log(msg: any): void; };
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 141
+//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 142
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.c = void 0;
 exports.c = 'test';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 142
+//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 143
 export declare const c: string;
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 143
+//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 144
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -122,14 +122,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
 __exportStar(require("./c"), exports);
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 144
+//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 145
 export * from './c';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 145
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 146
 {"root":["../src/c.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 146
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 147
 {
   "root": [
     "../src/c.ts",
@@ -139,18 +139,18 @@ export * from './c';
   "size": 68
 }
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 148
+//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 149
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.a = void 0;
 exports.a = 'test';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 149
+//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 150
 export declare const a: string;
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 150
+//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 151
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -171,15 +171,15 @@ __exportStar(require("./a"), exports);
 __exportStar(require("c"), exports);
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 151
+//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 152
 export * from './a';
 export * from 'c';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 152
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 153
 {"root":["../src/a.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 153
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 154
 {
   "root": [
     "../src/a.ts",
@@ -925,7 +925,7 @@ After running Immedidate callback:: count: 0
 
 change in unrelated folder in a
 Before running Timeout callback:: count: 0
-//// [/home/src/projects/a/2/unrelated/somethingUnrelated.ts] Inode:: 154
+//// [/home/src/projects/a/2/unrelated/somethingUnrelated.ts] Inode:: 155
 export const a = 10;
 
 
@@ -1041,7 +1041,7 @@ After running Immedidate callback:: count: 0
 
 change in unrelated folder in c
 Before running Timeout callback:: count: 0
-//// [/home/src/projects/c/4/unrelated/somethingUnrelated.ts] Inode:: 155
+//// [/home/src/projects/c/4/unrelated/somethingUnrelated.ts] Inode:: 156
 export const a = 10;
 
 
@@ -1157,7 +1157,7 @@ After running Immedidate callback:: count: 0
 
 change in unrelated folder in a
 Before running Timeout callback:: count: 0
-//// [/home/src/projects/a/2/unrelated/anotherFile.ts] Inode:: 156
+//// [/home/src/projects/a/2/unrelated/anotherFile.ts] Inode:: 157
 export const a = 10;
 
 
@@ -1273,7 +1273,7 @@ After running Immedidate callback:: count: 0
 
 change in unrelated folder in c
 Before running Timeout callback:: count: 0
-//// [/home/src/projects/c/4/unrelated/anotherFile.ts] Inode:: 157
+//// [/home/src/projects/c/4/unrelated/anotherFile.ts] Inode:: 158
 export const a = 10;
 
 
@@ -2002,18 +2002,18 @@ Custom watchDirectory:: Triggered Ignored:: {"id":31,"path":"/home/src/projects/
 Custom watchDirectory:: Triggered Ignored:: {"id":31,"path":"/home/src/projects/b/2/b-impl/b/node_modules/a","recursive":true,"ignoreUpdate":true}:: /home/src/projects/b/2/b-impl/b/node_modules/a/lib/tsconfig.tsbuildinfo created
 Custom watchDirectory:: Triggered Ignored:: {"id":31,"path":"/home/src/projects/b/2/b-impl/b/node_modules/a","recursive":true,"ignoreUpdate":true}:: /home/src/projects/b/2/b-impl/b/node_modules/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt created
 Before request
-//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 159
+//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 160
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.c = void 0;
 exports.c = 'test';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 160
+//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 161
 export declare const c: string;
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 161
+//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 162
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -2033,14 +2033,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
 __exportStar(require("./c"), exports);
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 162
+//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 163
 export * from './c';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 163
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 164
 {"root":["../src/c.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 164
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 165
 {
   "root": [
     "../src/c.ts",
@@ -2050,18 +2050,18 @@ export * from './c';
   "size": 68
 }
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 166
+//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 167
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.a = void 0;
 exports.a = 'test';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 167
+//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 168
 export declare const a: string;
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 168
+//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 169
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -2082,15 +2082,15 @@ __exportStar(require("./a"), exports);
 __exportStar(require("c"), exports);
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 169
+//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 170
 export * from './a';
 export * from 'c';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 170
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 171
 {"root":["../src/a.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 171
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 172
 {
   "root": [
     "../src/a.ts",
diff --git a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-MacOs.js b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-MacOs.js
index c413190825504..1926b731885b8 100644
--- a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-MacOs.js
+++ b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-MacOs.js
@@ -91,18 +91,18 @@ interface Array<T> { length: number; [n: number]: T; }
 interface ReadonlyArray<T> {}
 declare const console: { log(msg: any): void; };
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 141
+//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 142
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.c = void 0;
 exports.c = 'test';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 142
+//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 143
 export declare const c: string;
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 143
+//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 144
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -122,14 +122,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
 __exportStar(require("./c"), exports);
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 144
+//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 145
 export * from './c';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 145
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 146
 {"root":["../src/c.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 146
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 147
 {
   "root": [
     "../src/c.ts",
@@ -139,18 +139,18 @@ export * from './c';
   "size": 68
 }
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 148
+//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 149
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.a = void 0;
 exports.a = 'test';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 149
+//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 150
 export declare const a: string;
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 150
+//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 151
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -171,15 +171,15 @@ __exportStar(require("./a"), exports);
 __exportStar(require("c"), exports);
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 151
+//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 152
 export * from './a';
 export * from 'c';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 152
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 153
 {"root":["../src/a.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 153
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 154
 {
   "root": [
     "../src/a.ts",
@@ -410,17 +410,17 @@ PolledWatches::
 
 FsWatches::
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts: *new*
-  {"inode":149}
+  {"inode":150}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts: *new*
-  {"inode":151}
+  {"inode":152}
 /home/src/projects/a/1/a-impl/a/package.json: *new*
   {"inode":24}
 /home/src/projects/b/2/b-impl/b/tsconfig.json: *new*
   {"inode":36}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts: *new*
-  {"inode":142}
+  {"inode":143}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts: *new*
-  {"inode":144}
+  {"inode":145}
 /home/src/projects/c/3/c-impl/c/package.json: *new*
   {"inode":12}
 /home/src/tslibs/TS/Lib/lib.d.ts: *new*
@@ -580,7 +580,7 @@ Info seq  [hh:mm:ss:mss] Scheduled: /home/src/projects/b/2/b-impl/b/tsconfig.jso
 Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/a/2/unrelated/somethingUnrelated.ts :: WatchInfo: /home/src/projects/a 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations
 Before running Timeout callback:: count: 1
 2: /home/src/projects/b/2/b-impl/b/tsconfig.jsonFailedLookupInvalidation
-//// [/home/src/projects/a/2/unrelated/somethingUnrelated.ts] Inode:: 154
+//// [/home/src/projects/a/2/unrelated/somethingUnrelated.ts] Inode:: 155
 export const a = 10;
 
 
@@ -704,7 +704,7 @@ Info seq  [hh:mm:ss:mss] Scheduled: /home/src/projects/b/2/b-impl/b/tsconfig.jso
 Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/c/4/unrelated/somethingUnrelated.ts :: WatchInfo: /home/src/projects/c 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations
 Before running Timeout callback:: count: 1
 4: /home/src/projects/b/2/b-impl/b/tsconfig.jsonFailedLookupInvalidation
-//// [/home/src/projects/c/4/unrelated/somethingUnrelated.ts] Inode:: 155
+//// [/home/src/projects/c/4/unrelated/somethingUnrelated.ts] Inode:: 156
 export const a = 10;
 
 
@@ -828,7 +828,7 @@ Info seq  [hh:mm:ss:mss] Scheduled: /home/src/projects/b/2/b-impl/b/tsconfig.jso
 Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/a/2/unrelated/anotherFile.ts :: WatchInfo: /home/src/projects/a 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations
 Before running Timeout callback:: count: 1
 6: /home/src/projects/b/2/b-impl/b/tsconfig.jsonFailedLookupInvalidation
-//// [/home/src/projects/a/2/unrelated/anotherFile.ts] Inode:: 156
+//// [/home/src/projects/a/2/unrelated/anotherFile.ts] Inode:: 157
 export const a = 10;
 
 
@@ -952,7 +952,7 @@ Info seq  [hh:mm:ss:mss] Scheduled: /home/src/projects/b/2/b-impl/b/tsconfig.jso
 Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/c/4/unrelated/anotherFile.ts :: WatchInfo: /home/src/projects/c 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations
 Before running Timeout callback:: count: 1
 8: /home/src/projects/b/2/b-impl/b/tsconfig.jsonFailedLookupInvalidation
-//// [/home/src/projects/c/4/unrelated/anotherFile.ts] Inode:: 157
+//// [/home/src/projects/c/4/unrelated/anotherFile.ts] Inode:: 158
 export const a = 10;
 
 
@@ -1202,13 +1202,13 @@ FsWatches::
 
 FsWatches *deleted*::
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts:
-  {"inode":149}
+  {"inode":150}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts:
-  {"inode":151}
+  {"inode":152}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts:
-  {"inode":142}
+  {"inode":143}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts:
-  {"inode":144}
+  {"inode":145}
 
 FsWatchesRecursive::
 /home/src/projects/a:
@@ -1593,18 +1593,18 @@ Info seq  [hh:mm:ss:mss] Scheduled: /home/src/projects/b/2/b-impl/b/tsconfig.jso
 Info seq  [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/b/2/b-impl/b/node_modules/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt :: WatchInfo: /home/src/projects/b/2/b-impl/b/node_modules/a 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations
 Before running Timeout callback:: count: 1
 39: /home/src/projects/b/2/b-impl/b/tsconfig.jsonFailedLookupInvalidation
-//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 159
+//// [/home/src/projects/c/3/c-impl/c/lib/c.js] Inode:: 160
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.c = void 0;
 exports.c = 'test';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 160
+//// [/home/src/projects/c/3/c-impl/c/lib/c.d.ts] Inode:: 161
 export declare const c: string;
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 161
+//// [/home/src/projects/c/3/c-impl/c/lib/index.js] Inode:: 162
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -1624,14 +1624,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
 __exportStar(require("./c"), exports);
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 162
+//// [/home/src/projects/c/3/c-impl/c/lib/index.d.ts] Inode:: 163
 export * from './c';
 
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 163
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo] Inode:: 164
 {"root":["../src/c.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 164
+//// [/home/src/projects/c/3/c-impl/c/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 165
 {
   "root": [
     "../src/c.ts",
@@ -1641,18 +1641,18 @@ export * from './c';
   "size": 68
 }
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 166
+//// [/home/src/projects/a/1/a-impl/a/lib/a.js] Inode:: 167
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.a = void 0;
 exports.a = 'test';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 167
+//// [/home/src/projects/a/1/a-impl/a/lib/a.d.ts] Inode:: 168
 export declare const a: string;
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 168
+//// [/home/src/projects/a/1/a-impl/a/lib/index.js] Inode:: 169
 "use strict";
 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
     if (k2 === undefined) k2 = k;
@@ -1673,15 +1673,15 @@ __exportStar(require("./a"), exports);
 __exportStar(require("c"), exports);
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 169
+//// [/home/src/projects/a/1/a-impl/a/lib/index.d.ts] Inode:: 170
 export * from './a';
 export * from 'c';
 
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 170
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo] Inode:: 171
 {"root":["../src/a.ts","../src/index.ts"],"version":"FakeTSVersion"}
 
-//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 171
+//// [/home/src/projects/a/1/a-impl/a/lib/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 172
 {
   "root": [
     "../src/a.ts",
@@ -1742,17 +1742,17 @@ PolledWatches *deleted*::
 
 FsWatches::
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts: *new*
-  {"inode":167}
+  {"inode":168}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts: *new*
-  {"inode":169}
+  {"inode":170}
 /home/src/projects/a/1/a-impl/a/package.json:
   {"inode":24}
 /home/src/projects/b/2/b-impl/b/tsconfig.json:
   {"inode":36}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts: *new*
-  {"inode":160}
+  {"inode":161}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts: *new*
-  {"inode":162}
+  {"inode":163}
 /home/src/tslibs/TS/Lib/lib.d.ts:
   {"inode":45}
 
@@ -1943,17 +1943,17 @@ PolledWatches *deleted*::
 
 FsWatches::
 /home/src/projects/a/1/a-impl/a/lib/a.d.ts:
-  {"inode":167}
+  {"inode":168}
 /home/src/projects/a/1/a-impl/a/lib/index.d.ts:
-  {"inode":169}
+  {"inode":170}
 /home/src/projects/a/1/a-impl/a/package.json:
   {"inode":24}
 /home/src/projects/b/2/b-impl/b/tsconfig.json:
   {"inode":36}
 /home/src/projects/c/3/c-impl/c/lib/c.d.ts:
-  {"inode":160}
+  {"inode":161}
 /home/src/projects/c/3/c-impl/c/lib/index.d.ts:
-  {"inode":162}
+  {"inode":163}
 /home/src/projects/c/3/c-impl/c/package.json: *new*
   {"inode":12}
 /home/src/tslibs/TS/Lib/lib.d.ts:
diff --git a/tests/baselines/reference/tsserver/watchEnvironment/recursive-directory-does-not-watch-files-starting-with-dot-in-node_modules.js b/tests/baselines/reference/tsserver/watchEnvironment/recursive-directory-does-not-watch-files-starting-with-dot-in-node_modules.js
index 1d49731922b91..720b0b1c32fe9 100644
--- a/tests/baselines/reference/tsserver/watchEnvironment/recursive-directory-does-not-watch-files-starting-with-dot-in-node_modules.js
+++ b/tests/baselines/reference/tsserver/watchEnvironment/recursive-directory-does-not-watch-files-starting-with-dot-in-node_modules.js
@@ -235,26 +235,26 @@ ScriptInfos::
         /a/username/workspace/project/tsconfig.json
 
 After writing ignored file or folder
-//// [/a/username/workspace/project/node_modules/.cache/someFile.d.ts] Inode:: 115
+//// [/a/username/workspace/project/node_modules/.cache/someFile.d.ts] Inode:: 116
 
 
 
 After writing ignored file or folder
-//// [/a/username/workspace/project/node_modules/.cacheFile.ts] Inode:: 116
+//// [/a/username/workspace/project/node_modules/.cacheFile.ts] Inode:: 117
 
 
 
 After writing ignored file or folder
-//// [/a/username/workspace/project/.git/someFile.d.ts] Inode:: 118
+//// [/a/username/workspace/project/.git/someFile.d.ts] Inode:: 119
 
 
 
 After writing ignored file or folder
-//// [/a/username/workspace/project/.gitCache.d.ts] Inode:: 119
+//// [/a/username/workspace/project/.gitCache.d.ts] Inode:: 120
 
 
 
 After writing ignored file or folder
-//// [/a/username/workspace/project/src/.#field.ts] Inode:: 120
+//// [/a/username/workspace/project/src/.#field.ts] Inode:: 121
 
 
diff --git a/tests/baselines/reference/tsserver/watchEnvironment/uses-dynamic-polling-when-file-is-added-to-subfolder.js b/tests/baselines/reference/tsserver/watchEnvironment/uses-dynamic-polling-when-file-is-added-to-subfolder.js
index eeeb35662b4e9..4636ffa780cff 100644
--- a/tests/baselines/reference/tsserver/watchEnvironment/uses-dynamic-polling-when-file-is-added-to-subfolder.js
+++ b/tests/baselines/reference/tsserver/watchEnvironment/uses-dynamic-polling-when-file-is-added-to-subfolder.js
@@ -263,7 +263,7 @@ After request
 
 Before running Timeout callback:: count: 1
 1: pollPollingIntervalQueue
-//// [/a/username/workspace/project/src/file2.ts] Inode:: 112
+//// [/a/username/workspace/project/src/file2.ts] Inode:: 113
 
 
 
@@ -391,7 +391,7 @@ FsWatches::
 /a/username/workspace/project/src/file1.ts:
   {"inode":7}
 /a/username/workspace/project/src/file2.ts: *new*
-  {"inode":112}
+  {"inode":113}
 /a/username/workspace/project/tsconfig.json:
   {"inode":8}
 /home/src/tslibs/TS/Lib/lib.d.ts:
diff --git a/tests/baselines/reference/tsserver/watchEnvironment/uses-non-recursive-watchDirectory-when-file-is-added-to-subfolder.js b/tests/baselines/reference/tsserver/watchEnvironment/uses-non-recursive-watchDirectory-when-file-is-added-to-subfolder.js
index f598b8750ef03..b5ad36008765d 100644
--- a/tests/baselines/reference/tsserver/watchEnvironment/uses-non-recursive-watchDirectory-when-file-is-added-to-subfolder.js
+++ b/tests/baselines/reference/tsserver/watchEnvironment/uses-non-recursive-watchDirectory-when-file-is-added-to-subfolder.js
@@ -277,7 +277,7 @@ Before running Timeout callback:: count: 3
 1: /a/username/workspace/project/tsconfig.json
 2: *ensureProjectForOpenFiles*
 3: /a/username/workspace/project/tsconfig.jsonFailedLookupInvalidation
-//// [/a/username/workspace/project/src/file2.ts] Inode:: 112
+//// [/a/username/workspace/project/src/file2.ts] Inode:: 113
 
 
 
@@ -373,7 +373,7 @@ FsWatches::
 /a/username/workspace/project/src/file1.ts:
   {"inode":7}
 /a/username/workspace/project/src/file2.ts: *new*
-  {"inode":112}
+  {"inode":113}
 /a/username/workspace/project/tsconfig.json:
   {"inode":8}
 /home/src/tslibs/TS/Lib/lib.d.ts:
diff --git a/tests/baselines/reference/tsserver/watchEnvironment/uses-watchFile-when-file-is-added-to-subfolder.js b/tests/baselines/reference/tsserver/watchEnvironment/uses-watchFile-when-file-is-added-to-subfolder.js
index 7c6d16748969b..1634f0a2ba68a 100644
--- a/tests/baselines/reference/tsserver/watchEnvironment/uses-watchFile-when-file-is-added-to-subfolder.js
+++ b/tests/baselines/reference/tsserver/watchEnvironment/uses-watchFile-when-file-is-added-to-subfolder.js
@@ -280,7 +280,7 @@ Before running Timeout callback:: count: 3
 3: /a/username/workspace/project/tsconfig.json
 4: *ensureProjectForOpenFiles*
 5: /a/username/workspace/project/tsconfig.jsonFailedLookupInvalidation
-//// [/a/username/workspace/project/src/file2.ts] Inode:: 112
+//// [/a/username/workspace/project/src/file2.ts] Inode:: 113
 
 
 
@@ -363,7 +363,7 @@ FsWatches::
 /a/username/workspace/project/src/file1.ts:
   {"inode":7}
 /a/username/workspace/project/src/file2.ts: *new*
-  {"inode":112}
+  {"inode":113}
 /a/username/workspace/project/tsconfig.json:
   {"inode":8}
 /home/src/tslibs/TS/Lib/lib.d.ts:
diff --git a/tests/baselines/reference/tsserver/watchEnvironment/watching-npm-install-in-codespaces-where-workspaces-folder-is-hosted-at-root.js b/tests/baselines/reference/tsserver/watchEnvironment/watching-npm-install-in-codespaces-where-workspaces-folder-is-hosted-at-root.js
index 2498f79809353..b14076328315e 100644
--- a/tests/baselines/reference/tsserver/watchEnvironment/watching-npm-install-in-codespaces-where-workspaces-folder-is-hosted-at-root.js
+++ b/tests/baselines/reference/tsserver/watchEnvironment/watching-npm-install-in-codespaces-where-workspaces-folder-is-hosted-at-root.js
@@ -682,7 +682,7 @@ Projects::
     dirty: true *changed*
 
 Before request
-//// [/workspaces/somerepo/node_modules/@types/random-seed/index.d.ts] Inode:: 116
+//// [/workspaces/somerepo/node_modules/@types/random-seed/index.d.ts] Inode:: 117
 export function randomSeed(): string;
 
 
@@ -712,9 +712,9 @@ FsWatches::
 /home/src/tslibs/TS/Lib/lib.d.ts:
   {"inode":18}
 /workspaces/somerepo/node_modules: *new*
-  {"inode":113}
-/workspaces/somerepo/node_modules/@types: *new*
   {"inode":114}
+/workspaces/somerepo/node_modules/@types: *new*
+  {"inode":115}
 /workspaces/somerepo/src:
   {"inode":3}
 /workspaces/somerepo/src/tsconfig.json:
@@ -816,9 +816,9 @@ FsWatches::
 /home/src/tslibs/TS/Lib/lib.d.ts:
   {"inode":18}
 /workspaces/somerepo/node_modules:
-  {"inode":113}
-/workspaces/somerepo/node_modules/@types:
   {"inode":114}
+/workspaces/somerepo/node_modules/@types:
+  {"inode":115}
 /workspaces/somerepo/src:
   {"inode":3}
 /workspaces/somerepo/src/tsconfig.json:
@@ -956,11 +956,11 @@ FsWatches::
 /home/src/tslibs/TS/Lib/lib.d.ts:
   {"inode":18}
 /workspaces/somerepo/node_modules:
-  {"inode":113}
-/workspaces/somerepo/node_modules/@types:
   {"inode":114}
-/workspaces/somerepo/node_modules/@types/random-seed: *new*
+/workspaces/somerepo/node_modules/@types:
   {"inode":115}
+/workspaces/somerepo/node_modules/@types/random-seed: *new*
+  {"inode":116}
 /workspaces/somerepo/src:
   {"inode":3}
 /workspaces/somerepo/src/tsconfig.json:
diff --git a/tests/baselines/reference/typeAliasDeclarationEmit3.errors.txt b/tests/baselines/reference/typeAliasDeclarationEmit3.errors.txt
new file mode 100644
index 0000000000000..516b4494910a0
--- /dev/null
+++ b/tests/baselines/reference/typeAliasDeclarationEmit3.errors.txt
@@ -0,0 +1,30 @@
+typeAliasDeclarationEmit3.ts(3,14): error TS1156: 'type' declarations can only be declared inside a block.
+typeAliasDeclarationEmit3.ts(9,14): error TS1156: 'type' declarations can only be declared inside a block.
+typeAliasDeclarationEmit3.ts(15,14): error TS1156: 'type' declarations can only be declared inside a block.
+
+
+==== typeAliasDeclarationEmit3.ts (3 errors) ====
+    function f1(): void {
+        for (let i = 0; i < 1; i++)
+            type foo = [];
+                 ~~~
+!!! error TS1156: 'type' declarations can only be declared inside a block.
+            console.log('f1');
+    }
+    
+    function f2(): void {
+        while (true)
+            type foo = [];
+                 ~~~
+!!! error TS1156: 'type' declarations can only be declared inside a block.
+            console.log('f2');
+    }
+    
+    function f3(): void {
+        if (true)
+            type foo = [];
+                 ~~~
+!!! error TS1156: 'type' declarations can only be declared inside a block.
+            console.log('f3');
+    }
+    
\ No newline at end of file
diff --git a/tests/baselines/reference/typeInterfaceDeclarationsInBlockStatements1.errors.txt b/tests/baselines/reference/typeInterfaceDeclarationsInBlockStatements1.errors.txt
new file mode 100644
index 0000000000000..eca38cd12fd43
--- /dev/null
+++ b/tests/baselines/reference/typeInterfaceDeclarationsInBlockStatements1.errors.txt
@@ -0,0 +1,46 @@
+typeInterfaceDeclarationsInBlockStatements1.ts(4,18): error TS1156: 'type' declarations can only be declared inside a block.
+typeInterfaceDeclarationsInBlockStatements1.ts(12,21): error TS2304: Cannot find name 's'.
+typeInterfaceDeclarationsInBlockStatements1.ts(17,15): error TS1156: 'interface' declarations can only be declared inside a block.
+typeInterfaceDeclarationsInBlockStatements1.ts(29,21): error TS2304: Cannot find name 's'.
+
+
+==== typeInterfaceDeclarationsInBlockStatements1.ts (4 errors) ====
+    // https://github.com/microsoft/TypeScript/issues/60175
+    
+    function f1() {
+      if (true) type s = string;
+                     ~
+!!! error TS1156: 'type' declarations can only be declared inside a block.
+      console.log("" as s);
+    }
+    
+    function f2() {
+      if (true) {
+        type s = string;
+      }
+      console.log("" as s);
+                        ~
+!!! error TS2304: Cannot find name 's'.
+    }
+    
+    function f3() {
+      if (true)
+        interface s {
+                  ~
+!!! error TS1156: 'interface' declarations can only be declared inside a block.
+          length: number;
+        }
+      console.log("" as s);
+    }
+    
+    function f4() {
+      if (true) {
+        interface s {
+          length: number;
+        }
+      }
+      console.log("" as s);
+                        ~
+!!! error TS2304: Cannot find name 's'.
+    }
+    
\ No newline at end of file
diff --git a/tests/baselines/reference/typeInterfaceDeclarationsInBlockStatements1.js b/tests/baselines/reference/typeInterfaceDeclarationsInBlockStatements1.js
new file mode 100644
index 0000000000000..f636aafa95cce
--- /dev/null
+++ b/tests/baselines/reference/typeInterfaceDeclarationsInBlockStatements1.js
@@ -0,0 +1,65 @@
+//// [tests/cases/compiler/typeInterfaceDeclarationsInBlockStatements1.ts] ////
+
+//// [typeInterfaceDeclarationsInBlockStatements1.ts]
+// https://github.com/microsoft/TypeScript/issues/60175
+
+function f1() {
+  if (true) type s = string;
+  console.log("" as s);
+}
+
+function f2() {
+  if (true) {
+    type s = string;
+  }
+  console.log("" as s);
+}
+
+function f3() {
+  if (true)
+    interface s {
+      length: number;
+    }
+  console.log("" as s);
+}
+
+function f4() {
+  if (true) {
+    interface s {
+      length: number;
+    }
+  }
+  console.log("" as s);
+}
+
+
+//// [typeInterfaceDeclarationsInBlockStatements1.js]
+"use strict";
+// https://github.com/microsoft/TypeScript/issues/60175
+function f1() {
+    if (true)
+        ;
+    console.log("");
+}
+function f2() {
+    if (true) {
+    }
+    console.log("");
+}
+function f3() {
+    if (true)
+        ;
+    console.log("");
+}
+function f4() {
+    if (true) {
+    }
+    console.log("");
+}
+
+
+//// [typeInterfaceDeclarationsInBlockStatements1.d.ts]
+declare function f1(): void;
+declare function f2(): void;
+declare function f3(): void;
+declare function f4(): void;
diff --git a/tests/baselines/reference/typeInterfaceDeclarationsInBlockStatements1.symbols b/tests/baselines/reference/typeInterfaceDeclarationsInBlockStatements1.symbols
new file mode 100644
index 0000000000000..7c3ee3a47ae40
--- /dev/null
+++ b/tests/baselines/reference/typeInterfaceDeclarationsInBlockStatements1.symbols
@@ -0,0 +1,67 @@
+//// [tests/cases/compiler/typeInterfaceDeclarationsInBlockStatements1.ts] ////
+
+=== typeInterfaceDeclarationsInBlockStatements1.ts ===
+// https://github.com/microsoft/TypeScript/issues/60175
+
+function f1() {
+>f1 : Symbol(f1, Decl(typeInterfaceDeclarationsInBlockStatements1.ts, 0, 0))
+
+  if (true) type s = string;
+>s : Symbol(s, Decl(typeInterfaceDeclarationsInBlockStatements1.ts, 3, 11))
+
+  console.log("" as s);
+>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
+>console : Symbol(console, Decl(lib.dom.d.ts, --, --))
+>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
+>s : Symbol(s, Decl(typeInterfaceDeclarationsInBlockStatements1.ts, 3, 11))
+}
+
+function f2() {
+>f2 : Symbol(f2, Decl(typeInterfaceDeclarationsInBlockStatements1.ts, 5, 1))
+
+  if (true) {
+    type s = string;
+>s : Symbol(s, Decl(typeInterfaceDeclarationsInBlockStatements1.ts, 8, 13))
+  }
+  console.log("" as s);
+>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
+>console : Symbol(console, Decl(lib.dom.d.ts, --, --))
+>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
+>s : Symbol(s)
+}
+
+function f3() {
+>f3 : Symbol(f3, Decl(typeInterfaceDeclarationsInBlockStatements1.ts, 12, 1))
+
+  if (true)
+    interface s {
+>s : Symbol(s, Decl(typeInterfaceDeclarationsInBlockStatements1.ts, 15, 11))
+
+      length: number;
+>length : Symbol(s.length, Decl(typeInterfaceDeclarationsInBlockStatements1.ts, 16, 17))
+    }
+  console.log("" as s);
+>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
+>console : Symbol(console, Decl(lib.dom.d.ts, --, --))
+>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
+>s : Symbol(s, Decl(typeInterfaceDeclarationsInBlockStatements1.ts, 15, 11))
+}
+
+function f4() {
+>f4 : Symbol(f4, Decl(typeInterfaceDeclarationsInBlockStatements1.ts, 20, 1))
+
+  if (true) {
+    interface s {
+>s : Symbol(s, Decl(typeInterfaceDeclarationsInBlockStatements1.ts, 23, 13))
+
+      length: number;
+>length : Symbol(s.length, Decl(typeInterfaceDeclarationsInBlockStatements1.ts, 24, 17))
+    }
+  }
+  console.log("" as s);
+>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
+>console : Symbol(console, Decl(lib.dom.d.ts, --, --))
+>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
+>s : Symbol(s)
+}
+
diff --git a/tests/baselines/reference/typeInterfaceDeclarationsInBlockStatements1.types b/tests/baselines/reference/typeInterfaceDeclarationsInBlockStatements1.types
new file mode 100644
index 0000000000000..1a9b2cadab318
--- /dev/null
+++ b/tests/baselines/reference/typeInterfaceDeclarationsInBlockStatements1.types
@@ -0,0 +1,114 @@
+//// [tests/cases/compiler/typeInterfaceDeclarationsInBlockStatements1.ts] ////
+
+=== typeInterfaceDeclarationsInBlockStatements1.ts ===
+// https://github.com/microsoft/TypeScript/issues/60175
+
+function f1() {
+>f1 : () => void
+>   : ^^^^^^^^^^
+
+  if (true) type s = string;
+>true : true
+>     : ^^^^
+>s : string
+>  : ^^^^^^
+
+  console.log("" as s);
+>console.log("" as s) : void
+>                     : ^^^^
+>console.log : (...data: any[]) => void
+>            : ^^^^    ^^     ^^^^^    
+>console : Console
+>        : ^^^^^^^
+>log : (...data: any[]) => void
+>    : ^^^^    ^^     ^^^^^    
+>"" as s : string
+>        : ^^^^^^
+>"" : ""
+>   : ^^
+}
+
+function f2() {
+>f2 : () => void
+>   : ^^^^^^^^^^
+
+  if (true) {
+>true : true
+>     : ^^^^
+
+    type s = string;
+>s : string
+>  : ^^^^^^
+  }
+  console.log("" as s);
+>console.log("" as s) : void
+>                     : ^^^^
+>console.log : (...data: any[]) => void
+>            : ^^^^    ^^     ^^^^^    
+>console : Console
+>        : ^^^^^^^
+>log : (...data: any[]) => void
+>    : ^^^^    ^^     ^^^^^    
+>"" as s : s
+>        : ^
+>"" : ""
+>   : ^^
+}
+
+function f3() {
+>f3 : () => void
+>   : ^^^^^^^^^^
+
+  if (true)
+>true : true
+>     : ^^^^
+
+    interface s {
+      length: number;
+>length : number
+>       : ^^^^^^
+    }
+  console.log("" as s);
+>console.log("" as s) : void
+>                     : ^^^^
+>console.log : (...data: any[]) => void
+>            : ^^^^    ^^     ^^^^^    
+>console : Console
+>        : ^^^^^^^
+>log : (...data: any[]) => void
+>    : ^^^^    ^^     ^^^^^    
+>"" as s : s
+>        : ^
+>"" : ""
+>   : ^^
+}
+
+function f4() {
+>f4 : () => void
+>   : ^^^^^^^^^^
+
+  if (true) {
+>true : true
+>     : ^^^^
+
+    interface s {
+      length: number;
+>length : number
+>       : ^^^^^^
+    }
+  }
+  console.log("" as s);
+>console.log("" as s) : void
+>                     : ^^^^
+>console.log : (...data: any[]) => void
+>            : ^^^^    ^^     ^^^^^    
+>console : Console
+>        : ^^^^^^^
+>log : (...data: any[]) => void
+>    : ^^^^    ^^     ^^^^^    
+>"" as s : s
+>        : ^
+>"" : ""
+>   : ^^
+}
+
diff --git a/tests/baselines/reference/typeParameterConstModifiers.types b/tests/baselines/reference/typeParameterConstModifiers.types
index 6566a49b751f2..de77ed9efad22 100644
--- a/tests/baselines/reference/typeParameterConstModifiers.types
+++ b/tests/baselines/reference/typeParameterConstModifiers.types
@@ -727,7 +727,7 @@ const test_55033_minimal = factory_55033_minimal((b: string) => {})
 
 function factory_55033<const T extends readonly unknown[]>(cb: (...args: T) => void) {
 >factory_55033 : <const T extends readonly unknown[]>(cb: (...args: T) => void) => <const K extends T>(...args: K) => K
->              : ^^^^^^^ ^^^^^^^^^                  ^^  ^^                    ^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^    ^^ ^^^^^ 
+>              : ^^^^^^^ ^^^^^^^^^                  ^^  ^^                    ^^^^^^                 ^^          ^^^^^ 
 >cb : (...args: T) => void
 >   : ^^^^    ^^ ^^^^^    
 >args : T
@@ -758,7 +758,7 @@ const t1_55033 = factory_55033((a: { test: number }, b: string) => {})(
 >factory_55033((a: { test: number }, b: string) => {}) : <const K extends readonly [a: { test: number; }, b: string]>(...args: K) => K
 >                                                      : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^      ^^^^^^^^^^^^^^^^^^^^    ^^^^^^^^^
 >factory_55033 : <const T extends readonly unknown[]>(cb: (...args: T) => void) => <const K extends T>(...args: K) => K
->              : ^^^^^^^ ^^^^^^^^^                  ^^  ^^                    ^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^    ^^ ^^^^^ 
+>              : ^^^^^^^ ^^^^^^^^^                  ^^  ^^                    ^^^^^^                 ^^          ^^^^^ 
 >(a: { test: number }, b: string) => {} : (a: { test: number; }, b: string) => void
 >                                       : ^ ^^                 ^^ ^^      ^^^^^^^^^
 >a : { test: number; }
@@ -790,7 +790,7 @@ const t2_55033 = factory_55033((a: { test: number }, b: string) => {})(
 >factory_55033((a: { test: number }, b: string) => {}) : <const K extends readonly [a: { test: number; }, b: string]>(...args: K) => K
 >                                                      : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^      ^^^^^^^^^^^^^^^^^^^^    ^^^^^^^^^
 >factory_55033 : <const T extends readonly unknown[]>(cb: (...args: T) => void) => <const K extends T>(...args: K) => K
->              : ^^^^^^^ ^^^^^^^^^                  ^^  ^^                    ^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^    ^^ ^^^^^ 
+>              : ^^^^^^^ ^^^^^^^^^                  ^^  ^^                    ^^^^^^                 ^^          ^^^^^ 
 >(a: { test: number }, b: string) => {} : (a: { test: number; }, b: string) => void
 >                                       : ^ ^^                 ^^ ^^      ^^^^^^^^^
 >a : { test: number; }
@@ -820,7 +820,7 @@ const t2_55033 = factory_55033((a: { test: number }, b: string) => {})(
 
 function factory_55033_2<const T extends unknown[]>(cb: (...args: T) => void) {
 >factory_55033_2 : <const T extends unknown[]>(cb: (...args: T) => void) => <const K extends T>(...args: K) => K
->                : ^^^^^^^ ^^^^^^^^^         ^^  ^^                    ^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^    ^^ ^^^^^ 
+>                : ^^^^^^^ ^^^^^^^^^         ^^  ^^                    ^^^^^^                 ^^          ^^^^^ 
 >cb : (...args: T) => void
 >   : ^^^^    ^^ ^^^^^    
 >args : T
@@ -851,7 +851,7 @@ const t1_55033_2 = factory_55033_2((a: { test: number }, b: string) => {})(
 >factory_55033_2((a: { test: number }, b: string) => {}) : <const K extends [a: { test: number; }, b: string]>(...args: K) => K
 >                                                        : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^      ^^^^^^^^^^^^^^^^^^^^    ^^^^^^^^^
 >factory_55033_2 : <const T extends unknown[]>(cb: (...args: T) => void) => <const K extends T>(...args: K) => K
->                : ^^^^^^^ ^^^^^^^^^         ^^  ^^                    ^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^    ^^ ^^^^^ 
+>                : ^^^^^^^ ^^^^^^^^^         ^^  ^^                    ^^^^^^                 ^^          ^^^^^ 
 >(a: { test: number }, b: string) => {} : (a: { test: number; }, b: string) => void
 >                                       : ^ ^^                 ^^ ^^      ^^^^^^^^^
 >a : { test: number; }
@@ -883,7 +883,7 @@ const t2_55033_2 = factory_55033_2((a: { test: number }, b: string) => {})(
 >factory_55033_2((a: { test: number }, b: string) => {}) : <const K extends [a: { test: number; }, b: string]>(...args: K) => K
 >                                                        : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^      ^^^^^^^^^^^^^^^^^^^^    ^^^^^^^^^
 >factory_55033_2 : <const T extends unknown[]>(cb: (...args: T) => void) => <const K extends T>(...args: K) => K
->                : ^^^^^^^ ^^^^^^^^^         ^^  ^^                    ^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^    ^^ ^^^^^ 
+>                : ^^^^^^^ ^^^^^^^^^         ^^  ^^                    ^^^^^^                 ^^          ^^^^^ 
 >(a: { test: number }, b: string) => {} : (a: { test: number; }, b: string) => void
 >                                       : ^ ^^                 ^^ ^^      ^^^^^^^^^
 >a : { test: number; }
diff --git a/tests/baselines/reference/typePredicateFreshLiteralWidening.types b/tests/baselines/reference/typePredicateFreshLiteralWidening.types
index 98bba0521eea0..83f8935c32f38 100644
--- a/tests/baselines/reference/typePredicateFreshLiteralWidening.types
+++ b/tests/baselines/reference/typePredicateFreshLiteralWidening.types
@@ -14,11 +14,11 @@ type Narrow<A> = (A extends Narrowable ? A : never) | ({
 
 const satisfies =
 >satisfies : <TWide>() => <TNarrow extends TWide>(narrow: Narrow<TNarrow>) => Narrow<TNarrow>
->          : ^     ^^^^^^^^       ^^^^^^^^^     ^^      ^^               ^^^^^^^^^^^^^^^^^^^^
+>          : ^     ^^^^^^^^                     ^^                       ^^^^^^^^^^^^^^^^^^^^
 
   <TWide,>() =>
 ><TWide,>() =>  <TNarrow extends TWide>(narrow: Narrow<TNarrow>) =>    narrow : <TWide>() => <TNarrow extends TWide>(narrow: Narrow<TNarrow>) => Narrow<TNarrow>
->                                                                             : ^     ^^^^^^^^       ^^^^^^^^^     ^^      ^^               ^^^^^^^^^^^^^^^^^^^^
+>                                                                             : ^     ^^^^^^^^                     ^^                       ^^^^^^^^^^^^^^^^^^^^
 
   <TNarrow extends TWide>(narrow: Narrow<TNarrow>) =>
 ><TNarrow extends TWide>(narrow: Narrow<TNarrow>) =>    narrow : <TNarrow extends TWide>(narrow: Narrow<TNarrow>) => Narrow<TNarrow>
@@ -58,7 +58,7 @@ const item1 = satisfies<Item>()({ value: "1" });
 >satisfies<Item>() : <TNarrow extends Item>(narrow: Narrow<TNarrow>) => Narrow<TNarrow>
 >                  : ^       ^^^^^^^^^^^^^^^      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >satisfies : <TWide>() => <TNarrow extends TWide>(narrow: Narrow<TNarrow>) => Narrow<TNarrow>
->          : ^     ^^^^^^^^       ^^^^^^^^^     ^^      ^^               ^^^^^^^^^^^^^^^^^^^^
+>          : ^     ^^^^^^^^                     ^^                       ^^^^^^^^^^^^^^^^^^^^
 >{ value: "1" } : { value: "1"; }
 >               : ^^^^^^^^^^^^^^^
 >value : "1"
@@ -74,7 +74,7 @@ const item2 = satisfies<Item>()({ value: "2" });
 >satisfies<Item>() : <TNarrow extends Item>(narrow: Narrow<TNarrow>) => Narrow<TNarrow>
 >                  : ^       ^^^^^^^^^^^^^^^      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >satisfies : <TWide>() => <TNarrow extends TWide>(narrow: Narrow<TNarrow>) => Narrow<TNarrow>
->          : ^     ^^^^^^^^       ^^^^^^^^^     ^^      ^^               ^^^^^^^^^^^^^^^^^^^^
+>          : ^     ^^^^^^^^                     ^^                       ^^^^^^^^^^^^^^^^^^^^
 >{ value: "2" } : { value: "2"; }
 >               : ^^^^^^^^^^^^^^^
 >value : "2"
@@ -90,7 +90,7 @@ const item3 = satisfies<Item>()({ value: null });
 >satisfies<Item>() : <TNarrow extends Item>(narrow: Narrow<TNarrow>) => Narrow<TNarrow>
 >                  : ^       ^^^^^^^^^^^^^^^      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >satisfies : <TWide>() => <TNarrow extends TWide>(narrow: Narrow<TNarrow>) => Narrow<TNarrow>
->          : ^     ^^^^^^^^       ^^^^^^^^^     ^^      ^^               ^^^^^^^^^^^^^^^^^^^^
+>          : ^     ^^^^^^^^                     ^^                       ^^^^^^^^^^^^^^^^^^^^
 >{ value: null } : { value: null; }
 >                : ^^^^^^^^^^^^^^^^
 >value : null
diff --git a/tests/baselines/reference/typeSatisfaction_errorLocations1.errors.txt b/tests/baselines/reference/typeSatisfaction_errorLocations1.errors.txt
index 0d31158d64227..59268272aa9df 100644
--- a/tests/baselines/reference/typeSatisfaction_errorLocations1.errors.txt
+++ b/tests/baselines/reference/typeSatisfaction_errorLocations1.errors.txt
@@ -31,9 +31,11 @@ typeSatisfaction_errorLocations1.ts(47,24): error TS2322: Type 'number' is not a
 typeSatisfaction_errorLocations1.ts(48,21): error TS2322: Type '{ a: number; }' is not assignable to type '{ a: true; }'.
   Types of property 'a' are incompatible.
     Type 'number' is not assignable to type 'true'.
+typeSatisfaction_errorLocations1.ts(50,23): error TS2741: Property 'a' is missing in type '{}' but required in type '{ a: true; }'.
+typeSatisfaction_errorLocations1.ts(51,24): error TS2741: Property 'a' is missing in type '{}' but required in type '{ a: true; }'.
 
 
-==== typeSatisfaction_errorLocations1.ts (22 errors) ====
+==== typeSatisfaction_errorLocations1.ts (24 errors) ====
     const obj1 = { a: 1 };
     
     const fn1 = (s: { a: true }) => {};
@@ -143,4 +145,13 @@ typeSatisfaction_errorLocations1.ts(48,21): error TS2322: Type '{ a: number; }'
 !!! error TS2322: Type '{ a: number; }' is not assignable to type '{ a: true; }'.
 !!! error TS2322:   Types of property 'a' are incompatible.
 !!! error TS2322:     Type 'number' is not assignable to type 'true'.
+    
+    ((): { a: true } => (({}) satisfies unknown) satisfies unknown)();
+                          ~~
+!!! error TS2741: Property 'a' is missing in type '{}' but required in type '{ a: true; }'.
+!!! related TS2728 typeSatisfaction_errorLocations1.ts:50:8: 'a' is declared here.
+    ((): { a: true } => ((({}) satisfies unknown)) satisfies unknown)();
+                           ~~
+!!! error TS2741: Property 'a' is missing in type '{}' but required in type '{ a: true; }'.
+!!! related TS2728 typeSatisfaction_errorLocations1.ts:51:8: 'a' is declared here.
     
\ No newline at end of file
diff --git a/tests/baselines/reference/typeSatisfaction_errorLocations1.symbols b/tests/baselines/reference/typeSatisfaction_errorLocations1.symbols
index f44c4deaa529e..1e10f9409ff5c 100644
--- a/tests/baselines/reference/typeSatisfaction_errorLocations1.symbols
+++ b/tests/baselines/reference/typeSatisfaction_errorLocations1.symbols
@@ -129,3 +129,9 @@ function fn6(): number {
 >a : Symbol(a, Decl(typeSatisfaction_errorLocations1.ts, 47, 6))
 >obj1 : Symbol(obj1, Decl(typeSatisfaction_errorLocations1.ts, 0, 5))
 
+((): { a: true } => (({}) satisfies unknown) satisfies unknown)();
+>a : Symbol(a, Decl(typeSatisfaction_errorLocations1.ts, 49, 6))
+
+((): { a: true } => ((({}) satisfies unknown)) satisfies unknown)();
+>a : Symbol(a, Decl(typeSatisfaction_errorLocations1.ts, 50, 6))
+
diff --git a/tests/baselines/reference/typeSatisfaction_errorLocations1.types b/tests/baselines/reference/typeSatisfaction_errorLocations1.types
index 4a9abd2f9683c..eee81f12a2601 100644
--- a/tests/baselines/reference/typeSatisfaction_errorLocations1.types
+++ b/tests/baselines/reference/typeSatisfaction_errorLocations1.types
@@ -384,3 +384,49 @@ function fn6(): number {
 >obj1 : { a: number; }
 >     : ^^^^^^^^^^^^^^
 
+((): { a: true } => (({}) satisfies unknown) satisfies unknown)();
+>((): { a: true } => (({}) satisfies unknown) satisfies unknown)() : { a: true; }
+>                                                                  : ^^^^^    ^^^
+>((): { a: true } => (({}) satisfies unknown) satisfies unknown) : () => { a: true; }
+>                                                                : ^^^^^^            
+>(): { a: true } => (({}) satisfies unknown) satisfies unknown : () => { a: true; }
+>                                                              : ^^^^^^            
+>a : true
+>  : ^^^^
+>true : true
+>     : ^^^^
+>(({}) satisfies unknown) satisfies unknown : {}
+>                                           : ^^
+>(({}) satisfies unknown) : {}
+>                         : ^^
+>({}) satisfies unknown : {}
+>                       : ^^
+>({}) : {}
+>     : ^^
+>{} : {}
+>   : ^^
+
+((): { a: true } => ((({}) satisfies unknown)) satisfies unknown)();
+>((): { a: true } => ((({}) satisfies unknown)) satisfies unknown)() : { a: true; }
+>                                                                    : ^^^^^    ^^^
+>((): { a: true } => ((({}) satisfies unknown)) satisfies unknown) : () => { a: true; }
+>                                                                  : ^^^^^^            
+>(): { a: true } => ((({}) satisfies unknown)) satisfies unknown : () => { a: true; }
+>                                                                : ^^^^^^            
+>a : true
+>  : ^^^^
+>true : true
+>     : ^^^^
+>((({}) satisfies unknown)) satisfies unknown : {}
+>                                             : ^^
+>((({}) satisfies unknown)) : {}
+>                           : ^^
+>(({}) satisfies unknown) : {}
+>                         : ^^
+>({}) satisfies unknown : {}
+>                       : ^^
+>({}) : {}
+>     : ^^
+>{} : {}
+>   : ^^
+
diff --git a/tests/baselines/reference/typesVersions.ambientModules.trace.json b/tests/baselines/reference/typesVersions.ambientModules.trace.json
index fee25c7506c92..6d34688d3e201 100644
--- a/tests/baselines/reference/typesVersions.ambientModules.trace.json
+++ b/tests/baselines/reference/typesVersions.ambientModules.trace.json
@@ -1142,6 +1142,20 @@
     "======== Module name '@typescript/lib-esnext/iterator' was not resolved. ========",
     "File '/.ts/package.json' does not exist according to earlier cached lookups.",
     "File '/package.json' does not exist according to earlier cached lookups.",
+    "======== Resolving module '@typescript/lib-esnext/promise' from '/.src/__lib_node_modules_lookup_lib.esnext.promise.d.ts__.ts'. ========",
+    "Explicitly specified module resolution kind: 'Node10'.",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: TypeScript, Declaration.",
+    "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
+    "Directory '/.src/node_modules/@types' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Directory '/node_modules' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: JavaScript.",
+    "Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
+    "Directory '/node_modules' does not exist, skipping all lookups in it.",
+    "======== Module name '@typescript/lib-esnext/promise' was not resolved. ========",
+    "File '/.ts/package.json' does not exist according to earlier cached lookups.",
+    "File '/package.json' does not exist according to earlier cached lookups.",
     "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========",
     "Explicitly specified module resolution kind: 'Node10'.",
     "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.",
diff --git a/tests/baselines/reference/typesVersions.emptyTypes.trace.json b/tests/baselines/reference/typesVersions.emptyTypes.trace.json
index 8d1c40398f868..c2280eb9d00c8 100644
--- a/tests/baselines/reference/typesVersions.emptyTypes.trace.json
+++ b/tests/baselines/reference/typesVersions.emptyTypes.trace.json
@@ -1166,6 +1166,21 @@
     "======== Module name '@typescript/lib-esnext/iterator' was not resolved. ========",
     "File '/.ts/package.json' does not exist according to earlier cached lookups.",
     "File '/package.json' does not exist according to earlier cached lookups.",
+    "======== Resolving module '@typescript/lib-esnext/promise' from '/.src/__lib_node_modules_lookup_lib.esnext.promise.d.ts__.ts'. ========",
+    "Explicitly specified module resolution kind: 'Node10'.",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: TypeScript, Declaration.",
+    "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
+    "Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Directory '/node_modules' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: JavaScript.",
+    "Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
+    "Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
+    "Directory '/node_modules' does not exist, skipping all lookups in it.",
+    "======== Module name '@typescript/lib-esnext/promise' was not resolved. ========",
+    "File '/.ts/package.json' does not exist according to earlier cached lookups.",
+    "File '/package.json' does not exist according to earlier cached lookups.",
     "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========",
     "Explicitly specified module resolution kind: 'Node10'.",
     "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.",
diff --git a/tests/baselines/reference/typesVersions.justIndex.trace.json b/tests/baselines/reference/typesVersions.justIndex.trace.json
index 1b084ae200167..ee75e5a4b5dbc 100644
--- a/tests/baselines/reference/typesVersions.justIndex.trace.json
+++ b/tests/baselines/reference/typesVersions.justIndex.trace.json
@@ -1166,6 +1166,21 @@
     "======== Module name '@typescript/lib-esnext/iterator' was not resolved. ========",
     "File '/.ts/package.json' does not exist according to earlier cached lookups.",
     "File '/package.json' does not exist according to earlier cached lookups.",
+    "======== Resolving module '@typescript/lib-esnext/promise' from '/.src/__lib_node_modules_lookup_lib.esnext.promise.d.ts__.ts'. ========",
+    "Explicitly specified module resolution kind: 'Node10'.",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: TypeScript, Declaration.",
+    "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
+    "Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Directory '/node_modules' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: JavaScript.",
+    "Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
+    "Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
+    "Directory '/node_modules' does not exist, skipping all lookups in it.",
+    "======== Module name '@typescript/lib-esnext/promise' was not resolved. ========",
+    "File '/.ts/package.json' does not exist according to earlier cached lookups.",
+    "File '/package.json' does not exist according to earlier cached lookups.",
     "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========",
     "Explicitly specified module resolution kind: 'Node10'.",
     "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.",
diff --git a/tests/baselines/reference/typesVersions.multiFile.trace.json b/tests/baselines/reference/typesVersions.multiFile.trace.json
index 456f3b5142897..2277591d5848f 100644
--- a/tests/baselines/reference/typesVersions.multiFile.trace.json
+++ b/tests/baselines/reference/typesVersions.multiFile.trace.json
@@ -1105,6 +1105,20 @@
     "======== Module name '@typescript/lib-esnext/iterator' was not resolved. ========",
     "File '/.ts/package.json' does not exist according to earlier cached lookups.",
     "File '/package.json' does not exist according to earlier cached lookups.",
+    "======== Resolving module '@typescript/lib-esnext/promise' from '/.src/__lib_node_modules_lookup_lib.esnext.promise.d.ts__.ts'. ========",
+    "Explicitly specified module resolution kind: 'Node10'.",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: TypeScript, Declaration.",
+    "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
+    "Directory '/.src/node_modules/@types' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Directory '/node_modules' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: JavaScript.",
+    "Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
+    "Directory '/node_modules' does not exist, skipping all lookups in it.",
+    "======== Module name '@typescript/lib-esnext/promise' was not resolved. ========",
+    "File '/.ts/package.json' does not exist according to earlier cached lookups.",
+    "File '/package.json' does not exist according to earlier cached lookups.",
     "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========",
     "Explicitly specified module resolution kind: 'Node10'.",
     "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.",
diff --git a/tests/baselines/reference/typesVersionsDeclarationEmit.ambient.trace.json b/tests/baselines/reference/typesVersionsDeclarationEmit.ambient.trace.json
index fee25c7506c92..6d34688d3e201 100644
--- a/tests/baselines/reference/typesVersionsDeclarationEmit.ambient.trace.json
+++ b/tests/baselines/reference/typesVersionsDeclarationEmit.ambient.trace.json
@@ -1142,6 +1142,20 @@
     "======== Module name '@typescript/lib-esnext/iterator' was not resolved. ========",
     "File '/.ts/package.json' does not exist according to earlier cached lookups.",
     "File '/package.json' does not exist according to earlier cached lookups.",
+    "======== Resolving module '@typescript/lib-esnext/promise' from '/.src/__lib_node_modules_lookup_lib.esnext.promise.d.ts__.ts'. ========",
+    "Explicitly specified module resolution kind: 'Node10'.",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: TypeScript, Declaration.",
+    "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
+    "Directory '/.src/node_modules/@types' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Directory '/node_modules' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: JavaScript.",
+    "Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
+    "Directory '/node_modules' does not exist, skipping all lookups in it.",
+    "======== Module name '@typescript/lib-esnext/promise' was not resolved. ========",
+    "File '/.ts/package.json' does not exist according to earlier cached lookups.",
+    "File '/package.json' does not exist according to earlier cached lookups.",
     "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========",
     "Explicitly specified module resolution kind: 'Node10'.",
     "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.",
diff --git a/tests/baselines/reference/typesVersionsDeclarationEmit.multiFile.trace.json b/tests/baselines/reference/typesVersionsDeclarationEmit.multiFile.trace.json
index 456f3b5142897..2277591d5848f 100644
--- a/tests/baselines/reference/typesVersionsDeclarationEmit.multiFile.trace.json
+++ b/tests/baselines/reference/typesVersionsDeclarationEmit.multiFile.trace.json
@@ -1105,6 +1105,20 @@
     "======== Module name '@typescript/lib-esnext/iterator' was not resolved. ========",
     "File '/.ts/package.json' does not exist according to earlier cached lookups.",
     "File '/package.json' does not exist according to earlier cached lookups.",
+    "======== Resolving module '@typescript/lib-esnext/promise' from '/.src/__lib_node_modules_lookup_lib.esnext.promise.d.ts__.ts'. ========",
+    "Explicitly specified module resolution kind: 'Node10'.",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: TypeScript, Declaration.",
+    "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
+    "Directory '/.src/node_modules/@types' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Directory '/node_modules' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: JavaScript.",
+    "Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
+    "Directory '/node_modules' does not exist, skipping all lookups in it.",
+    "======== Module name '@typescript/lib-esnext/promise' was not resolved. ========",
+    "File '/.ts/package.json' does not exist according to earlier cached lookups.",
+    "File '/package.json' does not exist according to earlier cached lookups.",
     "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========",
     "Explicitly specified module resolution kind: 'Node10'.",
     "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.",
diff --git a/tests/baselines/reference/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.trace.json b/tests/baselines/reference/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.trace.json
index 72ff7ef5cf6dc..40f8a19dc8734 100644
--- a/tests/baselines/reference/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.trace.json
+++ b/tests/baselines/reference/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.trace.json
@@ -1128,6 +1128,20 @@
     "======== Module name '@typescript/lib-esnext/iterator' was not resolved. ========",
     "File '/.ts/package.json' does not exist according to earlier cached lookups.",
     "File '/package.json' does not exist according to earlier cached lookups.",
+    "======== Resolving module '@typescript/lib-esnext/promise' from '/.src/__lib_node_modules_lookup_lib.esnext.promise.d.ts__.ts'. ========",
+    "Explicitly specified module resolution kind: 'Node10'.",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: TypeScript, Declaration.",
+    "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
+    "Directory '/.src/node_modules/@types' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Directory '/node_modules' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: JavaScript.",
+    "Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
+    "Directory '/node_modules' does not exist, skipping all lookups in it.",
+    "======== Module name '@typescript/lib-esnext/promise' was not resolved. ========",
+    "File '/.ts/package.json' does not exist according to earlier cached lookups.",
+    "File '/package.json' does not exist according to earlier cached lookups.",
     "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========",
     "Explicitly specified module resolution kind: 'Node10'.",
     "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.",
diff --git a/tests/baselines/reference/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.trace.json b/tests/baselines/reference/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.trace.json
index 5249fe3037d38..c6d26c8143dc9 100644
--- a/tests/baselines/reference/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.trace.json
+++ b/tests/baselines/reference/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.trace.json
@@ -1110,6 +1110,20 @@
     "======== Module name '@typescript/lib-esnext/iterator' was not resolved. ========",
     "File '/.ts/package.json' does not exist according to earlier cached lookups.",
     "File '/package.json' does not exist according to earlier cached lookups.",
+    "======== Resolving module '@typescript/lib-esnext/promise' from '/.src/__lib_node_modules_lookup_lib.esnext.promise.d.ts__.ts'. ========",
+    "Explicitly specified module resolution kind: 'Node10'.",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: TypeScript, Declaration.",
+    "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
+    "Directory '/.src/node_modules/@types' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Directory '/node_modules' does not exist, skipping all lookups in it.",
+    "Scoped package detected, looking in 'typescript__lib-esnext/promise'",
+    "Loading module '@typescript/lib-esnext/promise' from 'node_modules' folder, target file types: JavaScript.",
+    "Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
+    "Directory '/node_modules' does not exist, skipping all lookups in it.",
+    "======== Module name '@typescript/lib-esnext/promise' was not resolved. ========",
+    "File '/.ts/package.json' does not exist according to earlier cached lookups.",
+    "File '/package.json' does not exist according to earlier cached lookups.",
     "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========",
     "Explicitly specified module resolution kind: 'Node10'.",
     "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.",
diff --git a/tests/baselines/reference/unusedLocalsInRecursiveReturn.symbols b/tests/baselines/reference/unusedLocalsInRecursiveReturn.symbols
new file mode 100644
index 0000000000000..f7ee6db9ba4aa
--- /dev/null
+++ b/tests/baselines/reference/unusedLocalsInRecursiveReturn.symbols
@@ -0,0 +1,19 @@
+//// [tests/cases/compiler/unusedLocalsInRecursiveReturn.ts] ////
+
+=== unusedLocalsInRecursiveReturn.ts ===
+// Test that we unconditionally check return expression, even if we don't need its type.
+function recursive(arg: string, other: string) {
+>recursive : Symbol(recursive, Decl(unusedLocalsInRecursiveReturn.ts, 0, 0))
+>arg : Symbol(arg, Decl(unusedLocalsInRecursiveReturn.ts, 1, 19))
+>other : Symbol(other, Decl(unusedLocalsInRecursiveReturn.ts, 1, 31))
+
+    const someLocalVar = arg + other;
+>someLocalVar : Symbol(someLocalVar, Decl(unusedLocalsInRecursiveReturn.ts, 2, 9))
+>arg : Symbol(arg, Decl(unusedLocalsInRecursiveReturn.ts, 1, 19))
+>other : Symbol(other, Decl(unusedLocalsInRecursiveReturn.ts, 1, 31))
+
+    return recursive(someLocalVar, arg);
+>recursive : Symbol(recursive, Decl(unusedLocalsInRecursiveReturn.ts, 0, 0))
+>someLocalVar : Symbol(someLocalVar, Decl(unusedLocalsInRecursiveReturn.ts, 2, 9))
+>arg : Symbol(arg, Decl(unusedLocalsInRecursiveReturn.ts, 1, 19))
+}
diff --git a/tests/baselines/reference/unusedLocalsInRecursiveReturn.types b/tests/baselines/reference/unusedLocalsInRecursiveReturn.types
new file mode 100644
index 0000000000000..c1b59613f34aa
--- /dev/null
+++ b/tests/baselines/reference/unusedLocalsInRecursiveReturn.types
@@ -0,0 +1,32 @@
+//// [tests/cases/compiler/unusedLocalsInRecursiveReturn.ts] ////
+
+=== unusedLocalsInRecursiveReturn.ts ===
+// Test that we unconditionally check return expression, even if we don't need its type.
+function recursive(arg: string, other: string) {
+>recursive : (arg: string, other: string) => never
+>          : ^   ^^      ^^     ^^      ^^^^^^^^^^
+>arg : string
+>    : ^^^^^^
+>other : string
+>      : ^^^^^^
+
+    const someLocalVar = arg + other;
+>someLocalVar : string
+>             : ^^^^^^
+>arg + other : string
+>            : ^^^^^^
+>arg : string
+>    : ^^^^^^
+>other : string
+>      : ^^^^^^
+
+    return recursive(someLocalVar, arg);
+>recursive(someLocalVar, arg) : never
+>                             : ^^^^^
+>recursive : (arg: string, other: string) => never
+>          : ^   ^^      ^^     ^^      ^^^^^^^^^^
+>someLocalVar : string
+>             : ^^^^^^
+>arg : string
+>    : ^^^^^^
+}
diff --git a/tests/baselines/reference/unusedParametersInLambda1.types b/tests/baselines/reference/unusedParametersInLambda1.types
index cde9f975b3718..2e5884cb6e391 100644
--- a/tests/baselines/reference/unusedParametersInLambda1.types
+++ b/tests/baselines/reference/unusedParametersInLambda1.types
@@ -7,7 +7,7 @@ class A {
 
     public f1() {
 >f1 : () => (X: any) => void
->   : ^^^^^^^ ^^^^^^^^^^^^^^
+>   : ^^^^^^^   ^^^^^^^^^^^^
 
         return (X) => {
 >(X) => {        } : (X: any) => void
diff --git a/tests/baselines/reference/unusedParametersInLambda2.types b/tests/baselines/reference/unusedParametersInLambda2.types
index d4f74b53e46a3..5b288ab2928ca 100644
--- a/tests/baselines/reference/unusedParametersInLambda2.types
+++ b/tests/baselines/reference/unusedParametersInLambda2.types
@@ -7,7 +7,7 @@ class A {
 
     public f1() {
 >f1 : () => (X: any, Y: any) => void
->   : ^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^
+>   : ^^^^^^^   ^^^^^   ^^^^^^^^^^^^
 
         return (X, Y) => {
 >(X, Y) => {            Y;        } : (X: any, Y: any) => void
diff --git a/tests/baselines/reference/variadicTuples1.js b/tests/baselines/reference/variadicTuples1.js
index e0b343b3c685c..ea3caaec1e32f 100644
--- a/tests/baselines/reference/variadicTuples1.js
+++ b/tests/baselines/reference/variadicTuples1.js
@@ -823,7 +823,7 @@ declare function getOrgUser(id: string, orgId: number, options?: {
     y?: number;
     z?: boolean;
 }): void;
-declare function callApi<T extends unknown[] = [], U = void>(method: (...args: [...T, object]) => U): (...args: T) => U;
+declare function callApi<T extends unknown[] = [], U = void>(method: (...args: [...T, object]) => U): (...args: [...T]) => U;
 type Numbers = number[];
 type Unbounded = [...Numbers, boolean];
 declare const data: Unbounded;
diff --git a/tests/baselines/reference/variadicTuples1.types b/tests/baselines/reference/variadicTuples1.types
index a4db4781503dd..8f6c40a0a8004 100644
--- a/tests/baselines/reference/variadicTuples1.types
+++ b/tests/baselines/reference/variadicTuples1.types
@@ -1601,7 +1601,7 @@ type R36 = DropLast<readonly []>;
 
 function curry<T extends unknown[], U extends unknown[], R>(f: (...args: [...T, ...U]) => R, ...a: T) {
 >curry : <T extends unknown[], U extends unknown[], R>(f: (...args: [...T, ...U]) => R, ...a: T) => (...b: U) => R
->      : ^ ^^^^^^^^^         ^^ ^^^^^^^^^         ^^ ^^ ^^                            ^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
+>      : ^ ^^^^^^^^^         ^^ ^^^^^^^^^         ^^ ^^ ^^                            ^^^^^ ^^ ^^^^^^       ^^^^^^
 >f : (...args: [...T, ...U]) => R
 >  : ^^^^    ^^            ^^^^^ 
 >args : [...T, ...U]
@@ -1650,7 +1650,7 @@ const c0 = curry(fn1);  // (a: number, b: string, c: boolean, d: string[]) => nu
 >curry(fn1) : (a: number, b: string, c: boolean, d: string[]) => number
 >           : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >curry : <T extends unknown[], U extends unknown[], R>(f: (...args: [...T, ...U]) => R, ...a: T) => (...b: U) => R
->      : ^ ^^^^^^^^^         ^^ ^^^^^^^^^         ^^ ^^ ^^                            ^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
+>      : ^ ^^^^^^^^^         ^^ ^^^^^^^^^         ^^ ^^ ^^                            ^^^^^ ^^ ^^^^^^       ^^^^^^
 >fn1 : (a: number, b: string, c: boolean, d: string[]) => number
 >    : ^ ^^      ^^ ^^      ^^ ^^       ^^ ^^        ^^^^^^^^^^^
 
@@ -1660,7 +1660,7 @@ const c1 = curry(fn1, 1);  // (b: string, c: boolean, d: string[]) => number
 >curry(fn1, 1) : (b: string, c: boolean, d: string[]) => number
 >              : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >curry : <T extends unknown[], U extends unknown[], R>(f: (...args: [...T, ...U]) => R, ...a: T) => (...b: U) => R
->      : ^ ^^^^^^^^^         ^^ ^^^^^^^^^         ^^ ^^ ^^                            ^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
+>      : ^ ^^^^^^^^^         ^^ ^^^^^^^^^         ^^ ^^ ^^                            ^^^^^ ^^ ^^^^^^       ^^^^^^
 >fn1 : (a: number, b: string, c: boolean, d: string[]) => number
 >    : ^ ^^      ^^ ^^      ^^ ^^       ^^ ^^        ^^^^^^^^^^^
 >1 : 1
@@ -1672,7 +1672,7 @@ const c2 = curry(fn1, 1, 'abc');  // (c: boolean, d: string[]) => number
 >curry(fn1, 1, 'abc') : (c: boolean, d: string[]) => number
 >                     : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >curry : <T extends unknown[], U extends unknown[], R>(f: (...args: [...T, ...U]) => R, ...a: T) => (...b: U) => R
->      : ^ ^^^^^^^^^         ^^ ^^^^^^^^^         ^^ ^^ ^^                            ^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
+>      : ^ ^^^^^^^^^         ^^ ^^^^^^^^^         ^^ ^^ ^^                            ^^^^^ ^^ ^^^^^^       ^^^^^^
 >fn1 : (a: number, b: string, c: boolean, d: string[]) => number
 >    : ^ ^^      ^^ ^^      ^^ ^^       ^^ ^^        ^^^^^^^^^^^
 >1 : 1
@@ -1686,7 +1686,7 @@ const c3 = curry(fn1, 1, 'abc', true);  // (d: string[]) => number
 >curry(fn1, 1, 'abc', true) : (d: string[]) => number
 >                           : ^^^^^^^^^^^^^^^^^^^^^^^
 >curry : <T extends unknown[], U extends unknown[], R>(f: (...args: [...T, ...U]) => R, ...a: T) => (...b: U) => R
->      : ^ ^^^^^^^^^         ^^ ^^^^^^^^^         ^^ ^^ ^^                            ^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
+>      : ^ ^^^^^^^^^         ^^ ^^^^^^^^^         ^^ ^^ ^^                            ^^^^^ ^^ ^^^^^^       ^^^^^^
 >fn1 : (a: number, b: string, c: boolean, d: string[]) => number
 >    : ^ ^^      ^^ ^^      ^^ ^^       ^^ ^^        ^^^^^^^^^^^
 >1 : 1
@@ -1702,7 +1702,7 @@ const c4 = curry(fn1, 1, 'abc', true, ['x', 'y']);  // () => number
 >curry(fn1, 1, 'abc', true, ['x', 'y']) : () => number
 >                                       : ^^^^^^^^^^^^
 >curry : <T extends unknown[], U extends unknown[], R>(f: (...args: [...T, ...U]) => R, ...a: T) => (...b: U) => R
->      : ^ ^^^^^^^^^         ^^ ^^^^^^^^^         ^^ ^^ ^^                            ^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
+>      : ^ ^^^^^^^^^         ^^ ^^^^^^^^^         ^^ ^^ ^^                            ^^^^^ ^^ ^^^^^^       ^^^^^^
 >fn1 : (a: number, b: string, c: boolean, d: string[]) => number
 >    : ^ ^^      ^^ ^^      ^^ ^^       ^^ ^^        ^^^^^^^^^^^
 >1 : 1
@@ -1738,7 +1738,7 @@ const c10 = curry(fn2);  // (x: number, b: boolean, ...args: string[]) => number
 >curry(fn2) : (x: number, b: boolean, ...args: string[]) => number
 >           : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >curry : <T extends unknown[], U extends unknown[], R>(f: (...args: [...T, ...U]) => R, ...a: T) => (...b: U) => R
->      : ^ ^^^^^^^^^         ^^ ^^^^^^^^^         ^^ ^^ ^^                            ^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
+>      : ^ ^^^^^^^^^         ^^ ^^^^^^^^^         ^^ ^^ ^^                            ^^^^^ ^^ ^^^^^^       ^^^^^^
 >fn2 : (x: number, b: boolean, ...args: string[]) => number
 >    : ^ ^^      ^^ ^^       ^^^^^    ^^        ^^^^^^^^^^^
 
@@ -1748,7 +1748,7 @@ const c11 = curry(fn2, 1);  // (b: boolean, ...args: string[]) => number
 >curry(fn2, 1) : (b: boolean, ...args: string[]) => number
 >              : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >curry : <T extends unknown[], U extends unknown[], R>(f: (...args: [...T, ...U]) => R, ...a: T) => (...b: U) => R
->      : ^ ^^^^^^^^^         ^^ ^^^^^^^^^         ^^ ^^ ^^                            ^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
+>      : ^ ^^^^^^^^^         ^^ ^^^^^^^^^         ^^ ^^ ^^                            ^^^^^ ^^ ^^^^^^       ^^^^^^
 >fn2 : (x: number, b: boolean, ...args: string[]) => number
 >    : ^ ^^      ^^ ^^       ^^^^^    ^^        ^^^^^^^^^^^
 >1 : 1
@@ -1760,7 +1760,7 @@ const c12 = curry(fn2, 1, true);  // (...args: string[]) => number
 >curry(fn2, 1, true) : (...b: string[]) => number
 >                    : ^^^^ ^^^^^^^^^^^^^^^^^^^^^
 >curry : <T extends unknown[], U extends unknown[], R>(f: (...args: [...T, ...U]) => R, ...a: T) => (...b: U) => R
->      : ^ ^^^^^^^^^         ^^ ^^^^^^^^^         ^^ ^^ ^^                            ^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
+>      : ^ ^^^^^^^^^         ^^ ^^^^^^^^^         ^^ ^^ ^^                            ^^^^^ ^^ ^^^^^^       ^^^^^^
 >fn2 : (x: number, b: boolean, ...args: string[]) => number
 >    : ^ ^^      ^^ ^^       ^^^^^    ^^        ^^^^^^^^^^^
 >1 : 1
@@ -1774,7 +1774,7 @@ const c13 = curry(fn2, 1, true, 'abc', 'def');  // (...args: string[]) => number
 >curry(fn2, 1, true, 'abc', 'def') : (...b: string[]) => number
 >                                  : ^^^^ ^^^^^^^^^^^^^^^^^^^^^
 >curry : <T extends unknown[], U extends unknown[], R>(f: (...args: [...T, ...U]) => R, ...a: T) => (...b: U) => R
->      : ^ ^^^^^^^^^         ^^ ^^^^^^^^^         ^^ ^^ ^^                            ^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
+>      : ^ ^^^^^^^^^         ^^ ^^^^^^^^^         ^^ ^^ ^^                            ^^^^^ ^^ ^^^^^^       ^^^^^^
 >fn2 : (x: number, b: boolean, ...args: string[]) => number
 >    : ^ ^^      ^^ ^^       ^^^^^    ^^        ^^^^^^^^^^^
 >1 : 1
@@ -1802,7 +1802,7 @@ const c20 = curry(fn3);  // (...args: string[]) => number
 >curry(fn3) : (...b: string[]) => number
 >           : ^^^^ ^^^^^^^^^^^^^^^^^^^^^
 >curry : <T extends unknown[], U extends unknown[], R>(f: (...args: [...T, ...U]) => R, ...a: T) => (...b: U) => R
->      : ^ ^^^^^^^^^         ^^ ^^^^^^^^^         ^^ ^^ ^^                            ^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
+>      : ^ ^^^^^^^^^         ^^ ^^^^^^^^^         ^^ ^^ ^^                            ^^^^^ ^^ ^^^^^^       ^^^^^^
 >fn3 : (...args: string[]) => number
 >    : ^^^^    ^^        ^^^^^^^^^^^
 
@@ -1812,7 +1812,7 @@ const c21 = curry(fn3, 'abc', 'def');  // (...args: string[]) => number
 >curry(fn3, 'abc', 'def') : (...b: string[]) => number
 >                         : ^^^^ ^^^^^^^^^^^^^^^^^^^^^
 >curry : <T extends unknown[], U extends unknown[], R>(f: (...args: [...T, ...U]) => R, ...a: T) => (...b: U) => R
->      : ^ ^^^^^^^^^         ^^ ^^^^^^^^^         ^^ ^^ ^^                            ^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
+>      : ^ ^^^^^^^^^         ^^ ^^^^^^^^^         ^^ ^^ ^^                            ^^^^^ ^^ ^^^^^^       ^^^^^^
 >fn3 : (...args: string[]) => number
 >    : ^^^^    ^^        ^^^^^^^^^^^
 >'abc' : "abc"
@@ -1826,7 +1826,7 @@ const c22 = curry(fn3, ...sa);  // (...args: string[]) => number
 >curry(fn3, ...sa) : (...b: string[]) => number
 >                  : ^^^^ ^^^^^^^^^^^^^^^^^^^^^
 >curry : <T extends unknown[], U extends unknown[], R>(f: (...args: [...T, ...U]) => R, ...a: T) => (...b: U) => R
->      : ^ ^^^^^^^^^         ^^ ^^^^^^^^^         ^^ ^^ ^^                            ^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
+>      : ^ ^^^^^^^^^         ^^ ^^^^^^^^^         ^^ ^^ ^^                            ^^^^^ ^^ ^^^^^^       ^^^^^^
 >fn3 : (...args: string[]) => number
 >    : ^^^^    ^^        ^^^^^^^^^^^
 >...sa : string
@@ -2218,8 +2218,8 @@ declare function getOrgUser(id: string, orgId: number, options?: { y?: number, z
 >  : ^^^^^^^^^^^^^^^^^^^
 
 function callApi<T extends unknown[] = [], U = void>(method: (...args: [...T, object]) => U) {
->callApi : <T extends unknown[] = [], U = void>(method: (...args: [...T, object]) => U) => (...args: T) => U
->        : ^ ^^^^^^^^^         ^^^^^^^ ^^^^^^^^^      ^^                              ^^^^^^^^^^^^^^^^^^^^^^
+>callApi : <T extends unknown[] = [], U = void>(method: (...args: [...T, object]) => U) => (...args: [...T]) => U
+>        : ^ ^^^^^^^^^         ^^^^^^^ ^^^^^^^^^      ^^                              ^^^^^^               ^^^^^^
 >method : (...args: [...T, object]) => U
 >       : ^^^^    ^^              ^^^^^ 
 >args : [...T, object]
@@ -2245,16 +2245,16 @@ function callApi<T extends unknown[] = [], U = void>(method: (...args: [...T, ob
 callApi(getUser);
 >callApi(getUser) : (id: string) => string
 >                 : ^^^^^^^^^^^^^^^^^^^^^^
->callApi : <T extends unknown[] = [], U = void>(method: (...args: [...T, object]) => U) => (...args: T) => U
->        : ^ ^^^^^^^^^         ^^^^^^^ ^^^^^^^^^      ^^                              ^^^^^^^^^^^^^^^^^^^^^^
+>callApi : <T extends unknown[] = [], U = void>(method: (...args: [...T, object]) => U) => (...args: [...T]) => U
+>        : ^ ^^^^^^^^^         ^^^^^^^ ^^^^^^^^^      ^^                              ^^^^^^               ^^^^^^
 >getUser : (id: string, options?: { x?: string; }) => string
 >        : ^  ^^      ^^       ^^^               ^^^^^      
 
 callApi(getOrgUser);
 >callApi(getOrgUser) : (id: string, orgId: number) => void
 >                    : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
->callApi : <T extends unknown[] = [], U = void>(method: (...args: [...T, object]) => U) => (...args: T) => U
->        : ^ ^^^^^^^^^         ^^^^^^^ ^^^^^^^^^      ^^                              ^^^^^^^^^^^^^^^^^^^^^^
+>callApi : <T extends unknown[] = [], U = void>(method: (...args: [...T, object]) => U) => (...args: [...T]) => U
+>        : ^ ^^^^^^^^^         ^^^^^^^ ^^^^^^^^^      ^^                              ^^^^^^               ^^^^^^
 >getOrgUser : (id: string, orgId: number, options?: { y?: number; z?: boolean; }) => void
 >           : ^  ^^      ^^     ^^      ^^       ^^^                            ^^^^^    
 
diff --git a/tests/baselines/reference/verbatimModuleSyntaxRestrictionsCJS.js b/tests/baselines/reference/verbatimModuleSyntaxRestrictionsCJS.js
index 92d72e603984a..b3e3508feb16b 100644
--- a/tests/baselines/reference/verbatimModuleSyntaxRestrictionsCJS.js
+++ b/tests/baselines/reference/verbatimModuleSyntaxRestrictionsCJS.js
@@ -74,13 +74,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 }) : function(o, v) {
     o["default"] = v;
 });
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
-    __setModuleDefault(result, mod);
-    return result;
-};
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
 var __importDefault = (this && this.__importDefault) || function (mod) {
     return (mod && mod.__esModule) ? mod : { "default": mod };
 };
diff --git a/tests/baselines/reference/yieldStatementNoAsiAfterTransform(target=es5).js b/tests/baselines/reference/yieldStatementNoAsiAfterTransform(target=es5).js
new file mode 100644
index 0000000000000..b34722da6afe5
--- /dev/null
+++ b/tests/baselines/reference/yieldStatementNoAsiAfterTransform(target=es5).js
@@ -0,0 +1,219 @@
+//// [tests/cases/conformance/generators/yieldStatementNoAsiAfterTransform.ts] ////
+
+//// [yieldStatementNoAsiAfterTransform.ts]
+declare var a: any;
+
+function *t1() {
+    yield (
+        // comment
+        a as any
+    );
+}
+function *t2() {
+    yield (
+        // comment
+        a as any
+    ) + 1;
+}
+function *t3() {
+    yield (
+        // comment
+        a as any
+    ) ? 0 : 1;
+}
+function *t4() {
+    yield (
+        // comment
+        a as any
+    ).b;
+}
+function *t5() {
+    yield (
+        // comment
+        a as any
+    )[a];
+}
+function *t6() {
+    yield (
+        // comment
+        a as any
+    )();
+}
+function *t7() {
+    yield (
+        // comment
+        a as any
+    )``;
+}
+function *t8() {
+    yield (
+        // comment
+        a as any
+    ) as any;
+}
+function *t9() {
+    yield (
+        // comment
+        a as any
+    ) satisfies any;
+}
+function *t10() {
+    yield (
+        // comment
+        a as any
+    )!;
+}
+
+
+//// [yieldStatementNoAsiAfterTransform.js]
+var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
+    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
+    return cooked;
+};
+var __generator = (this && this.__generator) || function (thisArg, body) {
+    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
+    return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
+    function verb(n) { return function (v) { return step([n, v]); }; }
+    function step(op) {
+        if (f) throw new TypeError("Generator is already executing.");
+        while (g && (g = 0, op[0] && (_ = 0)), _) try {
+            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
+            if (y = 0, t) op = [op[0] & 2, t.value];
+            switch (op[0]) {
+                case 0: case 1: t = op; break;
+                case 4: _.label++; return { value: op[1], done: false };
+                case 5: _.label++; y = op[1]; op = [0]; continue;
+                case 7: op = _.ops.pop(); _.trys.pop(); continue;
+                default:
+                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
+                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
+                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
+                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
+                    if (t[2]) _.ops.pop();
+                    _.trys.pop(); continue;
+            }
+            op = body.call(thisArg, _);
+        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
+        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
+    }
+};
+function t1() {
+    return __generator(this, function (_a) {
+        switch (_a.label) {
+            case 0: return [4 /*yield*/, 
+                // comment
+                a];
+            case 1:
+                _a.sent();
+                return [2 /*return*/];
+        }
+    });
+}
+function t2() {
+    return __generator(this, function (_a) {
+        switch (_a.label) {
+            case 0: return [4 /*yield*/, 
+                // comment
+                a + 1];
+            case 1:
+                _a.sent();
+                return [2 /*return*/];
+        }
+    });
+}
+function t3() {
+    return __generator(this, function (_a) {
+        switch (_a.label) {
+            case 0: return [4 /*yield*/, 
+                // comment
+                a ? 0 : 1];
+            case 1:
+                _a.sent();
+                return [2 /*return*/];
+        }
+    });
+}
+function t4() {
+    return __generator(this, function (_a) {
+        switch (_a.label) {
+            case 0: return [4 /*yield*/, 
+                // comment
+                a.b];
+            case 1:
+                _a.sent();
+                return [2 /*return*/];
+        }
+    });
+}
+function t5() {
+    return __generator(this, function (_a) {
+        switch (_a.label) {
+            case 0: return [4 /*yield*/, 
+                // comment
+                a[a]];
+            case 1:
+                _a.sent();
+                return [2 /*return*/];
+        }
+    });
+}
+function t6() {
+    return __generator(this, function (_a) {
+        switch (_a.label) {
+            case 0: return [4 /*yield*/, 
+                // comment
+                a()];
+            case 1:
+                _a.sent();
+                return [2 /*return*/];
+        }
+    });
+}
+function t7() {
+    return __generator(this, function (_a) {
+        switch (_a.label) {
+            case 0: return [4 /*yield*/, 
+                // comment
+                a(__makeTemplateObject([""], [""]))];
+            case 1:
+                _a.sent();
+                return [2 /*return*/];
+        }
+    });
+}
+function t8() {
+    return __generator(this, function (_a) {
+        switch (_a.label) {
+            case 0: return [4 /*yield*/, 
+                // comment
+                a];
+            case 1:
+                _a.sent();
+                return [2 /*return*/];
+        }
+    });
+}
+function t9() {
+    return __generator(this, function (_a) {
+        switch (_a.label) {
+            case 0: return [4 /*yield*/, 
+                // comment
+                a];
+            case 1:
+                _a.sent();
+                return [2 /*return*/];
+        }
+    });
+}
+function t10() {
+    return __generator(this, function (_a) {
+        switch (_a.label) {
+            case 0: return [4 /*yield*/, 
+                // comment
+                a];
+            case 1:
+                _a.sent();
+                return [2 /*return*/];
+        }
+    });
+}
diff --git a/tests/baselines/reference/yieldStatementNoAsiAfterTransform(target=esnext).js b/tests/baselines/reference/yieldStatementNoAsiAfterTransform(target=esnext).js
new file mode 100644
index 0000000000000..71167e5407143
--- /dev/null
+++ b/tests/baselines/reference/yieldStatementNoAsiAfterTransform(target=esnext).js
@@ -0,0 +1,118 @@
+//// [tests/cases/conformance/generators/yieldStatementNoAsiAfterTransform.ts] ////
+
+//// [yieldStatementNoAsiAfterTransform.ts]
+declare var a: any;
+
+function *t1() {
+    yield (
+        // comment
+        a as any
+    );
+}
+function *t2() {
+    yield (
+        // comment
+        a as any
+    ) + 1;
+}
+function *t3() {
+    yield (
+        // comment
+        a as any
+    ) ? 0 : 1;
+}
+function *t4() {
+    yield (
+        // comment
+        a as any
+    ).b;
+}
+function *t5() {
+    yield (
+        // comment
+        a as any
+    )[a];
+}
+function *t6() {
+    yield (
+        // comment
+        a as any
+    )();
+}
+function *t7() {
+    yield (
+        // comment
+        a as any
+    )``;
+}
+function *t8() {
+    yield (
+        // comment
+        a as any
+    ) as any;
+}
+function *t9() {
+    yield (
+        // comment
+        a as any
+    ) satisfies any;
+}
+function *t10() {
+    yield (
+        // comment
+        a as any
+    )!;
+}
+
+
+//// [yieldStatementNoAsiAfterTransform.js]
+function* t1() {
+    yield (
+    // comment
+    a);
+}
+function* t2() {
+    yield (
+    // comment
+    a) + 1;
+}
+function* t3() {
+    yield (
+    // comment
+    a) ? 0 : 1;
+}
+function* t4() {
+    yield (
+    // comment
+    a).b;
+}
+function* t5() {
+    yield (
+    // comment
+    a)[a];
+}
+function* t6() {
+    yield (
+    // comment
+    a)();
+}
+function* t7() {
+    yield (
+    // comment
+    a) ``;
+}
+function* t8() {
+    yield (
+    // comment
+    a);
+}
+function* t9() {
+    yield (
+    // comment
+    a);
+}
+function* t10() {
+    yield (
+    // comment
+    a);
+}
diff --git a/tests/cases/compiler/arrowExpressionBodyJSDoc.ts b/tests/cases/compiler/arrowExpressionBodyJSDoc.ts
new file mode 100644
index 0000000000000..639595fe7abc9
--- /dev/null
+++ b/tests/cases/compiler/arrowExpressionBodyJSDoc.ts
@@ -0,0 +1,20 @@
+// @strict: true
+// @noEmit: true
+// @checkJs: true
+// @allowJs: true
+
+// @filename: mytest.js
+
+/**
+ * @template T
+ * @param {T|undefined} value value or not
+ * @returns {T} result value
+ */
+const foo1 = value => /** @type {string} */({ ...value });
+
+/**
+ * @template T
+ * @param {T|undefined} value value or not
+ * @returns {T} result value
+ */
+const foo2 = value => /** @type {string} */(/** @type {T} */({ ...value }));
\ No newline at end of file
diff --git a/tests/cases/compiler/arrowExpressionJs.ts b/tests/cases/compiler/arrowExpressionJs.ts
new file mode 100644
index 0000000000000..11f38f7276a7c
--- /dev/null
+++ b/tests/cases/compiler/arrowExpressionJs.ts
@@ -0,0 +1,13 @@
+// @strict: true
+// @noEmit: true
+// @checkJs: true
+// @allowJs: true
+
+// @filename: mytest.js
+
+/**
+ * @template T
+ * @param {T|undefined} value value or not
+ * @returns {T} result value
+ */
+const cloneObjectGood = value => /** @type {T} */({ ...value });
\ No newline at end of file
diff --git a/tests/cases/compiler/asyncIteratorExtraParameters.ts b/tests/cases/compiler/asyncIteratorExtraParameters.ts
new file mode 100644
index 0000000000000..e25a0429dc8d7
--- /dev/null
+++ b/tests/cases/compiler/asyncIteratorExtraParameters.ts
@@ -0,0 +1,18 @@
+// @target: esnext
+// @noEmit: true
+// @noTypesAndSymbols: true
+
+// https://github.com/microsoft/TypeScript/issues/57130
+const iter = {
+    async *[Symbol.asyncIterator](_: number) {
+        yield 0;
+    }
+};
+
+declare function g(...args: any): any;
+
+async function* f() {
+    for await (const _ of iter);
+
+    yield* iter;
+}
diff --git a/tests/cases/compiler/classImplementsPrimitive.ts b/tests/cases/compiler/classImplementsPrimitive.ts
index 0da45d562e007..447f9f7a59a9b 100644
--- a/tests/cases/compiler/classImplementsPrimitive.ts
+++ b/tests/cases/compiler/classImplementsPrimitive.ts
@@ -2,4 +2,12 @@
 
 class C implements number { }
 class C2 implements string { }
-class C3 implements boolean { }
\ No newline at end of file
+class C3 implements boolean { }
+
+const C4 = class implements number {}
+const C5 = class implements string {}
+const C6 = class implements boolean {}
+
+const C7 = class A implements number { }
+const C8 = class B implements string { }
+const C9 = class C implements boolean { }
diff --git a/tests/cases/compiler/computedPropertiesWithSetterAssignment.ts b/tests/cases/compiler/computedPropertiesWithSetterAssignment.ts
new file mode 100644
index 0000000000000..c1fd1623a2bfa
--- /dev/null
+++ b/tests/cases/compiler/computedPropertiesWithSetterAssignment.ts
@@ -0,0 +1,24 @@
+// @target: esnext
+// @strict: true
+// @filename: /a.ts
+
+const k = Symbol();
+
+const enum Props {
+    k = 'k',
+}
+
+interface Foo {
+    get k(): Set<string>;
+    set k(v: Iterable<string>);
+
+    get [k](): Set<string>;
+    set [k](v: Iterable<string>);
+}
+
+declare const foo: Foo;
+
+foo.k = ['foo'];
+foo['k'] = ['foo'];
+foo[Props.k] = ['foo'];
+foo[k] = ['foo'];
diff --git a/tests/cases/compiler/dependentReturnType1.ts b/tests/cases/compiler/dependentReturnType1.ts
new file mode 100644
index 0000000000000..7527d3015bc3b
--- /dev/null
+++ b/tests/cases/compiler/dependentReturnType1.ts
@@ -0,0 +1,519 @@
+// @strict: true
+// @noEmit: true
+// @target: esnext
+
+interface A {
+    1: number;
+    2: string;
+}
+
+function f1<T extends 1 | 2>(x: T): A[T] {
+    if (x === 1) {
+        return 0; // Ok
+    }
+    else {
+        return 1; // Error
+    }
+}
+
+interface C {
+    1: number;
+    2: string;
+    3: boolean;
+}
+
+function f2<T extends 1 | 2 | 3>(x: T): C[T] {
+    if (x === 1) {
+        return 0; // Ok
+    }
+    else {
+        return ""; // Error, returned expression needs to have type string & boolean (= never)
+    }
+}
+
+function f3<T extends 1 | 2 | 3>(x: T): T extends 1 ? number : T extends 2 ? string : T extends 3 ? boolean : never {
+    if (x === 1) {
+        return 0; // Ok
+    }
+    else {
+        return ""; // Error, returned expression needs to have type string & boolean (= never)
+    }
+}
+
+interface One {
+    a: "a";
+    b: "b";
+    c: "c";
+    d: "d";
+}
+
+interface Two {
+    a: "a";
+    b: "b";
+    e: "e";
+    f: "f";
+}
+
+interface Three {
+    a: "a";
+    c: "c";
+    e: "e";
+    g: "g";
+}
+
+interface Four {
+    a: "a";
+    d: "d";
+    f: "f";
+    g: "g";
+}
+// Badly written conditional return type, will not trigger narrowing
+function f10<T extends 1 | 2 | 3 | 4>(x: T): T extends 1 ? One : T extends 2 ? Two : T extends 3 ? Three : Four {
+    if (x === 1 || x === 2) {
+        return { a: "a", b: "b", c: "c", d: "d", e: "e", f: "f" }; // Error
+    }
+    return { a: "a", b: "b", c: "c", d: "d", e: "e", f: "f", g: "g" }; // Error
+}
+// Well written conditional
+function f101<T extends 1 | 2 | 3 | 4>(x: T): T extends 1 ? One : T extends 2 ? Two : T extends 3 ? Three : T extends 4 ? Four : never {
+    if (x === 1 || x === 2) {
+        return { a: "a", b: "b", c: "c", d: "d", e: "e", f: "f" }; // Ok
+    }
+    // Excess property becomes a problem with the change,
+    // because we now check assignability to a narrower type...
+    return { a: "a", b: "b", c: "c", d: "d", e: "e", f: "f", g: "g" }; // EPC Error
+}
+
+// This will not work for several reasons:
+// - first because the constraint of type parameter `Arg` is generic,
+//   so attempting to narrow the type of `arg` in the `if` would result in type `Arg & LeftIn`,
+//   which when substituted in the conditional return type, would not further resolve that conditional type
+// - second because the `else` branch would never work because we don't narrow the type of `arg` to `Arg & RightIn` 
+function conditionalProducingIf<LeftIn, RightIn, LeftOut, RightOut, Arg extends LeftIn | RightIn>(
+    arg: Arg,
+    cond: (arg: LeftIn | RightIn) => arg is LeftIn,
+    produceLeftOut: (arg: LeftIn) => LeftOut,
+    produceRightOut: (arg: RightIn) => RightOut):
+    Arg extends LeftIn ? LeftOut : Arg extends RightIn ? RightOut : never
+{
+    if (cond(arg)) {
+        return produceLeftOut(arg);
+    } else {
+        return produceRightOut(arg as RightIn);
+    }
+}
+
+interface Animal {
+    name: string;
+}
+
+interface Dog extends Animal {
+    bark: () => string;
+}
+
+// This would be unsafe to narrow.
+declare function isDog(x: Animal): x is Dog;
+declare function doggy(x: Dog): number;
+function f12<T extends Animal>(x: T): T extends Dog ? number : string {
+    if (isDog(x)) { // `x` has type `T & Dog` here
+        return doggy(x);
+    }
+    return ""; // Error: Should not work because we can't express "not a Dog" in the type system
+}
+
+// Cannot narrow `keyof` too eagerly or something like the below breaks
+function f<Entry extends { [index: string]: number | boolean }, EntryId extends keyof Entry>(entry: EntryId): Entry[EntryId] {
+    const entries = {} as Entry;
+    return entries[entry];
+}
+
+// Works the same as before
+declare function takeA(val: 'A'): void;
+export function bounceAndTakeIfA<AB extends 'A' | 'B'>(value: AB): AB {
+    if (value === 'A') {
+        takeA(value);
+        takeAB(value);
+        return value;
+    }
+
+    return value;
+    function takeAB(val: AB): void {}
+}
+
+// Works the same as before
+export function bbb<AB extends "a" | "b">(value: AB): "a" {
+    if (value === "a") {
+        return value;
+    }
+    return "a";
+}
+
+class Unnamed {
+    root!: { name: string };
+    // Error: No narrowing because parameter is optional but `T` doesn't allow for undefined
+    name<T extends string>(name?: T): T extends string ? this : T extends undefined ? string : never {
+        if (typeof name === 'undefined') {
+            return this.root.name;
+        }
+        return this;
+    }
+
+    // Good conditional
+    name2<T extends string | undefined>(name?: T): T extends string ? this : T extends undefined ? string : never {
+        if (typeof name === 'undefined') {
+            return this.root.name; // Ok
+        }
+        this.root.name = name;
+        return this; // Ok
+    }
+
+    // Good conditional, wrong return expressions
+    name3<T extends string | undefined>(name?: T): T extends string ? this : T extends undefined ? string : never {
+        if (typeof name === 'undefined') {
+            return this; // Error
+        }
+        this.root.name = name;
+        return name; // Error
+    }
+}
+
+// Conditional expressions
+interface Aa {
+    1: number;
+    2: string;
+    3: boolean;
+}
+
+function trivialConditional<T extends 1 | 2 | 3>(x: T): Aa[T] {
+    if (x !== 1) {
+        return x === 2 ? "" : true;
+    }
+    else {
+        return 0;
+    }
+}
+
+function conditional<T extends boolean>(x: T):
+ T extends true ? 1 : T extends false ? 2 : never {
+    return x ? 1 : 2; // Ok
+}
+
+function contextualConditional<T extends "a" | "b">(
+    x: T
+): T extends "a" ? "a" : T extends "b" ? number : never {
+    return x === "a" ? x : parseInt(x); // Ok
+}
+
+function conditionalWithError<T extends "a" | "b">(
+    x: T
+): T extends "a" ? number : T extends "b" ? string : never {
+    return x === "a" ? x : parseInt(x); // Error
+}
+
+// Multiple indexed type reductions
+interface BB {
+    "a": number;
+    [y: number]: string;
+}
+
+interface AA<T extends keyof BB> {
+    "c": BB[T];
+    "d": boolean,
+}
+
+function reduction<T extends keyof BB, U extends "c" | "d">(x: T, y: U): AA<T>[U] {
+    if (y === "c" && x === "a") {
+        // AA<T>[U='c'] -> BB[T]
+        // BB[T='a'] -> number
+        return 0; // Ok
+    }
+
+    return undefined as never;
+}
+
+// Substitution types are not narrowed
+function subsCond<T extends 1 | 2 | 3>(
+    x: T,
+): T extends 1 | 2
+    ? T extends 1
+        ? string
+        : T extends 2
+          ? boolean
+          : never
+    : T extends 3
+      ? number
+      : never {
+    if (x === 1) {
+        return "";
+    } else if (x == 2) {
+        return true;
+    }
+    return 3;
+}
+
+
+// Unsafe: check types overlap
+declare function q(x: object): x is { b: number };
+function foo<T extends { a: string } | { b: number }>(
+    x: T,
+): T extends { a: string } ? number : T extends { b: number } ? string : never {
+    if (q(x)) {
+        x.b;
+        return "";
+    }
+    x.a;
+    return 1;
+}
+
+let y = { a: "", b: 1 }
+const r = foo<{ a: string }>(y); // type says number but actually string
+
+type HelperCond<T, A, R1, B, R2> = T extends A ? R1 : T extends B ? R2 : never;
+
+// We don't narrow the return type because the conditionals are not distributive
+function foo2<U extends string | number, V extends boolean>(x: U, y: V):
+    HelperCond<{ x: U, y: V },
+        { x: string, y: true }, 1,
+        { x: number, y: false }, 2> {
+    if (typeof x === "string" && y === true) {
+        return 1; // Error
+    }
+    if (typeof x === "number" && y === false) {
+        return 2; // Error
+    }
+    return 0; // Error
+}
+
+// From https://github.com/microsoft/TypeScript/issues/24929#issue-332087943
+declare function isString(s: unknown): s is string;
+// capitalize a string or each element of an array of strings
+function capitalize<T extends string | string[]>(
+    input: T
+): T extends string[] ? string[] : T extends string ? string : never {
+    if (isString(input)) {
+        return input[0].toUpperCase() + input.slice(1); // Ok
+    } else {
+        return input.map(elt => capitalize(elt)); // Ok
+    }
+}
+
+function badCapitalize<T extends string | string[]>(
+    input: T
+): T extends string[] ? string[] : T extends string ? string : never {
+    if (isString(input)) {
+        return input[0].toUpperCase() + input.slice(1); // Ok
+    } else {
+        return input[0].toUpperCase() + input.slice(1); // Bad, error
+    }
+}
+
+// No narrowing because conditional's extends type is different from type parameter constraint types
+function voidRet<T extends { a: string } | undefined>(
+    x: T
+): T extends {} ? void : T extends undefined ? number : never {
+    if (x) {
+        return;
+    }
+    return 1;
+}
+
+// Multiple type parameters at once
+function woo<T extends string | number, U extends string | number>(
+    x: T,
+    y: U,
+): T extends string
+    ? U extends string
+        ? 1
+        : U extends number
+          ? 2
+          : never
+    : T extends number
+      ? U extends number
+          ? 3
+          : U extends string
+            ? 4
+            : never
+      : never {
+    if (typeof x === "number" && typeof y === "string") {
+        return 1; // Good error
+    }
+    return undefined as any;
+}
+
+function ttt<T extends string | number, U extends string | number>(
+    x: T,
+    y: U,
+): T extends string
+    ? U extends string
+        ? 1
+        : U extends number
+          ? 2
+          : never
+    : T extends number
+      ? U extends number
+          ? 3
+          : U extends string
+            ? 4
+            : never
+      : never {
+    if (typeof x === "number" && typeof y === "string") {
+        return 4; // Ok
+    }
+    
+    return undefined as any;
+}
+
+// Shadowing of the narrowed reference
+function shadowing<T extends 1 | 2>(x: T): T extends 1 ? number : T extends 2 ? string : never {
+    if (true) {
+        let x: number = Math.random() ? 1 : 2;
+        if (x === 1) {
+            return 1; // Error
+        }
+        return ""; // Error
+    }
+}
+
+function noShadowing<T extends 1 | 2>(x: T): T extends 1 ? number : T extends 2 ? string : never {
+    if (true) {
+        if (x === 1) {
+            return 1; // Ok
+        }
+        return ""; // Ok
+    }
+}
+
+// If the narrowing reference is out of scope, we simply won't narrow its type
+declare let someX: boolean;
+function scope2<T extends boolean>(a: T): T extends true ? 1 : T extends false ? 2 : never {
+    if ((true)) {
+        const someX = a;
+        if (someX) { // We narrow `someX` and the return type here
+            return 1;
+        }
+    }
+    if (!someX) { // This is a different `someX`, so we don't narrow here
+        return 2;
+    }
+
+    return undefined as any;
+}
+
+function moreShadowing<T extends 1 | 2>(x: T): T extends 1 ? number : T extends 2 ? string : never {
+    if (x === 2) {
+        let x: number = Math.random() ? 1 : 2;
+        if (x === 1) {
+            return 1; // Error
+        }
+        return ""; // Ok
+    }
+    return 0; // Ok
+}
+
+// This would be unsafe to narrow due to `infer` type.
+function withInfer<T extends [string] | number>(x: T): T extends [infer R] ? R : T extends number ? boolean : never {
+    if (typeof x === "number") {
+        return true;
+    }
+    return "";
+}
+
+const withInferResult = withInfer(["a"] as const); // The type says it returns `"a"`, but the function actually returns `""`.
+
+// Ok
+async function abool<T extends true | false>(x: T): Promise<T extends true ? 1 : T extends false ? 2 : never> {
+    if (x) {
+        return 1;
+    }
+    return 2;
+}
+
+// Ok
+function* bbool<T extends true | false>(x: T): Generator<number, T extends true ? 1 : T extends false ? 2 : never, unknown> {
+    yield 3;
+    if (x) {
+        return 1;
+    }
+    return 2;
+}
+
+// We don't do the same type of narrowing for `yield` statements
+function* cbool<T extends true | false>(x: T): Generator<T extends true ? 1 : T extends false ? 2 : never, number, unknown> {
+    if (x) {
+        yield 1;
+    }
+    yield 2;
+    return 0;
+}
+
+// From #33912
+abstract class Operation<T, R> {
+    abstract perform(t: T): R;
+}
+
+type ConditionalReturnType<T, R, EOp extends Operation<T, R> | undefined> =
+    EOp extends Operation<T, R> ? R : EOp extends undefined ? T | R : never;
+
+
+class ConditionalOperation<
+    T,
+    R,
+    EOp extends Operation<T, R> | undefined,
+> extends Operation<T, ConditionalReturnType<T, R, EOp>> {
+    constructor(
+        private predicate: (value: T) => boolean,
+        private thenOp: Operation<T, R>,
+        private elseOp?: EOp,
+    ) {
+        super();
+    }
+
+    // We won't try to narrow the return type because `T` is declared on the class and we don't analyze this case.
+    perform(t: T): ConditionalReturnType<T, R, EOp> {
+        if (this.predicate(t)) {
+            return this.thenOp.perform(t); // Bad: this is assignable to all of the branches of the conditional, but we still can't return it
+        } else if (typeof this.elseOp !== "undefined") {
+            return this.elseOp.perform(t); // Would be ok
+        } else {
+            return t; // Would be ok
+        }
+    }
+}
+
+// Like the version above, we will not attempt to narrow because there's more than one reference to `T`,
+// because `T` shows up in the type of `predicate`.
+function perform<T, R, EOp extends Operation<T, R> | undefined>(
+    t: T,
+    predicate: (value: T) => boolean,
+    thenOp: Operation<T, R>,
+    elseOp?: EOp,
+    ): ConditionalReturnType<T, R, EOp> {
+    if (predicate(t)) {
+        return thenOp.perform(t); // Bad: this is assignable to all of the branches of the conditional, but we still can't return it
+    } else if (elseOp !== undefined) {
+        return elseOp.perform(t); // Would be ok
+    } else {
+        return t; // Would be ok
+    }
+}
+
+// Return conditional expressions with parentheses
+function returnStuff1<T extends boolean>(x: T ): T extends true ? 1 : T extends false ? 2 : never {
+    return (x ? (1) : 2);
+}
+
+function returnStuff2<T extends 1 | 2 | "a">(x: T ):
+    T extends 1 ? "one" : T extends 2 ? "two" : T extends "a" ? 0 : never {
+    return (typeof x === "string" ? 0 : (x === 1 ? ("one") : "two"));
+}
+
+// If the conditional type's input is `never`, then it resolves to `never`:
+function neverOk<T extends boolean>(x: T): T extends true ? 1 : T extends false ? 2 : never {
+    if (x === true) {
+        return 1;
+    }
+    if (x === false) {
+        return 2;
+    }
+    return 1;
+}
\ No newline at end of file
diff --git a/tests/cases/compiler/dependentReturnType2.ts b/tests/cases/compiler/dependentReturnType2.ts
new file mode 100644
index 0000000000000..0f14e3f7faa87
--- /dev/null
+++ b/tests/cases/compiler/dependentReturnType2.ts
@@ -0,0 +1,307 @@
+// @strict: true
+// @noEmit: true
+// @target: esnext
+// @checkJs: true
+// @filename: file.js
+
+// Adapted from ts-error-deltas repos
+
+/**
+ * @template T
+ * @template A
+ * @template R1
+ * @template B
+ * @template R2
+ * @typedef {T extends A ? R1 : T extends B ? R2 : never} HelperCond
+ */
+
+/**
+ * @typedef IMessage
+ * @property {string} [html]
+ * @property {Object[]} [tokens]
+ */
+
+class NewKatex {
+    /**
+     * @param {string} s
+     * @returns {string}
+     */
+    render(s) {
+        return "";
+    }
+
+    /**
+     * @template {string | IMessage} T
+     * @param {T} message
+     * @returns {T extends string ? string : T extends IMessage ? IMessage : never}
+     */
+    renderMessage(message) {
+        if (typeof message === 'string') {
+            return this.render(message); // Ok
+        }
+
+        if (!message.html?.trim()) {
+            return message; // Ok
+        }
+
+        if (!message.tokens) {
+            message.tokens = [];
+        }
+
+        message.html = this.render(message.html);
+        return message; // Ok
+    }
+}
+
+/**
+ * @template {true | false} T
+ * @param {{ dollarSyntax: boolean; parenthesisSyntax: boolean; }} options
+ * @param {T} _isMessage
+ * @returns {T extends true ? (message: IMessage) => IMessage : T extends false ? (message: string) => string : never}
+ */
+function createKatexMessageRendering(options, _isMessage) {
+    const instance = new NewKatex();
+    if (_isMessage) {
+        return (/** @type {IMessage} */ message) => instance.renderMessage(message); // Ok
+    }
+    return (/** @type {string} */ message) => instance.renderMessage(message); // Ok
+}
+
+// File: Rocket.Chat/apps/meteor/app/settings/lib/settings.ts
+
+/**
+ * @typedef {Record<any, any>} MyObj
+ */
+
+
+/**
+ * @typedef {MyObj} SettingValue
+ */
+ 
+/**
+ * @template {SettingValue} T
+ * @typedef {Object} SettingComposedValue
+ * @property {string} key
+ * @property {SettingValue} value
+ */
+
+/**
+ * @callback SettingCallback
+ * @param {string} key
+ * @param {SettingValue} value
+ * @param {boolean} [initialLoad]
+ * @returns {void}
+ */
+
+/** @type {{ settings: { [s: string]: any } }} */
+const Meteor = /** @type {any} */ (undefined);
+/** @type {{ isRegExp(x: unknown): x is RegExp; }} */
+const _ = /** @type {any} */ (undefined);
+
+/**
+ * @param {RegExp} x
+ * @returns {void}
+ */
+function takesRegExp(x) {
+    return /** @type {any} */ undefined;
+}
+/**
+ * @param {string} x
+ * @returns {void}
+ */
+function takesString(x) {
+    return /** @type {any} */ undefined;
+}
+
+/**
+ * @class NewSettingsBase
+ */
+class NewSettingsBase {
+    /**
+     * @template {SettingCallback | undefined} C
+     * @template {string | RegExp} I
+     * @template {SettingValue} T
+     * @param {I} _id
+     * @param {C} [callback]
+     * @returns {HelperCond<C, SettingCallback, void, undefined, HelperCond<I, string, T | undefined, RegExp, SettingComposedValue<T>[]>>}
+     */
+    newGet(_id, callback) {
+        if (callback !== undefined) {
+            if (!Meteor.settings) {
+                return; // Ok
+            }
+            if (_id === '*') {
+                return Object.keys(Meteor.settings).forEach((key) => {
+                    const value = Meteor.settings[key];
+                    callback(key, value);
+                });
+            }
+            if (_.isRegExp(_id) && Meteor.settings) {
+                return Object.keys(Meteor.settings).forEach((key) => {
+                    if (!_id.test(key)) {
+                        return;
+                    }
+                    const value = Meteor.settings[key];
+                    callback(key, value);
+                });
+            }
+
+            if (typeof _id === 'string') {
+                const value = Meteor.settings[_id];
+                if (value != null) {
+                    callback(_id, Meteor.settings[_id]);
+                }
+                return; // Ok
+            }
+
+            return; // Ok, needed for exhaustiveness check
+        }
+
+        if (!Meteor.settings) {
+            return undefined; // Error
+        }
+
+        if (_.isRegExp(_id)) {
+            return Object.keys(Meteor.settings).reduce((/** @type {SettingComposedValue<T>[]} */ items, key) => {
+                const value = Meteor.settings[key];
+                if (_id.test(key)) {
+                    items.push({ key, value });
+                }
+                return items;
+            }, []); // Ok
+        }
+
+        return Meteor.settings?.[_id]; // Error
+    }
+}
+
+// File: Rocket.Chat/apps/meteor/app/ui-utils/client/lib/messageBox.ts
+
+/**
+ * @typedef {MyObj} MessageBoxAction
+ */
+
+/**
+ * @template {string | undefined} T
+ * @param {T} group
+ * @returns {HelperCond<T, string, MessageBoxAction[], undefined, Record<string, MessageBoxAction[]>>}
+ */
+function getWithBug(group) {
+    if (!group) {
+        return /** @type {Record<string, MessageBoxAction[]>} */({}); // Error
+    }
+    return /** @type {MessageBoxAction[]} */([]); // Ok
+}
+
+/**
+ * @template {string | undefined} T
+ * @param {T} group
+ * @returns {HelperCond<T, string, MessageBoxAction[], undefined, Record<string, MessageBoxAction[]>>}
+ */
+function getWithoutBug(group) {
+    if (group === undefined) {
+        return /** @type {Record<string, MessageBoxAction[]>} */({}); // Ok
+    }
+    return /** @type {MessageBoxAction[]} */([]); // Ok
+}
+
+// File: Rocket.Chat/apps/meteor/ee/server/lib/engagementDashboard/date.ts
+
+/**
+ * @param {string} x
+ * @returns {Date}
+ */
+function mapDateForAPI(x) {
+    return /** @type {any} */ (undefined);
+}
+
+/**
+ * @template {string | undefined} T
+ * @param {string} start
+ * @param {T} [end]
+ * @returns {HelperCond<T, string, { start: Date, end: Date }, undefined, { start: Date, end: undefined }>}
+ */
+function transformDatesForAPI(start, end) {
+    return end !== undefined ?
+        {
+            start: mapDateForAPI(start),
+            end: mapDateForAPI(end),
+        } :
+        {
+            start: mapDateForAPI(start),
+            end: undefined
+        };
+}
+
+// File: Rocket.Chat/packages/agenda/src/Agenda.ts
+
+/**
+ * @typedef {MyObj} RepeatOptions
+ */
+
+/**
+ * @typedef {MyObj} Job
+ */
+
+/**
+ * @typedef {Object} IJob
+ * @property {MyObj} data
+ */
+class NewAgenda {
+    /**
+     * @param {string | number} interval
+     * @param {string} name
+     * @param {IJob['data']} data
+     * @param {RepeatOptions} options
+     * @returns {Promise<Job>}
+     */
+    async _createIntervalJob(interval, name, data, options) {
+        return /** @type {any} */ (undefined);
+    }
+
+    /**
+     * @param {string | number} interval
+     * @param {string[]} names
+     * @param {IJob['data']} data
+     * @param {RepeatOptions} options
+     * @returns {Promise<Job[]> | undefined}
+     */
+    _createIntervalJobs(interval, names, data, options) {
+        return undefined;
+    }
+
+    /**
+     * @template {string | string[]} T
+     * @param {string | number} interval
+     * @param {T} name
+     * @param {IJob['data']} data
+     * @param {RepeatOptions} options
+     * @returns {Promise<HelperCond<T, string, Job, string[], Job[] | undefined>>}
+     */
+    async newEvery(interval, name, data, options) {
+        if (typeof name === 'string') {
+            return this._createIntervalJob(interval, name, data, options); // Ok
+        }
+
+        if (Array.isArray(name)) {
+            return this._createIntervalJobs(interval, name, data, options); // Ok
+        }
+
+        throw new Error('Unexpected error: Invalid job name(s)');
+    }
+}
+
+// File: angular/packages/common/src/pipes/case_conversion_pipes.ts
+
+/**
+ * @template {string | null | undefined} T
+ * @param {T} value
+ * @returns {HelperCond<T, string, string, null | undefined, null>}
+ */
+function transform1(value) {
+    if (value == null) return null; // Ok
+    if (typeof value !== 'string') {
+        throw new Error();
+    }
+    return value.toLowerCase(); // Ok
+}
diff --git a/tests/cases/compiler/dependentReturnType3.ts b/tests/cases/compiler/dependentReturnType3.ts
new file mode 100644
index 0000000000000..df60c0677fd5d
--- /dev/null
+++ b/tests/cases/compiler/dependentReturnType3.ts
@@ -0,0 +1,216 @@
+// @strict: true
+// @noEmit: true
+// @target: ES6
+
+// Adapted from ts-error-deltas repos
+
+type HelperCond<T, A, R1, B, R2> =
+    T extends A
+        ? R1
+        : T extends B
+            ? R2
+            : never;
+
+
+// File: Rocket.Chat/apps/meteor/app/katex/client/index.ts
+interface IMessage {
+    html?: string;
+    tokens?: {}[];
+}
+
+class NewKatex {
+    render(s: string): string {
+        return "";
+    }
+
+    renderMessage<T extends string | IMessage>(message: T):
+        T extends string
+        ? string
+        : T extends IMessage
+          ? IMessage
+          : never {
+        if (typeof message === 'string') {
+            return this.render(message); // Ok
+        }
+
+        if (!message.html?.trim()) {
+            return message; // Ok
+        }
+
+        if (!message.tokens) {
+            message.tokens = [];
+        }
+
+        message.html = this.render(message.html);
+        return message; // Ok
+    }
+}
+
+export function createKatexMessageRendering<T extends true | false>(
+    options: {
+        dollarSyntax: boolean;
+        parenthesisSyntax: boolean;
+    },
+    _isMessage: T,
+): T extends true
+    ? (message: IMessage) => IMessage
+    : T extends false
+      ? (message: string) => string
+      : never {
+    const instance = new NewKatex();
+    if (_isMessage) {
+        return (message: IMessage): IMessage => instance.renderMessage(message); // Ok
+    }
+    return (message: string): string => instance.renderMessage(message); // Ok
+}
+
+// File: Rocket.Chat/apps/meteor/app/settings/lib/settings.ts
+type SettingComposedValue<T extends SettingValue = SettingValue> = { key: string; value: T };
+type SettingCallback = (key: string, value: SettingValue, initialLoad?: boolean) => void;
+
+type SettingValue = object;
+declare const Meteor: { settings: { [s: string]: any } };
+declare const _: { isRegExp(x: unknown): x is RegExp; };
+declare function takesRegExp(x: RegExp): void;
+declare function takesString(x: string): void;
+
+class NewSettingsBase {
+    public newGet<C extends SettingCallback | undefined, I extends string | RegExp, T extends SettingValue = SettingValue>(
+        _id: I,
+        callback?: C,
+    ): HelperCond<C,
+        SettingCallback, void,
+        undefined, HelperCond<I,
+            string, T | undefined,
+            RegExp, SettingComposedValue<T>[]>> {
+        if (callback !== undefined) {
+            if (!Meteor.settings) {
+                return; // Ok
+            }
+            if (_id === '*') {
+                return Object.keys(Meteor.settings).forEach((key) => { // Ok
+                    const value = Meteor.settings[key];
+                    callback(key, value);
+                });
+            }
+            if (_.isRegExp(_id) && Meteor.settings) {
+                return Object.keys(Meteor.settings).forEach((key) => { // Ok
+                    if (!_id.test(key)) {
+                        return;
+                    }
+                    const value = Meteor.settings[key];
+                    callback(key, value);
+                });
+            }
+
+            if (typeof _id === 'string') {
+                const value = Meteor.settings[_id];
+                if (value != null) {
+                    callback(_id, Meteor.settings[_id]);
+                }
+                return; // Ok
+            }
+
+            return; // Ok, needed for exhaustiveness check
+        }
+
+        if (!Meteor.settings) { // Wrong: we don't know that _id is string here, cannot return undefined
+            return undefined; // Error
+        }
+
+        if (_.isRegExp(_id)) {
+            return Object.keys(Meteor.settings).reduce((items: SettingComposedValue<T>[], key) => {
+				const value = Meteor.settings[key];
+				if (_id.test(key)) {
+					items.push({
+						key,
+						value,
+					});
+				}
+				return items;
+			}, []); // Ok
+        }
+
+        return Meteor.settings?.[_id]; // Error
+        // The indexing currently doesn't work because it doesn't use the narrowed type of `_id`.
+    }
+}
+
+// File: Rocket.Chat/apps/meteor/app/ui-utils/client/lib/messageBox.ts
+type MessageBoxAction = object;
+
+function getWithBug<T extends string | undefined>(group: T):
+HelperCond<T, string, MessageBoxAction[], undefined, Record<string, MessageBoxAction[]>> {
+    if (!group) {
+        return {} as Record<string, MessageBoxAction[]>; // Error, could fall into this branch when group is empty string
+    }
+
+    return [] as MessageBoxAction[]; // Ok
+}
+
+function getWithoutBug<T extends string | undefined>(group: T):
+HelperCond<T, string, MessageBoxAction[], undefined, Record<string, MessageBoxAction[]>> {
+    if (group === undefined) {
+        return {} as Record<string, MessageBoxAction[]>; // Ok
+    }
+
+    return [] as MessageBoxAction[]; // Ok
+}
+
+// File: Rocket.Chat/apps/meteor/ee/server/lib/engagementDashboard/date.ts
+declare function mapDateForAPI(x: string): Date;
+export function transformDatesForAPI<T extends string | undefined>(
+    start: string,
+    end?: T
+): HelperCond<T, string, { start: Date, end: Date }, undefined, { start: Date, end: undefined }> {
+    return end !== undefined ? // Ok
+        {
+            start: mapDateForAPI(start),
+            end: mapDateForAPI(end),
+        } :
+        {
+            start: mapDateForAPI(start),
+            end: undefined
+        };
+}
+
+// File: Rocket.Chat/packages/agenda/src/Agenda.ts
+type RepeatOptions = object;
+type Job = object;
+type IJob = { data: object };
+class NewAgenda {
+    public async _createIntervalJob(interval: string | number, name: string, data: IJob['data'], options: RepeatOptions): Promise<Job> { return undefined as any; }
+    private _createIntervalJobs(
+        interval: string | number,
+        names: string[],
+        data: IJob['data'],
+        options: RepeatOptions,
+    ): Promise<Job[]> | undefined { return undefined as any; }
+
+    public async newEvery<T extends string | string[]>(
+        interval: string | number,
+        name: T,
+        data: IJob['data'],
+        options: RepeatOptions): Promise<HelperCond<T, string, Job, string[], Job[] | undefined>> {
+        if (typeof name === 'string') {
+            return this._createIntervalJob(interval, name, data, options); // Ok
+        }
+
+        if (Array.isArray(name)) {
+            return this._createIntervalJobs(interval, name, data, options); // Ok
+            // Possible bug in original: createIntervalJobs can return undefined, but the original overload did not acount for that.
+        }
+
+        throw new Error('Unexpected error: Invalid job name(s)');
+    }
+}
+
+// File: angular/packages/common/src/pipes/case_conversion_pipes.ts
+
+function transform1<T extends string | null | undefined>(value: T): HelperCond<T, string, string, null | undefined, null> {
+    if (value == null) return null; // Ok
+    if (typeof value !== 'string') {
+        throw new Error();
+    }
+    return value.toLowerCase(); // Ok
+}
\ No newline at end of file
diff --git a/tests/cases/compiler/dependentReturnType4.ts b/tests/cases/compiler/dependentReturnType4.ts
new file mode 100644
index 0000000000000..166b8497fa3eb
--- /dev/null
+++ b/tests/cases/compiler/dependentReturnType4.ts
@@ -0,0 +1,36 @@
+// @strict: true
+// @noEmit: true
+// @target: ES2022
+// @exactOptionalPropertyTypes: true
+
+declare const rand: { a?: never };
+type Missing = typeof rand.a;
+
+// Detection of valid optional parameter references
+
+// Ok, will narrow return type
+function bar1<T extends string | Missing>(x?: T):
+    T extends Missing ? 0 : T extends string ? 1 : never {
+    if (x === undefined) {
+        return 0;
+    }
+    return 1;
+}
+
+// Ok, will narrow return type
+function bar2<T extends string | undefined>(x?: T):
+    T extends undefined ? 0 : T extends string ? 1 : never {
+    if (x === undefined) {
+        return 0;
+    }
+    return 1;
+}
+
+// Not ok, will not narrow return type
+function bar3<T extends string>(x?: T):
+    T extends undefined ? 0 : T extends string ? 1 : never {
+    if (x === undefined) {
+        return 0;
+    }
+    return 1;
+}
\ No newline at end of file
diff --git a/tests/cases/compiler/dependentReturnType5.ts b/tests/cases/compiler/dependentReturnType5.ts
new file mode 100644
index 0000000000000..137474217ecb7
--- /dev/null
+++ b/tests/cases/compiler/dependentReturnType5.ts
@@ -0,0 +1,99 @@
+// @strict: true
+// @noEmit: true
+
+// Indexed access return type
+interface A1 {
+    "prop": true;
+    [s: string]: boolean;
+}
+
+// This was already allowed but is unsound.
+function foo1<T extends string>(x: T): A1[T] {
+    return false;
+}
+const rfoo1 = foo1("prop"); // Type says true, but actually returns false.
+
+interface A2 {
+    "prop": true;
+    [n: number]: string;
+}
+
+// We could soundly allow that, because `"prop"` and `[n: number]` are disjoint types.
+function foo2<T extends "prop" | number>(x: T): A2[T] {
+    if (x === "prop") {
+        return true;
+    }
+    return "some string";
+}
+const rfoo2 = foo2("prop");
+const rfoo22 = foo2(34);
+const rfoo222 = foo2(Math.random() ? "prop" : 34);
+
+interface A3 {
+    [s: string]: boolean;
+}
+
+// No need for return type narrowing.
+function foo3<T extends string>(x: T): A3[T] {
+    if (Math.random()) return true;
+    return false;
+}
+
+interface Comp {
+    foo: 2;
+    [n: number]: 3;
+    [s: string]: 2 | 3 | 4;
+}
+
+function indexedComp<T extends number | string>(x: T): Comp[T] {
+    if (x === "foo") {
+        if (Math.random()) {
+            return 3; // Error
+        }
+        return 2; // Ok
+    }
+    if (typeof x === "number") {
+        if (Math.random()) {
+            return 2; // Error
+        }
+        return 3; // Ok
+    }
+    return 4; // Ok
+}
+
+function indexedComp2<T extends number | string>(x: T): Comp[T] {
+    if (Math.random()) {
+        return 3; // Bad, unsound
+    }
+    return 2; // Error
+}
+
+
+// Most common case supported:
+interface F {
+    "t": number,
+    "f": boolean,
+}
+
+// Ok
+function depLikeFun<T extends "t" | "f">(str: T): F[T] {
+    if (str === "t") {
+        return 1;
+    } else {
+        return true;
+    }
+}
+
+depLikeFun("t"); // has type number
+depLikeFun("f"); // has type boolean
+
+type IndirectF<T extends keyof F> = F[T];
+
+// Ok
+function depLikeFun2<T extends "t" | "f">(str: T): IndirectF<T> {
+    if (str === "t") {
+        return 1;
+    } else {
+        return true;
+    }
+}
\ No newline at end of file
diff --git a/tests/cases/compiler/dependentReturnType6.ts b/tests/cases/compiler/dependentReturnType6.ts
new file mode 100644
index 0000000000000..4a319fa7f401a
--- /dev/null
+++ b/tests/cases/compiler/dependentReturnType6.ts
@@ -0,0 +1,137 @@
+// @strict: true
+// @noEmit: true
+// @target: esnext
+
+// Tests for when return type narrowing can and cannot happen
+
+// @filename: file.ts
+// Type parameter in outer scope
+function outer<T extends boolean>(x: T): number {
+    return inner();
+
+    function inner(): T extends true ? 1 : T extends false ? 2 : never {
+        return x ? 1 : 2;
+    }
+}
+
+// Overloads
+function fun6<T extends boolean>(x: T, y: string): T extends true ? string : T extends false ? 2 : never;
+function fun6<T extends boolean>(x: T, y: undefined): T extends true ? 1 : T extends false ? 2 : never;
+function fun6(x: boolean): 1 | 2 | string;
+function fun6<T extends boolean>(x: T, y?: string): T extends true ? 1 | string : T extends false ? 2 : never {
+    return x ? y !== undefined ? y : 1 : 2;
+}
+
+// Indexed access with conditional inside
+
+// DOESN'T NARROW the nested conditional type of wrong shape
+interface SomeInterfaceBad<T> {
+    prop1: T extends 1 ? true : T extends 2 ? false : never;
+    prop2: T extends true ? 1 : T extends false ? 2 : never;
+}
+
+function fun4bad<T, U extends keyof SomeInterfaceBad<unknown>>(x: T, y: U): SomeInterfaceBad<T>[U] {
+    if (y === "prop1") {
+        return x === 1 ? true : false;
+    }
+    return x ? 1 : 2;
+}
+
+// Narrows nested conditional type of right shape
+interface SomeInterfaceGood<T> {
+    prop1: T extends true ? 2 : T extends false ? 1 : never;
+    prop2: T extends true ? 1 : T extends false ? 2 : never;
+}
+
+function fun4good<T extends boolean, U extends keyof SomeInterfaceGood<unknown>>(x: T, y: U): SomeInterfaceGood<T>[U] {
+    if (y === "prop1") {
+        return x ? 2 : 1;
+    }
+    return x ? 1 : 2;
+}
+
+// Indexed access with indexed access inside - OK, narrows
+interface BB {
+    "a": number;
+    "b": string;
+}
+
+interface AA<T extends keyof BB> {
+    "c": BB[T];
+    "d": boolean,
+}
+
+function reduction<T extends keyof BB, U extends keyof AA<any>>(x: T, y: U): AA<T>[U] {
+    if (x === "a" && y === "c") {
+        return 0; // Ok
+    }
+
+    return undefined as never;
+}
+
+// Conditional with indexed access inside - OK, narrows
+function fun5<T extends 1 | 2, U extends keyof BB>(x: T, y: U): T extends 1 ? BB[U] : T extends 2 ? boolean : never {
+    if (x === 1) {
+        if (y === "a") {
+            return 0;
+        }
+        return "";
+    }
+    return true;
+}
+
+// `this` type parameter - Doesn't narrow
+abstract class SomeClass {
+    fun3(this: Sub1 | Sub2): this extends Sub1 ? 1 : this extends Sub2 ? 2 : never {
+        if (this instanceof Sub1) {
+            return 1;
+        }
+        return 2;
+    }
+}
+class Sub1 extends SomeClass {
+    #sub1!: symbol;
+};
+class Sub2 extends SomeClass {
+    #sub2!: symbol;
+};
+
+// Detection of type parameter reference in presence of typeof
+function fun2<T extends boolean>(x: T, y: typeof x): T extends true ? 1 : T extends false ? 2 : never {
+    return x ? 1 : 2;
+}
+
+// Contextually-typed lambdas
+const fun1: <T extends boolean>(x: T) => T extends true ? 1 : T extends false ? 2 : never = (x) => x ? 1 : 2;
+
+
+// Circular conditionals
+type SomeCond<T> = T extends true ? 1 : T extends false ? SomeCond<T> : never;
+
+function f7<T extends boolean>(x: T): SomeCond<T> {
+    if (x) {
+        return 1;
+    }
+    return 2;
+}
+
+// Composite instantiation of conditional type
+type OtherCond<T> = T extends 1 ? "one" : T extends 2 ? "two" : T extends 3 ? "three" : T extends 4 ? "four" : never;
+
+function f8<U extends 1 | 2, V extends 3 | 4>(x: U, y: V): OtherCond<U | V> {
+    if (x === 1 && y === 3)  {
+        return "one";
+    }
+}
+
+// Conditionals with `infer` - will not narrow, it is not safe to infer from the narrowed type into an `infer` type parameter
+function f9<T extends "a"[] | "b"[] | number>(x: T): T extends Array<infer P> ? P : T extends number ? undefined : never {
+    if (Array.isArray(x)) {
+        // If we allowed narrowing of the conditional return type, when resolving the conditional `T & ("a"[] | "b"[]) extends Array<infer P> ? P : ...`,
+        // we could infer `"a" | "b"` for `P`, and allow "a" to be returned. However, when calling `f10`, `T` could be instantiated with `"b"[]`, and the return type would be `"b"`,
+        // so allowing an `"a"` return would be unsound.
+        return "a";
+    }
+    return undefined;
+}
+
diff --git a/tests/cases/compiler/dependentReturnType8.ts b/tests/cases/compiler/dependentReturnType8.ts
new file mode 100644
index 0000000000000..169d5f540c2b6
--- /dev/null
+++ b/tests/cases/compiler/dependentReturnType8.ts
@@ -0,0 +1,13 @@
+// @strict: true
+// @noEmit: true
+
+
+export {};
+
+declare const record: Record<string, string[]>;
+declare const array: string[];
+
+// Arrow function with expression body
+const getObject =
+    <T extends string | undefined>(group: T): T extends string ? string[] : T extends undefined ? Record<string, string[]> : never =>
+        group === undefined ? record : array;
\ No newline at end of file
diff --git a/tests/cases/compiler/dependentReturnType9.ts b/tests/cases/compiler/dependentReturnType9.ts
new file mode 100644
index 0000000000000..65437a8aea1c8
--- /dev/null
+++ b/tests/cases/compiler/dependentReturnType9.ts
@@ -0,0 +1,67 @@
+// @strict: true
+// @noEmit: true
+
+type Payload =
+  | { _tag: "auth"; username: string; password: string }
+  | { _tag: "cart"; items: Array<{ id: string; quantity: number }> }
+  | { _tag: "person"; name: string; age: number };
+
+type PayloadContent = {
+  [P in Payload as P["_tag"]]: Omit<P, "_tag">;
+};
+
+// ok, exhaustive cases and default case with throw
+function mockPayload<P_TAG extends Payload["_tag"]>(
+  str: P_TAG,
+): PayloadContent[P_TAG] {
+  switch (str) {
+    case "auth":
+      return { username: "test", password: "admin" };
+    case "cart":
+      return { items: [{ id: "123", quantity: 123 }] };
+    case "person":
+      return { name: "andrea", age: 27 };
+    default:
+      throw new Error("unknown tag");
+  }
+}
+
+// ok, non-exhaustive cases but default case with throw
+function mockPayload2<P_TAG extends Payload["_tag"]>(
+  str: P_TAG,
+): PayloadContent[P_TAG] {
+  switch (str) {
+    case "auth":
+      return { username: "test", password: "admin" };
+    case "cart":
+      return { items: [{ id: "123", quantity: 123 }] };
+    default:
+      throw new Error("unhandled tag");
+  }
+}
+
+// ok, exhaustive cases
+function mockPayload3<P_TAG extends Payload["_tag"]>(
+  str: P_TAG,
+): PayloadContent[P_TAG] {
+  switch (str) {
+    case "auth":
+      return { username: "test", password: "admin" };
+    case "cart":
+      return { items: [{ id: "123", quantity: 123 }] };
+    case "person":
+      return { name: "andrea", age: 27 };
+  }
+}
+
+// error, non-exhaustive cases
+function mockPayload4<P_TAG extends Payload["_tag"]>(
+  str: P_TAG,
+): PayloadContent[P_TAG] {
+  switch (str) {
+    case "auth":
+      return { username: "test", password: "admin" };
+    case "cart":
+      return { items: [{ id: "123", quantity: 123 }] };
+  }
+}
diff --git a/tests/cases/compiler/iteratorExtraParameters.ts b/tests/cases/compiler/iteratorExtraParameters.ts
new file mode 100644
index 0000000000000..86d563871675f
--- /dev/null
+++ b/tests/cases/compiler/iteratorExtraParameters.ts
@@ -0,0 +1,22 @@
+// @target: esnext
+// @noEmit: true
+// @noTypesAndSymbols: true
+
+// https://github.com/microsoft/TypeScript/issues/57130
+const iter = {
+    *[Symbol.iterator](_: number) {
+        yield 0;
+    }
+};
+
+declare function g(...args: any): any;
+
+function* f() {
+    for (const _ of iter);
+
+    yield* iter;
+
+    [...iter]
+
+    g(...iter);
+}
diff --git a/tests/cases/compiler/jsxFragReactReferenceErrors.tsx b/tests/cases/compiler/jsxFragReactReferenceErrors.tsx
new file mode 100644
index 0000000000000..92f4725d51bc3
--- /dev/null
+++ b/tests/cases/compiler/jsxFragReactReferenceErrors.tsx
@@ -0,0 +1,14 @@
+// @jsx: react-native, preserve
+// @strict: true
+// @skipLibCheck: true
+// @target: ES2017
+// @module: ESNext
+// @esModuleInterop: true
+
+/// <reference path="/.lib/react18/react18.d.ts" />
+/// <reference path="/.lib/react18/global.d.ts" />
+export function Component(){
+
+return <>
+  </>
+}
\ No newline at end of file
diff --git a/tests/cases/compiler/predicateSemantics.ts b/tests/cases/compiler/predicateSemantics.ts
index d6e12b297b25b..a22b34341e7d5 100644
--- a/tests/cases/compiler/predicateSemantics.ts
+++ b/tests/cases/compiler/predicateSemantics.ts
@@ -41,4 +41,31 @@ console.log((cond || undefined) && 1 / cond);
 function foo(this: Object | undefined) {
     // Should be OK
     return this ?? 0;
-}
\ No newline at end of file
+}
+
+// https://github.com/microsoft/TypeScript/issues/60401
+{
+  const maybe = null as true | null;
+  let i = 0;
+  const d = (i++, maybe) ?? true; // ok
+  const e = (i++, i++) ?? true; // error
+  const f = (maybe, i++) ?? true; // error
+}
+
+// https://github.com/microsoft/TypeScript/issues/60439
+class X {
+  constructor() {
+    const p = new.target ?? 32;
+  }
+}
+
+// https://github.com/microsoft/TypeScript/issues/60614
+declare function tag<T>(
+  strings: TemplateStringsArray,
+  ...values: number[]
+): T | null;
+
+tag`foo${1}` ?? 32; // ok
+
+`foo${1}` ?? 32; // error
+`foo` ?? 32; // error
diff --git a/tests/cases/compiler/promiseTry.ts b/tests/cases/compiler/promiseTry.ts
new file mode 100644
index 0000000000000..9fd69f28f22f6
--- /dev/null
+++ b/tests/cases/compiler/promiseTry.ts
@@ -0,0 +1,33 @@
+// @target: esnext
+
+Promise.try(() => {
+    return "Sync result";
+});
+
+Promise.try(async () => {
+    return "Async result";
+});
+
+const a = Promise.try(() => "Sync result");
+const b = Promise.try(async () => "Async result");
+
+// SINGLE PARAMETER
+Promise.try((foo: string) => "Async result", "foo");
+Promise.try((foo) => "Async result", "foo");
+// @ts-expect-error too few parameters
+Promise.try((foo) => "Async result");
+Promise.try((foo: string | undefined) => "Async result", undefined);
+Promise.try((foo: string | undefined) => "Async result", "foo");
+Promise.try((foo) => "Async result", undefined);
+// @ts-expect-error too many parameters
+Promise.try(() => "Async result", "foo");
+
+// MULTIPLE PARAMETERS
+Promise.try((foo: string, bar: number) => "Async result", "foo", 42);
+// @ts-expect-error too many parameters
+Promise.try((foo: string, bar: number) => "Async result", "foo", 42, "baz");
+// @ts-expect-error too few parameters
+Promise.try((foo: string, bar: number) => "Async result", "foo");
+Promise.try((foo: string, bar?: number) => "Async result", "foo");
+Promise.try((foo: string, bar?: number) => "Async result", "foo", undefined);
+Promise.try((foo: string, bar?: number) => "Async result", "foo", 42);
diff --git a/tests/cases/compiler/readonlyMembers.ts b/tests/cases/compiler/readonlyMembers.ts
index f24b365772755..b625da3b12d09 100644
--- a/tests/cases/compiler/readonlyMembers.ts
+++ b/tests/cases/compiler/readonlyMembers.ts
@@ -20,7 +20,12 @@ class C {
             this.a = 1;  // Error
             this.b = 1;  // Error
             this.c = 1;  // Error
-        }
+        };
+        (() => {
+            this.a = 1;  // Ok
+            this.b = 1;  // Ok
+            this.c = 1;  // Error
+        })();
     }
     foo() {
         this.a = 1;  // Error
diff --git a/tests/cases/compiler/returnConditionalExpressionJSDocCast.ts b/tests/cases/compiler/returnConditionalExpressionJSDocCast.ts
new file mode 100644
index 0000000000000..6141d73b86e54
--- /dev/null
+++ b/tests/cases/compiler/returnConditionalExpressionJSDocCast.ts
@@ -0,0 +1,22 @@
+// @strict: true
+// @noEmit: true
+// @target: esnext
+// @checkJs: true
+// @filename: file.js
+
+
+// Don't peek into conditional return expression if it's wrapped in a cast
+/** @type {Map<string, string>} */
+const sources = new Map();
+/**
+
+ * @param {string=} type the type of source that should be generated
+ * @returns {String}
+ */
+function source(type = "javascript") {
+    return /** @type {String} */ (
+        type
+            ? sources.get(type)
+            : sources.get("some other thing")
+    );
+}
\ No newline at end of file
diff --git a/tests/cases/compiler/signatureOverloadsWithComments.ts b/tests/cases/compiler/signatureOverloadsWithComments.ts
new file mode 100644
index 0000000000000..61101f1b046d7
--- /dev/null
+++ b/tests/cases/compiler/signatureOverloadsWithComments.ts
@@ -0,0 +1,23 @@
+// @declaration: true
+// @emitDeclarationOnly: true
+
+/**
+ * Docs
+ */
+function Foo() {
+    return class Bar {
+        /**
+         * comment 1
+         */
+        foo(bar: string): void;
+        /**
+         * @deprecated This signature is deprecated
+         *
+         * comment 2
+         */
+        foo(): string;
+        foo(bar?: string): string | void {
+            return 'hi'
+        }
+    }
+}
diff --git a/tests/cases/compiler/spreadParameterTupleType.ts b/tests/cases/compiler/spreadParameterTupleType.ts
index f626df3e7e174..e371647c6b31d 100644
--- a/tests/cases/compiler/spreadParameterTupleType.ts
+++ b/tests/cases/compiler/spreadParameterTupleType.ts
@@ -4,7 +4,7 @@ function f1() {
     type A = [s: string];
     type C = [...A, ...A];
 
-    return function fn(...args: C) { }
+    return function fn(...args: C) { } satisfies any
 }
 
 function f2() {
@@ -13,5 +13,5 @@ function f2() {
     type C = [c: string];
     type D = [...A, ...A, ...B, ...A, ...B, ...B, ...A, ...C];
 
-    return function fn(...args: D) { }
+    return function fn(...args: D) { } satisfies any;
 }
diff --git a/tests/cases/compiler/typeInterfaceDeclarationsInBlockStatements1.ts b/tests/cases/compiler/typeInterfaceDeclarationsInBlockStatements1.ts
new file mode 100644
index 0000000000000..27d698a4835b7
--- /dev/null
+++ b/tests/cases/compiler/typeInterfaceDeclarationsInBlockStatements1.ts
@@ -0,0 +1,33 @@
+// @strict: true
+// @declaration: true
+
+// https://github.com/microsoft/TypeScript/issues/60175
+
+function f1() {
+  if (true) type s = string;
+  console.log("" as s);
+}
+
+function f2() {
+  if (true) {
+    type s = string;
+  }
+  console.log("" as s);
+}
+
+function f3() {
+  if (true)
+    interface s {
+      length: number;
+    }
+  console.log("" as s);
+}
+
+function f4() {
+  if (true) {
+    interface s {
+      length: number;
+    }
+  }
+  console.log("" as s);
+}
diff --git a/tests/cases/compiler/typedArrayConstructorOverloads.ts b/tests/cases/compiler/typedArrayConstructorOverloads.ts
new file mode 100644
index 0000000000000..0a656f7eaeb2f
--- /dev/null
+++ b/tests/cases/compiler/typedArrayConstructorOverloads.ts
@@ -0,0 +1,13 @@
+// @target: esnext
+// @noEmit: true
+// @noTypesAndSymbols: true
+
+// https://github.com/microsoft/TypeScript/issues/60367
+
+type TypedArrayConstructor =
+    | Float64ArrayConstructor
+    | BigInt64ArrayConstructor
+
+export function makeTypedArray(buffer: ArrayBuffer, ctr: TypedArrayConstructor) {
+  return new ctr(buffer);
+}
diff --git a/tests/cases/compiler/unusedLocalsInRecursiveReturn.ts b/tests/cases/compiler/unusedLocalsInRecursiveReturn.ts
new file mode 100644
index 0000000000000..5ad1bac3cb013
--- /dev/null
+++ b/tests/cases/compiler/unusedLocalsInRecursiveReturn.ts
@@ -0,0 +1,9 @@
+// @strict: true
+// @noEmit: true
+// @noUnusedLocals: true
+
+// Test that we unconditionally check return expression, even if we don't need its type.
+function recursive(arg: string, other: string) {
+    const someLocalVar = arg + other;
+    return recursive(someLocalVar, arg);
+}
\ No newline at end of file
diff --git a/tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts b/tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts
index aaffa1a9dbf88..92b6641cd60db 100644
--- a/tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts
+++ b/tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts
@@ -11,4 +11,12 @@ class C6 extends undefined { }
 class C7 extends Undefined { }
 
 enum E { A }
-class C8 extends E { }
\ No newline at end of file
+class C8 extends E { }
+
+const C9 = class extends number { }
+const C10 = class extends string { }
+const C11 = class extends boolean { }
+
+const C12 = class A extends number { }
+const C13 = class B extends string { }
+const C14 = class C extends boolean { }
diff --git a/tests/cases/conformance/classes/mixinWithBaseDependingOnSelfNoCrash1.ts b/tests/cases/conformance/classes/mixinWithBaseDependingOnSelfNoCrash1.ts
new file mode 100644
index 0000000000000..d8ccc12c4630c
--- /dev/null
+++ b/tests/cases/conformance/classes/mixinWithBaseDependingOnSelfNoCrash1.ts
@@ -0,0 +1,16 @@
+// @strict: true
+// @noEmit: true
+
+// https://github.com/microsoft/TypeScript/issues/60202
+
+declare class Document<Parent> {}
+
+declare class BaseItem extends Document<typeof Item> {}
+
+declare function ClientDocumentMixin<
+  BaseClass extends new (...args: any[]) => any,
+>(Base: BaseClass): any;
+
+declare class Item extends ClientDocumentMixin(BaseItem) {}
+
+export {};
diff --git a/tests/cases/conformance/expressions/typeSatisfaction/typeSatisfaction_errorLocations1.ts b/tests/cases/conformance/expressions/typeSatisfaction/typeSatisfaction_errorLocations1.ts
index 11276d5ca26c9..966e710394cfb 100644
--- a/tests/cases/conformance/expressions/typeSatisfaction/typeSatisfaction_errorLocations1.ts
+++ b/tests/cases/conformance/expressions/typeSatisfaction/typeSatisfaction_errorLocations1.ts
@@ -49,3 +49,6 @@ function fn6(): number {
 ((): { a: true } => ({}) satisfies unknown)();
 ((): { a: true } => ({ a: 1 }) satisfies unknown)();
 ((): { a: true } => obj1 satisfies unknown)();
+
+((): { a: true } => (({}) satisfies unknown) satisfies unknown)();
+((): { a: true } => ((({}) satisfies unknown)) satisfies unknown)();
diff --git a/tests/cases/conformance/externalModules/rewriteRelativeImportExtensions/nonTSExtensions.ts b/tests/cases/conformance/externalModules/rewriteRelativeImportExtensions/nonTSExtensions.ts
new file mode 100644
index 0000000000000..e7d6f2107d8d9
--- /dev/null
+++ b/tests/cases/conformance/externalModules/rewriteRelativeImportExtensions/nonTSExtensions.ts
@@ -0,0 +1,15 @@
+// @module: nodenext
+// @rewriteRelativeImportExtensions: true
+// @allowArbitraryExtensions: true
+// @resolveJsonModule: true
+// @noTypesAndSymbols: true
+
+// @Filename: example.json
+{}
+
+// @Filename: styles.d.css.ts
+export {};
+
+// @Filename: index.mts
+import {} from "./example.json" with { type: "json" }; // Ok
+import {} from "./styles.css"; // Ok
\ No newline at end of file
diff --git a/tests/cases/conformance/generators/yieldStatementNoAsiAfterTransform.ts b/tests/cases/conformance/generators/yieldStatementNoAsiAfterTransform.ts
new file mode 100644
index 0000000000000..818159c7197e6
--- /dev/null
+++ b/tests/cases/conformance/generators/yieldStatementNoAsiAfterTransform.ts
@@ -0,0 +1,65 @@
+// @target: es5,esnext
+// @lib: esnext
+// @noTypesAndSymbols: true
+declare var a: any;
+
+function *t1() {
+    yield (
+        // comment
+        a as any
+    );
+}
+function *t2() {
+    yield (
+        // comment
+        a as any
+    ) + 1;
+}
+function *t3() {
+    yield (
+        // comment
+        a as any
+    ) ? 0 : 1;
+}
+function *t4() {
+    yield (
+        // comment
+        a as any
+    ).b;
+}
+function *t5() {
+    yield (
+        // comment
+        a as any
+    )[a];
+}
+function *t6() {
+    yield (
+        // comment
+        a as any
+    )();
+}
+function *t7() {
+    yield (
+        // comment
+        a as any
+    )``;
+}
+function *t8() {
+    yield (
+        // comment
+        a as any
+    ) as any;
+}
+function *t9() {
+    yield (
+        // comment
+        a as any
+    ) satisfies any;
+}
+function *t10() {
+    yield (
+        // comment
+        a as any
+    )!;
+}
diff --git a/tests/cases/conformance/statements/returnStatements/returnStatementNoAsiAfterTransform.ts b/tests/cases/conformance/statements/returnStatements/returnStatementNoAsiAfterTransform.ts
new file mode 100644
index 0000000000000..ba76ca6f50156
--- /dev/null
+++ b/tests/cases/conformance/statements/returnStatements/returnStatementNoAsiAfterTransform.ts
@@ -0,0 +1,64 @@
+// @target: es5,esnext
+// @noTypesAndSymbols: true
+declare var a: any;
+
+function t1() {
+    return (
+        // comment
+        a as any
+    );
+}
+function t2() {
+    return (
+        // comment
+        a as any
+    ) + 1;
+}
+function t3() {
+    return (
+        // comment
+        a as any
+    ) ? 0 : 1;
+}
+function t4() {
+    return (
+        // comment
+        a as any
+    ).b;
+}
+function t5() {
+    return (
+        // comment
+        a as any
+    )[a];
+}
+function t6() {
+    return (
+        // comment
+        a as any
+    )();
+}
+function t7() {
+    return (
+        // comment
+        a as any
+    )``;
+}
+function t8() {
+    return (
+        // comment
+        a as any
+    ) as any;
+}
+function t9() {
+    return (
+        // comment
+        a as any
+    ) satisfies any;
+}
+function t10() {
+    return (
+        // comment
+        a as any
+    )!;
+}
diff --git a/tests/cases/conformance/types/conditional/inferTypesWithExtendsDependingOnTypeVariables.ts b/tests/cases/conformance/types/conditional/inferTypesWithExtendsDependingOnTypeVariables.ts
new file mode 100644
index 0000000000000..9deb9e41f1cc3
--- /dev/null
+++ b/tests/cases/conformance/types/conditional/inferTypesWithExtendsDependingOnTypeVariables.ts
@@ -0,0 +1,7 @@
+// @strict: true
+// @noEmit: true
+
+// repro from https://github.com/microsoft/TypeScript/issues/54197
+
+type Bar<K, T extends readonly unknown[]> = T extends readonly [any, ...infer X extends readonly K[]] ? X : never;
+type Res1 = Bar<"a" | "b", ["a", "b", "b"]>
diff --git a/tests/cases/fourslash/autoImportCompletionAmbientMergedModule1.ts b/tests/cases/fourslash/autoImportCompletionAmbientMergedModule1.ts
new file mode 100644
index 0000000000000..48257107b51d5
--- /dev/null
+++ b/tests/cases/fourslash/autoImportCompletionAmbientMergedModule1.ts
@@ -0,0 +1,67 @@
+/// <reference path="fourslash.ts" />
+
+// @strict: true
+// @module: commonjs
+
+// @filename: /node_modules/@types/vscode/index.d.ts
+//// declare module "vscode" {
+////   export class Position {
+////     readonly line: number;
+////     readonly character: number;
+////   }
+//// }
+
+// @filename: src/motion.ts
+//// import { Position } from "vscode";
+////
+//// export abstract class MoveQuoteMatch {
+////   public override async execActionWithCount(
+////     position: Position,
+////   ): Promise<void> {}
+//// }
+////
+//// declare module "vscode" {
+////   interface Position {
+////     toString(): string;
+////   }
+//// }
+
+// @filename: src/smartQuotes.ts
+//// import { MoveQuoteMatch } from "./motion";
+////
+//// export class MoveInsideNextQuote extends MoveQuoteMatch {/*1*/
+////   keys = ["i", "n", "q"];
+//// }
+
+const preferences = {
+  includeCompletionsWithInsertText: true,
+  includeCompletionsWithClassMemberSnippets: true,
+};
+
+verify.completions({
+  marker: "1",
+  includes: [
+    {
+      name: "execActionWithCount",
+      insertText: "public execActionWithCount(position: Position): Promise<void> {\n}",
+      filterText: "execActionWithCount",
+      hasAction: true,
+      source: "ClassMemberSnippet/",
+    },
+  ],
+  preferences,
+  isNewIdentifierLocation: true,
+});
+
+verify.applyCodeActionFromCompletion("1", {
+  name: "execActionWithCount",
+  source: "ClassMemberSnippet/",
+  description: `Includes imports of types referenced by 'execActionWithCount'`,
+  newFileContent: `import { Position } from "vscode";
+import { MoveQuoteMatch } from "./motion";
+
+export class MoveInsideNextQuote extends MoveQuoteMatch {
+  keys = ["i", "n", "q"];
+}`,
+  preferences,
+});
diff --git a/tests/cases/fourslash/autoImportPathsNodeModules.ts b/tests/cases/fourslash/autoImportPathsNodeModules.ts
new file mode 100644
index 0000000000000..18df371fb1d05
--- /dev/null
+++ b/tests/cases/fourslash/autoImportPathsNodeModules.ts
@@ -0,0 +1,26 @@
+/// <reference path="fourslash.ts" />
+
+// @Filename: tsconfig.json
+//// {
+////     "compilerOptions": {
+////         "module": "amd",
+////         "moduleResolution": "node",
+////         "rootDir": "ts",
+////         "baseUrl": ".",
+////         "paths": {
+////             "*": ["node_modules/@woltlab/wcf/ts/*"]
+////         }
+////     },
+////     "include": [
+////         "ts",
+////         "node_modules/@woltlab/wcf/ts",
+////      ]
+//// }
+
+// @Filename: node_modules/@woltlab/wcf/ts/WoltLabSuite/Core/Component/Dialog.ts
+//// export class Dialog {}
+
+// @Filename: ts/main.ts
+//// Dialog/**/
+
+verify.importFixModuleSpecifiers("", ["WoltLabSuite/Core/Component/Dialog"]);
diff --git a/tests/cases/fourslash/codeFixAddMissingProperties30.ts b/tests/cases/fourslash/codeFixAddMissingProperties30.ts
index 3475c38db7642..720038818209b 100644
--- a/tests/cases/fourslash/codeFixAddMissingProperties30.ts
+++ b/tests/cases/fourslash/codeFixAddMissingProperties30.ts
@@ -9,7 +9,6 @@
 ////}
 ////[|f([{}])|]
 
-debugger;
 verify.codeFix({
     index: 0,
     description: ts.Diagnostics.Add_missing_properties.message,
diff --git a/tests/cases/fourslash/codeFixAddMissingProperties31.ts b/tests/cases/fourslash/codeFixAddMissingProperties31.ts
index c05e87d68d468..efc15962fb828 100644
--- a/tests/cases/fourslash/codeFixAddMissingProperties31.ts
+++ b/tests/cases/fourslash/codeFixAddMissingProperties31.ts
@@ -9,7 +9,6 @@
 ////}
 ////[|const b: B[] = [{c: [{}]}]|]
 
-debugger;
 verify.codeFix({
     index: 0,
     description: ts.Diagnostics.Add_missing_properties.message,
diff --git a/tests/cases/fourslash/codeFixAddMissingProperties33.ts b/tests/cases/fourslash/codeFixAddMissingProperties33.ts
new file mode 100644
index 0000000000000..c034471a4205a
--- /dev/null
+++ b/tests/cases/fourslash/codeFixAddMissingProperties33.ts
@@ -0,0 +1,39 @@
+/// <reference path="fourslash.ts" />
+
+////interface Foo {
+////    a: number;
+////    b: string;
+////    c: 1;
+////    d: "d";
+////    e: "e1" | "e2";
+////    f(x: number, y: number): void;
+////    g: (x: number, y: number) => void;
+////    h: number[];
+////    i: bigint;
+////    j: undefined | "special-string";
+////    k: `--${string}`;
+////}
+////[|const b = {} satisfies Foo;|]
+
+verify.codeFix({
+    index: 0,
+    description: ts.Diagnostics.Add_missing_properties.message,
+    newRangeContent:
+`const b = {
+    a: 0,
+    b: "",
+    c: 1,
+    d: "d",
+    e: "e1",
+    f: function(x: number, y: number): void {
+        throw new Error("Function not implemented.");
+    },
+    g: function(x: number, y: number): void {
+        throw new Error("Function not implemented.");
+    },
+    h: [],
+    i: 0n,
+    j: "special-string",
+    k: ""
+} satisfies Foo;`,
+});
diff --git a/tests/cases/fourslash/codeFixAddMissingProperties34.ts b/tests/cases/fourslash/codeFixAddMissingProperties34.ts
new file mode 100644
index 0000000000000..a74658c2ed5c1
--- /dev/null
+++ b/tests/cases/fourslash/codeFixAddMissingProperties34.ts
@@ -0,0 +1,23 @@
+/// <reference path='fourslash.ts' />
+
+////interface Foo {
+////    a: number;
+////    b: string;
+////    c: any;
+////}
+////[|class C {
+////    public c = {} satisfies Foo;
+////}|]
+
+verify.codeFix({
+    index: 0,
+    description: ts.Diagnostics.Add_missing_properties.message,
+    newRangeContent:
+`class C {
+    public c = {
+        a: 0,
+        b: "",
+        c: undefined
+    } satisfies Foo;
+}`
+});
diff --git a/tests/cases/fourslash/codeFixAddMissingProperties35.ts b/tests/cases/fourslash/codeFixAddMissingProperties35.ts
new file mode 100644
index 0000000000000..f9b120cba71c2
--- /dev/null
+++ b/tests/cases/fourslash/codeFixAddMissingProperties35.ts
@@ -0,0 +1,17 @@
+/// <reference path='fourslash.ts' />
+
+////interface Foo {
+////    a: number;
+////    b: string;
+////}
+////[|const foo = { a: 10 } satisfies Foo;|]
+
+verify.codeFix({
+    index: 0,
+    description: ts.Diagnostics.Add_missing_properties.message,
+    newRangeContent:
+`const foo = {
+    a: 10,
+    b: ""
+} satisfies Foo;`
+});
diff --git a/tests/cases/fourslash/codeFixAddMissingProperties36.ts b/tests/cases/fourslash/codeFixAddMissingProperties36.ts
new file mode 100644
index 0000000000000..629943c1cf3a8
--- /dev/null
+++ b/tests/cases/fourslash/codeFixAddMissingProperties36.ts
@@ -0,0 +1,16 @@
+/// <reference path='fourslash.ts' />
+
+////type T = {
+////    a: null;
+////}
+////
+////[|const foo = {} satisfies T;|]
+
+verify.codeFix({
+    index: 0,
+    description: ts.Diagnostics.Add_missing_properties.message,
+    newRangeContent:
+`const foo = {
+    a: null
+} satisfies T;`
+});
diff --git a/tests/cases/fourslash/codeFixAddMissingProperties37.ts b/tests/cases/fourslash/codeFixAddMissingProperties37.ts
new file mode 100644
index 0000000000000..cdc0b7e82f775
--- /dev/null
+++ b/tests/cases/fourslash/codeFixAddMissingProperties37.ts
@@ -0,0 +1,23 @@
+/// <reference path='fourslash.ts' />
+
+////interface I {
+////    x: number;
+////    y: number;
+////}
+////class C {
+////    public p: number;
+////    m(x: number, y: I) {}
+////}
+////[|const foo = {} satisfies C;|]
+
+verify.codeFix({
+    index: 0,
+    description: ts.Diagnostics.Add_missing_properties.message,
+    newRangeContent:
+`const foo = {
+    p: 0,
+    m: function(x: number, y: I): void {
+        throw new Error("Function not implemented.");
+    }
+} satisfies C;`
+});
diff --git a/tests/cases/fourslash/codeFixAddMissingProperties38.ts b/tests/cases/fourslash/codeFixAddMissingProperties38.ts
new file mode 100644
index 0000000000000..0932e6581f0c9
--- /dev/null
+++ b/tests/cases/fourslash/codeFixAddMissingProperties38.ts
@@ -0,0 +1,27 @@
+/// <reference path='fourslash.ts' />
+
+////enum E1 {
+////    A, B
+////}
+////enum E2 {
+////    A
+////}
+////enum E3 {
+////}
+////interface I {
+////    x: E1;
+////    y: E2;
+////    z: E3;
+////}
+////[|const foo = {} satisfies I;|]
+
+verify.codeFix({
+    index: 0,
+    description: ts.Diagnostics.Add_missing_properties.message,
+    newRangeContent:
+`const foo = {
+    x: E1.A,
+    y: E2.A,
+    z: 0
+} satisfies I;`
+});
diff --git a/tests/cases/fourslash/codeFixAddMissingProperties39.ts b/tests/cases/fourslash/codeFixAddMissingProperties39.ts
new file mode 100644
index 0000000000000..d7f99cbfcb8c7
--- /dev/null
+++ b/tests/cases/fourslash/codeFixAddMissingProperties39.ts
@@ -0,0 +1,29 @@
+/// <reference path='fourslash.ts' />
+
+////class A {
+////    constructor() {}
+////}
+////
+////abstract class B {}
+////
+////class C {
+////   constructor(a: string, b: number, c: A) {}
+////}
+////
+////interface I {
+////    a: A;
+////    b: B;
+////    c: C;
+////}
+////[|const foo = {} satisfies I;|]
+
+verify.codeFix({
+    index: 0,
+    description: ts.Diagnostics.Add_missing_properties.message,
+    newRangeContent:
+`const foo = {
+    a: new A,
+    b: undefined,
+    c: undefined
+} satisfies I;`
+});
diff --git a/tests/cases/fourslash/codeFixAddMissingProperties40.ts b/tests/cases/fourslash/codeFixAddMissingProperties40.ts
new file mode 100644
index 0000000000000..ca640fe0ec8f5
--- /dev/null
+++ b/tests/cases/fourslash/codeFixAddMissingProperties40.ts
@@ -0,0 +1,23 @@
+/// <reference path='fourslash.ts' />
+
+////interface I {
+////    a: {
+////        x: number;
+////        y: { z: string; };
+////    }
+////}
+////[|const foo = {} satisfies I;|]
+
+verify.codeFix({
+    index: 0,
+    description: ts.Diagnostics.Add_missing_properties.message,
+    newRangeContent:
+`const foo = {
+    a: {
+        x: 0,
+        y: {
+            z: ""
+        }
+    }
+} satisfies I;`
+});
diff --git a/tests/cases/fourslash/codeFixAddMissingProperties41.ts b/tests/cases/fourslash/codeFixAddMissingProperties41.ts
new file mode 100644
index 0000000000000..42330c13daa7d
--- /dev/null
+++ b/tests/cases/fourslash/codeFixAddMissingProperties41.ts
@@ -0,0 +1,21 @@
+/// <reference path='fourslash.ts' />
+
+////interface Bar {
+////    a: number;
+////}
+////
+////interface Foo<T, U> {
+////    foo(a: T): U;
+////}
+////[|const x = {} satisfies Foo<string, Bar>;|]
+
+verify.codeFix({
+  index: 0,
+  description: ts.Diagnostics.Add_missing_properties.message,
+  newRangeContent:
+`const x = {
+    foo: function(a: string): Bar {
+        throw new Error("Function not implemented.");
+    }
+} satisfies Foo<string, Bar>;`,
+});
diff --git a/tests/cases/fourslash/codeFixAddMissingProperties42.ts b/tests/cases/fourslash/codeFixAddMissingProperties42.ts
new file mode 100644
index 0000000000000..184a36914c041
--- /dev/null
+++ b/tests/cases/fourslash/codeFixAddMissingProperties42.ts
@@ -0,0 +1,15 @@
+/// <reference path='fourslash.ts' />
+
+////type A = { a: string };
+////type B = { b: string };
+////
+////[|const c = { } satisfies A satisfies B;|]
+
+verify.codeFix({
+  index: 0,
+  description: ts.Diagnostics.Add_missing_properties.message,
+  newRangeContent:
+`const c = {
+    a: ""
+} satisfies A satisfies B;`,
+});
diff --git a/tests/cases/fourslash/codeFixAddMissingProperties43.ts b/tests/cases/fourslash/codeFixAddMissingProperties43.ts
new file mode 100644
index 0000000000000..bf50ec73974c9
--- /dev/null
+++ b/tests/cases/fourslash/codeFixAddMissingProperties43.ts
@@ -0,0 +1,41 @@
+/// <reference path='fourslash.ts' />
+
+////interface Foo {
+////    a: number;
+////    b: string;
+////    c: 1;
+////    d: "d";
+////    e: "e1" | "e2";
+////    f(x: number, y: number): void;
+////    g: (x: number, y: number) => void;
+////    h: number[];
+////    i: bigint;
+////    j: undefined | "special-string";
+////    k: `--${string}`;
+////}
+////const f = (): Foo => {
+////    [|return { };|]
+////};
+
+verify.codeFix({
+  index: 0,
+  description: ts.Diagnostics.Add_missing_properties.message,
+  newRangeContent:
+`return {
+    a: 0,
+    b: "",
+    c: 1,
+    d: "d",
+    e: "e1",
+    f: function(x: number, y: number): void {
+        throw new Error("Function not implemented.");
+    },
+    g: function(x: number, y: number): void {
+        throw new Error("Function not implemented.");
+    },
+    h: [],
+    i: 0n,
+    j: "special-string",
+    k: ""
+};`,
+});
diff --git a/tests/cases/fourslash/codeFixAddMissingProperties44.ts b/tests/cases/fourslash/codeFixAddMissingProperties44.ts
new file mode 100644
index 0000000000000..5cb87bd2a53d9
--- /dev/null
+++ b/tests/cases/fourslash/codeFixAddMissingProperties44.ts
@@ -0,0 +1,43 @@
+/// <reference path='fourslash.ts' />
+// @lib: es2020
+// @target: es2020
+
+////interface Foo {
+////    a: number;
+////    b: string;
+////    c: 1;
+////    d: "d";
+////    e: "e1" | "e2";
+////    f(x: number, y: number): void;
+////    g: (x: number, y: number) => void;
+////    h: number[];
+////    i: bigint;
+////    j: undefined | "special-string";
+////    k: `--${string}`;
+////}
+////const f = function* (): Generator<Foo, void, any> {
+////    [|yield {};|]
+////};
+
+verify.codeFix({
+  index: 0,
+  description: ts.Diagnostics.Add_missing_properties.message,
+  newRangeContent:
+`yield {
+    a: 0,
+    b: "",
+    c: 1,
+    d: "d",
+    e: "e1",
+    f: function(x: number, y: number): void {
+        throw new Error("Function not implemented.");
+    },
+    g: function(x: number, y: number): void {
+        throw new Error("Function not implemented.");
+    },
+    h: [],
+    i: 0n,
+    j: "special-string",
+    k: ""
+};`,
+});
diff --git a/tests/cases/fourslash/codeFixAddMissingProperties45.ts b/tests/cases/fourslash/codeFixAddMissingProperties45.ts
new file mode 100644
index 0000000000000..4a2f30f73ad36
--- /dev/null
+++ b/tests/cases/fourslash/codeFixAddMissingProperties45.ts
@@ -0,0 +1,15 @@
+/// <reference path='fourslash.ts' />
+
+// @strict: true
+
+//// type U = { u?: { v: string } };
+//// const u: U = { [|u: {}|] };
+
+verify.codeFix({
+  index: 0,
+  description: ts.Diagnostics.Add_missing_properties.message,
+  newRangeContent:
+`u: {
+    v: ""
+}`,
+});
diff --git a/tests/cases/fourslash/codeFixAddMissingProperties46.ts b/tests/cases/fourslash/codeFixAddMissingProperties46.ts
new file mode 100644
index 0000000000000..3d0e64257fe1f
--- /dev/null
+++ b/tests/cases/fourslash/codeFixAddMissingProperties46.ts
@@ -0,0 +1,16 @@
+/// <reference path='fourslash.ts' />
+
+// @strict: true
+
+//// type T = { t: string };
+//// declare function f(arg?: T): void;
+//// f([|{}|]);
+
+verify.codeFix({
+  index: 0,
+  description: ts.Diagnostics.Add_missing_properties.message,
+  newRangeContent:
+`{
+    t: ""
+}`,
+});
diff --git a/tests/cases/fourslash/codeFixAddMissingProperties47.ts b/tests/cases/fourslash/codeFixAddMissingProperties47.ts
new file mode 100644
index 0000000000000..8d26466aaf671
--- /dev/null
+++ b/tests/cases/fourslash/codeFixAddMissingProperties47.ts
@@ -0,0 +1,22 @@
+/// <reference path='fourslash.ts' />
+
+// @strict: true
+
+//// interface A {
+////   a: number;
+////   b: string;
+//// }
+//// function f(_obj: (A | undefined)[]): string {
+////   return "";
+//// }
+//// [|f([{}]);|]
+
+verify.codeFix({
+  index: 0,
+  description: ts.Diagnostics.Add_missing_properties.message,
+  newRangeContent:
+`f([{
+    a: 0,
+    b: ""
+}]);`,
+});
diff --git a/tests/cases/fourslash/codeFixAddMissingProperties48.ts b/tests/cases/fourslash/codeFixAddMissingProperties48.ts
new file mode 100644
index 0000000000000..69993cd821b0a
--- /dev/null
+++ b/tests/cases/fourslash/codeFixAddMissingProperties48.ts
@@ -0,0 +1,22 @@
+/// <reference path='fourslash.ts' />
+
+// @strict: true
+
+//// interface A {
+////   a: number;
+////   b: string;
+//// }
+//// interface B {
+////   c: (A | undefined)[];
+//// }
+//// [|const b: B[] = [{ c: [{}] }];|]
+
+verify.codeFix({
+  index: 0,
+  description: ts.Diagnostics.Add_missing_properties.message,
+  newRangeContent:
+`const b: B[] = [{ c: [{
+    a: 0,
+    b: ""
+}] }];`,
+});
diff --git a/tests/cases/fourslash/codeFixAddMissingProperties_all.ts b/tests/cases/fourslash/codeFixAddMissingProperties_all.ts
index 78c7e6d165674..aacfe48ddd450 100644
--- a/tests/cases/fourslash/codeFixAddMissingProperties_all.ts
+++ b/tests/cases/fourslash/codeFixAddMissingProperties_all.ts
@@ -15,12 +15,17 @@
 ////}
 ////const a: I1 = {};
 ////const b: I2 = {};
-////class C {
+////class C1 {
 ////     public c: I1 = {};
 ////}
 ////function fn1(foo: I2 = {}) {}
 ////function fn2(a: I1) {}
 ////fn2({});
+////const d = {} satisfies I1;
+////const e = {} satisfies I2;
+////class C2 {
+////     public f = {} satisfies I1;
+////}
 
 verify.codeFixAll({
     fixId: "fixMissingProperties",
@@ -56,7 +61,7 @@ const b: I2 = {
     a: undefined,
     b: undefined
 };
-class C {
+class C1 {
      public c: I1 = {
          a: 0,
          b: "",
@@ -88,5 +93,37 @@ fn2({
     g: function(x: number, y: number): void {
         throw new Error("Function not implemented.");
     }
-});`
+});
+const d = {
+    a: 0,
+    b: "",
+    c: 1,
+    d: "d",
+    e: "e1",
+    f: function(x: number, y: number): void {
+        throw new Error("Function not implemented.");
+    },
+    g: function(x: number, y: number): void {
+        throw new Error("Function not implemented.");
+    }
+} satisfies I1;
+const e = {
+    a: undefined,
+    b: undefined
+} satisfies I2;
+class C2 {
+     public f = {
+         a: 0,
+         b: "",
+         c: 1,
+         d: "d",
+         e: "e1",
+         f: function(x: number, y: number): void {
+             throw new Error("Function not implemented.");
+         },
+         g: function(x: number, y: number): void {
+             throw new Error("Function not implemented.");
+         }
+     } satisfies I1;
+}`
 });
diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceGlobal.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceGlobal.ts
new file mode 100644
index 0000000000000..4217fdb5ee48a
--- /dev/null
+++ b/tests/cases/fourslash/codeFixClassImplementInterfaceGlobal.ts
@@ -0,0 +1,31 @@
+/// <reference path='fourslash.ts' />
+
+// @Filename: /src/globals.d.ts
+//// export {}; // Make this a module
+//// declare global {
+////     interface Disposable {
+////         [Symbol.dispose](): void;
+////     }
+//// }
+
+// @Filename: /src/test.ts
+//// import { Service } from './lifecycle';
+//// export class [|EditingService|] implements Service { }
+
+// @Filename: /src/lifecycle.ts
+//// export interface Disposable {
+//// 	(): string;
+//// }
+//// export interface Service {
+//// 	d: Disposable;
+//// }
+
+goTo.file('/src/test.ts');
+verify.codeFix({
+  description: "Implement interface 'Service'",
+  newFileContent:
+`import { Disposable, Service } from './lifecycle';
+export class EditingService implements Service {
+    d: Disposable;
+}`,
+});
diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports56-toplevel-import.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports56-toplevel-import.ts
new file mode 100644
index 0000000000000..436d32e4185e4
--- /dev/null
+++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports56-toplevel-import.ts
@@ -0,0 +1,30 @@
+/// <reference path='fourslash.ts'/>
+
+// @isolatedDeclarations: true
+// @declaration: true
+
+// @Filename: /person-code.ts
+////export interface Person { x: string; }
+////export function getPerson() : Person {
+////  return null!
+////}
+
+// @Filename: /code.ts
+////import { getPerson } from "./person-code";
+////export function wrapPerson() {
+////  return { person: getPerson() }
+////};
+
+goTo.file("/code.ts");
+
+verify.codeFix({
+    description: "Add return type '{ person: Person; }'",
+    index: 0,
+    newFileContent:
+`import { getPerson, Person } from "./person-code";
+export function wrapPerson(): {
+    person: Person;
+} {
+  return { person: getPerson() }
+};`
+});
diff --git a/tests/cases/fourslash/completionsImportDefaultExportCrash.ts b/tests/cases/fourslash/completionsImportDefaultExportCrash1.ts
similarity index 89%
rename from tests/cases/fourslash/completionsImportDefaultExportCrash.ts
rename to tests/cases/fourslash/completionsImportDefaultExportCrash1.ts
index b6780b1578d1e..776a9fd8c4d4b 100644
--- a/tests/cases/fourslash/completionsImportDefaultExportCrash.ts
+++ b/tests/cases/fourslash/completionsImportDefaultExportCrash1.ts
@@ -35,8 +35,8 @@
 
 verify.completions({
   marker: "1",
-  // some kind of a check should be added here
+  includes: [{ name: "$" }],
   preferences: {
-      includeCompletionsForModuleExports: true,
+    includeCompletionsForModuleExports: true,
   }
 });
diff --git a/tests/cases/fourslash/completionsImportDefaultExportCrash2.ts b/tests/cases/fourslash/completionsImportDefaultExportCrash2.ts
new file mode 100644
index 0000000000000..2e4d28e5a6930
--- /dev/null
+++ b/tests/cases/fourslash/completionsImportDefaultExportCrash2.ts
@@ -0,0 +1,51 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+// @allowJs: true
+
+// @Filename: /node_modules/dom7/index.d.ts
+//// export interface Dom7Array {
+////   length: number;
+////   prop(propName: string): any;
+//// }
+////
+//// export interface Dom7 {
+////   (): Dom7Array;
+////   fn: any;
+//// }
+////
+//// declare const Dom7: Dom7;
+////
+//// export {
+////   Dom7 as $,
+//// };
+
+// @Filename: /dom7.js
+//// import * as methods from 'dom7';
+//// Object.keys(methods).forEach((methodName) => {
+////   if (methodName === '$') return;
+////   methods.$.fn[methodName] = methods[methodName];
+//// });
+////
+//// export default methods.$;
+
+// @Filename: /swipe-back.js
+//// /*1*/
+
+verify.completions({
+  marker: "1",
+  includes: [{
+    name: "$",
+    hasAction: true,
+    source: 'dom7',
+    sortText: completion.SortText.AutoImportSuggestions,
+  }, {
+    name: "Dom7",
+    hasAction: true,
+    source: './dom7',
+    sortText: completion.SortText.AutoImportSuggestions,
+  }],
+  preferences: {
+    includeCompletionsForModuleExports: true,
+  }
+});
diff --git a/tests/cases/fourslash/completionsImport_umdDefaultNoCrash1.ts b/tests/cases/fourslash/completionsImport_umdDefaultNoCrash1.ts
new file mode 100644
index 0000000000000..af2fe79e050f7
--- /dev/null
+++ b/tests/cases/fourslash/completionsImport_umdDefaultNoCrash1.ts
@@ -0,0 +1,49 @@
+/// <reference path="fourslash.ts" />
+
+// @moduleResolution: node
+// @allowJs: true
+// @checkJs: true
+
+// @Filename: /node_modules/dottie/package.json
+//// {
+////   "name": "dottie",
+////   "main": "dottie.js"
+//// }
+
+// @Filename: /node_modules/dottie/dottie.js
+//// (function (undefined) {
+////   var root = this;
+////
+////   var Dottie = function () {};
+////
+////   Dottie["default"] = function (object, path, value) {};
+////
+////   if (typeof module !== "undefined" && module.exports) {
+////     exports = module.exports = Dottie;
+////   } else {
+////     root["Dottie"] = Dottie;
+////     root["Dot"] = Dottie;
+////
+////     if (typeof define === "function") {
+////       define([], function () {
+////         return Dottie;
+////       });
+////     }
+////   }
+//// })();
+
+// @Filename: /src/index.js
+//// /**/
+
+verify.completions({
+  marker: "",
+  includes: [
+    {
+      name: "Dottie",
+      hasAction: true,
+      source: "/node_modules/dottie/dottie",
+      sortText: completion.SortText.AutoImportSuggestions,
+    },
+  ],
+  preferences: { includeCompletionsForModuleExports: true },
+});
diff --git a/tests/cases/fourslash/completionsImport_umdDefaultNoCrash2.ts b/tests/cases/fourslash/completionsImport_umdDefaultNoCrash2.ts
new file mode 100644
index 0000000000000..fbd4fce743ba1
--- /dev/null
+++ b/tests/cases/fourslash/completionsImport_umdDefaultNoCrash2.ts
@@ -0,0 +1,43 @@
+/// <reference path="fourslash.ts" />
+
+// @moduleResolution: node
+// @allowJs: true
+// @checkJs: true
+
+// @Filename: /node_modules/dottie/package.json
+//// {
+////   "name": "dottie",
+////   "main": "dottie.js"
+//// }
+
+// @Filename: /node_modules/dottie/dottie.js
+//// (function (undefined) {
+////   var root = this;
+////
+////   var Dottie = function () {};
+////
+////   Dottie["default"] = function (object, path, value) {};
+////
+////   if (typeof module !== "undefined" && module.exports) {
+////     exports = module.exports = Dottie;
+////   } else {
+////     root["Dottie"] = Dottie;
+////     root["Dot"] = Dottie;
+////
+////     if (typeof define === "function") {
+////       define([], function () {
+////         return Dottie;
+////       });
+////     }
+////   }
+//// })();
+
+// @Filename: /src/index.js
+//// import Dottie from 'dottie';
+//// /**/
+
+verify.completions({
+  marker: "",
+  includes: [{ name: "Dottie" }],
+  preferences: { includeCompletionsForModuleExports: true },
+});
diff --git a/tests/cases/fourslash/completionsJSDocNoCrash3.ts b/tests/cases/fourslash/completionsJSDocNoCrash3.ts
new file mode 100644
index 0000000000000..f952b30422468
--- /dev/null
+++ b/tests/cases/fourslash/completionsJSDocNoCrash3.ts
@@ -0,0 +1,25 @@
+/// <reference path='fourslash.ts' />
+
+// @strict: true
+
+// @filename: index.ts
+//// class MssqlClient {
+////   /**
+////    *
+////    * @param {Object} - args
+////    * @param {String} - args.parentTable
+////    * @returns {Promise<{upStatement/**/, downStatement}>}
+////    */
+////   async relationCreate(args) {}
+//// }
+////
+//// export default MssqlClient;
+
+verify.completions({
+  marker: "",
+  exact: [{
+    name: "readonly",
+    sortText: completion.SortText.GlobalsOrKeywords,
+  }],
+  isNewIdentifierLocation: true,
+});
diff --git a/tests/cases/fourslash/completionsPaths_pathMapping_nonTrailingWildcard1.ts b/tests/cases/fourslash/completionsPaths_pathMapping_nonTrailingWildcard1.ts
new file mode 100644
index 0000000000000..65f8c7e59b5d7
--- /dev/null
+++ b/tests/cases/fourslash/completionsPaths_pathMapping_nonTrailingWildcard1.ts
@@ -0,0 +1,58 @@
+/// <reference path="fourslash.ts" />
+
+// @Filename: /src/b.ts
+////export const x = 0;
+
+// @Filename: /src/dir/x.ts
+/////export const x = 0;
+
+// @Filename: /src/a.ts
+////import {} from "foo//*0*/";
+////import {} from "foo/dir//*1*/"; // invalid
+////import {} from "foo/_/*2*/";
+////import {} from "foo/_dir//*3*/";
+
+// @Filename: /tsconfig.json
+////{
+////    "compilerOptions": {
+////        "baseUrl": ".",
+////        "paths": {
+////            "foo/_*/suffix": ["src/*.ts"]
+////        }
+////    }
+////}
+
+verify.completions(
+    {
+        marker: "0",
+        exact: [
+            { name: "foo/_a/suffix", kind: "script" },
+            { name: "foo/_b/suffix", kind: "script" },
+            { name: "foo/_dir/suffix", kind: "directory" },
+        ],
+        isNewIdentifierLocation: true,
+    },
+    {
+        marker: "1",
+        exact: [
+            { name: "foo/_a/suffix", kind: "script" },
+            { name: "foo/_b/suffix", kind: "script" },
+            { name: "foo/_dir/suffix", kind: "directory" },
+        ],
+        isNewIdentifierLocation: true,
+    },
+    {
+        marker: "2",
+        exact: [
+            { name: "a", kind: "script" },
+            { name: "b", kind: "script" },
+            { name: "dir", kind: "directory" },
+        ],
+        isNewIdentifierLocation: true,
+    },
+    {
+        marker: "3",
+        exact: { name: "x", kind: "script" },
+        isNewIdentifierLocation: true,
+    },
+);
diff --git a/tests/cases/fourslash/formatRemoveSemicolons1.ts b/tests/cases/fourslash/formatRemoveSemicolons1.ts
index b80ecee7edb2d..39735fe0a8d93 100644
--- a/tests/cases/fourslash/formatRemoveSemicolons1.ts
+++ b/tests/cases/fourslash/formatRemoveSemicolons1.ts
@@ -51,7 +51,7 @@ class C {
     ["p"]
     zero: void
     ["one"] = {};
-    ["two"];
+    ["two"]
     ;
 }
 a;
@@ -59,7 +59,7 @@ a;
 b;
 (3)
 4;
-/ regex /;
+/ regex /
 ;
 [];
 /** blah */[0]
diff --git a/tests/cases/fourslash/formatRemoveSemicolons4.ts b/tests/cases/fourslash/formatRemoveSemicolons4.ts
new file mode 100644
index 0000000000000..299efa837a74c
--- /dev/null
+++ b/tests/cases/fourslash/formatRemoveSemicolons4.ts
@@ -0,0 +1,48 @@
+/// <reference path="fourslash.ts" />
+
+////declare const opt: number | undefined;
+////
+////const a = 1;
+////const b = 2;
+////;[1, 2, 3]
+////
+////const c = opt ? 1 : 2;
+////const d = opt ? 1 : 2;
+////;[1, 2, 3]
+////
+////const e = opt ?? 1;
+////const f = opt ?? 1;
+////;[1, 2, 3]
+////
+////type a = 1;
+////type b = 2;
+////;[1, 2, 3]
+////
+////type c = typeof opt extends 1 ? 1 : 2;
+////type d = typeof opt extends 1 ? 1 : 2;
+////;[1, 2, 3]
+
+format.setFormatOptions({ ...format.copyFormatOptions(), semicolons: ts.SemicolonPreference.Remove });
+format.document();
+verify.currentFileContentIs(
+`declare const opt: number | undefined
+
+const a = 1
+const b = 2
+;[1, 2, 3]
+
+const c = opt ? 1 : 2
+const d = opt ? 1 : 2
+;[1, 2, 3]
+
+const e = opt ?? 1
+const f = opt ?? 1
+;[1, 2, 3]
+
+type a = 1
+type b = 2
+;[1, 2, 3]
+
+type c = typeof opt extends 1 ? 1 : 2
+type d = typeof opt extends 1 ? 1 : 2
+;[1, 2, 3]`);
diff --git a/tests/cases/fourslash/fourslash.ts b/tests/cases/fourslash/fourslash.ts
index f4f4b960753f5..3b07ac5a4981b 100644
--- a/tests/cases/fourslash/fourslash.ts
+++ b/tests/cases/fourslash/fourslash.ts
@@ -361,7 +361,7 @@ declare namespace FourSlashInterface {
         baselineSyntacticAndSemanticDiagnostics(): void;
         getEmitOutput(expectedOutputFiles: ReadonlyArray<string>): void;
         baselineCompletions(preferences?: UserPreferences): void;
-        baselineQuickInfo(): void;
+        baselineQuickInfo(verbosityLevels?: VerbosityLevels): void;
         baselineSmartSelection(): void;
         baselineSignatureHelp(): void;
         nameOrDottedNameSpanTextIs(text: string): void;
@@ -472,7 +472,6 @@ declare namespace FourSlashInterface {
             }
         }): void;
         baselineMapCode(ranges: Range[][], changes: string[]): void;
-        getImports(fileName: string, imports: string[]): void;
     }
     class edit {
         caretPosition(): Marker;
@@ -702,6 +701,9 @@ declare namespace FourSlashInterface {
         readonly organizeImportsCaseFirst?: "upper" | "lower" | false;
         readonly organizeImportsTypeOrder?: "first" | "last" | "inline";
     }
+    interface VerbosityLevels {
+        [markerName: string]: number | number[] | undefined;
+    }
     interface InlayHintsOptions extends UserPreferences {
         readonly includeInlayParameterNameHints?: "none" | "literals" | "all";
         readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean;
diff --git a/tests/cases/fourslash/getImportsDuplicate.ts b/tests/cases/fourslash/getImportsDuplicate.ts
deleted file mode 100644
index 1e4e069978a75..0000000000000
--- a/tests/cases/fourslash/getImportsDuplicate.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-///<reference path="fourslash.ts"/>
-
-// @Filename: /first.ts
-//// export function foo() {
-////     return 1;
-//// }
-//// export function bar() {
-////     return 2;
-//// }
-
-// @Filename: /index.ts
-//// import { foo } from "./first";
-//// import { bar } from './first';
-//// console.log(foo() + bar())
-
-verify.getImports('/index.ts', ['/first.ts'])
diff --git a/tests/cases/fourslash/getImportsDynamic.ts b/tests/cases/fourslash/getImportsDynamic.ts
deleted file mode 100644
index 0a16718bdcb02..0000000000000
--- a/tests/cases/fourslash/getImportsDynamic.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-///<reference path="fourslash.ts"/>
-
-// @Filename: /first.ts
-//// export function foo() {
-////     return 1;
-//// }
-// @Filename: /index.ts
-//// let bar: typeof import('./first').foo = function bar() {
-////     return 2;
-//// }
-
-verify.getImports('/index.ts', ['/first.ts'])
diff --git a/tests/cases/fourslash/getImportsJSXFactory.ts b/tests/cases/fourslash/getImportsJSXFactory.ts
deleted file mode 100644
index 2ccc885443a8b..0000000000000
--- a/tests/cases/fourslash/getImportsJSXFactory.ts
+++ /dev/null
@@ -1,108 +0,0 @@
-///<reference path="fourslash.ts"/>
-
-// @strict: true
-// @jsx: react-jsx
-// @jsxImportSource: preact
-// @filename: /node_modules/preact/index.d.ts
-//// type Defaultize<Props, Defaults> =
-//// 	// Distribute over unions
-//// 	Props extends any // Make any properties included in Default optional
-//// 		? Partial<Pick<Props, Extract<keyof Props, keyof Defaults>>> &
-//// 				// Include the remaining properties from Props
-//// 				Pick<Props, Exclude<keyof Props, keyof Defaults>>
-//// 		: never;
-//// export namespace JSXInternal {
-////     interface HTMLAttributes<T = {}> { }
-////     interface SVGAttributes<T = {}> { }
-////     type LibraryManagedAttributes<Component, Props> = Component extends {
-////         defaultProps: infer Defaults;
-////     }
-////         ? Defaultize<Props, Defaults>
-////         : Props;
-//// 
-////     interface IntrinsicAttributes {
-////         key?: any;
-////     }
-//// 
-////     interface Element extends VNode<any> { }
-//// 
-////     interface ElementClass extends Component<any, any> { }
-//// 
-////     interface ElementAttributesProperty {
-////         props: any;
-////     }
-//// 
-////     interface ElementChildrenAttribute {
-////         children: any;
-////     }
-//// 
-////     interface IntrinsicElements {
-////         div: HTMLAttributes;
-////     }
-//// }
-//// export const Fragment: unique symbol;
-//// export type ComponentType<T = {}> = {};
-//// export type ComponentChild = {};
-//// export type ComponentChildren = {};
-//// export type VNode<T = {}> = {};
-//// export type Attributes = {};
-//// export type Component<T = {}, U = {}> = {};
-// @filename: /node_modules/preact/jsx-runtime/index.d.ts
-//// export { Fragment } from '..';
-//// import {
-////     ComponentType,
-////     ComponentChild,
-////     ComponentChildren,
-////     VNode,
-////     Attributes
-//// } from '..';
-//// import { JSXInternal } from '..';
-//// 
-//// export function jsx(
-////     type: string,
-////     props: JSXInternal.HTMLAttributes &
-////         JSXInternal.SVGAttributes &
-////         Record<string, any> & { children?: ComponentChild },
-////     key?: string
-//// ): VNode<any>;
-//// export function jsx<P>(
-////     type: ComponentType<P>,
-////     props: Attributes & P & { children?: ComponentChild },
-////     key?: string
-//// ): VNode<any>;
-//// 
-//// 
-//// export function jsxs(
-////     type: string,
-////     props: JSXInternal.HTMLAttributes &
-////         JSXInternal.SVGAttributes &
-////         Record<string, any> & { children?: ComponentChild[] },
-////     key?: string
-//// ): VNode<any>;
-//// export function jsxs<P>(
-////     type: ComponentType<P>,
-////     props: Attributes & P & { children?: ComponentChild[] },
-////     key?: string
-//// ): VNode<any>;
-//// 
-//// 
-//// export function jsxDEV(
-////     type: string,
-////     props: JSXInternal.HTMLAttributes &
-////         JSXInternal.SVGAttributes &
-////         Record<string, any> & { children?: ComponentChildren },
-////     key?: string
-//// ): VNode<any>;
-//// export function jsxDEV<P>(
-////     type: ComponentType<P>,
-////     props: Attributes & P & { children?: ComponentChildren },
-////     key?: string
-//// ): VNode<any>;
-//// 
-//// export import JSX = JSXInternal;
-//// 
-// @filename: /index.tsx
-//// export const Comp = () => <div></div>;
-
-verify.noErrors()
-verify.getImports('/index.tsx', [])
diff --git a/tests/cases/fourslash/getImportsNone.ts b/tests/cases/fourslash/getImportsNone.ts
deleted file mode 100644
index d408cb6f14da5..0000000000000
--- a/tests/cases/fourslash/getImportsNone.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-///<reference path="fourslash.ts"/>
-
-// @Filename: /index.ts
-//// function foo() {
-////     return 1;
-//// }
-//// function bar() {
-////     return 2;
-//// }
-////
-
-verify.getImports('/index.ts', [])
diff --git a/tests/cases/fourslash/getImportsOne.ts b/tests/cases/fourslash/getImportsOne.ts
deleted file mode 100644
index 7ebf0a51f2b7f..0000000000000
--- a/tests/cases/fourslash/getImportsOne.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-///<reference path="fourslash.ts"/>
-
-// @Filename: /first.ts
-//// export function foo() {
-////     return 1;
-//// }
-// @Filename: /index.ts
-//// import { foo } from "./first";
-//// function bar() {
-////     return 2;
-//// }
-////
-
-verify.getImports('/index.ts', ['/first.ts'])
diff --git a/tests/cases/fourslash/getImportsOneJs.ts b/tests/cases/fourslash/getImportsOneJs.ts
deleted file mode 100644
index 1d9157f73e917..0000000000000
--- a/tests/cases/fourslash/getImportsOneJs.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-///<reference path="fourslash.ts"/>
-
-// @checkJs: true
-// @Filename: /first.ts
-//// export function foo() {
-////     return 1;
-//// }
-// @Filename: /index.js
-//// const { foo } = require("./first");
-//// function bar() {
-////     return 2;
-//// }
-////
-
-verify.getImports('/index.js', ['/first.ts'])
diff --git a/tests/cases/fourslash/getImportsReexport.ts b/tests/cases/fourslash/getImportsReexport.ts
deleted file mode 100644
index d5832405ae3b6..0000000000000
--- a/tests/cases/fourslash/getImportsReexport.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-///<reference path="fourslash.ts"/>
-
-// @Filename: /first.ts
-//// export function foo() {
-////     return 1;
-//// }
-// @Filename: /index.ts
-//// export { foo } from "./first";
-//// function bar() {
-////     return 2;
-//// }
-////
-
-
-verify.getImports('/index.ts', ['/first.ts'])
diff --git a/tests/cases/fourslash/getImportsTslib.ts b/tests/cases/fourslash/getImportsTslib.ts
deleted file mode 100644
index 8f0519a3b0834..0000000000000
--- a/tests/cases/fourslash/getImportsTslib.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-///<reference path="fourslash.ts"/>
-
-// @importHelpers: true
-// @target: es2015
-// @lib: es2015
-// @module: commonjs
-// @Filename: /node_modules/tslib/index.d.ts
-//// export function __awaiter(...args: any): any;
-// @Filename: /first.ts
-//// export function foo() {
-////     return 2
-//// }
-// @Filename: /index.ts
-//// export async function importer() {
-////     const mod = await import("./first");
-//// }
-
-verify.noErrors()
-verify.getImports('/index.ts', ['/first.ts'])
diff --git a/tests/cases/fourslash/importCompletionsPackageJsonExportsSpecifierEndsInTs.ts b/tests/cases/fourslash/importCompletionsPackageJsonExportsSpecifierEndsInTs.ts
new file mode 100644
index 0000000000000..0549081b7ddeb
--- /dev/null
+++ b/tests/cases/fourslash/importCompletionsPackageJsonExportsSpecifierEndsInTs.ts
@@ -0,0 +1,31 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+
+// @Filename: /node_modules/pkg/package.json
+//// {
+////     "name": "pkg",
+////     "version": "1.0.0",
+////     "exports": {
+////       "./something.ts": "./a.js"
+////     }
+////  }
+
+// @Filename: /node_modules/pkg/a.d.ts
+//// export function foo(): void;
+
+// @Filename: /package.json
+//// {
+////     "dependencies": {
+////        "pkg": "*"
+////     }
+////  }
+
+// @Filename: /index.ts
+//// import {} from "pkg//*1*/";
+
+verify.completions({
+    marker: ["1"],
+    exact: ["something.ts"],
+    isNewIdentifierLocation: true,
+});
diff --git a/tests/cases/fourslash/importCompletionsPackageJsonExportsTrailingSlash1.ts b/tests/cases/fourslash/importCompletionsPackageJsonExportsTrailingSlash1.ts
new file mode 100644
index 0000000000000..e381945b5d926
--- /dev/null
+++ b/tests/cases/fourslash/importCompletionsPackageJsonExportsTrailingSlash1.ts
@@ -0,0 +1,38 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+// @moduleResolution: nodenext
+
+// @Filename: /node_modules/pkg/package.json
+//// {
+////     "name": "pkg",
+////     "version": "1.0.0",
+////     "exports": {
+////       "./test/": "./"
+////     }
+////  }
+
+// @Filename: /node_modules/pkg/foo.d.ts
+//// export function foo(): void;
+
+// @Filename: /package.json
+//// {
+////     "dependencies": {
+////        "pkg": "*"
+////     }
+////  }
+
+// @Filename: /index.ts
+//// import {} from "pkg//*1*/";
+//// import {} from "pkg/test//*2*/";
+
+verify.completions({
+    marker: ["1"],
+    exact: ["test"],
+    isNewIdentifierLocation: true,
+});
+verify.completions({
+    marker: ["2"],
+    exact: ["foo.js"],
+    isNewIdentifierLocation: true,
+});
diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsConditions1.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsConditions1.ts
new file mode 100644
index 0000000000000..9bac2d834dd42
--- /dev/null
+++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsConditions1.ts
@@ -0,0 +1,25 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+
+// @Filename: /package.json
+//// {
+////   "imports": {
+////     "#thing": {
+////         "types": { "import": "./types-esm/thing.d.mts", "require": "./types/thing.d.ts" },
+////         "default": { "import": "./esm/thing.mjs", "require": "./dist/thing.js" }
+////      }
+////   }
+//// }
+
+// @Filename: /types/thing.d.ts
+//// export function something(name: string): any;
+
+// @Filename: /src/foo.ts
+//// import {} from "/*1*/";
+
+verify.completions({
+    marker: ["1"],
+    exact: ["#thing"],
+    isNewIdentifierLocation: true,
+});
diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsLength1.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsLength1.ts
new file mode 100644
index 0000000000000..36380677a29de
--- /dev/null
+++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsLength1.ts
@@ -0,0 +1,46 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+
+// @Filename: /package.json
+//// {
+////   "imports": {
+////     "#*": "./src/*.ts"
+////   }
+//// }
+
+// @Filename: /src/a/b/c/something.ts
+//// export function something(name: string): any;
+
+// @Filename: /src/a/b/c/d.ts
+//// import {} from "/*1*/";
+//// import {} from "#a//*2*/";
+//// import {} from "#a/b//*3*/";
+//// import {} from "#a/b/c//*4*/";
+//// import {} from "#a/b/c/something//*5*/";
+
+verify.completions({
+    marker: ["1"],
+    exact: ["#a"],
+    isNewIdentifierLocation: true,
+});
+verify.completions({
+    marker: ["2"],
+    exact: ["b"],
+    isNewIdentifierLocation: true,
+});
+verify.completions({
+    marker: ["3"],
+    exact: ["c"],
+    isNewIdentifierLocation: true,
+});
+verify.completions({
+    marker: ["4"],
+    exact: ["d", "something"],
+    isNewIdentifierLocation: true,
+});
+verify.completions({
+    marker: ["5"],
+    exact: [],
+    isNewIdentifierLocation: true,
+});
diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsLength2.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsLength2.ts
new file mode 100644
index 0000000000000..8dd812c00ef2c
--- /dev/null
+++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsLength2.ts
@@ -0,0 +1,47 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+
+// @Filename: /package.json
+//// {
+////   "imports": {
+////     "#*": "./src/*.ts"
+////   }
+//// }
+
+// @Filename: /src/a/b/c/something.ts
+//// export function something(name: string): any;
+
+// @Filename: /a.ts
+//// import {} from "/*1*/";
+//// import {} from "#a//*2*/";
+//// import {} from "#a/b//*3*/";
+//// import {} from "#a/b/c//*4*/";
+//// import {} from "#a/b/c/something//*5*/";
+
+verify.completions({
+    marker: ["1"],
+    exact: ["#a"],
+    isNewIdentifierLocation: true,
+});
+verify.completions({
+    marker: ["2"],
+    exact: ["b"],
+    isNewIdentifierLocation: true,
+});
+verify.completions({
+    marker: ["3"],
+    exact: ["c"],
+    isNewIdentifierLocation: true,
+});
+verify.completions({
+    marker: ["4"],
+    exact: ["something"],
+    isNewIdentifierLocation: true,
+});
+verify.completions({
+    marker: ["5"],
+    exact: [],
+    isNewIdentifierLocation: true,
+});
+
diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern.ts
new file mode 100644
index 0000000000000..89b84c7b5bf47
--- /dev/null
+++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern.ts
@@ -0,0 +1,22 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+
+// @Filename: /package.json
+//// {
+////   "imports": {
+////     "#*": "./src/*"
+////   }
+//// }
+
+// @Filename: /src/something.ts
+//// export function something(name: string): any;
+
+// @Filename: /a.ts
+//// import {} from "/*1*/";
+
+verify.completions({
+    marker: ["1"],
+    exact: ["#something.js"],
+    isNewIdentifierLocation: true,
+});
diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern2.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern2.ts
new file mode 100644
index 0000000000000..2cbea78b63351
--- /dev/null
+++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern2.ts
@@ -0,0 +1,23 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+// @allowImportingTsExtensions: true
+
+// @Filename: /package.json
+//// {
+////   "imports": {
+////     "#*": "./src/*"
+////   }
+//// }
+
+// @Filename: /src/something.ts
+//// export function something(name: string): any;
+
+// @Filename: /a.ts
+//// import {} from "/*1*/";
+
+verify.completions({
+    marker: ["1"],
+    exact: ["#something.ts"],
+    isNewIdentifierLocation: true,
+});
diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_capsInPath1.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_capsInPath1.ts
new file mode 100644
index 0000000000000..f75079c117361
--- /dev/null
+++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_capsInPath1.ts
@@ -0,0 +1,22 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+
+// @Filename: /Dev/package.json
+//// {
+////   "imports": {
+////     "#thing": "./src/something.js"
+////   }
+//// }
+
+// @Filename: /Dev/src/something.ts
+//// export function something(name: string): any;
+
+// @Filename: /Dev/a.ts
+//// import {} from "/*1*/";
+
+verify.completions({
+    marker: ["1"],
+    exact: ["#thing"],
+    isNewIdentifierLocation: true,
+});
diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_capsInPath2.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_capsInPath2.ts
new file mode 100644
index 0000000000000..fcb66e518d0f4
--- /dev/null
+++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_capsInPath2.ts
@@ -0,0 +1,27 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+
+// @Filename: /Dev/package.json
+//// {
+////   "imports": {
+////     "#thing/*": "./src/*.js"
+////   }
+//// }
+
+// @Filename: /Dev/src/something.ts
+//// export function something(name: string): any;
+
+// @Filename: /Dev/a.ts
+//// import {} from "#thing//*2*/";
+
+// verify.completions({
+//     marker: ["1"],
+//     exact: ["#thing"],
+//     isNewIdentifierLocation: true,
+// });
+verify.completions({
+    marker: ["2"],
+    exact: ["something"],
+    isNewIdentifierLocation: true,
+});
diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_js.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_js.ts
new file mode 100644
index 0000000000000..62c47e19cfb12
--- /dev/null
+++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_js.ts
@@ -0,0 +1,22 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+
+// @Filename: /package.json
+//// {
+////   "imports": {
+////     "#*": "./src/*.js"
+////   }
+//// }
+
+// @Filename: /src/something.ts
+//// export function something(name: string): any;
+
+// @Filename: /a.ts
+//// import {} from "/*1*/";
+
+verify.completions({
+    marker: ["1"],
+    exact: ["#something"],
+    isNewIdentifierLocation: true,
+});
diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_js_ts.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_js_ts.ts
new file mode 100644
index 0000000000000..0b79cad7fbc52
--- /dev/null
+++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_js_ts.ts
@@ -0,0 +1,22 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+
+// @Filename: /package.json
+//// {
+////   "imports": {
+////     "#*.js": "./src/*.ts"
+////   }
+//// }
+
+// @Filename: /src/something.ts
+//// export function something(name: string): any;
+
+// @Filename: /a.ts
+//// import {} from "/*1*/";
+
+verify.completions({
+    marker: ["1"],
+    exact: ["#something.js"],
+    isNewIdentifierLocation: true,
+});
\ No newline at end of file
diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts.ts
new file mode 100644
index 0000000000000..ef3ef47db4367
--- /dev/null
+++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts.ts
@@ -0,0 +1,22 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+
+// @Filename: /package.json
+//// {
+////   "imports": {
+////     "#*": "./src/*.ts"
+////   }
+//// }
+
+// @Filename: /src/something.ts
+//// export function something(name: string): any;
+
+// @Filename: /a.ts
+//// import {} from "/*1*/";
+
+verify.completions({
+    marker: ["1"],
+    exact: ["#something"],
+    isNewIdentifierLocation: true,
+});
diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts_js.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts_js.ts
new file mode 100644
index 0000000000000..595d3b0a7194d
--- /dev/null
+++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts_js.ts
@@ -0,0 +1,22 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+
+// @Filename: /package.json
+//// {
+////   "imports": {
+////     "#*.ts": "./src/*.js"
+////   }
+//// }
+
+// @Filename: /src/something.ts
+//// export function something(name: string): any;
+
+// @Filename: /a.ts
+//// import {} from "/*1*/";
+
+verify.completions({
+    marker: ["1"],
+    exact: ["#something.ts"],
+    isNewIdentifierLocation: true,
+});
diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts_ts.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts_ts.ts
new file mode 100644
index 0000000000000..e6dafdb1a3dc7
--- /dev/null
+++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts_ts.ts
@@ -0,0 +1,22 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+
+// @Filename: /package.json
+//// {
+////   "imports": {
+////     "#*.ts": "./src/*.ts"
+////   }
+//// }
+
+// @Filename: /src/something.ts
+//// export function something(name: string): any;
+
+// @Filename: /a.ts
+//// import {} from "/*1*/";
+
+verify.completions({
+    marker: ["1"],
+    exact: ["#something.ts"],
+    isNewIdentifierLocation: true,
+});
diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImports_js.ts b/tests/cases/fourslash/importCompletionsPackageJsonImports_js.ts
new file mode 100644
index 0000000000000..b650f213eaa89
--- /dev/null
+++ b/tests/cases/fourslash/importCompletionsPackageJsonImports_js.ts
@@ -0,0 +1,22 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+
+// @Filename: /package.json
+//// {
+////   "imports": {
+////     "#thing": "./src/something.js"
+////   }
+//// }
+
+// @Filename: /src/something.ts
+//// export function something(name: string): any;
+
+// @Filename: /a.ts
+//// import {} from "/*1*/";
+
+verify.completions({
+    marker: ["1"],
+    exact: ["#thing"],
+    isNewIdentifierLocation: true,
+});
diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImports_ts.ts b/tests/cases/fourslash/importCompletionsPackageJsonImports_ts.ts
new file mode 100644
index 0000000000000..0c8563e8665b3
--- /dev/null
+++ b/tests/cases/fourslash/importCompletionsPackageJsonImports_ts.ts
@@ -0,0 +1,22 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+
+// @Filename: /package.json
+//// {
+////   "imports": {
+////     "#thing": "./src/something.ts"
+////   }
+//// }
+
+// @Filename: /src/something.ts
+//// export function something(name: string): any;
+
+// @Filename: /a.ts
+//// import {} from "/*1*/";
+
+verify.completions({
+    marker: ["1"],
+    exact: ["#thing"],
+    isNewIdentifierLocation: true,
+});
diff --git a/tests/cases/fourslash/inlayHintsOverloadCall.ts b/tests/cases/fourslash/inlayHintsOverloadCall1.ts
similarity index 100%
rename from tests/cases/fourslash/inlayHintsOverloadCall.ts
rename to tests/cases/fourslash/inlayHintsOverloadCall1.ts
diff --git a/tests/cases/fourslash/inlayHintsOverloadCall2.ts b/tests/cases/fourslash/inlayHintsOverloadCall2.ts
new file mode 100644
index 0000000000000..2a9a0a91e7587
--- /dev/null
+++ b/tests/cases/fourslash/inlayHintsOverloadCall2.ts
@@ -0,0 +1,23 @@
+/// <reference path="fourslash.ts" />
+
+////type HasID = {
+////    id: number;
+////}
+////
+////type Numbers = {
+////    n: number[];
+////}
+////
+////declare function func(bad1: number, bad2: HasID): void;
+////declare function func(ok_1: Numbers, ok_2: HasID): void;
+////
+////func(
+////    { n: [1, 2, 3] },
+////    {
+////        id: 1,
+////    },
+////);
+
+verify.baselineInlayHints(undefined, {
+    includeInlayParameterNameHints: "all",
+});
diff --git a/tests/cases/fourslash/moveToFile_namespaceImport.ts b/tests/cases/fourslash/moveToFile_namespaceImport.ts
new file mode 100644
index 0000000000000..443cf161535f9
--- /dev/null
+++ b/tests/cases/fourslash/moveToFile_namespaceImport.ts
@@ -0,0 +1,33 @@
+/// <reference path='fourslash.ts' />
+
+// @Filename: /a.ts
+//// export type ExecutionPoint = string;
+////
+
+// @Filename: /b.ts
+//// import * as A from "./a";
+////
+//// [|async function fn1(point: A.ExecutionPoint) {}|]
+////
+//// async function fn2(point: A.ExecutionPoint) {}
+////
+
+// @Filename: /point.ts
+////
+
+verify.moveToFile({
+    newFileContents: {
+        "/b.ts":
+`import * as A from "./a";
+
+async function fn2(point: A.ExecutionPoint) {}
+`,
+        "/point.ts":
+`import * as A from "./a";
+
+
+async function fn1(point: A.ExecutionPoint) { }
+`,
+    },
+    interactiveRefactorArguments: { targetFile: "/point.ts" },
+});
\ No newline at end of file
diff --git a/tests/cases/fourslash/moveToNewFile_aliasDefaultExportNamedImport.ts b/tests/cases/fourslash/moveToNewFile_aliasDefaultExportNamedImport.ts
new file mode 100644
index 0000000000000..2db768ae54e4c
--- /dev/null
+++ b/tests/cases/fourslash/moveToNewFile_aliasDefaultExportNamedImport.ts
@@ -0,0 +1,35 @@
+/// <reference path='fourslash.ts' />
+
+// @Filename: /node_modules/use-react/index.d.ts
+///// export { default as useLatest } from './useLatest';
+
+// @Filename: /node_modules/use-react/index.d.ts
+//// declare const useLatest: <T>(value: T) => {
+////     readonly current: T;
+//// };
+//// export default useLatest;
+//// 
+
+// @Filename: /test.ts
+//// import { useLatest } from 'react-use';
+//// 
+//// [|export function useUseLatest(data: string) {
+////     return useLatest(data);
+//// }|]
+
+verify.moveToNewFile({
+    newFileContents: {
+        "/test.ts":
+`
+`,
+
+        "/useUseLatest.ts":
+`import { useLatest } from 'react-use';
+
+
+export function useUseLatest(data: string) {
+    return useLatest(data);
+}
+`,
+    },
+});
\ No newline at end of file
diff --git a/tests/cases/fourslash/moveToNewFile_globalAndLocal1.ts b/tests/cases/fourslash/moveToNewFile_globalAndLocal1.ts
new file mode 100644
index 0000000000000..d1c9119d63848
--- /dev/null
+++ b/tests/cases/fourslash/moveToNewFile_globalAndLocal1.ts
@@ -0,0 +1,30 @@
+/// <reference path="fourslash.ts" />
+
+// @Filename: /src/globals.d.ts
+//// export {}; // Make this a module
+//// declare global {
+////     interface Disposable {
+////         [Symbol.dispose](): void;
+////     }
+//// }
+
+// @Filename: /src/test.ts
+//// interface Disposable {
+////     (): string;
+//// }
+//// export interface [|EditingService|] extends Disposable { }
+
+
+verify.moveToNewFile({
+    newFileContents: {
+        "/src/test.ts": 
+`export interface Disposable {
+    (): string;
+}
+`,
+        "/src/EditingService.ts":  // Reference to Disposable is still from test
+`import { Disposable } from "./test";
+
+export interface EditingService extends Disposable { }
+`
+}});
diff --git a/tests/cases/fourslash/moveToNewFile_globalAndLocal2.ts b/tests/cases/fourslash/moveToNewFile_globalAndLocal2.ts
new file mode 100644
index 0000000000000..4fbcd80fbff98
--- /dev/null
+++ b/tests/cases/fourslash/moveToNewFile_globalAndLocal2.ts
@@ -0,0 +1,28 @@
+/// <reference path="fourslash.ts" />
+
+// @Filename: /src/globals.d.ts
+//// export {}; // Make this a module
+//// declare global {
+////     interface Disposable {
+////         [Symbol.dispose](): void;
+////     }
+//// }
+
+// @Filename: /src/test.ts
+//// [|export interface Disposable {
+////     (): string;
+//// }
+//// export interface EditingService extends Disposable { }|]
+
+
+verify.moveToNewFile({
+    newFileContents: {
+        "/src/test.ts": 
+``,
+        "/src/Disposable.ts":  // Reference to Disposable is moved to new file from `test.ts`
+`export interface Disposable {
+    (): string;
+}
+export interface EditingService extends Disposable { }
+`
+}});
diff --git a/tests/cases/fourslash/moveToNewFile_globalAndLocal3.ts b/tests/cases/fourslash/moveToNewFile_globalAndLocal3.ts
new file mode 100644
index 0000000000000..9a3ac8c312668
--- /dev/null
+++ b/tests/cases/fourslash/moveToNewFile_globalAndLocal3.ts
@@ -0,0 +1,28 @@
+/// <reference path="fourslash.ts" />
+
+// @Filename: /src/globals.d.ts
+//// export {}; // Make this a module
+//// declare global {
+////     interface Disposable {
+////         [Symbol.dispose](): void;
+////     }
+//// }
+
+// @Filename: /src/test.ts
+//// import { Disposable } from './lifecycle';
+//// export interface [|EditingService|] extends Disposable { }
+
+// @Filename: /src/lifecycle.ts
+//// export interface Disposable {
+//// 	(): string;
+//// }
+
+verify.moveToNewFile({
+    newFileContents: {
+        "/src/test.ts": ``,
+        "/src/EditingService.ts":  // Reference to Disposable is still from lifecycle
+`import { Disposable } from './lifecycle';
+
+export interface EditingService extends Disposable { }
+`
+}});
diff --git a/tests/cases/fourslash/moveToNewFile_globalAndLocal4.ts b/tests/cases/fourslash/moveToNewFile_globalAndLocal4.ts
new file mode 100644
index 0000000000000..ca0e8f847691c
--- /dev/null
+++ b/tests/cases/fourslash/moveToNewFile_globalAndLocal4.ts
@@ -0,0 +1,25 @@
+/// <reference path="fourslash.ts" />
+
+// @Filename: /src/globals.d.ts
+//// export {}; // Make this a module
+//// declare global {
+////     interface Disposable {
+////         [Symbol.dispose](): void;
+////     }
+//// }
+
+// @Filename: /src/test.ts
+//// export interface [|EditingService|] extends Disposable { }
+
+// @Filename: /src/lifecycle.ts
+//// export interface Disposable {
+//// 	(): string;
+//// }
+
+verify.moveToNewFile({
+    newFileContents: {
+        "/src/test.ts": ``,
+        "/src/EditingService.ts": // Reference to Disposable is still global
+`export interface EditingService extends Disposable { }
+`
+}});
diff --git a/tests/cases/fourslash/moveToNewFile_globalAndLocal5.ts b/tests/cases/fourslash/moveToNewFile_globalAndLocal5.ts
new file mode 100644
index 0000000000000..a887373d90242
--- /dev/null
+++ b/tests/cases/fourslash/moveToNewFile_globalAndLocal5.ts
@@ -0,0 +1,25 @@
+/// <reference path="fourslash.ts" />
+
+// @Filename: /src/globals.d.ts
+//// export {}; // Make this a module
+//// declare global {
+////     interface Disposable {
+////         [Symbol.dispose](): void;
+////     }
+//// }
+
+// @Filename: /src/test.ts
+//// const Disposable = 1;
+//// export const [|EditingService|] = Disposable;
+
+verify.moveToNewFile({
+    newFileContents: {
+        "/src/test.ts": 
+`export const Disposable = 1;
+`,
+        "/src/EditingService.ts": // Reference to Disposable is still from `test.ts`
+`import { Disposable } from "./test";
+
+export const EditingService = Disposable;
+`
+}});
diff --git a/tests/cases/fourslash/moveToNewFile_globalAndLocal6.ts b/tests/cases/fourslash/moveToNewFile_globalAndLocal6.ts
new file mode 100644
index 0000000000000..b8ed8e520e915
--- /dev/null
+++ b/tests/cases/fourslash/moveToNewFile_globalAndLocal6.ts
@@ -0,0 +1,22 @@
+/// <reference path="fourslash.ts" />
+
+// @Filename: /src/globals.d.ts
+//// export {}; // Make this a module
+//// declare global {
+////     interface Disposable {
+////         [Symbol.dispose](): void;
+////     }
+//// }
+
+// @Filename: /src/test.ts
+//// [|const Disposable = 1;
+//// export const EditingService = Disposable;|]
+
+verify.moveToNewFile({
+    newFileContents: {
+        "/src/test.ts": ``,
+        "/src/Disposable.ts": // Reference to Disposable is moved from `test.ts`
+`const Disposable = 1;
+export const EditingService = Disposable;
+`
+}});
diff --git a/tests/cases/fourslash/moveToNewFile_importNameLikeGlobal1.ts b/tests/cases/fourslash/moveToNewFile_importNameLikeGlobal1.ts
new file mode 100644
index 0000000000000..018ca7dcfd0f4
--- /dev/null
+++ b/tests/cases/fourslash/moveToNewFile_importNameLikeGlobal1.ts
@@ -0,0 +1,24 @@
+/// <reference path='fourslash.ts' />
+
+// @lib: dom
+
+// @Filename: /a.ts
+//// export default class Event {}
+
+// @Filename: /b.ts
+//// import Event from './a.js';
+//// [|export function test(test: Event): void {}|]
+
+verify.noErrors();
+
+verify.moveToNewFile({
+    newFileContents: {
+        "/b.ts": "",
+
+        "/test.ts":
+`import Event from './a';
+
+export function test(test: Event): void { }
+`,
+    },
+});
diff --git a/tests/cases/fourslash/moveToNewFile_namespaceExport.ts b/tests/cases/fourslash/moveToNewFile_namespaceExport.ts
new file mode 100644
index 0000000000000..eaa26394b482d
--- /dev/null
+++ b/tests/cases/fourslash/moveToNewFile_namespaceExport.ts
@@ -0,0 +1,25 @@
+/// <reference path='fourslash.ts' />
+
+// @module: esnext
+
+// @filename: /a.ts
+////export interface A {}
+
+// @filename: /b.ts
+////export * as A from "./a";
+////export type B = string
+
+// @filename: /c.ts
+////import { A } from "./b"
+////[|type B = A.B|]
+
+verify.moveToNewFile({
+    newFileContents: {
+        "/c.ts": '',
+        "/B.1.ts":
+`import { A } from "./a";
+
+type B = A.B;
+`,
+    },
+});
\ No newline at end of file
diff --git a/tests/cases/fourslash/moveToNewFile_namespaceTypeImport.ts b/tests/cases/fourslash/moveToNewFile_namespaceTypeImport.ts
new file mode 100644
index 0000000000000..e5c48b342373e
--- /dev/null
+++ b/tests/cases/fourslash/moveToNewFile_namespaceTypeImport.ts
@@ -0,0 +1,39 @@
+// @filename: /src/test.ts
+//// import type * as ambient from "ambient";
+//// 
+//// [|export class Yadda {
+////   foo(): ambient.Thing {
+////     throw new Error("not implemented");
+////   }
+//// 
+////   bar(): ambient.DoesNotExist {
+////     throw new Error("not implemented");
+////   }
+//// }|]
+
+// @filename: /src/globals.ts
+//// declare module "ambient" {
+////     export interface Thing {}
+//// }
+
+verify.moveToNewFile({
+    newFileContents: {
+        "/src/test.ts":
+`
+`,
+        "/src/Yadda.ts":
+`import type * as ambient from "ambient";
+
+
+export class Yadda {
+    foo(): ambient.Thing {
+        throw new Error("not implemented");
+    }
+
+    bar(): ambient.DoesNotExist {
+        throw new Error("not implemented");
+    }
+}
+`
+    }
+});
diff --git a/tests/cases/fourslash/moveToNewFile_reactDefaultImport.ts b/tests/cases/fourslash/moveToNewFile_reactDefaultImport.ts
new file mode 100644
index 0000000000000..49ad5794ad6dd
--- /dev/null
+++ b/tests/cases/fourslash/moveToNewFile_reactDefaultImport.ts
@@ -0,0 +1,41 @@
+/// <reference path='fourslash.ts' />
+
+// @jsx: react
+// @module: esnext
+// @target: es2020
+// @moduleResolution: bundler
+
+// @Filename: /node_modules/react/index.d.ts
+//// export = React;
+//// export as namespace React;
+//// declare namespace React {
+////     class Component<P, S> {}
+//// }
+
+// @Filename: /src/main.tsx
+//// import React from "react";
+//// 
+//// [|class MyComponent extends React.Component {
+////     render() {
+////         return <div />;
+////     }
+//// }|]
+
+
+// this test only crashes with bundler and non-preserve
+verify.moveToNewFile({
+    newFileContents: {
+        "/src/main.tsx":
+`
+`,
+        "/src/MyComponent.tsx":
+`import React from "react";
+
+class MyComponent extends React.Component {
+    render() {
+        return <div />;
+    }
+}
+`
+    }
+});
diff --git a/tests/cases/fourslash/moveToNewFile_reactNamespaceImport.ts b/tests/cases/fourslash/moveToNewFile_reactNamespaceImport.ts
new file mode 100644
index 0000000000000..2dff4b1014877
--- /dev/null
+++ b/tests/cases/fourslash/moveToNewFile_reactNamespaceImport.ts
@@ -0,0 +1,44 @@
+/// <reference path='fourslash.ts' />
+
+// @jsx: preserve
+
+// @Filename: /node_modules/react/index.d.ts
+////export = React;
+////export as namespace React;
+////declare namespace React {
+////    class Component {}
+////}
+
+// @Filename: /src/main.tsx
+//// import * as React from 'react';
+//// 
+//// export const main = () => {};
+//// 
+//// [|interface SProps {
+//// 	children: string;
+//// }
+//// 
+//// function SidebarSection({children}: SProps) {
+//// 	return <div>{children}</div>;
+//// }|]
+
+
+verify.moveToNewFile({
+    newFileContents: {
+        "/src/main.tsx":
+`
+export const main = () => {};
+
+`,
+        "/src/SProps.tsx":
+`import * as React from 'react';
+
+interface SProps {
+    children: string;
+}
+function SidebarSection({ children }: SProps) {
+    return <div>{children}</div>;
+}
+`
+    }
+});
diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard12.ts b/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard12.ts
new file mode 100644
index 0000000000000..9b6dcd8ce31a7
--- /dev/null
+++ b/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard12.ts
@@ -0,0 +1,55 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+
+// @Filename: /node_modules/foo/package.json
+//// {
+////   "name": "foo",
+////   "exports": {
+////     "./bar/_*/suffix": "./dist/*.js"
+////   }
+//// }
+
+// @Filename: /node_modules/foo/dist/b.d.ts
+////export const x = 0;
+
+// @Filename: /node_modules/foo/dist/dir/x.d.ts
+/////export const x = 0;
+
+// @Filename: /a.mts
+////import {} from "foo/bar//*0*/";
+////import {} from "foo/bar/dir//*1*/"; // invalid
+////import {} from "foo/bar/_/*2*/";
+////import {} from "foo/bar/_dir//*3*/";
+
+verify.completions(
+    {
+        marker: "0",
+        exact: [
+            { name: "bar/_b/suffix", kind: "script" },
+            { name: "bar/_dir/suffix", kind: "directory" },
+        ],
+        isNewIdentifierLocation: true,
+    },
+    {
+        marker: "1",
+        exact: [
+            { name: "bar/_b/suffix", kind: "script" },
+            { name: "bar/_dir/suffix", kind: "directory" },
+        ],
+        isNewIdentifierLocation: true,
+    },
+    {
+        marker: "2",
+        exact: [
+            { name: "b", kind: "script" },
+            { name: "dir", kind: "directory" },
+        ],
+        isNewIdentifierLocation: true,
+    },
+    {
+        marker: "3",
+        exact: { name: "x", kind: "script" },
+        isNewIdentifierLocation: true,
+    },
+);
diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsBundlerNoNodeCondition.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsBundlerNoNodeCondition.ts
new file mode 100644
index 0000000000000..324c51f0a696b
--- /dev/null
+++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsBundlerNoNodeCondition.ts
@@ -0,0 +1,31 @@
+/// <reference path="fourslash.ts" />
+
+// @moduleResolution: bundler
+
+// @Filename: /package.json
+//// {
+////   "name": "foo",
+////   "imports": {
+////     "#only-for-node": {
+////       "node": "./something.js"
+////     },
+////     "#for-everywhere": "./other.js",
+////   }
+//// }
+
+// @Filename: /something.d.ts
+//// export const index = 0;
+
+// @Filename: /other.d.ts
+//// export const index = 0;
+
+// @Filename: /index.ts
+//// import { } from "/**/";
+
+verify.completions({
+  marker: "",
+  isNewIdentifierLocation: true,
+  exact: [
+    { name: "#for-everywhere", kind: "script", kindModifiers: "" },
+  ]
+});
diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsCustomConditions.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsCustomConditions.ts
new file mode 100644
index 0000000000000..81a4da924773e
--- /dev/null
+++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsCustomConditions.ts
@@ -0,0 +1,28 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+// @customConditions: custom-condition
+
+// @Filename: /package.json
+//// {
+////   "name": "foo",
+////   "imports": {
+////     "#only-with-custom-conditions": {
+////       "custom-condition": "./something.js"
+////     },
+////   }
+//// }
+
+// @Filename: /something.d.ts
+//// export const index = 0;
+
+// @Filename: /index.ts
+//// import { } from "/**/";
+
+verify.completions({
+  marker: "",
+  isNewIdentifierLocation: true,
+  exact: [
+    { name: "#only-with-custom-conditions", kind: "script", kindModifiers: "" },
+  ]
+});
diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsIgnoreMatchingNodeModule1.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsIgnoreMatchingNodeModule1.ts
new file mode 100644
index 0000000000000..c38db992d9a1f
--- /dev/null
+++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsIgnoreMatchingNodeModule1.ts
@@ -0,0 +1,22 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+
+// @Filename: /src/node_modules/#internal/package.json
+//// {
+////   "imports": {
+////     "#thing": "./dist/something.js"
+////   }
+//// }
+
+// @Filename: /src/node_modules/#internal/dist/something.d.ts
+//// export function something(name: string): any;
+
+// @Filename: /src/a.ts
+//// import {} from "#internal//*1*/";
+
+verify.completions({
+    marker: ["1"],
+    exact: [],
+    isNewIdentifierLocation: true,
+});
diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsIgnoreMatchingNodeModule2.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsIgnoreMatchingNodeModule2.ts
new file mode 100644
index 0000000000000..81616077fb03f
--- /dev/null
+++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsIgnoreMatchingNodeModule2.ts
@@ -0,0 +1,25 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+
+// @Filename: /package.json
+//// {
+////   "imports": {
+////     "#internal/*": "./src/*.ts"
+////   }
+//// }
+
+// @Filename: /src/something.ts
+//// export function something(name: string): any;
+
+// @Filename: /src/node_modules/#internal/package.json
+//// {}
+
+// @Filename: /src/a.ts
+//// import {} from "#internal//*1*/";
+
+verify.completions({
+    marker: ["1"],
+    exact: ["a", "something"],
+    isNewIdentifierLocation: true,
+});
diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsOnlyFromClosestScope1.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsOnlyFromClosestScope1.ts
new file mode 100644
index 0000000000000..0c5e569b2a000
--- /dev/null
+++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsOnlyFromClosestScope1.ts
@@ -0,0 +1,34 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+
+// @Filename: /package.json
+//// {
+////   "imports": {
+////     "#thing": "./src/something.ts"
+////   }
+//// }
+
+// @Filename: /src/package.json
+//// {}
+
+// @Filename: /src/something.ts
+//// export function something(name: string): any;
+
+// @Filename: /src/a.ts
+//// import {} from "/*1*/";
+
+// @Filename: /a.ts
+//// import {} from "/*2*/";
+
+verify.completions({
+    marker: ["1"],
+    exact: [],
+    isNewIdentifierLocation: true,
+});
+
+verify.completions({
+    marker: ["2"],
+    exact: ["#thing"],
+    isNewIdentifierLocation: true,
+});
diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard1.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard1.ts
new file mode 100644
index 0000000000000..274412a2fe8d5
--- /dev/null
+++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard1.ts
@@ -0,0 +1,45 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+
+// @Filename: /package.json
+//// {
+////   "name": "foo",
+////   "main": "dist/index.js",
+////   "module": "dist/index.mjs",
+////   "types": "dist/index.d.ts",
+////   "imports": {
+////     "#*": {
+////       "types": "./dist/*.d.ts",
+////       "import": "./dist/*.mjs",
+////       "default": "./dist/*.js"
+////     },
+////     "#arguments": {
+////       "types": "./dist/arguments/index.d.ts",
+////       "import": "./dist/arguments/index.mjs",
+////       "default": "./dist/arguments/index.js"
+////     }
+////   }
+//// }
+
+// @Filename: /dist/index.d.ts
+//// export const index = 0;
+
+// @Filename: /dist/blah.d.ts
+//// export const blah = 0;
+
+// @Filename: /dist/arguments/index.d.ts
+//// export const arguments = 0;
+
+// @Filename: /index.mts
+//// import { } from "/**/";
+
+verify.completions({
+  marker: "",
+  isNewIdentifierLocation: true,
+  exact: [
+    { name: "#blah", kind: "script", kindModifiers: "" },
+    { name: "#index", kind: "script", kindModifiers: "" },
+    { name: "#arguments", kind: "script", kindModifiers: "" },
+  ]
+});
diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard10.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard10.ts
new file mode 100644
index 0000000000000..129e291e4c2ae
--- /dev/null
+++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard10.ts
@@ -0,0 +1,28 @@
+/// <reference path="fourslash.ts" />
+
+// @module: preserve
+// @moduleResolution: bundler
+// @allowImportingTsExtensions: true
+// @jsx: react
+
+// @Filename: /package.json
+//// {
+////   "name": "repo",
+////   "imports": {
+////     "#*": "./src/*"
+////   }
+//// }
+
+// @Filename: /src/card.tsx
+//// export {};
+
+// @Filename: /main.ts
+//// import { } from "/**/";
+
+verify.completions({
+  marker: "",
+  isNewIdentifierLocation: true,
+  exact: [
+    { name: "#card.tsx", kind: "script", kindModifiers: ".tsx" },
+  ],
+});
diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard11.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard11.ts
new file mode 100644
index 0000000000000..a355b245eb908
--- /dev/null
+++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard11.ts
@@ -0,0 +1,27 @@
+/// <reference path="fourslash.ts" />
+
+// @module: preserve
+// @moduleResolution: bundler
+// @jsx: react
+
+// @Filename: /package.json
+//// {
+////   "name": "repo",
+////   "imports": {
+////     "#*": "./src/*"
+////   }
+//// }
+
+// @Filename: /src/card.tsx
+//// export {};
+
+// @Filename: /main.ts
+//// import { } from "/**/";
+
+verify.completions({
+  marker: "",
+  isNewIdentifierLocation: true,
+  exact: [
+    { name: "#card.js", kind: "script", kindModifiers: ".js" },
+  ],
+});
diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard12.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard12.ts
new file mode 100644
index 0000000000000..d0fdfedbc1fa6
--- /dev/null
+++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard12.ts
@@ -0,0 +1,58 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+
+// @Filename: /package.json
+//// {
+////   "name": "repo",
+////   "imports": {
+////     "#foo/_*/suffix": "./src/*.ts"
+////   }
+//// }
+
+// @Filename: /src/b.ts
+////export const x = 0;
+
+// @Filename: /src/dir/x.ts
+/////export const x = 0;
+
+// @Filename: /src/a.ts
+////import {} from "#foo//*0*/";
+////import {} from "#foo/dir//*1*/"; // invalid
+////import {} from "#foo/_/*2*/";
+////import {} from "#foo/_dir//*3*/";
+
+verify.completions(
+    {
+        marker: "0",
+        exact: [
+            { name: "#foo/_a/suffix", kind: "script" },
+            { name: "#foo/_b/suffix", kind: "script" },
+            { name: "#foo/_dir/suffix", kind: "directory" },
+        ],
+        isNewIdentifierLocation: true,
+    },
+    {
+        marker: "1",
+        exact: [
+            { name: "#foo/_a/suffix", kind: "script" },
+            { name: "#foo/_b/suffix", kind: "script" },
+            { name: "#foo/_dir/suffix", kind: "directory" },
+        ],
+        isNewIdentifierLocation: true,
+    },
+    {
+        marker: "2",
+        exact: [
+            { name: "a", kind: "script" },
+            { name: "b", kind: "script" },
+            { name: "dir", kind: "directory" },
+        ],
+        isNewIdentifierLocation: true,
+    },
+    {
+        marker: "3",
+        exact: { name: "x", kind: "script" },
+        isNewIdentifierLocation: true,
+    },
+);
diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard2.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard2.ts
new file mode 100644
index 0000000000000..0e53d02ecc378
--- /dev/null
+++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard2.ts
@@ -0,0 +1,42 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+
+// @Filename: /package.json
+//// {
+////   "name": "salesforce-pageobjects",
+////   "version": "1.0.0",
+////   "imports": {
+////     "#*": {
+////       "types": "./dist/*.d.ts",
+////       "import": "./dist/*.mjs",
+////       "default": "./dist/*.js"
+////     }
+////   }
+//// }
+
+// @Filename: /dist/action/pageObjects/actionRenderer.d.ts
+//// export const actionRenderer = 0;
+
+// @Filename: /index.mts
+//// import { } from "/**/";
+
+verify.completions({
+  marker: "",
+  isNewIdentifierLocation: true,
+  exact: [{ name: "#action", kind: "directory" }]
+});
+
+edit.insert("#action/");
+
+verify.completions({
+  isNewIdentifierLocation: true,
+  exact: [{ name: "pageObjects", kind: "directory" }],
+});
+
+edit.insert("pageObjects/");
+
+verify.completions({
+  isNewIdentifierLocation: true,
+  exact: [{ name: "actionRenderer", kind: "script" }],
+});
diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard3.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard3.ts
new file mode 100644
index 0000000000000..e5ca68e643938
--- /dev/null
+++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard3.ts
@@ -0,0 +1,45 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+
+// @Filename: /package.json
+//// {
+////   "types": "index.d.ts",
+////   "imports": {
+////     "#component-*": {
+////       "types@>=4.3.5": "types/components/*.d.ts"
+////     }
+////   }
+//// }
+
+// @Filename: /nope.d.ts
+//// export const nope = 0;
+
+// @Filename: /types/components/index.d.ts
+//// export const index = 0;
+
+// @Filename: /types/components/blah.d.ts
+//// export const blah = 0;
+
+// @Filename: /types/components/subfolder/one.d.ts
+//// export const one = 0;
+
+// @Filename: /a.ts
+//// import { } from "/**/";
+
+verify.completions({
+  marker: "",
+  isNewIdentifierLocation: true,
+  exact: [
+    { name: "#component-blah", kind: "script" },
+    { name: "#component-index", kind: "script" },
+    { name: "#component-subfolder", kind: "directory" },
+  ],
+});
+
+edit.insert("#component-subfolder/");
+
+verify.completions({
+  isNewIdentifierLocation: true,
+  exact: [{ name: "one", kind: "script" }],
+});
diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard4.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard4.ts
new file mode 100644
index 0000000000000..06ead3662e97b
--- /dev/null
+++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard4.ts
@@ -0,0 +1,64 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+
+// @Filename: /package.json
+//// {
+////   "types": "index.d.ts",
+////   "imports": {
+////     "#*": "dist/*",
+////     "#foo/*": "dist/*",
+////     "#bar/*": "dist/*",
+////     "#exact-match": "dist/index.d.ts"
+////   }
+//// }
+
+// @Filename: /nope.d.ts
+//// export const nope = 0;
+
+// @Filename: /dist/index.d.ts
+//// export const index = 0;
+
+// @Filename: /dist/blah.d.ts
+//// export const blah = 0;
+
+// @Filename: /dist/foo/onlyInFooFolder.d.ts
+//// export const foo = 0;
+
+// @Filename: /dist/subfolder/one.d.ts
+//// export const one = 0;
+
+// @Filename: /a.mts
+//// import { } from "/**/";
+
+verify.completions({
+  marker: "",
+  isNewIdentifierLocation: true,
+  exact: [
+    { name: "#blah.js", kind: "script", kindModifiers: ".js" },
+    { name: "#index.js", kind: "script", kindModifiers: ".js" },
+    { name: "#foo", kind: "directory" },
+    { name: "#subfolder", kind: "directory" },
+    { name: "#bar", kind: "directory" },
+    { name: "#exact-match", kind: "script" },
+  ],
+});
+
+edit.insert("#foo/");
+
+verify.completions({
+  isNewIdentifierLocation: true,
+  exact: [
+    { name: "blah.js", kind: "script", kindModifiers: ".js" },
+    { name: "index.js", kind: "script", kindModifiers: ".js" },
+    { name: "foo", kind: "directory" },
+    { name: "subfolder", kind: "directory" },
+  ],
+});
+
+edit.insert("foo/");
+
+verify.completions({
+  isNewIdentifierLocation: true,
+  exact: [{ name: "onlyInFooFolder.js", kind: "script", kindModifiers: ".js" }],
+});
diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard5.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard5.ts
new file mode 100644
index 0000000000000..4217ece6826c9
--- /dev/null
+++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard5.ts
@@ -0,0 +1,56 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+
+// @Filename: /package.json
+//// {
+////   "name": "foo",
+////   "main": "dist/index.js",
+////   "module": "dist/index.mjs",
+////   "types": "dist/index.d.ts",
+////   "imports": {
+////     "#*": {
+////       "import": {
+////         "types": "./dist/types/*.d.mts",
+////         "default": "./dist/esm/*.mjs"
+////       },
+////       "default": {
+////         "types": "./dist/types/*.d.ts",
+////         "default": "./dist/cjs/*.js"
+////       }
+////     },
+////     "#only-in-cjs": {
+////       "require": {
+////         "types": "./dist/types/only-in-cjs/index.d.ts",
+////         "default": "./dist/cjs/only-in-cjs/index.js"
+////       }
+////     }
+////   }
+//// }
+
+// @Filename: /dist/types/index.d.mts
+//// export const index = 0;
+
+// @Filename: /dist/types/index.d.ts
+//// export const index = 0;
+
+// @Filename: /dist/types/blah.d.mts
+//// export const blah = 0;
+
+// @Filename: /dist/types/blah.d.ts
+//// export const blah = 0;
+
+// @Filename: /dist/types/only-in-cjs/index.d.ts
+//// export const onlyInCjs = 0;
+
+// @Filename: /index.mts
+//// import { } from "/**/";
+
+verify.completions({
+  marker: "",
+  isNewIdentifierLocation: true,
+  exact: [
+    { name: "#blah", kind: "script", kindModifiers: "" },
+    { name: "#index", kind: "script", kindModifiers: "" },
+  ]
+});
diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard6.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard6.ts
new file mode 100644
index 0000000000000..265fbe322404e
--- /dev/null
+++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard6.ts
@@ -0,0 +1,31 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+
+// @Filename: /package.json
+//// {
+////   "name": "foo",
+////   "main": "dist/index.js",
+////   "module": "dist/index.mjs",
+////   "types": "dist/index.d.ts",
+////   "imports": {
+////     "#*": "./dist/*?.d.ts"
+////   }
+//// }
+
+// @Filename: /dist/index.d.ts
+//// export const index = 0;
+
+// @Filename: /dist/blah?.d.ts
+//// export const blah = 0;
+
+// @Filename: /index.mts
+//// import { } from "/**/";
+
+verify.completions({
+  marker: "",
+  isNewIdentifierLocation: true,
+  exact: [
+    { name: "#blah", kind: "script", kindModifiers: "" },
+  ]
+});
diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard7.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard7.ts
new file mode 100644
index 0000000000000..42446088f6586
--- /dev/null
+++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard7.ts
@@ -0,0 +1,25 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+
+// @Filename: /package.json
+//// {
+////   "name": "foo",
+////   "imports": {
+////     "#*": "./dist/*.js"
+////   }
+//// }
+
+// @Filename: /dist/blah.d.ts
+//// export const blah = 0;
+
+// @Filename: /index.mts
+//// import { } from "/**/";
+
+verify.completions({
+  marker: "",
+  isNewIdentifierLocation: true,
+  exact: [
+    { name: "#blah", kind: "script", kindModifiers: "" },
+  ]
+});
diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard8.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard8.ts
new file mode 100644
index 0000000000000..b66761c43257d
--- /dev/null
+++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard8.ts
@@ -0,0 +1,28 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+
+// @Filename: /package.json
+//// {
+////   "name": "foo",
+////   "imports": {
+////     "#*": "./dist/*.js"
+////   }
+//// }
+
+// @Filename: /dist/blah.js
+//// export const blah = 0;
+
+// @Filename: /dist/blah.d.ts
+//// export declare const blah: 0;
+
+// @Filename: /index.mts
+//// import { } from "/**/";
+
+verify.completions({
+  marker: "",
+  isNewIdentifierLocation: true,
+  exact: [
+    { name: "#blah", kind: "script", kindModifiers: "" },
+  ]
+});
diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard9.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard9.ts
new file mode 100644
index 0000000000000..5e3ba519e23c3
--- /dev/null
+++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard9.ts
@@ -0,0 +1,26 @@
+/// <reference path="fourslash.ts" />
+
+// @module: nodenext
+// @allowJs: true
+
+// @Filename: /package.json
+//// {
+////   "name": "foo",
+////   "imports": {
+////     "#*": "./dist/*.js"
+////   }
+//// }
+
+// @Filename: /dist/blah.js
+//// export const blah = 0;
+
+// @Filename: /index.mts
+//// import { } from "/**/";
+
+verify.completions({
+  marker: "",
+  isNewIdentifierLocation: true,
+  exact: [
+    { name: "#blah", kind: "script", kindModifiers: "" },
+  ]
+});
diff --git a/tests/cases/fourslash/quickinfoVerbosity1.ts b/tests/cases/fourslash/quickinfoVerbosity1.ts
new file mode 100644
index 0000000000000..6d95aa6dbd8a9
--- /dev/null
+++ b/tests/cases/fourslash/quickinfoVerbosity1.ts
@@ -0,0 +1,10 @@
+/// <reference path='fourslash.ts'/>
+
+//// type FooType = string | number;
+//// const foo/*a*/: FooType = 1;
+
+//// type BarType = FooType | boolean;
+//// const bar/*b*/: BarType = 1;
+
+
+verify.baselineQuickInfo({ "a": [0, 1], "b": [0, 1, 2] });
\ No newline at end of file
diff --git a/tests/cases/fourslash/quickinfoVerbosity2.ts b/tests/cases/fourslash/quickinfoVerbosity2.ts
new file mode 100644
index 0000000000000..7f61912b97e5d
--- /dev/null
+++ b/tests/cases/fourslash/quickinfoVerbosity2.ts
@@ -0,0 +1,11 @@
+/// <reference path='fourslash.ts'/>
+
+//// type Str = string | {};
+//// type FooType = Str | number;
+//// type Sym = symbol | (() => void);
+//// type BarType = Sym | boolean;
+//// type BothType = FooType | BarType;
+//// const both/*b*/: BothType = 1;
+
+
+verify.baselineQuickInfo({ "b": [0, 1, 2, 3], });
\ No newline at end of file
diff --git a/tests/cases/fourslash/quickinfoVerbosityClass1.ts b/tests/cases/fourslash/quickinfoVerbosityClass1.ts
new file mode 100644
index 0000000000000..fd63a56939dec
--- /dev/null
+++ b/tests/cases/fourslash/quickinfoVerbosityClass1.ts
@@ -0,0 +1,71 @@
+/// <reference path='fourslash.ts'/>
+
+
+// simple case
+//// {
+////     class Foo {
+////         a!: "a" | "c";
+////     }
+////     const f/*f1*/ = new Foo();
+//// }
+// constructor
+//// {
+////     type FooParam = "a" | "b";
+////     class Foo {
+////         constructor(public x: string) {
+////             this.x = "a";
+////         }
+////         foo(p: FooParam): void {}
+////     }
+////     const f/*f2*/ = new Foo("");
+//// }
+// inheritance
+//// {
+////     class Bar {
+////         a!: string;
+////         bar(): void {}
+////         baz(param: string): void {}
+////     }
+////     class Foo extends Bar {
+////         b!: boolean;
+////         override baz(param: string | number): void {}
+////     }
+////     const f/*f3*/ = new Foo();
+//// }
+// type parameters
+//// {
+////     class Bar<B extends string> {
+////         bar(param: B): void {}
+////         baz(): this { return this; }
+////     }
+////     class Foo extends Bar<"foo"> {
+////         foo(): this { return this; }
+////     }
+////     const b/*b1*/ = new Bar();
+////     const f/*f4*/ = new Foo();
+//// }
+// class expression
+//// {
+////     class Bar<B extends string> {
+////         bar(param: B): void {}
+////         baz(): this { return this; }
+////     }
+////     const noname/*n1*/ = new (class extends Bar<"foo"> {
+////         foo(): this { return this; }
+////     })();
+////     const klass = class extends Bar<"foo"> {
+////         foo(): this { return this; }
+////     };
+////     const k/*k1*/ = new klass();
+//// }
+
+
+verify.baselineQuickInfo({
+    f1: [0, 1],
+    f2: [0, 1, 2],
+    f3: [0, 1],
+    b1: [0, 1, 2],
+    f4: [0, 1],
+    n1: [0, 1],
+    k1: [0, 1],
+});
\ No newline at end of file
diff --git a/tests/cases/fourslash/quickinfoVerbosityInterface1.ts b/tests/cases/fourslash/quickinfoVerbosityInterface1.ts
new file mode 100644
index 0000000000000..c0898b6fc25c6
--- /dev/null
+++ b/tests/cases/fourslash/quickinfoVerbosityInterface1.ts
@@ -0,0 +1,79 @@
+/// <reference path='fourslash.ts'/>
+
+// simple case
+//// {
+////     interface Foo {
+////         a: "a" | "c";
+////     }
+////     const f/*f1*/: Foo = { a: "a" };
+//// }
+// extends
+//// {
+////     interface Bar {
+////         b: "b" | "d";
+////     }
+////     interface Foo extends Bar {
+////         a: "a" | "c";
+////     }
+////     const f/*f2*/: Foo = { a: "a", b: "b" };
+//// }
+// methods
+//// {
+////     type BarParam = "b" | "d";
+////     interface Bar {
+////         bar(b: BarParam): string;
+////     }
+////     type FooType = "a" | "c";
+////     interface FooParam {
+////         param: FooType;
+////     }
+////     interface Foo extends Bar {
+////         a: FooType;
+////         foo: (a: FooParam) => number;
+////     }
+////     const f/*f3*/: Foo = { a: "a", bar: () => "b", foo: () => 1 };
+//// }
+// type parameters
+//// {
+////     interface Bar<B> {
+////         bar(b: B): string;
+////     }
+////     interface FooParam {
+////         param: "a" | "c";
+////     }
+////     interface Foo extends Bar<FooParam> {
+////         a: "a" | "c";
+////         foo: (a: FooParam) => number;
+////     }
+////     const f/*f4*/: Foo = { a: "a", bar: () => "b", foo: () => 1 };
+////     const b/*b1*/: Bar<number> = { bar: () => "" };
+//// }
+// alias + interface
+//// {
+////     interface Foo<A> {
+////         a: A;
+////     }
+////     type Alias = Foo<string>;
+////     const a/*a*/: Alias = { a: "a" };
+//// }
+// decl merging
+//// {
+////     interface Foo {
+////         a: "a";
+////     }
+////     interface Foo {
+////         b: "b";
+////     }
+////     const f/*f5*/: Foo = { a: "a", b: "b" };
+//// }
+
+
+verify.baselineQuickInfo({
+    f1: [0, 1],
+    f2: [0, 1],
+    f3: [0, 1, 2, 3],
+    f4: [0, 1, 2],
+    b1: [0, 1],
+    a: [0, 1, 2],
+    f5: [0, 1],
+});
\ No newline at end of file
diff --git a/tests/cases/fourslash/quickinfoVerbosityIntersection1.ts b/tests/cases/fourslash/quickinfoVerbosityIntersection1.ts
new file mode 100644
index 0000000000000..521e624880750
--- /dev/null
+++ b/tests/cases/fourslash/quickinfoVerbosityIntersection1.ts
@@ -0,0 +1,22 @@
+/// <reference path='fourslash.ts'/>
+
+
+
+//// {
+////     type Foo = { a: "a" | "c" };
+////     type Bar = { a: "a" | "b" };
+////     const obj/*o1*/: Foo & Bar = { a: "a" };
+//// }
+//// {
+////     type Foo = { a: "c" };
+////     type Bar = { a: "b" };
+////     const obj/*o2*/: Foo & Bar = { a: "" };
+//// }
+//// {
+////     type Foo = { a: "c" };
+////     type Bar = { a: "b" };
+////     type Never = Foo & Bar;
+////     const obj/*o3*/: Never = { a: "" };
+//// }
+
+verify.baselineQuickInfo({ "o1": [0, 1], "o2": 0, "o3": 0 });
\ No newline at end of file
diff --git a/tests/cases/fourslash/quickinfoVerbosityObjectType1.ts b/tests/cases/fourslash/quickinfoVerbosityObjectType1.ts
new file mode 100644
index 0000000000000..d255f61622014
--- /dev/null
+++ b/tests/cases/fourslash/quickinfoVerbosityObjectType1.ts
@@ -0,0 +1,13 @@
+/// <reference path='fourslash.ts'/>
+
+
+//// type Str = string | {};
+//// type FooType = Str | number;
+//// type Sym = symbol | (() => void);
+//// type BarType = Sym | boolean;
+//// type Obj = { foo: FooType, bar: BarType, str: Str };
+//// const obj1/*o1*/: Obj = { foo: 1, bar: true, str: "3"};
+//// const obj2/*o2*/: { foo: FooType, bar: BarType, str: Str } = { foo: 1, bar: true, str: "3"};
+
+
+verify.baselineQuickInfo({ "o1": [0, 1, 2, 3], "o2": [0, 1, 2] });
\ No newline at end of file
diff --git a/tests/cases/fourslash/quickinfoVerbosityTruncation.ts b/tests/cases/fourslash/quickinfoVerbosityTruncation.ts
new file mode 100644
index 0000000000000..b321761950d92
--- /dev/null
+++ b/tests/cases/fourslash/quickinfoVerbosityTruncation.ts
@@ -0,0 +1,31 @@
+/// <reference path='fourslash.ts'/>
+
+//// type Str = string | {};
+//// type FooType = Str | number;
+//// type Sym = symbol | (() => void);
+//// type BarType = Sym | boolean;
+
+//// interface LotsOfProps {
+////     someLongPropertyName1: Str;
+////     someLongPropertyName2: FooType;
+////     someLongPropertyName3: Sym;
+////     someLongPropertyName4: BarType;
+////     someLongPropertyName5: Str;
+////     someLongPropertyName6: FooType;
+////     someLongPropertyName7: Sym;
+////     someLongPropertyName8: BarType;
+////     someLongMethodName1(a: FooType, b: BarType): Sym;
+////     someLongPropertyName9: Str;
+////     someLongPropertyName10: FooType;
+////     someLongPropertyName11: Sym;
+////     someLongPropertyName12: BarType;
+////     someLongPropertyName13: Str;
+////     someLongPropertyName14: FooType;
+////     someLongPropertyName15: Sym;
+////     someLongPropertyName16: BarType;
+////     someLongMethodName2(a: FooType, b: BarType): Sym;
+//// }
+//// const obj1/*o1*/: LotsOfProps = undefined as any as LotsOfProps;
+
+
+verify.baselineQuickInfo({ "o1": [1], });
\ No newline at end of file
diff --git a/tests/cases/fourslash/refactorConvertImport_namedToNamespace11.ts b/tests/cases/fourslash/refactorConvertImport_namedToNamespace11.ts
new file mode 100644
index 0000000000000..69d7491609ba5
--- /dev/null
+++ b/tests/cases/fourslash/refactorConvertImport_namedToNamespace11.ts
@@ -0,0 +1,18 @@
+/// <reference path='fourslash.ts' />
+
+// @allowJs: true
+// @checkJs: true
+
+// @filename: /a.js
+/////*a*/import { a } from "./foo.js";/*b*/
+////a;
+
+goTo.select("a", "b");
+edit.applyRefactor({
+    refactorName: "Convert import",
+    actionName: "Convert named imports to namespace import",
+    actionDescription: "Convert named imports to namespace import",
+    newContent:
+`import * as foo from "./foo.js";
+foo.a;`,
+});
diff --git a/tests/cases/fourslash/returnTypeNarrowingAfterCachingTypes.ts b/tests/cases/fourslash/returnTypeNarrowingAfterCachingTypes.ts
new file mode 100644
index 0000000000000..fad2f1452fd11
--- /dev/null
+++ b/tests/cases/fourslash/returnTypeNarrowingAfterCachingTypes.ts
@@ -0,0 +1,12 @@
+/// <reference path="fourslash.ts" />
+
+// @strict: true
+//// function h<T extends boolean>(x: T): T extends true ? 1 : T extends false ? 2 : never {
+////   if (x) {
+////       return 1;
+////   }
+////   return 2;
+//// }
+
+verify.encodedSemanticClassificationsLength("2020", 21);
+verify.noErrors();
\ No newline at end of file
diff --git a/tests/cases/fourslash/server/importCompletions_importsMap1.ts b/tests/cases/fourslash/server/importCompletions_importsMap1.ts
new file mode 100644
index 0000000000000..530704bfb5d74
--- /dev/null
+++ b/tests/cases/fourslash/server/importCompletions_importsMap1.ts
@@ -0,0 +1,36 @@
+/// <reference path="../fourslash.ts"/>
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+//// {
+////   "compilerOptions": {
+////     "module": "nodenext",
+////     "rootDir": "src",
+////     "outDir": "dist"
+////   }
+//// }
+
+// @Filename: /home/src/workspaces/project/package.json
+//// {
+////   "type": "module",
+////   "imports": {
+////     "#is-browser": {
+////       "browser": "./dist/env/browser.js",
+////       "default": "./dist/env/node.js"
+////     }
+////   }
+//// }
+
+// @Filename: /home/src/workspaces/project/src/env/browser.ts
+//// export const isBrowser = true;
+
+// @Filename: /home/src/workspaces/project/src/env/node.ts
+//// export const isBrowser = false;
+
+// @Filename: /home/src/workspaces/project/src/a.ts
+//// import {} from "/*1*/";
+
+verify.completions({
+    marker: ["1"],
+    exact: ["#is-browser"],
+    isNewIdentifierLocation: true,
+});
diff --git a/tests/cases/fourslash/server/importCompletions_importsMap2.ts b/tests/cases/fourslash/server/importCompletions_importsMap2.ts
new file mode 100644
index 0000000000000..10ea87f0aca2d
--- /dev/null
+++ b/tests/cases/fourslash/server/importCompletions_importsMap2.ts
@@ -0,0 +1,36 @@
+/// <reference path="../fourslash.ts"/>
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+//// {
+////   "compilerOptions": {
+////     "module": "nodenext",
+////     "rootDir": "src",
+////     "outDir": "dist"
+////   }
+//// }
+
+// @Filename: /home/src/workspaces/project/package.json
+//// {
+////   "type": "module",
+////   "imports": {
+////     "#internal/*": "./dist/internal/*"
+////   }
+//// }
+
+// @Filename: /home/src/workspaces/project/src/internal/foo.ts
+//// export function something(name: string) {}
+
+// @Filename: /home/src/workspaces/project/src/a.ts
+//// import {} from "/*1*/";
+//// import {} from "#internal//*2*/";
+
+verify.completions({
+    marker: ["1"],
+    exact: ["#internal"],
+    isNewIdentifierLocation: true,
+});
+verify.completions({
+    marker: ["2"],
+    exact: ["foo.js"],
+    isNewIdentifierLocation: true,
+});
diff --git a/tests/cases/fourslash/server/importCompletions_importsMap3.ts b/tests/cases/fourslash/server/importCompletions_importsMap3.ts
new file mode 100644
index 0000000000000..01776d771a3db
--- /dev/null
+++ b/tests/cases/fourslash/server/importCompletions_importsMap3.ts
@@ -0,0 +1,36 @@
+/// <reference path="../fourslash.ts"/>
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+//// {
+////   "compilerOptions": {
+////     "module": "nodenext",
+////     "rootDir": "src",
+////     "outDir": "dist"
+////   }
+//// }
+
+// @Filename: /home/src/workspaces/project/package.json
+//// {
+////   "type": "module",
+////   "imports": {
+////     "#internal/": "./dist/internal/"
+////   }
+//// }
+
+// @Filename: /home/src/workspaces/project/src/internal/foo.ts
+//// export function something(name: string) {}
+
+// @Filename: /home/src/workspaces/project/src/a.ts
+//// import {} from "/*1*/";
+//// import {} from "#internal//*2*/";
+
+verify.completions({
+    marker: ["1"],
+    exact: ["#internal"],
+    isNewIdentifierLocation: true,
+});
+verify.completions({
+    marker: ["2"],
+    exact: ["foo.js"],
+    isNewIdentifierLocation: true,
+});
diff --git a/tests/cases/fourslash/server/importCompletions_importsMap4.ts b/tests/cases/fourslash/server/importCompletions_importsMap4.ts
new file mode 100644
index 0000000000000..3e15b253f4710
--- /dev/null
+++ b/tests/cases/fourslash/server/importCompletions_importsMap4.ts
@@ -0,0 +1,33 @@
+/// <reference path="../fourslash.ts"/>
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+//// {
+////   "compilerOptions": {
+////     "module": "nodenext",
+////     "rootDir": "src",
+////     "outDir": "dist"
+////   }
+//// }
+
+// @Filename: /home/src/workspaces/project/package.json
+//// {
+////   "type": "module",
+////   "imports": {
+////     "#is-browser": {
+////       "types": "./dist/env/browser.d.ts",
+////       "default": "./dist/env/browser.js"
+////     }
+////   }
+//// }
+
+// @Filename: /home/src/workspaces/project/src/env/browser.ts
+//// export const isBrowser = true;
+
+// @Filename: /home/src/workspaces/project/src/a.ts
+//// import {} from "/*1*/";
+
+verify.completions({
+    marker: ["1"],
+    exact: ["#is-browser"],
+    isNewIdentifierLocation: true,
+});
diff --git a/tests/cases/fourslash/server/importCompletions_importsMap5.ts b/tests/cases/fourslash/server/importCompletions_importsMap5.ts
new file mode 100644
index 0000000000000..0b240075a1e66
--- /dev/null
+++ b/tests/cases/fourslash/server/importCompletions_importsMap5.ts
@@ -0,0 +1,34 @@
+/// <reference path="../fourslash.ts"/>
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+//// {
+////   "compilerOptions": {
+////     "module": "nodenext",
+////     "rootDir": "src",
+////     "outDir": "dist",
+////     "declarationDir": "types",
+////   }
+//// }
+
+// @Filename: /home/src/workspaces/project/package.json
+//// {
+////   "type": "module",
+////   "imports": {
+////     "#is-browser": {
+////       "types": "./types/env/browser.d.ts",
+////       "default": "./not-dist-on-purpose/env/browser.js"
+////     }
+////   }
+//// }
+
+// @Filename: /home/src/workspaces/project/src/env/browser.ts
+//// export const isBrowser = true;
+
+// @Filename: /home/src/workspaces/project/src/a.ts
+//// import {} from "/*1*/";
+
+verify.completions({
+    marker: ["1"],
+    exact: ["#is-browser"],
+    isNewIdentifierLocation: true,
+});
diff --git a/tests/cases/fourslash/server/pasteEdits_blankTargetFile.ts b/tests/cases/fourslash/server/pasteEdits_blankTargetFile.ts
index 97cd869cd74a7..711f50eaed1b8 100644
--- a/tests/cases/fourslash/server/pasteEdits_blankTargetFile.ts
+++ b/tests/cases/fourslash/server/pasteEdits_blankTargetFile.ts
@@ -1,6 +1,6 @@
 /// <reference path="../fourslash.ts" />
 
-// @Filename: /home/src/workspaces/project/c.ts
+// @Filename: /home/src/workspaces/project/folder/c.ts
 ////[||]
 
 // @Filename: /home/src/workspaces/project/a.ts
@@ -15,7 +15,7 @@
 //// console.log("abc");
 
 // @Filename: /home/src/workspaces/project/tsconfig.json
-////{ "files": ["c.ts", "a.ts", "b.ts"] }
+////{ "files": ["folder/c.ts", "a.ts", "b.ts"] }
 
 const ranges = test.ranges();
 verify.pasteEdits({
@@ -25,8 +25,8 @@ verify.pasteEdits({
         copiedFrom: { file: "/home/src/workspaces/project/b.ts", range: [ranges[1]] },
     },
     newFileContents: {
-        "/home/src/workspaces/project/c.ts":
-`import { abc } from "./a";
+        "/home/src/workspaces/project/folder/c.ts":
+`import { abc } from "../a";
 
 console.log(abc);`
     }
diff --git a/tests/cases/fourslash/server/pasteEdits_defaultExport1.ts b/tests/cases/fourslash/server/pasteEdits_defaultExport1.ts
new file mode 100644
index 0000000000000..c04342ef37ab4
--- /dev/null
+++ b/tests/cases/fourslash/server/pasteEdits_defaultExport1.ts
@@ -0,0 +1,31 @@
+/// <reference path="../fourslash.ts" />
+
+// @Filename: /home/src/workspaces/project/folder/c.ts
+////[||]
+
+// @Filename: /home/src/workspaces/project/b.ts
+////import foo from "./a";
+////[|const b = foo("bar");|]
+
+// @Filename: /home/src/workspaces/project/a.ts
+//// export default function foo(name: string): void {
+////     console.log(name);
+//// }
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+////{ "files": ["folder/c.ts", "a.ts", "b.ts"] }
+
+const range = test.ranges();
+verify.pasteEdits({
+    args: {
+        pastedText: [`const b = foo("bar");`],
+        pasteLocations: [range[0]],
+        copiedFrom: { file: "/home/src/workspaces/project/b.ts", range: [range[1]] },
+    },
+    newFileContents: {
+        "/home/src/workspaces/project/folder/c.ts":
+`import foo from "../a";
+
+const b = foo("bar");`
+    }
+});
\ No newline at end of file
diff --git a/tests/cases/fourslash/server/pasteEdits_defaultExport2.ts b/tests/cases/fourslash/server/pasteEdits_defaultExport2.ts
new file mode 100644
index 0000000000000..bb8adbc78a522
--- /dev/null
+++ b/tests/cases/fourslash/server/pasteEdits_defaultExport2.ts
@@ -0,0 +1,28 @@
+/// <reference path="../fourslash.ts" />
+
+// @Filename: /home/src/workspaces/project/folder/c.ts
+////[||]
+
+// @Filename: /home/src/workspaces/project/a.ts
+////[|const b = foo("bar");|]
+//// export default function foo(name: string): void {
+////     console.log(name);
+//// }
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+////{ "files": ["folder/c.ts", "a.ts"] }
+
+const range = test.ranges();
+verify.pasteEdits({
+    args: {
+        pastedText: [`const b = foo("bar");`],
+        pasteLocations: [range[0]],
+        copiedFrom: { file: "/home/src/workspaces/project/a.ts", range: [range[1]] },
+    },
+    newFileContents: {
+        "/home/src/workspaces/project/folder/c.ts":
+`import foo from "../a";
+
+const b = foo("bar");`
+    }
+});
\ No newline at end of file
diff --git a/tests/cases/fourslash/server/pasteEdits_defaultImport.ts b/tests/cases/fourslash/server/pasteEdits_defaultImport.ts
new file mode 100644
index 0000000000000..d2eafb4291c45
--- /dev/null
+++ b/tests/cases/fourslash/server/pasteEdits_defaultImport.ts
@@ -0,0 +1,45 @@
+/// <reference path="../fourslash.ts" />
+
+// @Filename: /home/src/workspaces/project/folder/folder/c.ts
+//// [||]
+
+// @Filename: /home/src/workspaces/project/folder/b.mts
+//// import test from "./a.js";
+////
+//// [|function foo(abc: test.testInterface, def: test.testInterface) {
+////    console.log(abc);
+////    console.log(def);
+//// }|]
+//// 
+
+// @Filename: /home/src/workspaces/project/folder/a.ts
+//// const abc = 10;
+//// const def = 20;
+//// export interface testInterface {
+////     abc: number;
+////     def: number;
+//// }
+
+// @Filename: /home/src/workspaces/project/folder/tsconfig.json
+////{ "compilerOptions": { "module": "nodenext" }, "files": ["folder/c.ts", "a.ts", "b.mts"] }
+
+const range = test.ranges();
+verify.pasteEdits({
+    args: {
+        pastedText: [`function foo(abc: test.abc, def: test.def) {
+console.log(abc);
+console.log(def);
+}`],
+        pasteLocations: [range[0]],
+        copiedFrom: { file: "/home/src/workspaces/project/folder/b.mts", range: [range[1]] },
+    },
+    newFileContents: {
+        "/home/src/workspaces/project/folder/folder/c.ts":
+`import test from "../a";
+
+function foo(abc: test.abc, def: test.def) {
+console.log(abc);
+console.log(def);
+}`
+    }
+});
\ No newline at end of file
diff --git a/tests/cases/fourslash/server/pasteEdits_globalAndLocal1.ts b/tests/cases/fourslash/server/pasteEdits_globalAndLocal1.ts
new file mode 100644
index 0000000000000..492cdd90ef4bb
--- /dev/null
+++ b/tests/cases/fourslash/server/pasteEdits_globalAndLocal1.ts
@@ -0,0 +1,38 @@
+/// <reference path="../fourslash.ts" />
+
+// @Filename: /home/src/workspaces/project/target.ts
+//// [||]
+
+// @Filename: /home/src/workspaces/project/test.ts
+//// export interface Disposable {
+////     (): string;
+//// }
+//// [|export interface EditingService extends Disposable { }|]
+
+// @Filename: /home/src/workspaces/project/globals.d.ts
+//// export {}; // Make this a module
+//// declare global {
+////     interface Disposable {
+////         [Symbol.dispose](): void;
+////     }
+//// }
+
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+////{ "files": ["target.ts", "globals.d.ts", "test.ts"] }
+
+const ranges = test.ranges();
+verify.pasteEdits({
+    args: {
+        copiedFrom: { file: "/home/src/workspaces/project/test.ts", range: [ranges[1]] },
+        pastedText: [ `export interface EditingService extends Disposable { }` ],
+        pasteLocations: [ranges[0]],
+    },
+    newFileContents: {
+        "/home/src/workspaces/project/target.ts":
+`import { Disposable } from "./test";
+
+export interface EditingService extends Disposable { }`
+
+    }
+});
\ No newline at end of file
diff --git a/tests/cases/fourslash/server/pasteEdits_globalAndLocal2.ts b/tests/cases/fourslash/server/pasteEdits_globalAndLocal2.ts
new file mode 100644
index 0000000000000..6e0ec85ee2427
--- /dev/null
+++ b/tests/cases/fourslash/server/pasteEdits_globalAndLocal2.ts
@@ -0,0 +1,40 @@
+/// <reference path="../fourslash.ts" />
+
+// @Filename: /home/src/workspaces/project/target.ts
+//// [||]
+
+// @Filename: /home/src/workspaces/project/test.ts
+//// import { Disposable } from './lifecycle';
+//// [|export interface EditingService extends Disposable { }|]
+
+// @Filename: /home/src/workspaces/project/lifecycle.ts
+//// export interface Disposable {
+//// 	(): string;
+//// }
+
+// @Filename: /home/src/workspaces/project/globals.d.ts
+//// export {}; // Make this a module
+//// declare global {
+////     interface Disposable {
+////         [Symbol.dispose](): void;
+////     }
+//// }
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+////{ "files": ["target.ts", "globals.d.ts", "test.ts", "lifecycle.ts"] }
+
+const ranges = test.ranges();
+verify.pasteEdits({
+    args: {
+        copiedFrom: { file: "/home/src/workspaces/project/test.ts", range: [ranges[1]] },
+        pastedText: [ `export interface EditingService extends Disposable { }` ],
+        pasteLocations: [ranges[0]],
+    },
+    newFileContents: {
+        "/home/src/workspaces/project/target.ts":
+`import { Disposable } from './lifecycle';
+
+export interface EditingService extends Disposable { }`
+
+    }
+});
\ No newline at end of file
diff --git a/tests/cases/fourslash/server/pasteEdits_namespaceImport.ts b/tests/cases/fourslash/server/pasteEdits_namespaceImport.ts
new file mode 100644
index 0000000000000..ded500926fa96
--- /dev/null
+++ b/tests/cases/fourslash/server/pasteEdits_namespaceImport.ts
@@ -0,0 +1,46 @@
+/// <reference path="../fourslash.ts" />
+
+// @Filename: /home/src/workspaces/project/folder/c.ts
+//// [||]
+
+
+// @Filename: /home/src/workspaces/project/a.ts
+//// const abc = 10;
+//// const def = 20;
+//// export interface testInterface {
+////     abc: number;
+////     def: number;
+//// }
+
+// @Filename: /home/src/workspaces/project/b.ts
+//// import * as test from "./a";
+////
+//// [|function foo(abc: test.abc, def: test.def) {
+////    console.log(abc);
+////    console.log(def);
+//// }|]
+//// 
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+////{ "files": ["folder/c.ts", "a.ts", "b.ts"] }
+
+const range = test.ranges();
+verify.pasteEdits({
+    args: {
+        pastedText: [`function foo(abc: test.abc, def: test.def) {
+console.log(abc);
+console.log(def);
+}`],
+        pasteLocations: [range[0]],
+        copiedFrom: { file: "/home/src/workspaces/project/b.ts", range: [range[1]] },
+    },
+    newFileContents: {
+        "/home/src/workspaces/project/folder/c.ts":
+`import * as test from "../a";
+
+function foo(abc: test.abc, def: test.def) {
+console.log(abc);
+console.log(def);
+}`
+    }
+});
\ No newline at end of file
diff --git a/tests/cases/fourslash/server/pasteEdits_rangeSelection0.ts b/tests/cases/fourslash/server/pasteEdits_rangeSelection0.ts
new file mode 100644
index 0000000000000..5ab90a9b480d2
--- /dev/null
+++ b/tests/cases/fourslash/server/pasteEdits_rangeSelection0.ts
@@ -0,0 +1,23 @@
+/// <reference path="../fourslash.ts" />
+// @Filename: /home/src/workspaces/project/folder/target.ts
+////[||]
+
+// @Filename: /home/src/workspaces/project/a.ts
+//// [||]function foo() { }
+//// const x = foo()
+////
+//// foo()
+//// x
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+////{ "files": ["a.ts", "folder/target.ts"] }
+
+const ranges = test.ranges();
+verify.pasteEdits({
+    args: {
+        pastedText: [``],
+        pasteLocations: [ranges[0]],
+        copiedFrom: { file: "/home/src/workspaces/project/a.ts", range: [ranges[1]] },
+    },
+    newFileContents: {}
+});
diff --git a/tests/cases/fourslash/server/pasteEdits_rangeSelection1.ts b/tests/cases/fourslash/server/pasteEdits_rangeSelection1.ts
new file mode 100644
index 0000000000000..f9276c236dadb
--- /dev/null
+++ b/tests/cases/fourslash/server/pasteEdits_rangeSelection1.ts
@@ -0,0 +1,34 @@
+/// <reference path="../fourslash.ts" />
+// @Filename: /home/src/workspaces/project/folder/target.ts
+////[||]
+
+// @Filename: /home/src/workspaces/project/a.ts
+//// function foo() { }
+//// const x = foo()
+////
+//// [|foo()|]
+//// x
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+////{ "files": ["a.ts", "folder/target.ts"] }
+
+const ranges = test.ranges();
+verify.pasteEdits({
+    args: {
+        pastedText: [`foo()`],
+        pasteLocations: [ranges[0]],
+        copiedFrom: { file: "/home/src/workspaces/project/a.ts", range: [ranges[1]] },
+    },
+    newFileContents: {
+        "/home/src/workspaces/project/folder/target.ts":
+`import { foo } from "../a";
+
+foo()`,
+        "/home/src/workspaces/project/a.ts":
+`export function foo() { }
+const x = foo()
+
+foo()
+x`,
+    }
+});
diff --git a/tests/cases/fourslash/server/pasteEdits_rangeSelection2.ts b/tests/cases/fourslash/server/pasteEdits_rangeSelection2.ts
new file mode 100644
index 0000000000000..4f6992b1f1868
--- /dev/null
+++ b/tests/cases/fourslash/server/pasteEdits_rangeSelection2.ts
@@ -0,0 +1,32 @@
+/// <reference path="../fourslash.ts" />
+// @Filename: /home/src/workspaces/project/folder/target.ts
+////[||]
+
+// @Filename: /home/src/workspaces/project/a.ts
+//// function foo() { }
+////
+//// // comment
+//// [|foo()|]
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+////{ "files": ["a.ts", "folder/target.ts"] }
+
+const ranges = test.ranges();
+verify.pasteEdits({
+    args: {
+        pastedText: [`foo()`],
+        pasteLocations: [ranges[0]],
+        copiedFrom: { file: "/home/src/workspaces/project/a.ts", range: [ranges[1]] },
+    },
+    newFileContents: {
+        "/home/src/workspaces/project/folder/target.ts":
+`import { foo } from "../a";
+
+foo()`,
+        "/home/src/workspaces/project/a.ts":
+`export function foo() { }
+
+// comment
+foo()`,
+    }
+});
diff --git a/tests/cases/fourslash/server/pasteEdits_rangeSelection3.ts b/tests/cases/fourslash/server/pasteEdits_rangeSelection3.ts
new file mode 100644
index 0000000000000..d9cd323acdab1
--- /dev/null
+++ b/tests/cases/fourslash/server/pasteEdits_rangeSelection3.ts
@@ -0,0 +1,32 @@
+/// <reference path="../fourslash.ts" />
+// @Filename: /home/src/workspaces/project/folder/target.ts
+////[||]
+
+// @Filename: /home/src/workspaces/project/a.ts
+//// function foo() { }
+////
+//// /* comment */
+//// [|foo()|]
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+////{ "files": ["a.ts", "folder/target.ts"] }
+
+const ranges = test.ranges();
+verify.pasteEdits({
+    args: {
+        pastedText: [`foo()`],
+        pasteLocations: [ranges[0]],
+        copiedFrom: { file: "/home/src/workspaces/project/a.ts", range: [ranges[1]] },
+    },
+    newFileContents: {
+        "/home/src/workspaces/project/folder/target.ts":
+`import { foo } from "../a";
+
+foo()`,
+        "/home/src/workspaces/project/a.ts":
+`export function foo() { }
+
+/* comment */
+foo()`,
+    }
+});
diff --git a/tests/cases/fourslash/server/pasteEdits_rangeSelection4.ts b/tests/cases/fourslash/server/pasteEdits_rangeSelection4.ts
new file mode 100644
index 0000000000000..56c6d6ce60c0c
--- /dev/null
+++ b/tests/cases/fourslash/server/pasteEdits_rangeSelection4.ts
@@ -0,0 +1,44 @@
+/// <reference path="../fourslash.ts" />
+// @Filename: /home/src/workspaces/project/folder/target.ts
+////[||]
+
+// @Filename: /home/src/workspaces/project/a.ts
+//// function foo() { }
+////
+//// /*
+//// [|  comment
+////   more comment
+//// */
+//// foo()|]
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+////{ "files": ["a.ts", "folder/target.ts"] }
+
+const ranges = test.ranges();
+verify.pasteEdits({
+    args: {
+        pastedText: [`  comment
+  more comment
+*/
+foo()`],
+        pasteLocations: [ranges[0]],
+        copiedFrom: { file: "/home/src/workspaces/project/a.ts", range: [ranges[1]] },
+    },
+    newFileContents: {
+        "/home/src/workspaces/project/folder/target.ts":
+`import { foo } from "../a"
+
+  comment
+  more comment
+*/
+foo()`,
+        "/home/src/workspaces/project/a.ts":
+`export function foo() { }
+
+/*
+  comment
+  more comment
+*/
+foo()`,
+    }
+});
diff --git a/tests/cases/fourslash/server/pasteEdits_rangeSelection5.ts b/tests/cases/fourslash/server/pasteEdits_rangeSelection5.ts
new file mode 100644
index 0000000000000..df881e68744c8
--- /dev/null
+++ b/tests/cases/fourslash/server/pasteEdits_rangeSelection5.ts
@@ -0,0 +1,34 @@
+/// <reference path="../fourslash.ts" />
+// @Filename: /home/src/workspaces/project/folder/target.ts
+////[||]
+
+// @Filename: /home/src/workspaces/project/a.ts
+//// function foo() { }
+////
+//// [|// comment
+//// foo()|]
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+////{ "files": ["a.ts", "folder/target.ts"] }
+
+const ranges = test.ranges();
+verify.pasteEdits({
+    args: {
+        pastedText: [`// comment
+foo()`],
+        pasteLocations: [ranges[0]],
+        copiedFrom: { file: "/home/src/workspaces/project/a.ts", range: [ranges[1]] },
+    },
+    newFileContents: {
+        "/home/src/workspaces/project/folder/target.ts":
+`import { foo } from "../a";
+
+// comment
+foo()`,
+        "/home/src/workspaces/project/a.ts":
+`export function foo() { }
+
+// comment
+foo()`,
+    }
+});
diff --git a/tests/cases/fourslash/server/pasteEdits_rangeSelection6.ts b/tests/cases/fourslash/server/pasteEdits_rangeSelection6.ts
new file mode 100644
index 0000000000000..607e98f052ff6
--- /dev/null
+++ b/tests/cases/fourslash/server/pasteEdits_rangeSelection6.ts
@@ -0,0 +1,42 @@
+/// <reference path="../fourslash.ts" />
+// @Filename: /home/src/workspaces/project/folder/target.ts
+////[||]
+
+// @Filename: /home/src/workspaces/project/a.ts
+//// function foo() { }
+//// const x = foo()
+////
+//// // comment
+//// [|foo()
+//// /* another comment */
+//// x|]
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+////{ "files": ["a.ts", "folder/target.ts"] }
+
+const ranges = test.ranges();
+verify.pasteEdits({
+    args: {
+        pastedText: [`foo()
+/* another comment */
+x`],
+        pasteLocations: [ranges[0]],
+        copiedFrom: { file: "/home/src/workspaces/project/a.ts", range: [ranges[1]] },
+    },
+    newFileContents: {
+        "/home/src/workspaces/project/folder/target.ts":
+`import { foo, x } from "../a"
+
+foo()
+/* another comment */
+x`,
+        "/home/src/workspaces/project/a.ts":
+`export function foo() { }
+export const x = foo()
+
+// comment
+foo()
+/* another comment */
+x`,
+    }
+});
diff --git a/tests/cases/fourslash/server/pasteEdits_rangeSelection7.ts b/tests/cases/fourslash/server/pasteEdits_rangeSelection7.ts
new file mode 100644
index 0000000000000..cf8deea6bcc22
--- /dev/null
+++ b/tests/cases/fourslash/server/pasteEdits_rangeSelection7.ts
@@ -0,0 +1,40 @@
+/// <reference path="../fourslash.ts" />
+// @Filename: /home/src/workspaces/project/folder/target.ts
+////[||]
+
+// @Filename: /home/src/workspaces/project/a.ts
+//// function foo() { }
+//// const x = foo()
+////
+//// // comment
+//// [|foo
+//// /* another comment */|]
+//// x
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+////{ "files": ["a.ts", "folder/target.ts"] }
+
+const ranges = test.ranges();
+verify.pasteEdits({
+    args: {
+        pastedText: [`foo
+/* another comment */`],
+        pasteLocations: [ranges[0]],
+        copiedFrom: { file: "/home/src/workspaces/project/a.ts", range: [ranges[1]] },
+    },
+    newFileContents: {
+        "/home/src/workspaces/project/folder/target.ts":
+`import { foo } from "../a";
+
+foo
+/* another comment */`,
+        "/home/src/workspaces/project/a.ts":
+`export function foo() { }
+const x = foo()
+
+// comment
+foo
+/* another comment */
+x`,
+    }
+});
diff --git a/tests/cases/fourslash/server/pasteEdits_rangeSelection8.ts b/tests/cases/fourslash/server/pasteEdits_rangeSelection8.ts
new file mode 100644
index 0000000000000..13a54c2f854f7
--- /dev/null
+++ b/tests/cases/fourslash/server/pasteEdits_rangeSelection8.ts
@@ -0,0 +1,42 @@
+/// <reference path="../fourslash.ts" />
+// @Filename: /home/src/workspaces/project/folder/target.ts
+////[||]
+
+// @Filename: /home/src/workspaces/project/a.ts
+//// function foo() { }
+//// const aaaa = foo()
+////
+//// // comment
+//// [|foo
+//// /* another comment */
+//// a|]aaa
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+////{ "files": ["a.ts", "folder/target.ts"] }
+
+const ranges = test.ranges();
+verify.pasteEdits({
+    args: {
+        pastedText: [`foo
+/* another comment */
+a`],
+        pasteLocations: [ranges[0]],
+        copiedFrom: { file: "/home/src/workspaces/project/a.ts", range: [ranges[1]] },
+    },
+    newFileContents: {
+        "/home/src/workspaces/project/folder/target.ts":
+`import { foo } from "../a"
+
+foo
+/* another comment */
+a`,
+        "/home/src/workspaces/project/a.ts":
+`export function foo() { }
+const aaaa = foo()
+
+// comment
+foo
+/* another comment */
+aaaa`,
+    }
+});
diff --git a/tests/cases/fourslash/server/pasteEdits_rangeSelection9.ts b/tests/cases/fourslash/server/pasteEdits_rangeSelection9.ts
new file mode 100644
index 0000000000000..872746f4ba141
--- /dev/null
+++ b/tests/cases/fourslash/server/pasteEdits_rangeSelection9.ts
@@ -0,0 +1,34 @@
+/// <reference path="../fourslash.ts" />
+// @Filename: /home/src/workspaces/project/folder/target.ts
+////[||]
+
+// @Filename: /home/src/workspaces/project/a.ts
+//// function foo() { }
+////
+//// // comment
+//// [|foo|]
+//// /* another comment */
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+////{ "files": ["a.ts", "folder/target.ts"] }
+
+const ranges = test.ranges();
+verify.pasteEdits({
+    args: {
+        pastedText: [`foo`],
+        pasteLocations: [ranges[0]],
+        copiedFrom: { file: "/home/src/workspaces/project/a.ts", range: [ranges[1]] },
+    },
+    newFileContents: {
+        "/home/src/workspaces/project/folder/target.ts":
+`import { foo } from "../a";
+
+foo`,
+        "/home/src/workspaces/project/a.ts":
+`export function foo() { }
+
+// comment
+foo
+/* another comment */`,
+    }
+});
diff --git a/tests/cases/fourslash/server/pasteEdits_requireImportJsx.ts b/tests/cases/fourslash/server/pasteEdits_requireImportJsx.ts
new file mode 100644
index 0000000000000..f7be3b8f61c4a
--- /dev/null
+++ b/tests/cases/fourslash/server/pasteEdits_requireImportJsx.ts
@@ -0,0 +1,47 @@
+/// <reference path="../fourslash.ts" />
+
+// @Filename: /home/src/workspaces/project/folder/c.jsx
+//// [||]
+
+// @Filename: /home/src/workspaces/project/b.jsx
+//// import React = require("./react");
+////
+//// [|class MyComponent extends React.Component {
+////     render() {
+////         return <div />;
+////     }
+//// }|]
+
+// @Filename: /home/src/workspaces/project/react.d.ts
+////export = React;
+////export as namespace React;
+////declare namespace React {
+////    class Component {}
+////}
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+////{ "files": ["folder/c.jsx", "react.d.ts", "b.jsx"] }
+
+const range = test.ranges();
+verify.pasteEdits({
+    args: {
+        pastedText: 
+[`class MyComponent extends React.Component {
+    render() {
+        return <div />;
+    }
+}`],
+        pasteLocations: [range[0]],
+        copiedFrom: { file: "/home/src/workspaces/project/b.jsx", range: [range[1]] },
+    },
+    newFileContents: {
+        "/home/src/workspaces/project/folder/c.jsx":
+`const React = require("../react");
+
+class MyComponent extends React.Component {
+    render() {
+        return <div />;
+    }
+}`
+    }
+});
\ No newline at end of file
diff --git a/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard1.ts b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard1.ts
new file mode 100644
index 0000000000000..0bc1ad2dbdacc
--- /dev/null
+++ b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard1.ts
@@ -0,0 +1,52 @@
+/// <reference path="../fourslash.ts"/>
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+//// {
+////   "compilerOptions": {
+////     "module": "nodenext",
+////     "rootDir": "src",
+////     "outDir": "dist"
+////   }
+//// }
+
+// @Filename: /home/src/workspaces/project/package.json
+//// {
+////   "name": "foo",
+////   "main": "dist/index.js",
+////   "module": "dist/index.mjs",
+////   "types": "dist/index.d.ts",
+////   "imports": {
+////     "#*": {
+////       "types": "./dist/*.d.ts",
+////       "import": "./dist/*.mjs",
+////       "default": "./dist/*.js"
+////     },
+////     "#arguments": {
+////       "types": "./dist/arguments/index.d.ts",
+////       "import": "./dist/arguments/index.mjs",
+////       "default": "./dist/arguments/index.js"
+////     }
+////   }
+//// }
+
+// @Filename: /home/src/workspaces/project/src/index.ts
+//// export const index = 0;
+
+// @Filename: /home/src/workspaces/project/src/blah.ts
+//// export const blah = 0;
+
+// @Filename: /home/src/workspaces/project/src/arguments/index.ts
+//// export const arguments = 0;
+
+// @Filename: /home/src/workspaces/project/src/m.mts
+//// import { } from "/**/";
+
+verify.completions({
+  marker: "",
+  isNewIdentifierLocation: true,
+  exact: [
+    { name: "#blah", kind: "script", kindModifiers: "" },
+    { name: "#index", kind: "script", kindModifiers: "" },
+    { name: "#arguments", kind: "script", kindModifiers: "" },
+  ]
+});
diff --git a/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard2.ts b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard2.ts
new file mode 100644
index 0000000000000..5dbbeba52d78c
--- /dev/null
+++ b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard2.ts
@@ -0,0 +1,49 @@
+/// <reference path="../fourslash.ts"/>
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+//// {
+////   "compilerOptions": {
+////     "module": "nodenext",
+////     "rootDir": "src",
+////     "outDir": "dist"
+////   }
+//// }
+
+// @Filename: /home/src/workspaces/project/package.json
+//// {
+////   "name": "salesforce-pageobjects",
+////   "version": "1.0.0",
+////   "imports": {
+////     "#*": {
+////       "types": "./dist/*.d.ts",
+////       "import": "./dist/*.mjs",
+////       "default": "./dist/*.js"
+////     }
+////   }
+//// }
+
+// @Filename: /home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts
+//// export const actionRenderer = 0;
+
+// @Filename: /home/src/workspaces/project/src/index.mts
+//// import { } from "/**/";
+
+verify.completions({
+  marker: "",
+  isNewIdentifierLocation: true,
+  exact: [{ name: "#action", kind: "directory" }]
+});
+
+edit.insert("#action/");
+
+verify.completions({
+  isNewIdentifierLocation: true,
+  exact: [{ name: "pageObjects", kind: "directory" }],
+});
+
+edit.insert("pageObjects/");
+
+verify.completions({
+  isNewIdentifierLocation: true,
+  exact: [{ name: "actionRenderer", kind: "script" }],
+});
diff --git a/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard3.ts b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard3.ts
new file mode 100644
index 0000000000000..443382bdf4811
--- /dev/null
+++ b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard3.ts
@@ -0,0 +1,53 @@
+/// <reference path="../fourslash.ts"/>
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+//// {
+////   "compilerOptions": {
+////     "module": "nodenext",
+////     "rootDir": "src",
+////     "outDir": "dist",
+////     "declarationDir": "types"
+////   }
+//// }
+
+// @Filename: /home/src/workspaces/project/package.json
+//// {
+////   "types": "index.d.ts",
+////   "imports": {
+////     "#component-*": {
+////       "types@>=4.3.5": "types/components/*.d.ts"
+////     }
+////   }
+//// }
+
+// @Filename: /home/src/workspaces/project/nope.ts
+//// export const nope = 0;
+
+// @Filename: /home/src/workspaces/project/src/components/index.ts
+//// export const index = 0;
+
+// @Filename: /home/src/workspaces/project/src/components/blah.ts
+//// export const blah = 0;
+
+// @Filename: /home/src/workspaces/project/src/components/subfolder/one.ts
+//// export const one = 0;
+
+// @Filename: /home/src/workspaces/project/src/a.ts
+//// import { } from "/**/";
+
+verify.completions({
+  marker: "",
+  isNewIdentifierLocation: true,
+  exact: [
+    { name: "#component-blah", kind: "script" },
+    { name: "#component-index", kind: "script" },
+    { name: "#component-subfolder", kind: "directory" },
+  ],
+});
+
+edit.insert("#component-subfolder/");
+
+verify.completions({
+  isNewIdentifierLocation: true,
+  exact: [{ name: "one", kind: "script" }],
+});
diff --git a/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard4.ts b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard4.ts
new file mode 100644
index 0000000000000..ae393be7ce4d6
--- /dev/null
+++ b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard4.ts
@@ -0,0 +1,73 @@
+/// <reference path="../fourslash.ts"/>
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+//// {
+////   "compilerOptions": {
+////     "module": "nodenext",
+////     "rootDir": "src",
+////     "outDir": "dist"
+////   }
+//// }
+
+// @Filename: /home/src/workspaces/project/package.json
+//// {
+////   "types": "index.d.ts",
+////   "imports": {
+////     "#*": "dist/*",
+////     "#foo/*": "dist/*",
+////     "#bar/*": "dist/*",
+////     "#exact-match": "dist/index.d.ts"
+////   }
+//// }
+
+// @Filename: /home/src/workspaces/project/nope.ts
+//// export const nope = 0;
+
+// @Filename: /home/src/workspaces/project/src/index.ts
+//// export const index = 0;
+
+// @Filename: /home/src/workspaces/project/src/blah.ts
+//// export const blah = 0;
+
+// @Filename: /home/src/workspaces/project/src/foo/onlyInFooFolder.ts
+//// export const foo = 0;
+
+// @Filename: /home/src/workspaces/project/src/subfolder/one.ts
+//// export const one = 0;
+
+// @Filename: /home/src/workspaces/project/src/a.mts
+//// import { } from "/**/";
+
+verify.completions({
+  marker: "",
+  isNewIdentifierLocation: true,
+  exact: [
+    { name: "#a.mjs", kind: "script", kindModifiers: ".mjs" },
+    { name: "#blah.js", kind: "script", kindModifiers: ".js" },
+    { name: "#index.js", kind: "script", kindModifiers: ".js" },
+    { name: "#foo", kind: "directory" },
+    { name: "#subfolder", kind: "directory" },
+    { name: "#bar", kind: "directory" },
+    { name: "#exact-match", kind: "script" },
+  ],
+});
+
+edit.insert("#foo/");
+
+verify.completions({
+  isNewIdentifierLocation: true,
+  exact: [
+    { name: "a.mjs", kind: "script", kindModifiers: ".mjs" },
+    { name: "blah.js", kind: "script", kindModifiers: ".js" },
+    { name: "index.js", kind: "script", kindModifiers: ".js" },
+    { name: "foo", kind: "directory" },
+    { name: "subfolder", kind: "directory" },
+  ],
+});
+
+edit.insert("foo/");
+
+verify.completions({
+  isNewIdentifierLocation: true,
+  exact: [{ name: "onlyInFooFolder.js", kind: "script", kindModifiers: ".js" }],
+});
diff --git a/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard5.ts b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard5.ts
new file mode 100644
index 0000000000000..d63f313c1773e
--- /dev/null
+++ b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard5.ts
@@ -0,0 +1,64 @@
+/// <reference path="../fourslash.ts"/>
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+//// {
+////   "compilerOptions": {
+////     "module": "nodenext",
+////     "rootDir": "src",
+////     "outDir": "dist/esm",
+////     "declarationDir": "dist/types"
+////   }
+//// }
+
+// @Filename: /home/src/workspaces/project/package.json
+//// {
+////   "name": "foo",
+////   "main": "dist/index.js",
+////   "module": "dist/index.mjs",
+////   "types": "dist/index.d.ts",
+////   "imports": {
+////     "#*": {
+////       "import": {
+////         "types": "./dist/types/*.d.mts",
+////         "default": "./dist/esm/*.mjs"
+////       },
+////       "default": {
+////         "types": "./dist/types/*.d.ts",
+////         "default": "./dist/cjs/*.js"
+////       }
+////     },
+////     "#only-in-cjs": {
+////       "require": {
+////         "types": "./dist/types/only-in-cjs/index.d.ts",
+////         "default": "./dist/cjs/only-in-cjs/index.js"
+////       }
+////     }
+////   }
+//// }
+
+// @Filename: /home/src/workspaces/project/src/index.mts
+//// export const index = 0;
+
+// @Filename: /home/src/workspaces/project/src/index.ts
+//// export const index = 0;
+
+// @Filename: /home/src/workspaces/project/src/blah.mts
+//// export const blah = 0;
+
+// @Filename: /home/src/workspaces/project/src/blah.ts
+//// export const blah = 0;
+
+// @Filename: /home/src/workspaces/project/src/only-in-cjs/index.ts
+//// export const onlyInCjs = 0;
+
+// @Filename: /home/src/workspaces/project/src/index.mts
+//// import { } from "/**/";
+
+verify.completions({
+  marker: "",
+  isNewIdentifierLocation: true,
+  exact: [
+    { name: "#blah", kind: "script", kindModifiers: "" },
+    { name: "#index", kind: "script", kindModifiers: "" },
+  ]
+});
diff --git a/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard6.ts b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard6.ts
new file mode 100644
index 0000000000000..79026a3f7c2b3
--- /dev/null
+++ b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard6.ts
@@ -0,0 +1,38 @@
+/// <reference path="../fourslash.ts"/>
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+//// {
+////   "compilerOptions": {
+////     "module": "nodenext",
+////     "rootDir": "src",
+////     "outDir": "dist"
+////   }
+//// }
+
+// @Filename: /home/src/workspaces/project/package.json
+//// {
+////   "name": "foo",
+////   "main": "dist/index.js",
+////   "module": "dist/index.mjs",
+////   "types": "dist/index.d.ts",
+////   "imports": {
+////     "#*": "./dist/*?.d.ts"
+////   }
+//// }
+
+// @Filename: /home/src/workspaces/project/src/index.ts
+//// export const index = 0;
+
+// @Filename: /home/src/workspaces/project/src/blah?.ts
+//// export const blah = 0;
+
+// @Filename: /home/src/workspaces/project/src/m.mts
+//// import { } from "/**/";
+
+verify.completions({
+  marker: "",
+  isNewIdentifierLocation: true,
+  exact: [
+    { name: "#blah", kind: "script", kindModifiers: "" },
+  ]
+});
diff --git a/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard7.ts b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard7.ts
new file mode 100644
index 0000000000000..c26da613c1304
--- /dev/null
+++ b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard7.ts
@@ -0,0 +1,32 @@
+/// <reference path="../fourslash.ts"/>
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+//// {
+////   "compilerOptions": {
+////     "module": "nodenext",
+////     "rootDir": "src",
+////     "outDir": "dist"
+////   }
+//// }
+
+// @Filename: /home/src/workspaces/project/package.json
+//// {
+////   "name": "foo",
+////   "imports": {
+////     "#*": "./dist/*.js"
+////   }
+//// }
+
+// @Filename: /home/src/workspaces/project/src/blah.ts
+//// export const blah = 0;
+
+// @Filename: /home/src/workspaces/project/src/index.mts
+//// import { } from "/**/";
+
+verify.completions({
+  marker: "",
+  isNewIdentifierLocation: true,
+  exact: [
+    { name: "#blah", kind: "script", kindModifiers: "" },
+  ]
+});
diff --git a/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard8.ts b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard8.ts
new file mode 100644
index 0000000000000..c26da613c1304
--- /dev/null
+++ b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard8.ts
@@ -0,0 +1,32 @@
+/// <reference path="../fourslash.ts"/>
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+//// {
+////   "compilerOptions": {
+////     "module": "nodenext",
+////     "rootDir": "src",
+////     "outDir": "dist"
+////   }
+//// }
+
+// @Filename: /home/src/workspaces/project/package.json
+//// {
+////   "name": "foo",
+////   "imports": {
+////     "#*": "./dist/*.js"
+////   }
+//// }
+
+// @Filename: /home/src/workspaces/project/src/blah.ts
+//// export const blah = 0;
+
+// @Filename: /home/src/workspaces/project/src/index.mts
+//// import { } from "/**/";
+
+verify.completions({
+  marker: "",
+  isNewIdentifierLocation: true,
+  exact: [
+    { name: "#blah", kind: "script", kindModifiers: "" },
+  ]
+});
diff --git a/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard9.ts b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard9.ts
new file mode 100644
index 0000000000000..fdbe7436f4d96
--- /dev/null
+++ b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard9.ts
@@ -0,0 +1,33 @@
+/// <reference path="../fourslash.ts"/>
+
+// @Filename: /home/src/workspaces/project/tsconfig.json
+//// {
+////   "compilerOptions": {
+////     "module": "nodenext",
+////     "rootDir": "src",
+////     "outDir": "dist",
+////     "allowJs": true
+////   }
+//// }
+
+// @Filename: /home/src/workspaces/project/package.json
+//// {
+////   "name": "foo",
+////   "imports": {
+////     "#*": "./dist/*.js"
+////   }
+//// }
+
+// @Filename: /home/src/workspaces/project/src/blah.js
+//// export const blah = 0;
+
+// @Filename: /home/src/workspaces/project/src/index.mts
+//// import { } from "/**/";
+
+verify.completions({
+  marker: "",
+  isNewIdentifierLocation: true,
+  exact: [
+    { name: "#blah", kind: "script", kindModifiers: "" },
+  ]
+});
diff --git a/tests/cases/fourslash/server/quickinfoVerbosityServer.ts b/tests/cases/fourslash/server/quickinfoVerbosityServer.ts
new file mode 100644
index 0000000000000..9fc9eeb7082e1
--- /dev/null
+++ b/tests/cases/fourslash/server/quickinfoVerbosityServer.ts
@@ -0,0 +1,6 @@
+/// <reference path="../fourslash.ts"/>
+
+//// type FooType = string | number
+//// const foo/*a*/: FooType = 1
+
+verify.baselineQuickInfo({ "a": [0, 1] });
\ No newline at end of file