01Intro
June 08, 2021We'll discuss the goals and agenda of this course, and how to get up and running with the workshop project in 2 minutes or less.
We'll discuss the goals and agenda of this course, and how to get up and running with the workshop project in 2 minutes or less.
In this chapter, we'll get hands on with our first TypeScript program and the compiler CLI command, and examine a simple program's compiled output
We will begin our study of the TypeScript language with simple variables and functions.
Now that we know how to type simple variables and functions, let's make things a bit more interesting with collections: in JavaScript this includes Objects and Arrays.
In this unit, we will explore how TypeScript is fundamentally different from nominal type systems, such as the ones found in Java and C++.
We will discuss and explore TypeScript's union and intersection types, which are effectively "AND" and "OR" boolean logic operators for types.
TypeScript provides two mechanisms for centrally defining types and giving them useful and meaningful names: interfaces and type aliases. We will study both concepts in depth, and explain when it makes sense to use each.
We will take on our first challenge together: defining types that describe any valid JSON value
So far, we have dealt with function argument and return types. There are a few more in-depth features we need to cover, including multiple function heads and callable types.
TypeScript classes add some powerful and important features on top of traditional JavaScript classes. In this unit, we will take a close look class fields, access modifier keywords and more!
Top types can be anything, bottom types can't be anything. We will also look at three "extreme types" in TypeScript: any, unknown and never.
We have explored built-in type guards like typeof and instanceof, but there's a lot more power in type guards, including the ability to define your own!
There are situations where we have to plan for, and deal with the possibility that values are null or undefined. In this chapter, we will dive deep into null, undefined, definite assignment, and the non-null assertion operator.
Generics allow us to parameterize types, which unlocks great opportunity to reuse types broadly across a TypeScript project.
Many of us use array the higher-order functions map, filter and reduce quite often. Let's build out similar utilities that operate on dictionaries!
In this chapter, we'll learn about scopes and constraints, as they pertain to type params, and what the language would look like if we didn't have these important tools