TypeScript 5.0 is here! 🎉🎉

Learn about what's new and try it today!

devblogs.microsoft.com/typescript/ann…
30
1,380
4,722
819,339
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.

Mar 16, 2023 · 7:12 PM UTC

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