TypeScript · Junior · Question 59 of 75

What does Readonly<User> do?

Explanation

Nested objects remain mutable. At runtime nothing changes; use Object.freeze if you need runtime protection.

Further reading

Problem with a question

TypeScript · Junior · question 59

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