The #364 showed that this would be extremely useful to have a static types in our frontend as it becomes more complex:
This is really great for refactoring.
It significantly reduces amount of regressions.
It simplifies search for code usages. So if you want to change some aspect of the application it is much more simple to find places where some changes must be made.
It is great for clarification of the code
It is much easier to communicate a purpose of the code if you add types
Static typing has much better IDE support. This adds more static checks, hints and so on.
I've already experimented with using TypeScript in my free time and it worked great. TypeScript has very powerful and convenient type system (algebraic types, structural typing, generics, etc), which provides a great amount of polymorphism and fits the dynamic JS code-base very well.
ETA is 2d
Migration of React components is almost 1-to-1. Just replace PropTypes with react types. Migration of the Redux state could be tedious but it will not be required after #426. I've already tried to migrate parts of the Server and it was pretty simple. Also this could be done gradually: we can mix JS and TS code for some time.
The #364 showed that this would be extremely useful to have a static types in our frontend as it becomes more complex:
I've already experimented with using TypeScript in my free time and it worked great. TypeScript has very powerful and convenient type system (algebraic types, structural typing, generics, etc), which provides a great amount of polymorphism and fits the dynamic JS code-base very well.
ETA is 2d
Migration of React components is almost 1-to-1. Just replace PropTypes with react types. Migration of the Redux state could be tedious but it will not be required after #426. I've already tried to migrate parts of the
Server
and it was pretty simple. Also this could be done gradually: we can mix JS and TS code for some time.