monome / maiden

web based editor and repl for norns
GNU General Public License v3.0
47 stars 34 forks source link

Consider migrating from JavaScript to TypeScript #217

Open midouest opened 2 years ago

midouest commented 2 years ago

In my experience, static typing is extremely helpful for new developers who are just beginning to explore a codebase (like myself). It can also give developers more confidence that changes to existing code are not going to introduce type errors.

It seems like create-react-app has a pretty straightforward path to migrating existing JavaScript projects to TypeScript: https://create-react-app.dev/docs/adding-typescript/

Adding the TypeScript ESLint plugin would also be a good call if TypeScript is adopted.

Some potential downsides include:

ngwese commented 2 years ago

I think this would be a welcome change. The additional type information would inevitably be a great asset to refactoring work. Back when maiden was started the Typescript support in create-reate-app was a bit more rough if I recall correctly. Javascript was chosen only to keep the number of moving parts to learn as low as possible.