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

[INTERNAL] Decide if we should convert to TypeScript #1040

Open
chaoticbear opened this issue Apr 6, 2024 · 2 comments
Open

[INTERNAL] Decide if we should convert to TypeScript #1040

chaoticbear opened this issue Apr 6, 2024 · 2 comments
Assignees

Comments

@chaoticbear
Copy link

chaoticbear commented Apr 6, 2024

Overview

Converting to TypeScript has some benefits like strong typing which will avoid some errors with incorrect or missing data while building this app. It can be frustrating to learn though, so this issue is a place to discuss whether we should try to make that change.

Notes

  • Strong typing will help us avoid some errors with incorrect or missing data
  • Learning curve is a bit steep and can be frustrating to learn the type system and what errors mean
  • Converting earlier in the the build of this project will be much easier than later on
  • In the long run it's preferred by a lot of devs because of the guard rails it sets up
  • It can be done incrementally. I (@chaoticbear aka wood ape) have worked on conversion projects before. We start with the outer extremities first (hooks, utility functions, models, tests) then work our way in to components and then screens/pages
@chaoticbear
Copy link
Author

@wsanchez I created this issue to discuss the possibility of converting sooner than later. Some of that decision leans on who is actually going to show up and work on this project, but as I recall from our meeting, most of the front-end folks there preferred TypeScript. If there's a critical mass, maybe it's worth it.

@sdebaun
Copy link

sdebaun commented Apr 13, 2024

FNG chiming in -- when i finally switched to TS about 10 years ago, it was a little annoying at first, but then something finally clicked:

TS -- if used properly -- basically turns 99% of js runtime errors into compile-time errors, that show nice little red squigglies in my ide, and can be quickly addressed. The initial struggles that I had were just not realizing that they were actual errors, and feeling like the typechecker was fighting against me.

Once I got into the swing of it, it became my language of choice for full-stack webapps for the past 10 years. The few times I had to work in javascript -- dont judge me, i needed the money -- it was terrifying. the initial reaction was OH MY GODS IM CODING WITHOUT A NET AGAIN.

So yeah. Im obviously a fan of TS > JS, especially when it comes to react, but that doesn't make it a reason to switch. On one hand, I HATE REWRITES, theyre usually counterproductive at best, epic disasters at worst.

On the other hand, if we have a bunch of people who are actually going to donate their time on "anything but js", then maybe its worth some realtime discussion between us?

-- Dearest, an inverate champion against maintenance load

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

3 participants