Interesting, RBS 4.0.0 adds inline support: https://github.com/ruby/rbs/blob/master/CHANGELOG.md. Usage is not directly linked to via the README, but can be found in the docs: https://github.com/ruby/rbs/blob/master/docs/inline.md

#ruby

rbs/CHANGELOG.md at master · ruby/rbs

The type signature language for Ruby. Contribute to ruby/rbs development by creating an account on GitHub.

GitHub
@bkuhlmann Interesting... I've recently been wanting to go the opposite direction: move my RDoc into the .rbs sidecar files.

@kerrick Yeah, I'm mixed feelings on this.

I'm such a heavy user of Dry Types, Schema, and Validation that I don't usually need any of this. ...but having inline type checks could be useful (as I enjoyed them when writing Elm).

I can also see the flip side of using `*.rbs` files but then you have to do a lot of jumping back and forth much like C header files. That might be too much file management as it would duplicate the number of tabs open and breaking flow state.