3 ms·
The reason is to fight with bugs, which are caused by type errors. Current approaches are: 1) use guards 2) add tests which check types 3) use error reporting
by stereobooster 9y ago
The reason is to fight with bugs, which are caused by type errors. Current approaches are:
1) use guards
2) add tests which check types
3) use error reporting software, like Sentry, and cath errors in production
Is there any reason you do not want not catch type errors without additional code and useless tests before you deployed it to production?
https://blog.acolyer.org/2017/09/19/to-type-or-not-to-type-quantifying-detectable-bugs-in-javascript/ https://blog.acolyer.org/2017/09/19/to-type-or-not-to-type-q...