Object shapes
Required
Removes ? from every property, one level deep.
What it is
The mirror of Partial, written with -?. The minus sign is the whole mechanism: modifiers in a mapped type can be added with +? and removed with -?, and Required is the standard library using the second. It also strips undefined from the property type, which is a separate effect people rarely expect.
Examples
Required<{ a?: string; b?: number }>→{ a: string; b: number; }Required<{ a?: string | undefined }>→{ a: string; }undefinedgoes too —-?removes it from the type, not only the?from the key.Required<{ a: string }>→{ a: string; }
Each resolved type above was printed by TypeScript 6.0.3, not written by hand.
What it does not do
- It does not make a property non-null.
Required<{ a?: string | null }>still hasnullin it — onlyundefinedis removed. - It is not deep either. The symmetry with
Partialholds all the way to the limitation.
Takeaway
-? does two things at once: it removes the optionality and it removes undefined. Most confusion about Required is the second one arriving unannounced.

