Open HoneyryderChuck opened 2 weeks ago
@soutaro it's ready for review 🙏
Thank you for your work! 🎉 I'm totally good for using optional records for return values.
However, using the records instead of Hash
for options may result in reporting more type errors.
opts = {}
# Set up opts
CGI.new(opts) # Type error because it's a Hash, not a record
What do you think about this?
I'm thinking of if having additional rules for Hash
-> record conversion in Steep would help.
I'll run some tests locally to see if this impacts rbs runtime type check significantly. Nevertheless, I think there's great value in being precise on the options you accept in a hash as a function argument, particularly in examples such as ssl context, or URI build functions. That's definitely something steep could be a bit smarter about 👍
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#draft-pull-requests