TypeScript Type Safety: Exploring Overloads & Conditional Types

Delving into TypeScript function overloads, union types, and common challenges in search for type safety

In this blog post, we will discuss slightly advanced TypeScript features such as union types, generics, and conditional types. We will explore how these features interact when attempting to create type-safe function overloads, a common challenge faced by developers using TypeScript.

This post was originally notes from an impromptu presentation I gave during a work "lunch and learn" session a couple of years ago. I've noticed that many people find this area of TypeScript to be frustrating as they try to combine different language features, often ending up confused. Let's dive in and learn how to avoid some common pitfalls.

Risks of Mastodon for Journalists

Or why Stephen Bush of the FT has two newsletters, but does not know it

Cathy Newman of Channel 4 News, a UK news broadcaster, asks on Twitter:

Ok…Mastodon…erm…which server to use?

The responses are a combination of mutual confusion and assurances that it does not matter and that she can correct any mistake later. What all of the responses fail to mention is that she might not have a choice at all. In at least one possible future where some version of the fediverse prevails, her Mastadon handle will be:

cathy.newman@channel4newsuk.social

This has potentially major implications for Newman's future relationships with both with her audiences and her employers.