Check out a free preview of the full TypeScript 5+ Fundamentals, v4 course

The "Wrapping Up" Lesson is part of the full, TypeScript 5+ Fundamentals, v4 course featured in this preview video. Here's what you'd learn in this lesson:

Mike wraps up the course by providing a recap of the topics covered in the TypeScript fundamentals course. A practice exercise for the students to write their own map, filter, and reduce utility functions is also discussed.


Transcript from the "Wrapping Up" Lesson

>> Thanks for spending time with us learning about TypeScript fundamentals. Just to recap what we've covered since the beginning of the course. We built a small TypeScript program and use the TypeScript CLI. We talked about variables and values, the differences between let and const declarations and started to develop an intuition for how to think about types as representing sets of allowed values.

We discussed object, arrays and tuples, and how tuples could be used in a read only mode where we get much better inference when initializing tuples. We discussed the differences between structural and nominal type systems. TypeScript of course is a structural type system. And we talked about how type equivalence is performed in these different kinds of type systems, and hopefully this helps bolster your mental model for how TypeScript works.

We went on to discuss union and intersection types using a nice Venn diagram model where we compared the concepts of what kinds of values is a type able to accept versus what assumptions can you make? What guarantees do you have about any member of a set. And we saw there was sort of an asymmetric relationship there where, you can be very flexible and allow a bunch of values, but then, you sort of have to narrow down before you can do much because there's a lot of things that something could be there.

We talked about interfaces and type aliases. We compared and contrasted them and discussed, open interfaces and how type aliases are basically variables for types. We went through an exercise where we made types for JSON values, any allowable JSON value. And then went on to discuss type queries, which are ways of obtaining types from values that we may already have in hand.

We talked about callables and constructables, call signatures and construct signatures as well as function overloads, which allow us to have multiple function heads and one function implementation. We went on to talk about classes, including static fields, static blocks, private fields, which are actually private. Then we we had a discussion about type guards and narrowing, including user defined type guards.

We talked a little bit about how we could implement type guards in a nominal way versus a structural way. Finally, the last topic we talked about was generics, which allow us to write parametric types. Types that are described in terms of a type param, which often is something that's inferred when callers invoke the generic function.

And we talked a little bit about an exercise we'll leave for you all to do at home, writing your own map, filter, and reduce utility functions which can operate on dictionaries. I hope you found this course interesting and useful. Please remember that there's an intermediate TypeScript course that picks up right where we left off.

So if you'd like to learn more about TypeScript, I'll see you in the next course. [APPLAUSE]

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now