DEV Community


Discussion on: Thoughts on migrating to TypeScript and improving the overall quality of the frontend DEV codebase

restoreddev profile image
Andrew Davis

I would like to hear about the experience if you do refactor to TS. It seems like a big departure for a Ruby app. Every time I’ve tried to use it before, it feels very foreign to JavaScript and it’s dynamic nature.

matthewbdaly profile image
Matthew Daly

To my mind, Flow has always made more sense than Typescript.

Other languages that compile to Javascript have historically not done all that well in the long term (not many people use Coffeescript or Dart any more), and the refrain that you should always bet on Javascript is pretty reasonable.

It therefore feels safer to adopt Flow, which is just annotations for Javascript, than Typescript. The toolchain is generally easier to set up, and it can be fairly easily added to legacy projects. Also, I tend to use React for my front end stuff these days, which has historically had a stronger emphasis on Flow than Typescript.