Full: { [P in keyof T]-?: T[P] }

Mutates the type by removing the optional modifier (?) from all properties.

Type Parameters

  • T

    The type to mutate.

type Original = { readonly name?: string; age?: number };
type Mutated = MutableRequired<Original>; // { readonly name: string; age: number }