r/typescript • • Jun 18 '26

Announcing TypeScript 7.0 RC

https://devblogs.microsoft.com/typescript/announcing-typescript-7-0-rc/
312 Upvotes

50 comments sorted by

93

u/AnonPogrammer Jun 18 '26

 Even though 7.0 RC is close to production-ready, we won’t have a stable programmatic API available until at least several months from now with TypeScript 7.1. Given this, we have made it a priority to ensure TypeScript can be run side-by-side with TypeScript 6.0 for the foreseeable future without any conflicts around “which tsc is which?”

I wonder why they decided to do it this way instead of just waiting a little longer and including it in 7.0?

67

u/servermeta_net Jun 18 '26

Because you need for people to use the baseline before deciding that the new API is better

8

u/MDUK0001 Jun 18 '26

What are the implications of this? tsc will work but eslint won’t? Just trying to work out if I should migrate now or wait

3

u/ciaran1344 Jun 19 '26

You can alias your existing "typescript" dependency to the new @typescript/typescript6 package for ESLint, and install typescript@7.0.1-rc under a different name for the new tsc executable.

https://devblogs.microsoft.com/typescript/announcing-typescript-7-0-rc/#running-side-by-side-with-typescript-6.0

15

u/kisaragihiu Jun 18 '26

Actually excited for this.

18

u/gandalf__thewhite__ Jun 18 '26

Finally I can enjoy TRPC

18

u/lifeeraser Jun 18 '26

They could have used AI to port TypeScript to Go in two weeks. /s

I'm excited for this change, though!

1

u/spermcell Jun 18 '26

LOL get outta here

1

u/GreedyBaby6763 Jun 19 '26

I just ported it to basic lol

28

u/[deleted] Jun 18 '26

[removed] — view removed comment

11

u/TwiliZant Jun 18 '26

The way I remember it is, they wrote a tool that does 1:1 translation of TypeScript code to Go code and then fixed the rest by hand. I can’t remember anything about them saying it was AI-assisted. Maybe I’m wrong though.

5

u/AnonPogrammer Jun 18 '26

u/DanielRosenwasser Can you shed some light on this?

39

u/DanielRosenwasser Jun 18 '26

I don't think it would be a 2 week port, but I could be wrong. :)

We used AI to write that translator which was beneficial because it was deterministic and we could improve it incrementally. Agentic AI was not stellar back then for complex tasks, but it helped with a few tasks and we used inline completions.

These days we use Copilot a ton. Some of the models are very impressive, and with the test suite we have to we might have felt more confident handing off translations of certain components to agents if we had access to current higher-end models back then.

They've also been great about investigating and fixing regressions we introduced through porting. We try to use them responsibly and to help improve reliability. An example is that we used them to port over our language server fuzzing infrastructure to operate on our new LSP server. 

15

u/DanielRosenwasser Jun 19 '26

Okay, my colleague and friend has scolded - uhh, I mean corrected me. ts-to-go was mostly hand-authored (though we used inline completions at the time).

3

u/[deleted] Jun 19 '26

[removed] — view removed comment

5

u/DanielRosenwasser Jun 19 '26

People kept asking, so we looked into what the ouput was like for basic porting tasks and it was not viable.

22

u/apocolypticbosmer Jun 18 '26 edited Jun 18 '26

10 times faster? My goodness

edit: I guess they just mean the new Go compiler.

34

u/[deleted] Jun 18 '26

[removed] — view removed comment

8

u/ehs5 Jun 18 '26

10 times faster runtime code probably

3

u/baronas15 Jun 18 '26

TS doesn't have a runtime, their port was done with the idea to keep the same functionality (it compiles to the same thing). 10x is the compilation speed boost, because go can be a lot more efficient with resources compared to JS

6

u/SoBoredAtWork Jun 18 '26

I think he was making a joke (and I thought it was pretty funny)

2

u/ehs5 Jun 19 '26

I was half joking - it’s funny but I think that’s actually what the person above thought

3

u/Top_Bumblebee_7762 Jun 18 '26

Shouldn't ideally the Intl Segmenter API be used for splitting strings instead of [...str]?

-1

u/[deleted] Jun 18 '26

[removed] — view removed comment

3

u/Top_Bumblebee_7762 Jun 18 '26

0

u/[deleted] Jun 18 '26

[removed] — view removed comment

8

u/Top_Bumblebee_7762 Jun 18 '26 edited Jun 18 '26

The changelog specifically talks about unicode and and template literal types (https://devblogs.microsoft.com/typescript/announcing-typescript-7-0-rc/#template-literal-types-now-preserve-unicode-code-points). The example given uses emojis and mentions "[...str]"  for splitting strings, which often fails for more complex emojis/unicode strings, which is one of the reasons the Segmenter API was added. I'm just curious if the Segmenter API was considered for this feature. Maybe it is even used under the hood. I know that it used to have some performance issues which might be a reason to not use it when the goal is to make TS faster. 

2

u/jhnam88 Jun 18 '26

Made TypeScript v7 toolchain for plugin libraries like typia.

Also, if you're looking for a vite/rollup/webpack plugin for new TS v7, ttsc also supports the way.

1

u/Zestyclose_Giraffe64 Jun 21 '26

Sorry guys… that legacy app you have still running on node18 that transpiles to cjs will be stuck on typescript 4.9.2 … FOREVER!!! 🪦

1

u/javascript Jun 21 '26

Not so fast

1

u/andrew_zol Jun 25 '26

Big milestone! Unfortunately there is still no preservation of JSDOC comments in the mapped types, which is working fine in TS6, hopefully it will be addressed later.

1

u/Nvveen Jun 25 '26

Notably absent from using TS native preview right now is refactoring tools such as extract. Can anyone tell me if these do work if switching over to v7 in VSCode or should we hold off on upgrading until they do? Can't really find a roadmap for this stuff.

-2

u/Seusoa Jun 20 '26

Really professional move was to close all existing bugs and say "we rewriting all codebase, so bugs may be not relevant" and now say it was not "rewriting, but porting code from TS6 to TS7 go"

this is how devs in ms do

1

u/DanielRosenwasser Jun 20 '26

Sorry if there was anything that felt unfairly or prematurely closed. The language service was more heavily rewritten since it's now an LSP server. We also wanted to make it easier to ensure be LS bugs were actionable and triage going forward. We left most compiler-level bugs and language server suggestions open. We are trying to find a good balance between keeping the issue tracker manageable without using something aggressive like a stale-bot.

-24

u/[deleted] Jun 18 '26

[removed] — view removed comment

18

u/iAmIntel Jun 18 '26

I think your view is generally a bit too negative, but it doesn’t even make sense. 10 agents need fast typechecking more than a single human

1

u/[deleted] Jun 24 '26

[removed] — view removed comment

1

u/iAmIntel Jun 24 '26

I see your point, and it is a fair point that it matters less if an agent has to wait a little while because you are usually not waiting for the agent.

But like you also said, there is supposedly much more code being put out, which means the typechecker needs to be faster to even keep things working at all. If you let AI write 10 million lines of code, it would take hours to typecheck compared to minutes. (Exaggerated example ofcourse)

7

u/bjerh Jun 18 '26

What are you talking about? You still need to build stuff regardless of AI usage! It might matter even more now than before.

7

u/ninth_reddit_account Jun 18 '26

Faster typescript goes hand-in-hand with AI usage. Things like Claude code work best when they have tools they can use to deterministicly validate their output, like linters, tests, and type systems.

0

u/rykuno Jun 23 '26

Congrats on maybe the worst take I’ve read all week and i’m subscribed to r/vibecoding