-
-
Notifications
You must be signed in to change notification settings - Fork 435
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
[Tech] Update to Typescript 5.6.3 #3908
base: main
Are you sure you want to change the base?
Conversation
This makes me wonder until when we should keep using typescript or maybe just stick to a version forever, updating it without adding value to the type checks might be a wasted time and effort on our end. |
I do not agree at all. Everything fixed/ Not blaming anyone for those errors of course (heck I bet some of them were made by me), but they are real & should be fixed (or at least checked for & explicitly ignored) |
Those 'errors' exists because we have TS and it is becoming more "aggressive" with each version, that is what I mean. Sometimes we get ourselves putting a lot of time in figuring out the correct way of typing something and that is what I mean about 'worth' to have it or not. |
TypeScript is preventing real runtime errors. Let's take an example from this PR: I understand however that sometimes, you might just need to tell TS that you know what you're doing & whatever that might be, it's fine to do. That's why I just |
I agree on keeping typescript updated and being open to add some magic comment to ignore something when the typing wants to go out of hands (and who knows, maybe someone else wants to address the ignore comment in the future and it's fine too). In my experience, locking something to an old version eventually create more problems somewhere else, then if we wait months or years to update and at some point we must do it it's way harder in general cause we missed doing it more gradual. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Probably the version is outdated by now though.
597b912
to
4afc682
Compare
4afc682
to
385e790
Compare
This required a bunch of little changes across the codebase.
Some were easy (a missing property in a record),
some tedious (adding probably 30
@ts-expect-error
s to faulty test types) andsome a little confusing (making something a Record with a literal type as its key allows you to only index into it with values that are of that literal type)
Everything seems to typecheck properly, tests all pass, app works OK as far as I can tell (not that that should be affected at all)
Use the following Checklist if you have changed something on the Backend or Frontend: