-
Notifications
You must be signed in to change notification settings - Fork 203
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
feat: basic support for inferrable types #1407
Conversation
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.
Hey @swnf, I'm not dedicated to this project or either a main contributor. But I arrieved at your PR randomly and decided to stick my nose for a bit, you can only use what you find useful :)
Thanks for your feedback @arthurfiorette. I made some changes based on it. However, I'm not so sure anymore if my approach makes sense. There does not seem to be any advantage in parsing the AST of the initializer (except maybe for an |
Thanks for the pull request. I think using the type checker directly would make sense if it makes the code a lot simpler. We mainly use the AST to preserve aliases but that isn't an issue here with inferred types. |
@swnf would you be able to revise this pull request? |
Yes, I think I can update it next week. |
I've updated my code. It now uses the type checker and works for all types. I will rebase the PR once #1386 is merged. |
I merged #1386 |
I've rebased the PR. I think it is now ready for review. |
@domoritz can you have a look at this PR? It would help me with some eslint issues. |
🚀 PR was released in |
This PR adds support to infer the type of properties without an explicit type. For example:
Previously, properties without an explicit type were always ignored. With this PR they will get their correct type from the type checker.
This PR fixes #1406.
Version
Published prerelease version:
v1.2.0-next.3
Changelog
🎉 This release contains work from new contributors! 🎉
Thanks for all your work!
❤️ null@swnf
❤️ Thomas (@thomaswr)
❤️ Arthur Fiorette (@arthurfiorette)
❤️ Sean Keenan (@sean9keenan)
🚀 Enhancement
🐛 Bug Fix
🔩 Dependency Updates
Authors: 7