If you turn off `any` on a gradually-typed codebase, everything will blow up because of the untyped parts. Gradual typing CANNOT be sound unless you dynamically typecheck everything (at which point you are just doing what JS devs do anyway).
> If you turn off `any` on a gradually-typed codebase, everything will blow up because of the untyped parts.
Again, that's not true. A JavaScript file's exports don't have `any` type. Any types during interop are inferred (maybe?) or require bindings. The use of `any` in bindings is your (sometimes valid) choice.
> Gradual typing CANNOT be sound
TypeScript isn't sound [0].
Re:TypeScript vs. ReasonML
by WorldMaker on Wednesday September 04, 2019 @04:31PM
(#20881119)
The new-ish `unknown` type is also very useful for interop work to force adding runtime checks where needed. Some of the Typescript defaults are slowly moving to `unknown` rather than `any` in the strictest compile modes.
This is not true. Types may be complex and out of laziness (which we do suffer from) there may be `any` types laying around. But you can set up eslint rules that forbid this and turn off implicit `any` at the TypeScript compiler level so you aren't bit by the defaults (which are not nice, for sure).
We have very few `any`'s now in our code and aim to get rid of all of them.