Skip to content

Commit

Permalink
Merge pull request #12 from thatch-health/olivier-rbi-params-options
Browse files Browse the repository at this point in the history
Add support for `options` param in `params` type signature
  • Loading branch information
olivier-thatch authored Jul 16, 2024
2 parents 868a638 + c99c472 commit 4de51f1
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 4de51f1

Please sign in to comment.