NonNullable<T>

The utility type that removes null and undefined from type T.

In more detail

NonNullable<string | null | undefined> is string. The course uses it in an assertion function that proves a value is present.

Related terms

Taught in

References