I wonder how to create a type that has only a subset of keys from an object, imagine the following object:
const something = {
cannary: "yellow",
coyote: "brown",
fox: "red",
roses: "white",
tulipan: "purple",
palmera: "green"
}
If I defined a type like:
type Something = keyof typeof something
Autocomplete and the check type will work for all the keys, but what about if I want to accept only some of those keys like:
type Animal = keyof typeof {only cannary|coyote|fox}
is this feasible to do in typescript?
