TypeScript 5.0 is here! 🎉🎉
Learn about what's new and try it today!
devblogs.microsoft.com/typescript/ann…
Learn about what's new and try it today!
devblogs.microsoft.com/typescript/ann…
30
1,381
4,723
819,338
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…
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
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!
You can expect at anywhere from 10%-20% of your compile times to disappear with TypeScript 5.0!
2
15
117
22,073
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
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 🧪.
TypeScript 5.0 ships the latest version of decorators! ✨
Use them without setting --experimentalDecorators 🧪.
1
7
92
16,476
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.
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
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.
It understands classic Node-style resolution while respecting rules for 'exports', 'imports', etc. in your dependencies.
2
20
99
21,229
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.
With 'const' type parameters, you can hint which values should get literal & read-only types.
3
7
107
15,631
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. 🪄
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
@typescript Would be great o have automatic break statements in there too! 🤔
0
0
2
503
@typescript Who is in charge of adding ts 5 to the TS playground?
0
0
0
781




![/**
* Ensures a method is bound to every instance.
*/
function bound(method: Function, context: ClassMethodDecoratorContext<any>) {
if (context.private) {
throw new Error("Cannot bind private methods.");
}
context.addInitializer(function (this) {
this[context.name] = method.bind(this);
});
}](/pic/media%2FFrXRYseagAATr05.jpg)


![declare function frozen<const T>(x: T): T;
// inferred type is 'readonly ["elsa", "anna", "olaf"]'
let itSnow = frozen([
"elsa", "anna", "olaf"
]);](/pic/media%2FFrXS2zEaIAA9FQO.jpg)

![// tsconfig1.json
{
"compilerOptions": {
"strictNullChecks": true
}
}
// tsconfig2.json
{
"compilerOptions": {
"noImplicitAny": true
}
}
// tsconfig.json
{
"extends": ["./tsconfig1.json", "./tsconfig2.json"],
"files": ["./index.ts"]
}](/pic/media%2FFrXTn5RaYAEgQc6.jpg)



