[RFC] Migrate Jest to TypeScript by SimenB · Pull Request #7554 · facebook/jest

For me I see the sense in moving to reason or ocaml which are more safe languages than both flow and typescript.

@orta already answered here, but the tl;dr (at least to me) is that the point here is to make the code base more approachable to to new (and old) contributors who are consumers of Jest. The vast majority of them are JavaScript developers, not OCaml developers.

But in the end of the day it’s the same javascript full of its problems.

True, but we love it nonetheless 🙂


Flow has recently been putting lots of effort into rolling out support for Microsoft’s Language Server Protocol

Sure, but it’s taken months and months, and it’s still not done. The argument “we’ll be just as good, just a year later” doesn’t really spark much confidence.

Happy to be convinced otherwise of course.

Also, FWIW I personally don’t use VS Code, so LSP doesn’t impact my experience. I use IntelliJ (WebStorm), and their TS support is miles ahead of the Flow support. I know most people do use VS Code nowadays though, so your point is very much valid to the majority.

Not sure I understand this point – what’s the difference from Flow & flow-typed?

There is no way to generate typings from source code in flow. They’ve had an untouched gen-flow-files for some time, but it never went anywhere (facebook/flow#5871)

Imo jumping between TS and Flow does not create much of a barrier for someone experienced with either. Like you say, the features and syntax are extremely similar.

Sure, but the tooling is way better with typescript, even if the syntax itself is very similar. The fact flow is improving (lsp support has been worked on for a long time, generating types etc) doesn’t mask the fact TS has all of that today, and there’s no real reason to believe Flow will get those features in a timely manner.

Flow and Jest are both Facebook products (right?), so I assume (a) the barrier to entry for internal FB employees would be higher, and (b) if changes are needed upstream in the typechecker, the chances of that being prioritised are higher than with TS.

I can’t answer to a, but to b: not necessarily, this took 8 months facebook/flow#6103, typescript had it within a few days DefinitelyTyped/DefinitelyTyped#24624

Read More

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.