TypeScript Weekly

Issue #184 — February 27, 2022

Announcing TypeScript 4.6 RC

The release candidate of TypeScript 4.6 is out and ships with various quality-of-life improvements to TypeScript. Most notably, this includes control flow analysis for destructured discriminated unions, as well as other improvements.

Daniel Rosenwasser

Assertion Functions in TypeScript

Assertion functions in TypeScript are functions that throw an error if something unexpected happened. Using so-called assertion signatures, we can tell TypeScript that a function should be treated as an assertion function.

Marius Schulz

The Type Hierarchy Tree

Zhenghao explains his mental model of supertypes vs. subtypes, nominal vs. structural typing, and type assignability in TypeScript.

Zhenghao He

How Not to Learn TypeScript

Stefan goes over a bunch of mistakes he has seen people make when getting started with TypeScript: ignoring JavaScript, annotating everything, mistaking types for values, and going all-in straight away.

Stefan Baumgartner

microsoft / TypeScript-Compiler-Notes

A GitHub repo containing notes about the TypeScript compiler codebase from many engineers over time. If you’re interested in contributing to TypeScript, this could be a great starting point to familiarize yourself with the codebase.

TypeScript Team