Repository: TypeScript
Issue: TS hangs up entire computer, type of variables stuck at "Loading..."
Labels: Bug

### 🔎 Search Terms

TS intellisense not working, TS hangs up entire PC, Type inference not working

### 🕗 Version & Regression Information

- This is a crash using version 5.4.5
- I tried versions 5.4.3, 5.4.5, and 5.5
- This issue sprung up out of nowhere, I have no idea about the origin


### ⏯ Reproduction steps

To reproduce this issue please clone the following repository  - https://github.com/slyofzero/TONBuyBot
Install the packages using pnpm - `pnpm i`
Visit the file - `./src/bot/commands/index.ts`

### 💻 Code

The file code in question is very tame -
```ts
import { teleBot } from "@/index";
import { startBot } from "./start";
import { log, errorHandler } from "@/utils/handlers";
import { settings } from "./settings";
import { setEmojiCommand } from "./setEmoji";
import { stopBot } from "./stop";
import { setGifCommand } from "./setGif";

export function initiateBotCommands() {
  teleBot.api
    .setMyCommands([
      { command: "start", description: "Start the bot" },
      { command: "stop", description: "Stop the bot" },
      { command: "settings", description: "To customize the bot" },
      { command: "setemoji", description: "To set an emoji" },
      { command: "setgif", description: "To set a GIF" },
    ])
    .catch((e) => errorHandler(e));

  teleBot.command("start", (ctx) => startBot(ctx));
  teleBot.command("stop", (ctx) => stopBot(ctx));
  teleBot.command("settings", (ctx) => settings(ctx));
  teleBot.command("setemoji", (ctx) => setEmojiCommand(ctx));

  teleBot.hears(/\/setgif/, (ctx) => setGifCommand(ctx, true));
  // @ts-expect-error CTX type invalid
  teleBot.on(":animation", (ctx) => setGifCommand(ctx));

  log("Bot commands up");
}
```

The above code is used to setup a telegram bot's commands using grammy.js

### 🙁 Actual behavior

Update - The issue only occurs when I open the `./src/bot/commands/index.ts` file of the repository I share above in reproduction steps.

Uptil yesterday night VSCode and Typescript Intellisense worked fine but now types of variables upon hovering are indefinitely stuck at "Loading..."

![image](https://github.com/microsoft/TypeScript/assets/71858966/a6f18a3e-cc7d-493b-a811-c16c345a6a05)

This is followed by a high spike in CPU and RAM usage

![image](https://github.com/microsoft/TypeScript/assets/71858966/2d535b2f-5d3e-4886-b5ff-069dd305e59f)

The icon to the bottom right showing TS server status keeps spinning followed followed by the spike in CPU and RAM usage mentioned above.

![image](https://github.com/microsoft/TypeScript/assets/71858966/941dd375-92a1-499f-b692-4939797213b2)

Because of all these issues, using the computer with the project on is next to impossible. Typescript syntax errors, Intellisense, or Type inference, nothing works. I first tried uninstalling and reinstalling VSCode but that didn't fix it. I formatted by hard drive and reinstalled my OS but the problem still persists. I have gone through the below two issues that sounds similar to my problem but haven't found a fix yet.

https://github.com/microsoft/TypeScript/issues/35512
https://github.com/microsoft/vscode/issues/87870


### 🙂 Expected behavior

The expected behaviour would be smooth Intellisense, type inference, and an average usage of CPU and RAM not affecting other functionalities of my PC.

### Additional information about the issue

I have tried this issue on two different devices and two different OS and been able to reproduce on both.

First device was an i3, 8GB RAM Dell Inspiron 5482 with Windows 10
Second device is an AMD Ryzen 7 6800, 32GB RAM, 8GB RTX 3070, Lenovo Legion 5 Pro with Windows 11