discordrb
discordrb copied to clipboard
Add types
Summary
RBS is supported by default with Ruby ~>3.0. This is an experiment to add types to the ruby classes in the library.
Added
Steps
- Added rbs gem
gem install rbs - Added steep gem
gem install steep bundle exec steep init- This creates theSteefileinside the project.- Generate RBS files inside the
sigfolder - Then run
➜ discordrb git:(static_typing_using_rbs) bundle exec steep check --log-level=fatal
# Type checking files:
....................................................................................................................................................................................................................
No type error detected. 🫖
Hey there, it seems like most of these ended up being untyped. Maybe trying this using sord might yield better results https://github.com/AaronC81/sord