I was expecting the example below to work but it seems that TypeScript cannot reduce the type of my lookup argument based on the value of another argument. Am I missing a tr