-
-
Notifications
You must be signed in to change notification settings - Fork 638
Closed
Labels
Description
Summary
Add documentation about RBS type signature support to help developers leverage type checking in their IDEs.
Motivation
React on Rails now has comprehensive RBS type signatures (added in PR #1945), but developers may not be aware of this feature or how to use it.
Proposed Changes
Add a new section to README.md:
Suggested Content
## Type Safety (RBS)
React on Rails includes [RBS](https://github.com/ruby/rbs) type signatures for improved type safety and IDE support.
### Benefits
- Better autocomplete in supported IDEs
- Early detection of type errors
- Improved documentation through types
### IDE Support
RBS signatures work with:
- [Steep](https://github.com/soutaro/steep) - Type checker for Ruby
- [Solargraph](https://solargraph.org/) - Ruby language server with RBS support
- RubyMine (built-in RBS support)
### Validation
To validate type signatures:
\`\`\`bash
bundle exec rbs -I sig validate
# or
rake rbs:validate
\`\`\`
### Location
Type signatures are located in `sig/react_on_rails/`Additional Documentation
Consider also adding:
- Link to RBS documentation
- Version compatibility notes (which Ruby/RBS versions are supported)
- Examples of how types improve the development experience
Related
Follow-up to PR #1945 - post-merge code review feedback