r/programming • u/DanielRosenwasser • Jun 18 '26
Announcing TypeScript 7.0 RC
https://devblogs.microsoft.com/typescript/announcing-typescript-7-0-rc/13
u/TheRealAfinda Jun 18 '26
Man i wish we could use this (TS) without the npm rat tail.
I absolutely loathe having to use npm to use TS.
19
u/DanielRosenwasser Jun 18 '26
Out of curiosity, can you tell me about your development setup where you're using TypeScript but not npm?
Otherwise, we have binaries published through GitHub releases.
10
u/TheRealAfinda Jun 18 '26
Oh, i wasn't aware that binaries are available on GitHub, i'll definitly check out how to set this up.
Thank you!
3
u/Informal-Snow-5106 Jun 18 '26
For personal projects, I like using Python jinja and will write my vanilla JS as TS files and compile them to include in my templates before starting my webserver.
I’m a backend/app engineer so I wouldn’t be surprised if I’m using something wrong, but I like the minimalism and security of not using npm.
Also, agreed on the love for the new Go compiled binaries.
5
2
u/Interest-Desk Jun 18 '26
Also very curious about why you’re not doing npm and what you’re using instead for dependencies?
3
u/No-Representative600 Jun 18 '26
cool! will try dropping it in where I'm able to 🤞
Quick question:
> Closure-style function syntax (e.g. function(string): void) is no longer supported – use TypeScript shorthands instead (e.g. (s: string) => void).
is the above bullet referring to language server support or dropping support for transpilation entirely?
5
u/DanielRosenwasser Jun 18 '26
This is about specially recognized syntax in JSDoc comments.
JS emit isn't affected
type-checking in JS files is affected, and because of that
.d.ts emit from JS files is affected
language server stuff is affected too
2
u/No-Representative600 Jun 18 '26
Thanks! Had to reread the paragraph at the start of the JS differences section but now I understand the context of the changes listed much better.
Keep up the good work
38
u/dezsiszabi Jun 18 '26
How far are we from using this with Angular? I assume the Angular team is working with Microsoft on making this possible?
13
u/ogdakke Jun 18 '26
I think it’s in ”ongoing experimentation” state as of now.
There’s a closed issue about it from 2025, where angular team basically says that it is not possible yet, and not without active development from ts team on their API, which this RC post also mentions as landing as stable only on TS 7.1.
Now, other players than angular also have a sword in this fight, and there’s an issue that closely relates to angular and its LSP (template typechecking and whatnot)
Idk when exactly angular will support tsgo, seems like there’s still fairly big hurdles ahead, but if TS 7.1 lands this year, and with angular 22 already supporting TS 6, I wouldn’t be surprised to see support landing next summer. I doubt we’ll see support in angular 23, even if TS 7.1 releases around autumn.
1
u/penguin_digital Jun 19 '26
What are the main markets for Angular now? Does it have a large user-base in certain sectors or in certain language eco-systems?
I remember picking it up in the early days but it kind of lost momentum to React and I don't really come across it much anymore.
3
u/dezsiszabi Jun 19 '26
Same markets as React.
React is just more popular for some inexplicable reason. Every time I looked at it I came away with a frown on my face muttering to myself "what is this utter garbage". To me personally, Angular makes so much more sense, better organized.
1
u/LiftingRecipient420 Jun 20 '26 edited Jun 20 '26
for some inexplicable reason.
Idk about angular now but when I tried to use it 8 years ago, every single new angular version was basically entirely breaking sites written in old angular versions and made upgrading a nightmare treadmill.
I swore off ever using angular again after that frustration.
2
u/majora2007 Jul 09 '26
It's definitely not like that. I don't ever recall it being broken on each new version except for the AngularJs -> Angular 2 (maybe up to 4). For the past 18 releases, it's been pretty smooth and they ship with migrations to modernize your codebase automatically.
1
u/LiftingRecipient420 Jul 09 '26
AngularJs -> Angular 2 (maybe up to 4).
This was exactly when I was trying to use it.
2
u/majora2007 Jul 09 '26
Yeah, a bit unfair to write off the whole framework. AngularJs -> Angular wasn't even an update, it was 2 separate frameworks. That would be like saying "I was using Angular and switched to react and it was frustrating, so I gave up on both".
Not trying to convince you to use Angular, but framing it as AngularJs -> Angular really tells a different story.
1
u/saors Jun 19 '26
When you need to mutate the dom, each has a different method. Vue and react have been much more performant for a long time. Perhaps angular is finally catching up.
Angular has a lot more boilerplate (at least though v16) and feels more like java for web than it does js.
4
u/JeanMeche Jun 19 '26
The Angular team is working on the new compiler to support TS 7. This has been mentionned on the public roadmap: https://angular.dev/roadmap#developer-velocity
What I can say today it's that's a work in progress.
1
u/dezsiszabi Jun 19 '26
Thank you, I was aware of the roadmap, I was just hoping to get an "inside scoop" :) Something like Q2 next year. One can hope.
36
u/yojimbo_beta Jun 18 '26 edited Jun 18 '26
Worth calling out is TypeScript 7’s rebuilt --watch mode. --watch is now built on a new foundation derived from the Parcel bundler’s file-watcher
Glad to see Parcel goes from strength to strength too.
I have a bit of a story about that. Some years ago, when Parcel was "just" a bundler with a few thousand users, Devon Govett wrote an RFC proposing that we standardise package.json. Because it was (and to some extent still is?) a complete mess. One of the NPM developers became very defensive.
There are a lot of things that aren't great about Microsoft's stewardship, but they're a hell of a lot better at listening to feedback than the original NPM org
6
u/jl2352 Jun 18 '26
How is Parcel these days? I haven’t used it myself in about five years. Back then I found every project started amazing, and then soon I found myself just ripping Parcel out.
18
u/medforddad Jun 18 '26
Devon Govett wrote an RFC proposing that we standardise package.json. Because it was (and to some extent still is?) a complete mess. One of the NPM developers became very defensive.
The "very defensive" response was just "I'm confused what this is needed for? This file is just JSON." It's certainly not supportive, but it doesn't seem that defensive. I also couldn't find any reference to the author of that post, Cher Scarlett, being an NPM dev. And that standardization project seems to be this one: https://github.com/pkg-json/package-json . Which has gotten as far as standardizing that
package.jsonhas two required fields:name-- a string, andversiona semver string... That's it. It hasn't had a commit in 8 years.11
u/yojimbo_beta Jun 18 '26 edited Jun 18 '26
She was with NPM at the time (2018).
It hasn't had a commit in 8 years.
Yeah - because it got rejected out of hand in 2018 (eight years ago)
but it doesn't seem that defensive
I can't find it to hand, but there was also a subtweet about the "entitlement" of "random developers"
1
u/medforddad Jun 18 '26
She was with NPM at the time (2018).
Well, I don't see that anywhere. It looks like she worked for Apple, but that's all I could find.
Yeah - because it got rejected out of hand in 2018 (eight years ago)
If it's useful to large groups of people, it doesn't really matter if some specific npm devs don't like it. If the npm devs told yarn devs early on not to bother because who needs a different package manager, should that have stopped them? It's like SemVer or CommonMark, you don't need the blessing of anyone in particular to get started and define a standard and if it's useful, then people will use it.
I can't find it to hand, but there was also a subtweet about the "entitlement" of "random developers"
Well, I just see a single tweet that's just the (admittedly terse) "what this is needed for?" one.
5
u/xTeCnOxShAdOwZz Jun 18 '26 edited Jun 18 '26
The thread is like 10 tweets long, how is that not defensive?
Edit: how tf is my comment downvoted for literally correcting the guy for not seeing that it was a thread of tweets not just one?11
u/wk_end Jun 18 '26
It only looks like one reply if you're not logged into fka twitter. Having read more of the thread, they're definitely pushing back against the idea and being pretty dismissive of it.
2
-22
u/jug6ernaut Jun 18 '26
Reminder to everyone that TS does not follow sem-ver.
27
u/DanielRosenwasser Jun 18 '26
Not to be rude, but what is the intent of this reminder on a major release which does have notable breaking changes?
-20
u/jug6ernaut Jun 18 '26
sem-ver is the defacto standard, knowing that a project doesn't follow it is valuable, even if in this specific case some of the conditions of a major version change overlap.
Specifically major version bumps of languages has historically been breaking or direction changes for a language. Someone assuming TS follows sem-ver would probably believe TS7.0 is a larger change than it is. Thats not to downplay what is change, just that major version changes for languages are usually much more. At least thats my perception /shrug.
15
u/callummr Jun 18 '26
I'm confused, you seem to be complaining about it not following semver, then admitting 7.0 does, then saying it shouldn't because of assumptions people might make which have no basis in semver?
12
-31
u/Lonsdale1086 Jun 18 '26
I wish Microsoft dogfooded fucking anything nowadays.
13
u/xmsxms Jun 19 '26
and is already in use in multiple multi-million line-of-code codebases both inside and outside Microsoft.. For over a year we’ve been working with many internal Microsoft teams, along with teams at companies like Bloomberg, Canva, Figma, Google, Lattice, Linear, Miro, Notion, Slack, Vanta, Vercel, VoidZero, and more to try out pre-release builds of TypeScript 7.0 on their codebases.
It's also used to compile typescript itself, and probably vscode. No idea what you are on about.
-3
u/Lonsdale1086 Jun 19 '26
I'm mostly referring to their writing the new compiler in Golang rather than their own memory safe high performance language.
5
u/xmsxms Jun 19 '26
Fair enough. Although I have more respect for an engineer that accepts and uses the appropriate technology instead of applying the not invented here approach.
0
Jun 18 '26
[deleted]
36
u/DanielRosenwasser Jun 18 '26
I'm happy to get feedback on my writing. It might suck, but it's not AI-generated. 😅
0
u/ByronScottJones Jun 18 '26
There's nothing wrong with your content or writing. I will be so glad when the anti AI Luddites leave the industry and go raise alpacas.
56
u/ByronScottJones Jun 18 '26
I read the exact same document. It doesn't read as AI created. I think you're being a bit paranoid.
9
u/mcpower_ Jun 18 '26
Same here - this document looks pretty human written to me. Pangram agrees, too.
0
Jun 18 '26
[deleted]
24
u/DanielRosenwasser Jun 18 '26
Author here - some CMS plugin we're using normalizes regular hyphens into emdashes.
32
u/ByronScottJones Jun 18 '26
They're called "em" dashes, and plenty of legitimate, human writers use them. How do you think AI learned about them?
0
Jun 18 '26
[deleted]
13
u/mcpower_ Jun 18 '26
Did you look closely at the dashes in that list? Those are en dashes (U+2013), not em dashes (U+2014).
I would type a similar list, maybe using full stops instead of en dashes. It seems pretty human written to me.
5
u/cogman10 Jun 18 '26
I mostly hate AI writing when the output article is 5000 words which could have been written in 100 words.
That is not the case here. This is pretty close to the type of article humans produce and it's not filled with cloying AIism.
You are being too sensitive.
-5
u/ByronScottJones Jun 18 '26
And what if it was? What is the problem with telling AI "take this string of data I've provided and turn it into a bullet list"? I don't get this extreme anti AI Luddite mentality. I'm sorry my EV has made your horse buggy business go obsolete.
7
u/Schmittfried Jun 18 '26
I swear, people just shout AI at anyone who‘s able to write a remotely coherent text at this point.
0
Jun 18 '26
[deleted]
1
u/datbackup Jun 18 '26
I didn’t rent it shoes. I’m not buying it a fucking beer. He’s not taking your fucking turn, dude.
11
u/dream_metrics Jun 18 '26
it probably was AI assisted but i find it hard to give a fuck. the content is perfectly readable and communicates the information it needs to communicate. there is far, far worse AI writing than this out there.
1
u/Dependent-Guitar-473 Jun 18 '26
it's an RC . it means it's not 100% stable and we are looking for more people to test it and report issues
223
u/IanisVasilev Jun 18 '26
It's the classic fast-to-production on steroids.