June 2024 Monthly Newsletter -TypeScript 5.5 released with a huge upgrade
In this issue, I look at content from myself and other authors for the month of June, and also take a brief look at Typescript 5.5 notable features that were released last month
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.
React Advanced London 2024
I want to announce a special collaboration with GitNation, the organizers of events such as JSNation and React Summit in Amsterdam and New York, React Day Berlin, and React Advanced in London.
React Advanced London 2024 is coming up later in the year (October), and as subscribers for All Things Typescript, you will get 10% off for tickets using the code AllThingsTypescript10 for the conference.
In this conference, you learn more about React 19, Performance, Server Components, Senior-Driven Tech Mindset & more! On top of that, you will get to network and reconnect with some of the top minds in the industry and engage in board games and, if you want to, parties and karaoke.
Typescript 5.5 Released
The latest version of Typescript (version 5.5) was released in June and has a very exciting update that all Typescript developers are excited about. Typescript has improved Type inference and now can narrow Types based on control flow within arrays when you use the array filter method, which wasn’t possible before.
Before Typescript 5.5., if you filtered an array to, let’s say, remove undefined values inside an array, Typescript wasn’t able to infer that the type needed to be narrowed as the undefined values have been removed. This has changed, as demonstrated in the video clip I created below when the beta version was released.
Other notable features include:
Control flow narrowing for Constant Indexed Accesses
Import types into JS Docs (JS Files)
Type-checking in regular expressions
ESM Set new methods such as
union
andintersection
are now supported.
And there is more, which you can learn by reading the announcement blog here.
Next week, I will take a deep dive into some of the exciting features of Typescript 5.5.
From All Things Typescript
I want to apologize for not publishing as regularly as in previous months, but I will resume publishing regularly in June, starting next week when I take a deep dive into Typescript 5.5.
I want to give a shout-out to CSS Isn’t Magic by Stas Melnikov. Most of us struggle with understanding CSS concepts, and If you want to change that and take your CSS game to the next level, please subscribe to the newsletter.
From Other Authors
How To Write API Response Types with TypeScript by Artem Holinka
Organize TypeScript types for API responses to ensure a great development experience, code maintenance, and avoidance of obvious coding errors.
7 Use Cases for Javascript Proxies by Matt Lewandowski
JavaScript's Proxy object is a useful tool that opens up a world of possibilities, allowing you to create some really useful behaviors in your applications. When combined with TypeScript, Proxy enhances your ability to manage and manipulate objects and functions in ways you might not have thought possible. In this article, we'll explore the incredible utility of Proxies through practical examples.
Visual testing: The greatest trick in UI development by Michael Shilman
In UI development, making sure everything looks right is as important as making sure it works. Visual tests are image snapshot tests that solve for this.
However, somewhat surprisingly, they can also replace the most brittle part of many UI unit tests: asserting on details of the UI. In many cases this can replace the unit test entirely, allowing you to test more with far less code.
A Gentle Intro to TypeScript by Jo Franchetti
This article is an excellent article for developers who are just getting started with Typescript and wondering why Typescript exists and the fundamentals of Typescript.
Introduction to Sorting Algorithms in JavaScript by Alex Merced
Sorting algorithms are fundamental to computer science and programming. They are essential tools for organizing data in a meaningful order, whether it’s numerical, alphabetical, or based on any other criteria. For JavaScript developers, understanding these algorithms is crucial, as they often need to manipulate and sort data efficiently within their applications. This blog aims to provide an introduction to some of the most common sorting algorithms implemented in JavaScript, highlighting their mechanics and when to use them.
Dual Publishing ESM and CJS Modules with tsup and Are the Types Wrong? by John Reilly
If you need to publish a package that supports both ECMAScript modules (ESM) and CommonJS modules (CJS), you can use tsup
to do so. This post will show you how to do that and how to ensure that the types are correct using the tool Are the Types Wrong?
.
Understanding JavaScript Object Accessors by Jack Pritom Soren
JavaScript is a versatile and powerful programming language used extensively in web development. One of its key features is the ability to define objects, which can encapsulate properties and methods. Among the various ways to interact with these objects, accessors play a crucial role. This blog post will delve into the concept of JavaScript object accessors, explaining what they are, how they work, and why they are beneficial.
I've been writing TypeScript without understanding it by vincanger
The other day, I was stuck with a bug in some code that was handling optimistic updates, so I asked my colleague Filip for some help. Filip, a TypeScript wizard, mentioned that the satisfies keyword would be part of the solution I was looking for.
Satisfies? What the heck is that? And why had I never heard of it before? I mean, I’ve been using TypeScript for some time now, so I was surprised I didn’t know it myself.
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 get in touch with me to discuss it.
And until next time, please keep on learning.