@vsokolov/utils - v0.32.0
    Preparing search index...

    Type Alias NonNullable<T>

    NonNullable: T extends null | undefined ? never : T

    Constructs a type by excluding null and undefined from a given type T.

    Type Parameters

    • T

      The source type which may include null and/or undefined

    // With optional properties
    interface User {
    name: string;
    email?: string | null;
    }
    type RequiredEmail = NonNullable<User['email']>; // string