A Byte of Typescript

A Byte of Typescript is a series where I break up Typescript into small bits - Bytes - that are easy to learn and digest. In this series, I will share everything I learn about Typescript and my goal is to help developers demystify Typescript. We will focus mostly on the Typescript Typesystem and its relationship with Javascript.

Latest Posts

Mar 4, 2022

Getting the Best out of TypeScript with Maina Wycliffe

Web Rush Episode 173: Getting the Best out of TypeScript with Maina Wycliffe ...

Feb 25, 2022

const assertions in Typescript

In this article, we look into const assertions introduced in version 4..3 of Typescript, the purpose, and how we can use them. ...

Feb 21, 2022

The Tuple Type in Typescript

A tuple type is an array with a predefined length and predefined types in each index position in the array. ...

Dec 30, 2021

Type Assertions in TypeScript - why not?

In this article, we explore why you should avoid using Type assertions in Typescript and techniques you can avoid using them. ...

Nov 17, 2021

Template String Types as Discriminants in Typescript 4.5

In this article, we are going to explore Typescripts 4.5 feature - Template String Types as Discriminants using rudimentary examples. ...

Sep 26, 2021

Better Types using Discriminated Unions in TypeScript

In this article, we are going to look at how we can use discriminative unions to write better and more specific types and help typescript to be more h ...

Sep 23, 2021

All Things TypeScript ft. Wycliffe Maina - AiA 326

In this Podcast, I join the adventure in angular as a Guest to discuss the ins and outs of Typescript and several tips and tricks for using TypeScript ...

Sep 15, 2021

Custom Type Guards in Typescript

In this article, we are going to look at how we can create our own custom type guards. Custom type guards will help you to check if a variable is of a ...

Sep 1, 2021

Typescript: why you should use unknown instead of any

The unknown type, when assigned to a variable, means that a variable type is not known. And typescript doesn't allow you to use a variable of unknown ...

Aug 25, 2021

Type Narrowing in TypeScript

In this article, we are going to learn various ways you can narrow types. Type narrowing is the process of moving a type from a less process type to a ...

Jun 23, 2021

Template Literal Types in TypeScript

In this article, we will take a closer look at template literal types and how you can take advantage of them in your day to day activities as a develo ...

Jun 7, 2021

Types and Mocking - Typescript

Learn how to create functions which are easy to create mocks for using TypeScript utility types. ...

May 5, 2021

Transforming Types in TypeScript with Utility Types

In this article, we are going to have a look at these built-in utility types and a third-party library (with examples) that offers more utilities you ...