r/javascript • TypeScript • 6d ago

Announcing TypeScript 7.1 Beta

https://devblogs.microsoft.com/typescript/announcing-typescript-7-1-beta/?r
127 Upvotes

38 comments sorted by

47

u/queen-adreena 6d ago

Yay. Finally we can get ESLint support for Typescript Go.

8

u/Positive_Method3022 6d ago

I'm still on 5 because of eslint 10 and vite

22

u/olegispe 6d ago

Do you hate yourself? Oxlint + esbuild are great

2

u/Positive_Method3022 6d ago

I'm building a framework. Vite is the standard for modern frameworks so I won't fight it. I'm going to keep eslint+prettier as defaults templates. I also need vite for bundling client-side code which used rollup/rolldown. Vite also has esbuild in it and it uses for some part of the bundling I just don't need to know where exactly.

11

u/olegispe 6d ago

Fair enough. I still can't stress enough how good oxfmt and oxlint are. Using the transfer tool, on the same repo we went from 60-70s to 4s on almost 10k files.

It has been a game changer

7

u/Xacius 6d ago

I'd at least recommend swapping out prettier with eslint-plugin-oxfmt. It's much faster and will set you up for migrating in the future.

1

u/Positive_Method3022 6d ago

Will take a look. Thank you 😊

2

u/GodOfSunHimself 2d ago

Why 5? 6 works with Eslint and Vite just fine.

1

u/altano 6d ago

What part of this release enables linting?

14

u/queen-adreena 6d ago

The Typescript API.

Other apps weren’t able to execute Typescript programmatically without one, and it was dropped in the v7.0 release.

3

u/altano 6d ago

I don’t know how I scrolled past that hah. Thanks!

0

u/kevinlch 10+ YoE, Fullstack 6d ago

little too late. many of us moved to biome

3

u/nullvoxpopuli sand was never meant to think 6d ago

not too late for the group of people who also needed content-mappers

we're all running TS 7@next (for editor and type checking) + TS@6 (for eslint)

2

u/Brilla-Bose JS paying my bills 🙃 6d ago

we're moving to Vite+

3

u/Spleeeee 5d ago

Literally nobody doing anything serious is using biome

2

u/svish 6d ago

If only biome could stop hanging and messing up formatting in vs code...

1

u/gonzales40 5d ago

All 5 of you?

11

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

u/hugazow 6d ago

Finally! I’ve eyeing this one for a while

1

u/dudebomb 5d ago

Me too!

3

u/Boguskyle 5d ago

Hallelujah. I need tsgo for svelte files like yesterday.

-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.

1

u/0xKubo 5d ago

Great explanation. Thanks!

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

u/biskitpagla 6d ago

That has more to do with JS culture tbh. 

-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

u/Block_Parser 6d ago

How is a brand new go rewrite legacy?

5

u/Xacius 6d ago

It's less about what's possible and more about what's feasible from a long-term maintenance perspective. What's the maintenance plan for this rust rewrite?

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)