Engrain by ByteRush

TS.06.01 JuniorCore — asked often

Built-in utility types

Comes up in: Coding, Recruiter screen

This concept is being written. It gets the full five steps — explanation, predict, interview angle, practice with tests, and review cards. Here is exactly what it will cover, so you can study it elsewhere in the meantime.

What it covers

  • Partial, Required, Readonly, Pick, Omit, Record, Exclude, Extract, NonNullable, ReturnType, Parameters, ConstructorParameters, InstanceType, Awaited, NoInfer
  • Omit is not distributive over unions

Words you will know

utility type

What you will practise

  • use each in a realistic API type

Interview questions this answers

  • Implement Pick and Omit.
  • What is the difference between Exclude and Omit?
  • Why does Omit behave badly on union types? How do you fix it?
  • Implement Awaited.