Repository: TypeScript
Issue: Changes in JSON files cause stale TS error squiggles in ts/tsx files
Labels: Bug,Help Wanted


Type: <b>Bug</b>

1. Configure a TS project to allow JSON imports
2. Import a JSON file into a TS/TSX file.
3. Use the type information from the JSON file to infer different types.
4. Change the contents of the JSON file.
5. Navigate back to the TS file.
6. Observe that any TS errors become stale/new errors are not visible. Only restarting the server helps.

VS Code version: Code 1.94.2 (Universal) (384ff7382de624fb94dbaf6da11977bba1ecd427, 2024-10-09T16:08:44.566Z)
OS version: Darwin arm64 24.0.0
Modes:
Remote OS version: Linux arm64 6.8.0-45-generic

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Apple M1 (8 x 2400)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: enabled_on<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_graphite: disabled_off<br>video_decode: enabled<br>video_encode: enabled<br>webgl: enabled<br>webgl2: enabled<br>webgpu: enabled<br>webnn: disabled_off|
|Load (avg)|3, 3, 3|
|Memory (System)|16.00GB (0.04GB free)|
|Process Argv|--crash-reporter-id 9e5b74d3-969a-40a2-b2e5-561acacb1e0a|
|Screen Reader|no|
|VM|0%|

|Item|Value|
|---|---|
|Remote|Dev Container: Node.js & GitHub Actions @ 172.16.44.136|
|OS|Linux arm64 6.8.0-45-generic|
|CPUs|unknown (4 x 0)|
|Memory (System)|7.74GB (1.45GB free)|
|VM|0%|
</details><details><summary>Extensions (27)</summary>

Extension|Author (truncated)|Version
---|---|---
better-comments|aar|3.0.2
remote-containers|ms-|0.389.0
remote-ssh|ms-|0.115.0
remote-ssh-edit|ms-|0.87.0
vscode-remote-extensionpack|ms-|0.25.0
remote-explorer|ms-|0.4.3
remote-server|ms-|1.5.2
vscode-speech|ms-|0.10.0
vscode-eslint|dba|3.0.10
gitlens|eam|15.6.1
effect-vscode|eff|0.1.6
auto-run-command|gab|1.6.0
copilot|Git|1.238.0
copilot-chat|Git|0.21.2
vscode-github-actions|git|0.27.0
vscode-pull-request-github|Git|0.98.0
todo-tree|Gru|0.0.226
vscode-docker|ms-|1.29.3
vscode-kubernetes-tools|ms-|1.3.18
resourcemonitor|mut|1.0.7
vscode-yaml|red|1.15.0
preview-vscode|sea|2.3.7
vscode-styled-components|sty|1.7.8
vscode-stylelint|sty|1.4.0
explorer|vit|1.6.0
vscode-css-variables|vun|2.7.1
pretty-ts-errors|Yoa|0.6.0


</details><details>
<summary>A/B Experiments</summary>

```
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
pythonnoceb:30805159
asynctok:30898717
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
accentitlementst:30995554
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
f3je6385:31013174
a69g1124:31058053
dvdeprecation:31068756
dwnewjupyter:31046869
impr_priority:31102340
nativerepl2:31139839
refactort:31108082
pythonrstrctxt:31112756
wkspc-onlycs-t:31132770
wkspc-ranged-t:31151552
cf971741:31144450
autoexpandse:31146404
iacca2:31156134
notype1:31157159
5fd0e150:31155592
iconenabled:31158251

```

</details>

<!-- generated by issue reporter -->