TypeScript Weekly

Issue #188 — April 11, 2022

Announcing TypeScript 4.7 Beta

The beta of TypeScript 4.7 adds several new features related to ECMAScript module support in Node. It also ships with control flow analysis for computed properties, instantiation expressions, and various other improvements.

Daniel Rosenwasser

How to Deal with Optional Things and Undefined in TypeScript

How to make your code more robust by dealing with undefined using various TypeScript language features.

Mattie Behrens

New White Paper: Guide to Code Reviews

Sema has just published a white paper on why code reviews matter and how to integrate them effectively into your team and organization. The white paper includes: why code reviews are important, how to explain the benefits of code review to a non-technical CEO, and the Six Golden Rules of Code Reviews. You can read the white paper here.

Sema Technologies (Sponsored)

Making Object Properties Partially Optional or Required

A quick walkthrough of how to implement the PartiallyOptional<T, K> and PartiallyRequired<T, K> helper types which let us make a subset of object properties optional or required.

Pawel Grzybek

How to Use Type Guards in TypeScript

An overview of how to use various kinds of type guards in TypeScript, including the instanceof, typeof, and in keywords. The article also covers narrowing based on equality checks as well as custom type guard functions.

Oyinkansola Awosan