Type alias NullToOptional<T>

NullToOptional<T>: Omit<T, NullKeys<T>> & {
    [K in keyof T]?: NonNullable<T[K]>
}

Removes null values and marks those properties as optional.

Type Parameters

  • T