I have an interface Iphone
export interface Iphone {
url: string;
name: string;
year: number;
color: string;
number_of_cameras: number;
popularity: boolean;
quantity: number;
}
Can I somehow make it that color can only be 'black', 'blue' and 'light'? Something like that
color = { 'black' | 'blue' | 'light' }