Skip to content

Commit dc860c7

Browse files
committed
Fix typecheck
1 parent e2d2c63 commit dc860c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/js_routes/configuration.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def initialize(attributes = nil)
5656
@compact = T.let(false, T::Boolean)
5757
@serializer = T.let(nil, T.nilable(String))
5858
@special_options_key = T.let("_options", Literal)
59-
@application = T.let(-> { Rails.application }, ApplicationCaller)
59+
@application = T.let(T.unsafe(-> { Rails.application }), ApplicationCaller)
6060
@module_type = T.let('ESM', T.nilable(String))
6161
@documentation = T.let(true, T::Boolean)
6262
@optional_definition_params = T.let(false, T::Boolean)
@@ -166,7 +166,7 @@ def verify
166166
sig { returns(T.proc.returns(String)) }
167167
def default_banner
168168
-> () {
169-
app = application.is_a?(Proc) ? application.call : application
169+
app = application.is_a?(Proc) ? T.unsafe(application).call : application
170170
<<~TXT
171171
File generated by js-routes #{JsRoutes::VERSION} on #{Time.now}
172172
Based on Rails #{Rails.version} routes of #{app.class}

0 commit comments

Comments
 (0)