This course has been updated! We now recommend you take the TypeScript Fundamentals, v3 course.
Transcript from the "Course Overview" Lesson
[00:00:00]
>> Mike North: So here's a rough outline of what we're gonna learn. We're gonna start out with kind of a crash course in the TypeScript programming language. Now, we don't have time, and it's not a good use of our time to go through every little facet of what can be done with TypeScript.
[00:00:17] My main goal here is to ensure that I leave you with a great mental model of how to think about this programming language. Because then you can go and you can learn about all the little corners that I made left untouched on your own. We'll learn about configuring the TypeScript compiler.
[00:00:35] This is important because it can be the difference between shrinking your code by 70%, right? Like if you're building for IE6, there's a lot of extra code there because we can't really depend on as much being there in the browser for us to use. And it also helps you set your strictness settings.
[00:00:56] So if you really want type safety, you kind of have to set things appropriately so the rules are strong, right? We will go through a three step, practical strategy for converting from TypeScript to JavaScript. There are bad ways to do this. If done correctly, and if done the way that I'm gonna teach you, it can be a very smooth, incremental process.
[00:01:23] It doesn't have to be a big, disruptive thing, right? We don't have to treat it like we're rewriting a JavaScript program in Swift or something completely unrelated. We can take advantage of the similarity between these languages. And the ability for mixing JavaScript and TypeScript modules. We'll focus quite a bit on advanced types and generics.
[00:01:48] And you can think of generics as parameterized types, right, we pass a value to a function to sort of parameterize the value. We can pass type parameters to generics, to parameterize types, like a fill-in-the-blank kind of situation. And at the end, I want to give you a quick demo of how the TypeScript compiler looks at your code.
[00:02:14] So we're going to use the JavaScript API for the TypeScript compiler, not because I think a lot of you will end up using this in your apps. But it allows us to pick under the hood and to see how TypeScript understands our code. And how it sort of splits it apart and how it represents it in data structures.
[00:02:31] That's really important in order to validate that you have the correct mental model.