Member-only story

🚫 TypeScript 5.6: No More Condition Errors. You Can Skip Type Checking Too

Tom Smykowski
3 min readSep 16, 2024

--

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.
// ...
}

--

--

Tom Smykowski
Tom Smykowski

Written by Tom Smykowski

🚀 Senior/Lead Frontend Engineer | Angular · Vue.js · React | Design Systems, UI/UX | Looking for a new project! 📩 contact@tomasz-smykowski.com

Responses (3)