AaronC81 / sord

Convert YARD docs to Sorbet RBI and Ruby 3/Steep RBS files
https://sord.aaronc.cc
MIT License
293 stars 18 forks source link

Add constant type for rbs #130

Closed shoma07 closed 3 years ago

shoma07 commented 3 years ago

In this PR, add type definition(rbs) to constant using @return. If there is no @return, it continue to be untyped.

We can also write @return in constant, but I'm not sure if that's the right thing to do. But I couldn't think of any other way to add the type.

example:

I haven't changed rbi, so I couldn't determine if https://github.com/AaronC81/sord/issues/128 could be closed.

AaronC81 commented 3 years ago

Awesome - thanks for your contribution! Looks good to me.

Yeah, I think we'll leave #128 open for now until RBI works too.

shoma07 commented 3 years ago

Thank you!