April 2024 Monthly Newsletter - TypeScript 5.5 Beta with a huge feature
In April we saw the release of Typescript 5.5, and on top of that, the Deno team announced a JavaScript Registry (JSR) that's optimized for Typescript and JavaScript
Hey, Everyone. Another month has passed, and today is the day I look back on informative content I came across last month and 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.
My First Typescript Workshop
I am excited to announce that I am working on a series of virtual Typescript workshops. The first will be in a couple of months—either later in July or early August.
The first workshop I will be doing is about a topic I am very passionate about - Schema first-type design in Typescript (I will be doing a talk in relationship to this next week for the This is Learning virtual conference (please join).
I aim to teach how to use tools such as Zod and Valibot to design schemas from which you can infer Typescript static. This will create a single source of truth together with static types.
Let me know if you are interested in joining my first workshop by answering the survey below:
I will send out a notification with details on the workshop and instructions on how to sign up.
Typescript 5.5 Beta Released
The beta version of Typescript 5.5 was released last month, and I will review the features that I found rather interesting and exciting.
Some of the exciting improvements revolve around better type inference. For instance, one that I find personally exciting is control flow type narrowing when arrays are involved.
Currently, if you filter an array to, let’s say, remove undefined values inside an array, Typescript isn’t able to infer that the type needs to be narrowed.
This changes in the next version of Typescript, which can now narrow based on the control flow inside the filter method, as shown below.
This is exciting, isn’t it? Let me know if you want me to explore this further in a future issue of All Things Typescript.
Other notable features include:
Import types into JS Docs (JS Files)
Type-checking in regular expressions
And there is more, which you can learn by reading the announcement blog here.
From All Things Typescript
This month, I wrapped up the series around Generics and explored Typescript’s relationship with Javascript.
If you like my content and want to support my work, please consider supporting me (you can buy me a double latte, the juice that powers my creativity and determination ☕️) through Github Sponsors.
From Other Authors
An intro to TSConfig for JavaScript Developers by Jo Franchetti
Have you ever wanted to understand the tsconfig. Jo Franchetti goes over the tsconfig, the different settings available, and its capabilities in this post.
Introducing JSR - the JavaScript Registry
The Deno team introduced a new Javascript Registry optimized for Typescript and ESM Modules. In a series of posts, the registry discusses what JSR is and isn’t and why you should consider using it.
Here is a list of the most interesting blog posts about the registry from the Deno team.
Improving Code Quality in JavaScript Projects With Qodana by Maksim Grushchenko and Kerry Beetge
JetBrains Qodana is a powerful static code analysis platform that enables teams to analyze code quality and find issues before runtime. This article discusses how to utilize Qodan to improve code quality for JS projects.
Understanding 'Use strict' in JavaScript by Muslimat Mojeed
Strict mode is a special mode in JavaScript that allows developers to opt into a set of rules and restrictions that are not enforced by default.
Strict mode in JavaScript is like having a helpful friend who keeps an eye out for mistakes while you're coding.
This TypeScript Trick Will Blow Your Mind by Daniel Craciun
Daniel Craciun takes us through extracting types from arrays by creating a custom utility type.
Node.js Debugging in Chrome DevTools by Frontend Masters
Learn how you can utilize Chrome DevTools to debut NodeJS and Javascript applications.
That's it for this issue. Thank you for getting this far. If you enjoyed this article and would like to support my work, please share and like this issue and consider sharing All Things Typescript with friends and colleagues.
Did you know you can hire me to coach your team and help them improve their Typescript skills? If this interests you, please contact me to discuss it.
And until next time, please keep on learning.