By Microsoft Team
Summary: in this tutorial, you will learn about the TypeScript boolean data type.
The TypeScript boolean type allows two values: true and false. It’s one of the primitive types in TypeScript. For example:
let pending: boolean;
pending = true;
// after a while
// ..
pending = false;
JavaScript has the Boolean type that refers to the non-primitive boxed object. The Boolean type has the letter B in uppercase, which is different from the boolean type.
It’s a good practice to avoid using the Boolean type.