AI Hints
Home›TypeScript Tutorial›Template Types and Practice
TypeScript · Lesson 72 of 120

Advanced Types Quiz

Test yourself.

⏱ 2 min read▶ Video at 54:58🎓 Free
Watch this lesson in the TypeScript courseWatch on YouTube ↗Full TypeScript course

Let's review the advanced types. Pause after each question, and answer before I do.

Advanced Types Quiz
From the video: Advanced Types Quiz
  • Advanced types quiz
  • Pause and think
  • Then check

Question 1

What does keyof give you? A union of property names.

Quick check
keyof Bike is:

Question 2

Which utility removes a property? Omit.

Quick check
To drop the id property:

Question 3

Which utility makes every property optional? Partial.

Quick check
All optional:

Question 4

What gives a function's return type? ReturnType.

Quick check
A function's return type:

Summary

Well done. Next, a new section on modules and tooling.

Key takeaways
  • keyof
  • Omit
  • Partial
Next up: Modules — import and export