Skip to content

Commit 8d83c38

Browse files
justin808claude
andcommitted
Improve RBS signatures based on code review feedback
- Fix Utils module method signatures: - Remove question mark from rails_version_less_than (matches actual implementation) - Add missing public utility methods: - react_on_rails_pro_version - rsc_support_enabled? - full_text_errors_enabled? - smart_trim - find_most_recent_mtime - prepend_to_file_if_text_not_present - detect_package_manager - default_troubleshooting_section - server_bundle_js_file_path - source_path - public_bundles_full_path - generated_assets_full_path - gem_available? - Add missing Configuration private methods: - rsc_bundle_js_file - react_client_manifest_file - react_server_client_manifest_file These methods are used in ensure_webpack_generated_files_exists and other parts of the codebase, so including them improves type coverage. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 2bd6a40 commit 8d83c38

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

sig/react_on_rails/configuration.rbs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,8 @@ module ReactOnRails
8989
def configure_skip_display_none_deprecation: () -> void
9090
def raise_missing_components_subdirectory: () -> void
9191
def compile_command_conflict_message: () -> String
92+
def rsc_bundle_js_file: () -> String?
93+
def react_client_manifest_file: () -> String?
94+
def react_server_client_manifest_file: () -> String?
9295
end
9396
end

sig/react_on_rails/utils.rbs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,22 @@ module ReactOnRails
1010
def self.server_bundle_path_is_http?: () -> bool
1111
def self.bundle_js_file_path: (String bundle_name) -> String
1212
def self.react_on_rails_pro?: () -> bool
13-
def self.server_bundle?: (String bundle_name) -> bool
13+
def self.react_on_rails_pro_version: () -> String?
14+
def self.rsc_support_enabled?: () -> bool
15+
def self.full_text_errors_enabled?: () -> bool
16+
def self.smart_trim: (String str, ?Integer max_length) -> String
17+
def self.find_most_recent_mtime: (Array[String] files) -> Time?
18+
def self.prepend_to_file_if_text_not_present: (file: String, text_to_prepend: String, regex: Regexp) -> void
19+
def self.detect_package_manager: () -> String
20+
def self.default_troubleshooting_section: () -> String
21+
def self.server_bundle_js_file_path: () -> String
1422
def self.running_on_windows?: () -> bool
15-
def self.rails_version_less_than?: (String version) -> bool
23+
def self.rails_version_less_than: (String version) -> bool
1624
def self.rails_version_less_than_4_1_1?: () -> bool
25+
def self.source_path: () -> String
26+
def self.public_bundles_full_path: () -> String
27+
def self.generated_assets_full_path: () -> String
28+
def self.gem_available?: (String name) -> bool
1729

1830
module Required
1931
def required: (String name) -> untyped

0 commit comments

Comments
 (0)