Sometimes the TypeScript server in Visual Studio Code crashes which results in broken auto completion. You can restart the server with a single command.

Make sure that you have a TypeScript file open, press Ctrl+Shift+P (or Cmd+Shift+P on macOS) to open the Command Palette and type restart, then select the command "TypeScript: Restart TS server".

Restart TS server command in VS Code

The status bar at the bottom of the window will show the status of the server.