Skip to content
Typetypesv0.16.2

Nullable

Makes a type nullable by adding null and undefined

type Nullable<Value = null> = Value extends null
    ? null | undefined
    : Value | null | undefined;

Value

The type to make nullable

Value = null