There is rarely a head-scratcher in TypeScript as prominent as trying to access an object property via iterating through its keys. I tried to “improve” Object.keys once. It’s a nice exercise on declaration merging but uh… I wouldn’t do that too often. Annotating definitely is one solution.
Sort: