Skip to content

Commit 7f330e4

Browse files
justin808claude
andcommitted
Document RBS type signature support in README
Add comprehensive documentation about RBS type signatures to help developers leverage type checking in their IDEs. Key additions: - Benefits section explaining type safety advantages - IDE support information (Steep, Solargraph, RubyMine, VS Code) - Usage instructions for validation and listing type files - Location and compatibility information - Links to RBS documentation and sig/README.md Fixes #1953 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 9404439 commit 7f330e4

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,61 @@ _Requires creating a free account._
148148
- Node.js >= 20 (CI tested: 20 - 22)
149149
- A JavaScript package manager (npm, yarn, pnpm, or bun)
150150

151+
# 🔍 Type Safety (RBS)
152+
153+
React on Rails includes [RBS](https://github.com/ruby/rbs) type signatures for improved type safety and IDE support.
154+
155+
## Benefits
156+
157+
- Better autocomplete in supported IDEs
158+
- Early detection of type errors
159+
- Improved code documentation through types
160+
- Enhanced refactoring safety
161+
162+
## IDE Support
163+
164+
RBS signatures work with:
165+
166+
- [Steep](https://github.com/soutaro/steep) - Static type checker for Ruby
167+
- [Solargraph](https://solargraph.org/) - Ruby language server with RBS support
168+
- RubyMine - Built-in RBS support
169+
- VS Code - Via Ruby LSP extensions
170+
171+
## Usage
172+
173+
### Validation
174+
175+
To validate type signatures:
176+
177+
```bash
178+
bundle exec rake rbs:validate
179+
```
180+
181+
Or directly using the RBS CLI:
182+
183+
```bash
184+
bundle exec rbs -I sig validate
185+
```
186+
187+
### Listing Type Files
188+
189+
To see all available RBS type signature files:
190+
191+
```bash
192+
bundle exec rake rbs:list
193+
```
194+
195+
## Location
196+
197+
Type signatures are located in the `sig/` directory, organized to mirror the `lib/` directory structure. For more details, see [sig/README.md](sig/README.md).
198+
199+
## Compatibility
200+
201+
- Ruby >= 3.0 (RBS is included in Ruby 3.0+)
202+
- RBS gem >= 2.0
203+
204+
For more information about RBS, visit the [official RBS documentation](https://github.com/ruby/rbs).
205+
151206
# 🆘 Get Help & Support
152207

153208
**Need immediate help?** Here are your options, ordered by response time:

0 commit comments

Comments
 (0)