There\'s a few type definitions I didn\'t want to put in the question, so here\'s a Playground link
While answering this question, I came across a weird scenario.