This course, Getting the Most from the TypeScript Compiler, will teach you advanced techniques of TypeScript, how to rely on the compiler to avoid errors, how to have rapid feedback, and how to improve the code maintainability.
At the core of any successful application is an in-depth knowledge of how to write well maintainable code. In this course, Getting the Most from the TypeScript Compiler, you’ll learn how to rely on the compiler to avoid errors and have cleaner code. First, you’ll learn about compiler options you can use. Next, you’ll explore advanced features of the language. Finally, you’ll discover how to use types to better design an application. When you’re finished with this course, you’ll have an advanced knowledge of TypeScript and its compiler that will help you as you write your own applications with fewer errors and an improved design.
Thiago Temple is a Brazilian developer based in Ottawa, Canada. He has been building software for more than fifteen years, and his professional interests are mostly related to web development both for the client and server.
Using Advanced Features Hello. My name is Thiago Temple, and welcome back to my course: Getting the Most from the TypeScript Compiler; and in this module: Using Advanced Features, we will see some of the more advanced features of the language, and while you're using these features, the goal remains the same. We still want to have the compiler to work for us. It's not about using a hidden corner of the language. It's about keeping the code strongly typed, even when we try to make it flexible. We are going to see how to achieve the type safety, while dynamically accessing properties of an object using the keyof keyword. It's also about writing less code when possible because the compiler can generate new types for us based on other types, and we'll see how to do that using mapped types. Next, we are going to see what are the benefits of using union types. Syntactically, union types are very simple, but they are also very powerful and can help us ensure a more type safe code, avoid optional arguments, and have a stronger designed application. Finally, we'll see how to use the compiler so we can be sure we are covering all possible logical cases in a given business scenario with the use of discriminated unions.
Avoiding the Any Type Hello. My name is Thiago Temple, and welcome back to my course: Getting the Most from the TypeScript Compiler, and in this module: Avoiding the Any Type, we will learn a few strategies to avoid having to type any. If you are using TypeScript, there is a great chance one of the reasons for that is to have a static typed language and the benefits that come with such a language. When using the type any, we are losing the type safety that TypeScript provides, and although using the type any may be needed in some cases, we should try and avoid it as much as we can. During this module, we're going to investigate a few ways we can achieve that by augmenting existing interfaces when we are dealing with this external library. We are also going to see how to achieve the same goal, but using intersection types, and we'll take a look at a more advanced usage of generics in TypeScript. So let's begin.