March 2024 Monthly Newsletter - TypeScript 5.5 is going to be huge
Typescript 5.4 released, Typescript 5.5 around the corner with some exciting news and hand curated content for Typescript.
Hey Everyone, another month is gone, and today is the day I look at informative content that I came across in the last month and also news related to Typescript.
My name is Maina Wycliffe, and I love teaching Typescript to developers, my goal is to break down complex topics into small understandable bits that you can apply in your day-to-day life as a developer.
Typescript News
Over the last two issues, we have looked at the release process of Typescript 5.4 which was released last month, so I won’t focus on that on this issue, you can learn more about Typescript 5.4 here.
For this issue, I want to focus on the next version of Typescript which has the potential to be huge. First, before proceeding further, I want to state we are still early and some of the details might change as we get closer to the next issue. Now, that that is out of the way, let me focus on a few interesting changes:
APIs marked in version 5 as deprecated are going to be removed, for more information, check out this issue.
Ability to add imports, when you copy-paste code from another TS file, the same imports in that file, for information, check out this issue.
Narrowing of generics indexed access type return type, for more information, take a look at this issue.
And many more such as providing syntax checking for regex, for more information, check out the road map here.
Let me know if there are features you want me to cover in a future issue of All Things Typescript.
From All Things Typescript
This month, I wrote two articles that explain generics which I hope for those of you who have read them and found very useful.
From other Authors
The `never` type and error handling in TypeScript by Stefan Baumgartner
This article by Stefan Baumgartner goes on to explain more about the never type, common misunderstandings about the never type, and how to correctly handle the never type for handling errors.
For more information, you can go through the article here.
This Pattern Will Wreck Your React App's TS Performance by Matt Pocock
In this article by Matt Pocock, he looks at a case where using one way of defining Typescript type can slow down your IDE performance compared to another way, especially in a large code base.
For more information, you can go through the article here.
Making Your Code Type-Safe with Zod by Leonardo Maldonado
In the past, I have made it clear I am a huge fan of tools like Zod which look to combine schema validation for forms, and runtime data validation, while also getting back to static types for you to use in Typescript. This article takes you through the process of setting up Zod and using it to make your code type-safe with Zod.
For more information, you can go through the article here.
`any` Considered Harmful, Except For These Cases by Matt Pocock
If there is anything I have spent a large amount of time doing in this newsletter, is discouraging you not to use any. In software engineering, it’s quite rare we have a definite answer the correct answer is always, it depends and this article by Matt Pocock is a great example of situations where it’s acceptable to use any.
For more information, you can go through the article here.
Intersection Types In TypeScript by Alex Khomenko
This article by Alex Khomenko takes you through an introduction and a detailed description of what the intersection types are and how you can add them to your toolbox and be comfortable using them in your day-to-day activities.
For more information, you can go through the article here.
TypeScript Intermediates - Type Generics by Corbin Crutchley
This article by Corbin Crutchley is about generics and some real-world uses for generics. He goes into detail explaining a use case, and looks at alternative solutions, before explaining why generics are a good fit and why you might consider using generics for that use case.
For more information, you can go through the article here.
That’s it for now and I will see you again at the end of April, where I will share some interesting reads that I will come across in my learning journey in April. Until then, I will continue teaching Typescript, and next week, we will take a look at Typescript Generics and default values, to wrap up my generics series.
If you found this issue useful, consider subscribing, if you haven’t and if you have (Thank you ❤️) please consider sharing All Things Typescript with your friends and colleagues.
Until next, keep on learning.