https://medium.com/@shahriarhasan0_57376/i-solved-a-typescript-typing-problem-using-infer-heres-my-story-14dab69cb211