Skip to content

Commit

Permalink
Add support for options param in params type signature
Browse files Browse the repository at this point in the history
  • Loading branch information
olivier-thatch committed Jul 16, 2024
1 parent 868a638 commit c99c472
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions rbi/grape.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,22 @@ module Grape

module Helpers
module BaseHelper
sig { params(name: Symbol, block: T.proc.bind(Grape::Validations::ParamsScope).void).void }
sig do
params(
name: Symbol,
block: T.proc.bind(Grape::Validations::ParamsScope).params(options: T::Hash[Symbol, T.untyped]).void,
).void
end
def params(name, &block); end
end

module ClassMethods
sig { params(new_modules: T.untyped, block: T.nilable(T.proc.bind(Grape::DSL::Helpers::BaseHelper).void)).void }
sig do
params(
new_modules: T.untyped,
block: T.nilable(T.proc.bind(Grape::DSL::Helpers::BaseHelper).void),
).void
end
def helpers(*new_modules, &block); end
end
end
Expand Down

0 comments on commit c99c472

Please sign in to comment.