Has anyone encountered a problem similar to this?
type B = a ? 'apple' | 'grape' | 'orange' : 'apple' | 'grape'; // This code results in an ERROR!
const x = (a: boolean, b: B) => console.log('foo')
Any suggestions on how to tackle this issue? Can it be achieved using Typescript?