TypeScript · Junior · Question 49 of 75

How does Required<T> differ from Partial<T>?

Explanation

They're opposites: Required removes the ? modifier, Partial adds it. readonly is handled by Readonly<T>. All these utilities are mapped types that you can write yourself.

Further reading

Problem with a question

TypeScript · Junior · question 49

Test yourself

Take the TypeScript · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz