Skip to content

Add draft of TS 7 post#9938

Open
mjbvz wants to merge 1 commit into
mainfrom
dev/mjbvz/ts7-post
Open

Add draft of TS 7 post#9938
mjbvz wants to merge 1 commit into
mainfrom
dev/mjbvz/ts7-post

Conversation

@mjbvz

@mjbvz mjbvz commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Draft of a post about how VS Code adopted TypeScript 7

Date is just a placeholder

@DanielRosenwasser DanielRosenwasser left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️


VS Code and TypeScript practically grew up together. We made a bet early on to write VS Code in TypeScript, and we have always worked closely with the TypeScript team to provide great built-in TypeScript and JavaScript language support in VS Code. This post is about the next step of that journey: TypeScript 7, and how collaborating on adopting TypeScript 7 sped up our builds, improved the day-to-day editing loop for both developers and agents, and helped the TypeScript team ship a more tested release.

TypeScript 7 is a [ground-up rewrite of the TypeScript compiler and language tooling in Go](https://devblogs.microsoft.com/typescript/typescript-native-port/). That means it's fast, more than 10x faster in many cases. VS Code had a lot to gain from those speedups, so we were naturally eager to adopt TypeScript 7 as soon as we could.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"ground-up rewrite" -> "complete port"

## An incremental migration
The VS Code team has never been afraid to take on large engineering efforts, whether that's enabling [strict null checking in our codebase](https://code.visualstudio.com/blogs/2019/05/23/strict-null), adding [remote development support](https://code.visualstudio.com/blogs/2019/05/02/remote-development), or addressing and preventing dangerous code patterns across thousands of files. A common theme across these efforts is that we try to take an incremental approach. This means breaking big, complex problems down into small steps. Those steps happen in the main codebase (no forks or long-lived branches), and each one usually brings a small improvement as it lands. Take enough little steps, and eventually you can look back and realize that you've quietly conquered that once seemingly insurmountable challenge.

We wanted to take the same approach to adopting TypeScript 7. For us, that meant gradually introducing TypeScript 7 into different parts of our workflows and codebases, starting with lower-impact, lower risk areas before eventually moving on to the main areas of VS Code. There are many benefits to working incrementally, but two were especially important for this effort:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
We wanted to take the same approach to adopting TypeScript 7. For us, that meant gradually introducing TypeScript 7 into different parts of our workflows and codebases, starting with lower-impact, lower risk areas before eventually moving on to the main areas of VS Code. There are many benefits to working incrementally, but two were especially important for this effort:
We wanted to take the same approach to adopting TypeScript 7. For us, that meant gradually introducing TypeScript 7 into different parts of our workflows and codebases, starting with lower-impact, lower-risk areas before eventually moving on to the main areas of VS Code. There are many benefits to working incrementally, but two were especially important for this effort:

5 seconds
```

TypeScript 7 is more than seven times faster! That's especially impressive when you consider that these two tasks are doing the same work: they type check the same files with the same level of thoroughness and report the same errors. Just by switching from TypeScript 6 to TypeScript 7, we sped up our type checking by 7x.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty fitting number! :D


TypeScript 7 is more than seven times faster! That's especially impressive when you consider that these two tasks are doing the same work: they type check the same files with the same level of thoroughness and report the same errors. Just by switching from TypeScript 6 to TypeScript 7, we sped up our type checking by 7x.

With TypeScript 7, we can also now type check all of our built-in extensions (except Copilot) in well under a second (and even the large Copilot extension still only takes 2.5 seconds).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
With TypeScript 7, we can also now type check all of our built-in extensions (except Copilot) in well under a second (and even the large Copilot extension still only takes 2.5 seconds).
With TypeScript 7, we can also now type check almost all of our built-in extensions in well under a second. The only exception is our larger Copilot extension, and that still only takes 2.5 seconds.


With TypeScript 6, `npm run watch` takes around 80 seconds to complete. After migrating to TypeScript 7, we dropped this time to just over 20 seconds: roughly four times faster. That's a whole minute saved in normal development and agent-assisted iteration every time a build needs to be restarted (re-checks after the initial watch completes are around a second at most).

Those improvements also translate into better language tooling performance in the editor. For TypeScript language features in the editor, we need to load the whole `tsconfig` project before we can provide proper errors and complex features like auto imports. For the main VS Code project, that used to take close to a minute. Now it's around 10 seconds. That's roughly 50 seconds saved. With VS Code developers often reloading their editor windows multiple times per day, those saved seconds really add up. No more quick coffee runs while the editor tools are loading.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm actually a little bit surprised with the numbers for the editor experience. My experience is historically that a full project load used to take a minimum of 25-35 seconds on a good machine, and it's now basically under 2 seconds.

@DanielRosenwasser

Copy link
Copy Markdown
Member

Also, would be great if we could coordinate this after the (imminent) TS7 RC release to garner up more attention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants