Skip to content

Commit

Permalink
Merge branch 'main' into sidekiq-70
Browse files Browse the repository at this point in the history
  • Loading branch information
HoneyryderChuck authored Jan 10, 2024
2 parents 3fd4681 + ec140af commit e09548b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
10 changes: 10 additions & 0 deletions gems/rack/2.2/_test/string_body.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# @type var app: Rack::_Application
app = _ = nil

middleware = -> (env) do
# @type var env: Rack::env
# @type block: Rack::response
[404, { "FOO" => "BAR" }, "Not found"]
end

middleware #: Rack::_Application
11 changes: 10 additions & 1 deletion gems/rack/2.2/rack.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,16 @@ module Rack
def self.release: -> String

type env = Hash[String, untyped]
type response = [_ToI, _Each[[String, String]], _Each[String]]

type string_body = _ToStr

type enumerable_body = _Each[String]

interface _StreamingBody
def call: (untyped stream) -> void
end

type response = [_ToI, _Each[[String, String]], string_body | enumerable_body | _StreamingBody]

interface _Application
def call: (env) -> response
Expand Down

0 comments on commit e09548b

Please sign in to comment.