Author: Martin Aarhus Gregersen

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 […]

3 reasons to use classes over constructor functions in Typescript

Have you ever spent any time working in Typescript (or Javascript, really), and found yourself wondering if you should use constructor functions – which is commonplace in Javascript – or use Classes? Well, look no further! In this article we’ll be going over just three reasons for using classes instead of constructor functions when building […]