AaronC81 / sord

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

Constant types #128

Open AaronC81 opened 3 years ago

AaronC81 commented 3 years ago

It would be good to be able to specify types for constants - currently they're all untyped.

AaronC81 commented 3 years ago

Support for this in RBS added by #130, so just needs RBI.

postmodern commented 2 years ago

Was going to submit a bug about this. I found it odd that sord --rbs cannot output the type of constants, even when they have literal values (ex: a literal Regexp), and also cannot infer the types of constants when their value is a method call which has a YARD @return tag.