discordrb icon indicating copy to clipboard operation
discordrb copied to clipboard

Add types

Open gaurav-singh-dtree opened this issue 3 years ago • 1 comments

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 the Steefile inside the project.
  • Generate RBS files inside the sig folder
  • Then run
➜  discordrb git:(static_typing_using_rbs) bundle exec steep check --log-level=fatal

# Type checking files:

....................................................................................................................................................................................................................

No type error detected. 🫖

gaurav-singh-dtree avatar Aug 16 '22 12:08 gaurav-singh-dtree

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

swarley avatar Aug 16 '22 14:08 swarley