Typescript Tutorial
Learn Typescript interactively. Read the concept and write code to practice.
1. TypeScript Introduction
TypeScript is a syntactic superset of JavaScript which adds static typing. This...
2. Simple Types
TypeScript supports some simple types (primitives) you may know. The three main...
3. Special Types
TypeScript has special types that may not refer to any specific type of data. *...
4. Arrays
TypeScript has a specific syntax for typing arrays. To specify the type of an a...
5. Tuples
A **Tuple** is a typed array with a pre-defined length and types for each index....
6. Object Types
TypeScript has a specific syntax for typing objects. ```typescript const car: {...
7. Enums
An **Enum** is a special "class" that represents a group of constants (unchangea...
8. Type Aliases
TypeScript allows types to be defined separately from the variables that use the...
9. Interfaces
Interfaces are similar to type aliases, except they **only** apply to `object` t...
10. Union Types
**Union types** are used when a value can be more than a single type. Such as wh...
11. Functions
TypeScript has specific syntax for typing function parameters and return values....
12. Type Casting
There are times when working with types where it's necessary to override the typ...
13. Classes
TypeScript adds types and visibility modifiers to JavaScript classes. **Visibil...
14. Generics
Generics allow creating 'type variables' which can be used to create classes, fu...
15. Utility Types
TypeScript comes with a large number of types that can help with some common typ...