Axinom Mosaic Libraries
    Preparing search index...

    Type Alias Not<Type>

    Not: { [Property in keyof Type]?: undefined }

    Creates a new type with the same properties as Type, but with all property values set to undefined and optional.

    Type Parameters

    • Type

      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,
    }