Skip to Content
Mastering TypeScript - Fourth Edition
book

Mastering TypeScript - Fourth Edition

by Nathan Rozentals
April 2021
Beginner content levelBeginner
538 pages
12h 18m
English
Packt Publishing
Content preview from Mastering TypeScript - Fourth Edition

2

Exploring the Type System

Thus far, we have covered the basic principles of using types in TypeScript. We already know how to define a type for a variable or a function argument, and some of the rules that the compiler uses in order to ensure strongly typed code. We have discussed some of the basic, or primitive, types (number, string, and boolean), as well as the array type. However, we have only just skimmed the surface of the TypeScript type system.

In this chapter, we will explore all of the primitive types that are available, as well as some language elements that we can use to better describe how to use these types. We will discuss when and where to use these types and language elements, and even when not to use some types.

This chapter ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

TypeScript for Beginners

TypeScript for Beginners

Bharath Thippireddy
Learning TypeScript

Learning TypeScript

Josh Goldberg

Publisher Resources

ISBN: 9781800564732Supplemental Content