-
Notifications
You must be signed in to change notification settings - Fork 17
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
Allow for type inferencing #36
Milestone
Comments
AydanPirani
added
wontfix
This will not be worked on
and removed
wontfix
This will not be worked on
labels
Sep 20, 2023
See also #79 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Typescript has a decent ability to infer types correctly. In some cases, you need to coax it, but that goes for any strongly typed language.
While it is good to be explicit in your typing, I believe that if the linter can infer the type without any help, type annotations should not be added (an argument can also be made for allowing TS to infer return types as well, but I am like half-and-half on this idea). The TS LSP has support for showing inferred types within the editor (with the help of inlay hints or inline virtual text), so requiring type annotations to be present only makes it an extra thing to worry about when developing features.
The text was updated successfully, but these errors were encountered: