Pergunta de entrevista da empresa Altametrics

Presented me with a more complex typescript question