Daniel Rosenwasser, Program Manager of TypeScript, announced the availability of TypeScript 3.9 beta in a blog post on March 27, 2020. TypeScript is a much-loved superset of JavaScript. It adds syntax for types which can be analyzed through static type-checking before running the code with minimal configuration management, IDE support, all while still providing the benefit of JS libraries.
The new beta release mainly focuses on providing stability, bug fixes, and crash-reduction. It arrives thanks to the feedback and efforts from the community.
SEE ALSO: How can you make a JavaScript website successful in Google?
Announcing 3.9 Beta! We’ve been focusing on polish, performance, stability, and correctness in this release and want your feedback! Check out our release notes and give it a shot!https://t.co/qAmDX4Bi3E
— TypeScript (@typescript) March 27, 2020
TypeScript 3.9 beta highlights
Let’s check on some of the new features included in TypeScript 3.9 beta.
- Inference and Promise.all improvements: Previous issues and errors regarding Promises have been fixed. View the pull request for more information.
- Improved speed: Thanks to multiple pull requests, TypeScript has reduced its material-ui’s compile time up to 40%. Optimizations include using objects instead of closures for type mappers, faster exit from isTypeRelatedTo, and optimizing deferred type references.
- Added @ts-expect-error to @ts-ignore directives: Thanks to contributions from Joshua Goldberg, now when a line is prefixed with a // @ts-expect-error comment, it suppresses the error, preventing it from being reported. In cases where there is no error, it will report that // @ts-expect-error is unnecessary.
- Visual Studio Code improvements: Select different versions of TypeScript in VS Code with the TypeScript: Select TypeScript Version command.
- JavaScript auto-imports: When using CommonJS modules, TypeScript automatically detects the types of imports you use, keeping all your code clean and neat.
- Preserving newlines: When printing nodes from TextChanges, TypeScript now works to preserve newlines better than before.
Source : JAXenter