-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add types to JS files #125
Comments
Status: 30/51 production JS files (59%) |
Making progress in #301! Status: 41/53 files (77%) |
I have an essay I don't wanna write, grinding these out: |
I highly appreciate the work and excitement, but go write your essay! 😅 |
I know, I know. I'm gonna go finish it now 🙃 Well, off to write another couple hundred words... 😅 |
Oh, can you close #132 as superseded, @jfmengels? |
I have added TypeScript to the project to help out with finding bugs during development.
Unfortunately, because without type annotations it determines that the arguments of pretty much every function is
any
, it doesn't report many problems in practice.The idea is to add more types, so that there are none of these implicits
any
.I have added TypeScript configuration that enables that setting for a few files, and have added all the necessary annotations for them, but I'm still missing a lot of the files. You can run it using
The idea is to update the
tsconfig.no-implicit-any.json
by adding a new file in theinclude
list one and adding types until there are no more issues, and repeating until all files are done and we can enable thenoImplicitAny
setting in the regulartsconfig.json
file.I recommend adding new files that only import files that are already in the
include
list. (To do that, just add an arbitrary file, and if TS reports issues for other files, then choose one of those files instead, and so on).Note that adding type annotations and fixing issues can result in the "main" tsconfig.json starting to report new issues.
If you'd like to work on this, great! And thank you!
Feel free to do as much or as little as you wish, I recommend to do small steps in this work, and to do for instance one PR per file added.
The text was updated successfully, but these errors were encountered: