Re:Migrating 300k LOC from Flow to TypeScript
by wereHamster on Thursday June 20, 2019 @11:22AM
(#20233796)
A sound type system shouldn't allow you to write such a parser function without either you lying in its implementation or having to use unsafe code.
In a year or two, once everyone has switched to use `unknown` instead of `any` in functions which at runtime return… uhm… unknown values, we'll all be much safer. Because we'll be forced to use proper parsers and validators.
In a year or two, once everyone has switched to use `unknown` instead of `any` in functions which at runtime return… uhm… unknown values, we'll all be much safer. Because we'll be forced to use proper parsers and validators.