DEV Community

Discussion on: Why TypeScript is a better option than JavaScript when it comes to functional programming?

Collapse
 
mroggy85 profile image
Oskar Okuno

A other solution is to structure isEligableToVote in a more procedural way so you, at a glaze, can see what happens and what parameters are expected.
Plus add some unit tests to describe and test common use cases. And volia, your need for Typescript is gone. Of course you can still add it for static typing, but the added benifits is not worth the extra code, typing and tooling you need to introduce :)

Collapse
 
neomedeiros profile image
Leandro Medeiros

Very true