Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider migrating from JavaScript to TypeScript #217

Open
midouest opened this issue Feb 5, 2022 · 1 comment
Open

Consider migrating from JavaScript to TypeScript #217

midouest opened this issue Feb 5, 2022 · 1 comment

Comments

@midouest
Copy link
Contributor

midouest commented Feb 5, 2022

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:

  • Need to learn additional type syntax introduced by TypeScript. However, TypeScript is a superset of JavaScript, so all your JavaScript knowledge transfers over. Static typing in TypeScript is also gradual and optional, so it's possible to migrate incrementally without having to add types to every function and variable.
  • Additional compilation step during development, and the TypeScript compiler is known to be slow for large projects. However, I don't think it would be noticeable for this project.
@ngwese
Copy link
Member

ngwese commented Feb 25, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants