News for hackers. Stuff that matters.
Re:Is TypeScript actually worth It? by pontilanda on Friday January 13, 2023 @10:06PM (#34376998)
> tests are much better at giving you a glimpse of what the code even does

Types do that, they tell you the expected input and expected output. No type nor test is all-encompassing of course, but it gives at least some information.

No test will guarantee that a function will never return a number. Types, if valid and without prototypal shenanigans, can.

There are no comments on this comment yet.