CodeZettaInterview Hub

TypeScript · Mapped Types · Junior · Concept

How do modifiers +, - work in mapped types?

Short Interview Answer

Add/remove readonly or ? optionality on generated props.

Detailed Explanation

Example: { -readonly [K in keyof T]-?: T[K] } makes required mutable.

Did you know this answer?