logoalt Hacker News

TypeScript 7

283 pointsby DanRosenwassertoday at 4:06 PM97 commentsview on HN

Comments

m3htoday at 7:14 PM

The speed up numbers based on their testing:

    Codebase    | TypeScript 6 | TypeScript 7 | Speedup
    ------------|--------------|--------------|--------
    vscode      | 125.7s       | 10.6s        | 11.9x
    sentry      | 139.8s       | 15.7s        | 8.9x
    bluesky     | 24.3s        | 2.8s         | 8.7x
    playwright  | 12.8s        | 1.47s        | 8.7x
    tldraw      | 11.2s        | 1.46s        | 7.7x
Congratulations to the team for pulling off this feat while doing a responsible migration (looking at you, Bun).

Quick question: How does this affect downstream tools like tsdown and esbuild, which need to build the TypeScript codebase? Can I use TS 7 and current tsdown together?

adamddev1today at 5:54 PM

Remember when people would argue about how types weren't worth the effort?

I love TypeScript, if nothing else for how it's been able to popularize types.

show 6 replies
dimitropoulostoday at 4:19 PM

the real story here is an incredible team that managed to simultaneously keep two separate codebases alive for the most advanced type system known to mankind (yeahhh yeahh Hindley-Milner eat your heart out).

huge congrats to the team!

looking forward to the Rust rewrite ;)

show 7 replies
miiiiiiketoday at 6:32 PM

After a few years of using Typescript, having to use type annotations and import basic language features like `abc` in Python feels like an absolute slog.

chroma_zonetoday at 6:02 PM

I'm glad the JSDoc type syntax is still getting some focus. It's my favorite way to use typescript in my own projects. Some of the syntax changes will be annoying to update but most of them seem to be for the better.

show 1 reply
skybriantoday at 6:28 PM

No TypeScript compiler API yet, but I'm encouraged to hear that they're working on it.

show 1 reply
perrohuntertoday at 6:53 PM

For the average developer, does this mean we can simply ugprade to typescriptn 7 and start enjoying the improvements?

show 2 replies
NetOpWibbytoday at 6:16 PM

The speed-up improvements are incredible, can't wait for this to rollout to Deno. Everything I build uses TypeScript so I'm excited to see just how quick my apps compile.

show 1 reply
m_ketoday at 7:48 PM

After running out of Fable credits in a day on my max plan I started looking around for ways to trim down my token usage and came to the realization that all of the type spaghetti that opus wrote is probably eating up like 50-70% of my tokens.

A clean django project is probably 3-4x less code than the equivalent TS based service.

It made me consider dropping strict mode and defaulting to js for most simple things.

show 3 replies
fishgoesblubtoday at 7:13 PM

Are these performance improvements just for transpiling the Typescript to JS, or actually running programs written in Typescript?

show 1 reply
_pdp_today at 7:30 PM

I've been waiting for this for a long long time. Congrats on the release.

willchentoday at 5:35 PM

really excited to see this release! i've been using TypeScript for several projects like https://github.com/dyad-sh/dyad which is >250k lines of TypeScript and the speed-up makes things like running typescript check as a pre-commit hook painless

thanks DanRosenwasser and team for building such an awesome tool for so many years!

Exoristostoday at 6:37 PM

Seeing these graphs of astounding performance gains with less memory requirements makes one wonder, Why am I using server-side TypeScript and not Go?

show 2 replies
stymaartoday at 6:12 PM

Performance improvements, yay !

It always surprises me how little complaints there have been on HN about tsc's performance. I do both TypeScript and Rust at work, and I've seen orders of magnitude more comments on the web about how “rustc is slow” than complaints about tsc's performance and it never stops to surprise me given than in practice the later have annoyed me consistently more than the former.

show 2 replies
pmkarytoday at 7:45 PM

Glorious Day!

terpimosttoday at 5:51 PM

Are there any plans about wasm version?

show 1 reply
ontouchstarttoday at 7:16 PM

Perhaps some AI agent can vibe code TS8 in Lean 5, then it will be 100% bug free. ;-)

MiTypeScripttoday at 4:22 PM

sub-1day-first-frame-of-DOOM LFGGGGGG

devtoolsuitetoday at 7:16 PM

[flagged]

shimmantoday at 6:46 PM

[dead]

blurb2023today at 6:11 PM

finally it uses a normal language backend =)

austinthetacotoday at 6:49 PM

I'm still not sold on typescript. I've used it off and on professionally for years and it has always just felt like a maneuver to create a safehaven to C# and java devs scrambling to find roles in the modern landscape. Doing purely functional with it is or at least was an absolute chore and so much extra typing happens for extremely obvious variable values that you could derive from the name of the variable. YES you technically can do functional programming (but as i said its a pain) and YES its optional and you dont have to use it everywhere, but try pulling that maneuver on a technical team "lets use typescript where we each feel like it".

I am still of the opinion that well organized and named JS is all that anyone needs and typescript only exists for fresh graduates and fleeing OOP devs.

edit: also the downvote button HN is not for disagreeing with comments or unpopular opinions.

show 1 reply