Hacker News new | ask | show | jobs
by erlich 1749 days ago
I can't believe Facebook hasn't canned Flowtype yet and moved to TypeScript. They will have to do it eventually.
3 comments

The problem is that TypeScript does not scale to the size of the giant monorepo at Facebook, with hundreds of thousands, if not millions of files. Since they aren't organized into packages, it is just one giant flat namespace (any JS file can import any other JS file by the filename). It is pretty amazing to change a core file and see type errors across the entire codebase in a few seconds. The main way to scale in TypeScript is Project References, which don't work when you haven't separated your code into packages. (Worked at Facebook until June 2021).
I'm not sure you understand the scale at which Facebook operates. They don't have to do anything.

As long as billions of people keep using Facebook they can maintain their own static analysis tooling for Javascript for as long as they want.

You do have a point, a rewrite on that scale would be a colossal waste of manyears/$$. Your delivery could be nicer though.
Doesn't look like they're stopping their use of Hack either. Eventually is a long time so you're right.