Commit 16c9604
Fix RBS type accuracy and improve error handling
Type Accuracy Fixes:
- Change Configuration#initialize raise_on_prerender_error from bool to bool?
to allow nil values (matches actual implementation)
- Replace String return types with safe_buffer type alias for methods that
return html_safe strings (ActiveSupport::SafeBuffer):
- Helper: react_component, react_component_hash, redux_store,
redux_store_hydration_data, server_render_js
- Controller: redux_store_hydration_data
- Private helpers: build_react_component_result_for_server_rendered_string,
build_react_component_result_for_server_rendered_hash,
prepend_render_rails_context
Infrastructure Improvements:
- Improve rake task error handling with explicit case statement for nil
(handles cases where RBS command is not found)
- Add rubocop disable directive for Metrics/BlockLength in rbs.rake
The safe_buffer type alias (= String) documents that these methods return
html_safe strings while maintaining RBS compatibility without requiring
ActiveSupport type definitions.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 8d83c38 commit 16c9604
File tree
4 files changed
+30
-12
lines changed- rakelib
- sig/react_on_rails
4 files changed
+30
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | | - | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | | - | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
19 | 24 | | |
20 | 25 | | |
21 | 26 | | |
| |||
30 | 35 | | |
31 | 36 | | |
32 | 37 | | |
| 38 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
9 | | - | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
| 9 | + | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
9 | | - | |
| 13 | + | |
10 | 14 | | |
| 15 | + | |
11 | 16 | | |
12 | 17 | | |
13 | 18 | | |
14 | | - | |
| 19 | + | |
15 | 20 | | |
| 21 | + | |
16 | 22 | | |
17 | 23 | | |
18 | 24 | | |
19 | | - | |
| 25 | + | |
20 | 26 | | |
21 | | - | |
| 27 | + | |
| 28 | + | |
22 | 29 | | |
| 30 | + | |
23 | 31 | | |
24 | 32 | | |
25 | 33 | | |
26 | | - | |
| 34 | + | |
27 | 35 | | |
28 | 36 | | |
29 | 37 | | |
| |||
43 | 51 | | |
44 | 52 | | |
45 | 53 | | |
46 | | - | |
| 54 | + | |
47 | 55 | | |
48 | 56 | | |
49 | 57 | | |
50 | 58 | | |
51 | 59 | | |
52 | 60 | | |
53 | | - | |
| 61 | + | |
54 | 62 | | |
55 | | - | |
| 63 | + | |
56 | 64 | | |
57 | 65 | | |
0 commit comments