News for hackers. Stuff that matters.
Re:Why doesn't TypeScript properly type Object.keys? by MatthiasPortzel on Saturday June 24, 2023 @01:21PM (#36460684)
Another comment implements what you describe using some crazy typing tricks.

=> https://news.ycombinator.com/item?id=36458653

Re:Why doesn't TypeScript properly type Object.keys? by valenterry on Saturday June 24, 2023 @01:53PM (#36460970)
Awesome, exactly the function that I talked about.