TypeScript has 7 primitive types: string, number, boolean, null, undefined, bigint, and symbol. You use them to tell TypeScript what kind of value a variable holds. You write them in lowercase. TypeScript can often figure out the type for you. But knowing how each one works is key to writing safe and clear code.
What Are Primitive Types?
Primitive types are the simplest building blocks in TypeScript. Every piece of data in your program starts with one.
They hold a single value. They are not objects. You cannot add methods or properties to them directly.
TypeScript has 7 primitive types in total:






