I’d like us to decide whether to continue using Flow for type checking, or whether we should switch to TypeScript. Initially, when choosing a type checking system for BookBrainz, it seemed that Flow was the least intrusive of the two, and that we could gradually migrate our code to use it, while TypeScript seemed to be the better choice for new projects.
Because of this Flow was picked and integrated into a few of our repositories (mainly the site). I’d estimate that about 30 files have some meaningful type annotation with Flow.
However, over the past few months, I’ve become increasingly disappointed with Flow. When running it consumes a huge amount of system memory, and seems to have some memory leak which result in certain code structures forcing me to terminate the processes. It’s also quite slow, and lacks good integration with IDEs. In contrast, TypeScript is extremely well integrated into VSCode, faster and supports a variety of features (autocomplete and automatic refactoring) that Flow doesn’t. For more info, see:
According to https://medium.com/@ckoster22/migrating-from-flow-to-typescript-b065796797db it’s quite easy to convert from Flow to TypeScript, and an automatic tool actually exists to do it (haven’t tried it though): https://github.com/bcherny/flow-to-typescript . I’d like to propose that we start a branch in bookbrainz-site and start migrating a few of our Flow annotated files over.