Skip to content

Consider migrating from JavaScript to TypeScript #217

@midouest

Description

@midouest

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions