How can I catch all types of an interface keys?
I have below object:
interface WorkingTime {
id?: number;
openTime: number;
closeTime: number;
type?: string;
status: 0 | 1 | 2;
day: 1 | 2 | 3 | 4 | 5 | 6 | 7;
clinicId?: number;
clinicStaffId?: number;
}
Now I want set a type which that get all types of the interface and the result will be as below:
type X = string | number | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7;
Thanks for your participating to answer my question