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,
}
Generated using TypeDoc
Creates a new type with the same properties as
Type
, but with all property values set toundefined
and optional.