๐— ๐—ฎ๐˜€๐˜๐—ฒ๐—ฟ ๐—ง๐˜†๐—ฝ๐—ฒ๐—ฆ๐—ฐ๐—ฟ๐—ถ๐—ฝ๐˜ ๐—ฃ๐—ฟ๐—ถ๐—บ๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ง๐˜†๐—ฝ๐—ฒ๐˜€

You need types to write safe code. TypeScript uses 7 primitive types. These are the basic building blocks of your data.

The 7 types are:

Use string, number, and boolean most of the time.

Follow these rules for better code:

Numbers in TypeScript cover everything. You do not need separate types for integers or floats.

BigInt handles numbers larger than the standard number type. It requires ES2020 or higher.

Write clear types to stop errors before they happen.

Source: https://dev.to/krunalkanojiya/how-to-use-primitive-types-in-typescript-string-number-and-boolean-19o9