Basic types

TypeScript has a rich set of built-in types, which can be categorized into the following groups:

  1. Primitive types: These are the basic data types in TypeScript, including number, string, boolean, null, and undefined.
  2. Object types: These include object, array, function, and class.
  3. Union types: These allow you to combine multiple types into one.
  4. Any type: This type can hold any value, and is used when the type of a variable is not known.
  5. Void type: This is used to indicate that a function does not return a value.