TypeScript

Sefism.

Chapter 03

Unions and narrowing

Unions describe values that can be one of several types; narrowing is how the compiler follows your checks to know which one you have.

7 concepts locked

Keep reading

7 more chapters, 46 more concepts, free with an account.

You have read the open chapters of the TypeScript sheet. Every concept it covers is listed above, and an account opens the rest of them, the examples, the pitfalls and the whole library alongside it. Early access is open: sign up and your account is active shortly after.

Everything here is free to learn from. A few things, like adding a roadmap, keeping a cheat sheet or asking Tauseef a question, use credits. You get 15 when you join, your first roadmap is free, and if you are learning seriously and run out, you can ask for more. Credits only make sure the platform goes to people who are actually learning.

03 · Unions and narrowing3 / 10