News for hackers. Stuff that matters.
Re:Catching bugs early with static analysis by bcherny on Monday August 12, 2019 @09:55AM (#20675409)
If you compile your code with TypeScript and set allowJs=true, you’ll get a lot of checking for free with no changes at all to your existing JS code. TS will catch things like dead code, missing return statements, type mismatches and so on for free.
Re:Catching bugs early with static analysis by baybal2 on Monday August 12, 2019 @10:24AM (#20675663)
It will be nice if the use case of TS only being used as a static checker be supported better, but then there will be no point in TS as a language
Re:Catching bugs early with static analysis by oakesm9 on Monday August 12, 2019 @10:27AM (#20675699)
If that's the use case you have, then Facebook's Flow is a better fit.
Re:Catching bugs early with static analysis by bcherny on Monday August 12, 2019 @11:51AM (#20676541)
What kind of additional support do you wish TS had, that it doesn’t have already?