TypeScript 5.0 is here! 🎉🎉

Learn about what's new and try it today!

devblogs.microsoft.com/typescript/ann…
30
1,381
4,723
819,338
Replying to @typescript
Want to know what's new in TypeScript 5.0 at a glance? Here's a thread about what's packed into this release that makes it great. 🧵

x.com/typescript/sta…
TypeScript 5.0 is here! 🎉🎉

Learn about what's new and try it today!

devblogs.microsoft.com/typescript/ann…
1
18
115
54,922
Replying to @typescript
We'll make this one fast: TypeScript's now way speedier.

You can expect at anywhere from 10%-20% of your compile times to disappear with TypeScript 5.0!
2
15
117
22,073
Replying to @typescript
TypeScript's also lighter too! Unzipped from npm, TypeScript 5.0 now takes about 41% less space compared to TypeScript 4.9!
1
11
136
16,928
Replying to @typescript
Ever gotten into an argument about decorating? Now you can decorate without any red flags. 🚩🚩🚩🚩

TypeScript 5.0 ships the latest version of decorators! ✨

Use them without setting --experimentalDecorators 🧪.
1
7
92
16,476
Replying to @typescript
If you thought TypeScript 4.9 was a satisfying release...

5.0 will do it again by bringing support for

/** @⁠satisfies */

to checked JavaScript files!

Works the same as our recent 'satisfies' operator in TypeScript files.
2
11
86
17,012
Replying to @typescript
TypeScript 5.0 brings '--moduleResolution bundler' to model how most modern bundlers and loaders work.

It understands classic Node-style resolution while respecting rules for 'exports', 'imports', etc. in your dependencies.
2
20
99
21,229
Replying to @typescript
If you're a library author, maybe you've told your users to write 'as const' when they call a function.

With 'const' type parameters, you can hint which values should get literal & read-only types.
3
7
107
15,631
Replying to @typescript
Does your linter fight with your editor?

We're lovers, not fighters. Let's all get along. ☮️✌️

TypeScript 5.0 is smarter about respecting upper/lower-casing in already-sorted imports.
2
2
54
12,079
Replying to @typescript
We're pretty sure you love coding with TypeScript - but just in *case*, we added a new feature to our code-completions.

If you write a 'switch' statement and you're using literal types, we'll scaffold out all your 'case's automagically. 🪄

Mar 16, 2023 · 7:16 PM UTC

7
30
358
86,972
Replying to @typescript
Speaking of literal types - every enum member now acts kind of like a literal type. This is way safer, and pushes us to be tidy and consistent. 🤓
2
12
114
17,095
Replying to @typescript
TypeScript 5.0 also makes it possible to mix and match options from different 'tsconfig.json' files.
6
11
109
20,443
Replying to @typescript
And there's lots more which you can read here on our blog!

devblogs.microsoft.com/typescript/ann…
1
11
80
16,429
RepliesRelevant
Replying to @typescript
@typescript Would be great o have automatic break statements in there too! 🤔
0
0
2
503
Replying to @typescript
@typescript what's the theme ? 😍
0
0
1
363
Replying to @typescript
@typescript I like coding switch true! 😎
0
0
0
22
Replying to @typescript
@typescript Cheers🤩
0
0
0
142
Replying to @typescript
@typescript Who is in charge of adding ts 5 to the TS playground?
0
0
0
781