Skip to content

NonPartial<T> ​

ts
type NonPartial<T> = { [K in keyof T]: Exclude<T[K], undefined> };

Defined in: types.ts:229

Makes all properties of a object type required by excluding undefined from each property type.

Type Parameters ​

Type ParameterDescription
Tobject to make non-partial

Example ​

ts
type Original = { a?: string; b: number | undefined };
type Result = NonPartial<Original>;
// Result: { a: string; b: number }