Comment by Levitating

7 hours ago

Ugh more transpilers.

I think low_type is a much more elegant solution: https://github.com/low-rb/low_type

The problem I see with low-type[1] is that it lacks static analysis to evaulate type usage before runtime and, I don't think, it has any support for tooling so you can't get method usage information in the editor.

I think that static analysis could be done with an extension to rubocop via Prism though. Same for documention features via Ruby-LSP tooling.

I think if they worked on those they would very quickly pick up support as the syntax is quite nice.

Until then I think that Sorbet, possibly using RBS-Inline, is probably the best solution. I'd give a notable second to YARD annotations and Solargraph. Solargraph is a much underated project IMHO.

https://github.com/low-rb/low_type