Member-only story
🚫 TypeScript 5.6: No More Condition Errors. You Can Skip Type Checking Too
TypeScript 5.6 is here, bringing two quite awesome features that will streamline your development. First, it now flags incorrect truthy and nullish checks, preventing common bugs before they happen.
Daniel Rosenwasser from the TypeScript team announced a general availability of TypeScript 5.6 on August 23rd, 2024. Now it’s public. Let’s go over the most interesting things in this release.
This article was brought to you thanks to 18 thousand followers on Medium
The release notes for TypeScript are usually quite long and include explanations about why something was introduced and how to use it, so it means it acts as a live documentation complementing the basic TypeScript documentation.
No More Condition Errors
The first one is exciting, because it will make our lives just easier. JavaScript is quite relaxed about what you do. But TypeScript isn’t. And with this release it won’t approve truthy and nullish checks. What does it mean?
if (x => 0) {
// Oops! This block always runs.
// ...
}