News for hackers. Stuff that matters.
Re:Deno will stop using TypeScript by geoka9 on Sunday June 21, 2020 @12:50PM (#23593196)
> With JS, I almost never want to verify only that a value is of a specific type; I want to look at its contents, which means I'd need to write the same test in TypeScript.

If such (refactored) method is being called from code that's not covered by tests, the bug may not be discovered until it blows up in production. With static typing it would be caught at compile time.

Re:Deno will stop using TypeScript by orangecat on Sunday June 21, 2020 @12:59PM (#23593288)
If such (refactored) method is being called from code that's not covered by tests

Well there's your problem :p

I agree that if code has no tests, it's more likely to be correct if it's in TypeScript than JS. But I don't consider that an acceptable bar, so if I'm doing your code review I'm going to ask for tests in either case. And once you have tests that verify the behavior of the code, you're not getting much incremental benefit from type checking.

Re:Deno will stop using TypeScript by yawaramin on Sunday June 21, 2020 @04:27PM (#23595130)
Unit tests can only prove the presence of bugs; they can never prove the absence of bugs. Only a typechecker can do that (provided an appropriate implementation). E.g. here is an AVL tree that is verified balanced at the type level: https://sketch.sh/s/C7Afz38jtFRMTkkydeBgUA/

No unit tests needed to show that it is balanced :-)