The desired outcome should be as follows:
const newObj: ??? = {
[Fruit<Apple>]: Taste<Apple>,
[Fruit<Banana>]: Taste<Banana>,
}
const selectedKey: Fruit<Apple> = ...;
newObj[selectedKey] // should only return Taste<Apple>
I am aware that I could potentially use
Record<Fruit<T>, Taste<T>>
but this would still permit me to assign Taste<Apple>
to Fruit<Banana>
;