< All Posts

VS Code and TypeScript Stale Errors

Have you ever run into an issue where you know your TypeScripts “types” are correct but VS Code stubbornly displays that ugly red squiggle line under your syntax barking that your TypeScript definitions are wrong. Before getting into a big hizzy of confusion there’s a good chance the VS Code TS server did not pick up on the correction and the error displayed is actually stale. First thing I would do is try restarting your TS compiler by first using the command (for Mac) cmd + shift + P then type “TS: restart” and press enter.

VS Code TS Server Restart

Wait a second or two and those nasty red squiggly lines should disappear. If not… maybe there is something wrong with your types lol ;).

Jesse Goodenough Mon Feb 13 2023