From JS to TS
A quick tour of how core JavaScript constructs like variables, functions, objects and classes are used with TypeScript. We'll make extensive use of the TS language server and its integration with Visual Studio Code to explore the compiler's inference and type-checking capabilities
-
From JS to TSTyping Values
We'll begin by looking at how to declare (and infer) the types of variables -- starting with primitive values and quickly moving on to objects and arrays.
-
From JS to TSFunctions
We'll study how functions (or methods) are typed in TypeScript, including rest params, default params, signature overloading and callbacks.
-
From JS to TSInterfaces and Type Aliases
If we want to refer to a type by name, and reuse it across our codebase, we'll need to define it as an interface or type alias. We'll compare these two tools, exploring the limitations of each, and how they can be used together to define "recursive types".
-
From JS to TSClasses
TypeScript classes look very similar to what we're used to seeing in JavaScript, with a few notable exceptions. We'll get "hands on" with some examples involving the
implements
keyword, access modifier keywords, param properties, abstract classes and more!