> {dev:true} | {prod:true} | {stage:true}
This can't be accessed safely. Because all value in typescript can be sub type of how it typed.
It means code following will pass.
var a = { dev: true, get prod() { throw Error() } }
var b: { dev:true } | {prod:true} | {stage:true} = a
And there is no guarantee that access any of these fields is safe.