3 ms·
I totally agree with the sentiment that unit tests and type checking are not mutually exclusive and, in fact I'd go further to say, are mutually beneficial. I'v
by spmurrayzzz 6y ago
I totally agree with the sentiment that unit tests and type checking are not mutually exclusive and, in fact I'd go further to say, are mutually beneficial. I've said this elsewhere on this topic that if JS had native types, I'd probably use them.
The assertion I am making here is a little more nuanced, insofar the premise of my argument is that as unit test coverage can and does offer a reliable (if not more verbose) way to assert type correctness of an application. Given that premise, I think its a deductively valid conclusion to make that the tradeoffs of introducing a significantly dense transpiling toolchain to the same application may not always be worth it.