Type alias ExcludeNullable<T>

ExcludeNullable<T>: Exclude<T, Nullable>

A type that excludes null and undefined from type T. *

Type Parameters

  • T

Example

Type Str = ExcludeNullable<string | null> //  string
Type Str2 = ExcludeNullable<string | null | undefined> // string
Type Str3 = ExcludeNullable<string | undefined> // string
*