JavaScript
🔷 Introduction to TypeScript
Add types to JavaScript to write safer code: basic types, interfaces, functions, generics, and unions.
What you'll learn
- Annotate variables and functions with basic types (
number,string,boolean, arrays) and explain what type inference brings. - Describe the shape of an object with an
interface, including optional properties. - Distinguish the types of a
number | stringunion usingtypeofchecks. - Write a generic function
<T>that preserves the type of its arguments.
Lessons
Why types and basic typesWhat TypeScript brings and the fundamental types. Interfaces and function typesDescribing the shape of objects and functions. Generics and unionsFlexible types and values with several possible types.Practice this module in the app
DevPath is a hands-on course: you read the theory here; in the app you put it into practice with exercises that really run, offline.
Start free in the app →