Category: Typescript

How to tell Typescript a function always returns something

Nothing is more frustrating than having the Typescript compiler complain about something that obviously worked fine in Javascript, what the hell man!? However, as frustrating as it seems, Typescript is actually trying to protect us from… Well, ourselves! Sometimes we know more than Typescript and we can safely ignore such warnings, for example by declaring […]