Introduction to TypesScript

Let's get an introduction to Typescript in this lesson.

Introducing TypeScript

In programming, the type of some data indicates the set of values that are valid for that data. For example, if I say that a value is an integer, that means I expect the data to have a value like 1, -3, or 357 and not a value like "banana". If the data is set to a value that is not of the expected type, we expect something bad to happen. In some languages, the attempt to set data to the wrong value leads to a compiler error. Whereas in other languages, it leads to incorrect or unspecified behavior at runtime.

All high-level programming languages use some concept of type to determine behavior. This is to say that all these languages determine behavior by using not just the value of a piece of data in the system but also information about what kind of value it is.

Get hands-on with 1200+ tech skills courses.