Creates a new type with the same properties as Type, but with all property values set to undefined and optional.
Type
undefined
The type to negate.
interface Person { name: string; age: number; email: string; } type EmptyPerson = Not<Person>; const emptyPerson: EmptyPerson = {}; // The EmptyPerson type will be equivalent to: { name?: undefined; age?: undefined; email?: undefined, } Copy
interface Person { name: string; age: number; email: string; } type EmptyPerson = Not<Person>; const emptyPerson: EmptyPerson = {}; // The EmptyPerson type will be equivalent to: { name?: undefined; age?: undefined; email?: undefined, }
Creates a new type with the same properties as
Type, but with all property values set toundefinedand optional.