@@ -65,10 +65,11 @@ def create_type_variable(name, type:, variance: :invariant, fixed: nil, upper: n
6565 #| ?return_type: String?,
6666 #| ?class_method: bool,
6767 #| ?visibility: RBI::Visibility,
68- #| ?comments: Array[RBI::Comment]
68+ #| ?comments: Array[RBI::Comment],
69+ #| ?type_params: Array[String]
6970 #| ) ?{ (RBI::Method node) -> void } -> void
7071 def create_method ( name , parameters : [ ] , return_type : nil , class_method : false , visibility : RBI ::Public . new ,
71- comments : [ ] , &block )
72+ comments : [ ] , type_params : [ ] , &block )
7273 return unless Tapioca ::RBIHelper . valid_method_name? ( name )
7374
7475 sigs = [ ]
@@ -77,7 +78,7 @@ def create_method(name, parameters: [], return_type: nil, class_method: false, v
7778 # If there is no block, and the params and return type have not been supplied, then
7879 # we create a single signature with the given parameters and return type
7980 params = parameters . map { |param | RBI ::SigParam . new ( param . param . name . to_s , param . type ) }
80- sigs << RBI ::Sig . new ( params : params , return_type : return_type || "T.untyped" )
81+ sigs << RBI ::Sig . new ( params : params , return_type : return_type || "T.untyped" , type_params : type_params )
8182 end
8283
8384 method = RBI ::Method . new (
0 commit comments