I've got the following types/interfaces:
type Nullable<T> = T | null;
export interface Employee {
name: string;
salary: number;
}
I don't want to define attributes of Employee to be Nullable, BUT the whole Employee should be Nullable.
Since I don't want do type everytime I use it as so Nullable<Employee>
.
I'd rather just type it as Employee
which then would automatically be Employee | null