How to build a program that cannot do the wrong thing (illustrated with Typescript)

from blog GEEK.SG, | ↗ original
As a junior developer, I was very concerned about getting things done. With any task, how to make things work concerned me the most. Learning to do test-driven development (TDD) comes a long way to help me make sure the code works as I intended - for both positive and negative examples. However, as I come across the "Representable/Valid...