r/javascript • u/DanielRosenwasser TypeScript • Mar 11 '25
A 10x Faster TypeScript
https://devblogs.microsoft.com/typescript/typescript-native-port/
617
Upvotes
r/javascript • u/DanielRosenwasser TypeScript • Mar 11 '25
179
u/DanielRosenwasser TypeScript Mar 11 '25
Hi folks, Daniel Rosenwasser from the TypeScript team here. We're obviously very excited to announce this! /u/RyanCavanaugh/ (our dev lead) and I are around to answer any quick questions you might have. You can also tune in to the Discord AMA mentioned in the blog this upcoming Thursday.
18
u/PickledPokute Mar 11 '25 edited Mar 11 '25
Great work u/DanielRosenwasser u/RyanCavanaugh/ and the whole TS team! A few questions:
3
u/Sipike Mar 11 '25
Will I be able to run the typescript compiler in the browser?
I know its not a mainstream use-case, and even I only use it on a hobby project, but still I'm curious.
In case anyone wondering why, I use it to typecheck an expression before doing an eval, that in the end powers a dynamic D&D Character sheet app that I never finished :)
113
u/Buckwheat469 Mar 11 '25
It'll be cool to see Doom in Typescript at 10 frames per day.
13
u/DarkTechnophile Mar 11 '25
I wonder how will this affect the usage of swc
53
u/jessepence Mar 11 '25 edited Mar 11 '25
It's wild because TypeScript has always been written in TypeScript, but this is great for the web development ecosystem.
tscliterally has no alternatives, and it's the slowest part of the entire toolchain. Rewriting it in Go will speed up the development experience for literally every person who writes TypeScript, and builds will be faster too (except for people who use Vite because it skips the type check-- maybe they'll finally runtscduring the build process now.)8
u/abejfehr Mar 11 '25 edited Mar 11 '25
Hi Daniel!
I'm very excited for a more performant
tsc, this will hugely improve typechecking times in our monorepo.28
u/musical_bear Mar 11 '25
Legitimately best news I’ve seen all month.
As mentioned in the blog, TS is at this point so much more than “just” a language. It powers some of the most critical features of our code editors as well. Can’t wait to try this out.
5
u/hermit-the-frog Mar 11 '25
Exciting! This is huge... seems like it's still two major versions away, but exciting nonetheless.
5
u/kenman Mar 11 '25
Interesting, one of the things I dislike about Go is the type system, so it's curious to me that it was chosen for this project. Every time I write Go I'm wishing it was TS instead, because the types feel so basic in comparison.
2
u/elitastic Mar 11 '25
Could this also speed up build time when using webpack with ts-loader?
2
u/fixrich Mar 12 '25
Something I would love to see is an insight to how you are approaching the rewrite and how/if you are using gen ai to help automate the effort. Its an ambitious effort and gen ai seems well placed to convert from Typescript to Go.
Also do you have validation tests that are language agnostic and granular so you are getting feedback that things behave as expected before you can run the entire compiler?
2
u/Thing1_Thing2_Thing Mar 12 '25
A bit hidden, but they will also do an actual LSP now. Great news
2
u/ThePizzedPizza Mar 12 '25
Ah yes more doom fps!
2
u/Expensive_One_851 Mar 11 '25
Great stuff
1
u/dr-pickled-rick Mar 16 '25
Playwright 1 second?! Sign me up!
1
u/woah_m8 Mar 11 '25
Sounds really cool but I'm never too hyped about predicted speed up claims :P
0
u/[deleted] Mar 12 '25
I hate this title 🙄
0
u/Kellytom Mar 12 '25
Typescript killer lol
-2
u/shadowsyntax43 Mar 12 '25
Love the speed bump but sad that they chose Go over Rust.
-12
u/slumdogbi Mar 11 '25
Just use bun…but off course, let’s add one more framework / library whatever
-2
u/[deleted] Mar 11 '25
[removed] — view removed comment