r/javascript • u/DanielRosenwasser TypeScript • 6d ago
Announcing TypeScript 7.1 Beta
https://devblogs.microsoft.com/typescript/announcing-typescript-7-1-beta/?r11
u/nullvoxpopuli sand was never meant to think 6d ago
yay I/my-project got mentioned!!
on my 3.3 million line ember app at work, I see:
11.6 to 15.1% faster
type-checking this now takes ~ 10s or less
and 22% less memory
5
3
-10
u/the404 6d ago
I feel like some typescript developers have an obsession with using as much features of the language as possible and giving these people more ammo is the wrong direction.
Less is more
7
u/prehensilemullet 6d ago
If less is more, why not go back to writing ES3? You have to make a more nuanced argument about where on the complexity curve the cost/benefit tradeoff breaks down...
17
u/musical_bear 6d ago
This release is crucial to the ecosystem given the release that preceded it and what holes this release is filling, has very, very little to do with "new features of the language", and you clearly have no idea what you're talking about.
1
u/0xKubo 5d ago
This release is crucial to the ecosystem given the release that preceded it and what holes this release is filling
Could you share more, please?
3
u/musical_bear 5d ago
TS 7 (the previous release) was a major rewrite of the compiler from TypeScript to Go, which brought massive performance increases to type checking. While they shipped it with all of the "standard" features that most devs interact with at complete parity with the old compiler, they did not ship it with a completed or stable programmatic API. In practice, any libraries that needed to deeply communicate with the TypeScript compiler (one common example of this would be a library like ESLint) had to "sit out" on supporting TypeScript 7 at all, because it (intentionally) did not contain the features they needed to work as before.
And so for several months we've had this kind of awkward period where you can technically use TS 7, but only for certain use cases. Some projects have been installing 2 versions of TypeScript side by side - TS 7 for type checking for example, while keeping TS 6.X around so that 3rd party libraries like ESLint could continue to work.
Anyway, once TS 7.1 is stable, all of this awkwardness goes away and the ecosystem reunifies, and libraries like ESLint can update to use the new programmatic APIs in TS 7.1. The tl;dr is that TS 7.0 was effectively "half finished" (albeit for very good and reasonable reason and many workarounds provided), and TS 7.1 completes the missing half and gets us back to where we were before the Go rewrite began.
5
u/headinthesky 6d ago
Why wouldn't you use language features that are available? Do you write everything from scratch and leave the mess for someone else to deal with?
1
-30
u/AleksHop 6d ago
lol
not needed
https://blog.cloudflare.com/typescript-rust-port/
guys, for real, stop investing time in legacy
11
u/JeanMeche 6d ago
From your own link. The TS implementation by Microsoft will still be considered the gold standard.
We will apply the same process to TypeScript, taking extreme care that we don’t introduce diverging behaviors from upstream TypeScript. When we come across performance improvements, we’ll attempt to contribute them back to the TypeScript Go codebase so everyone wins.
-14
u/AleksHop 6d ago
I think u all live in a deep past :P where "work" took 10y. Not anymore.
This fork/implementation will become standard way faster u think. 1-1.5y max
Regarding comment - thats a political. Not technical.5
u/catladywitch 6d ago edited 6d ago
How is tsrs not political? Nobody was asking for a Rust rewrite. There was some discussion about why Microsoft went with Go instead of C#, but tsrs feels more like an advertisement for AI rewrite pipelines than anything else. And it remains to be seen whether maintenance will be possible in a couple of versions. Code factories are notoriously bad at this.
Also the issues tab of the repo is pretty hilarious if you think about why people are supposed to be using Rust in the first place.
6
5
1
u/TypeSafeBug 3d ago
Alternative implementations of the same standard is a hallmark of a healthy popular language ecosystem. Java has it with JDKs, C/C++ have it with gcc, llvm, msvc etc, etc.
In fact Rust frequently gets complained about because it’s very dependent on its one and only reference compiler which effectively doubles as a de-facto unwritten standard.
(Well there’s the gcc version etc but basically it’s not as competitive as the C++ ecosystem having many active implementations, which is where the complaints about Rust normally originate from haha)
47
u/queen-adreena 6d ago
Yay. Finally we can get ESLint support for Typescript Go.