From c99c472af72deb1f4804f7b8014a280c4c7b3880 Mon Sep 17 00:00:00 2001 From: Olivier Bellone Date: Mon, 15 Jul 2024 17:02:52 -0700 Subject: [PATCH] Add support for `options` param in `params` type signature --- rbi/grape.rbi | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/rbi/grape.rbi b/rbi/grape.rbi index 2bea6e5..baf51ae 100644 --- a/rbi/grape.rbi +++ b/rbi/grape.rbi @@ -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