@@ -228,7 +228,7 @@ module RDoc
228228 # later sees `class Container`. `add_class` automatically upgrades `given_name`
229229 # to a class in this case.
230230 #
231- def add_class : (class_types class_type, ::String given_name, ?::String superclass) -> (RDoc::NormalClass | RDoc::SingleClass)
231+ def add_class : (class_types class_type, ::String given_name, ?::String superclass, ?Array[RDoc::TypeParameter] ) -> (RDoc::NormalClass | RDoc::SingleClass)
232232
233233 # <!--
234234 # rdoc-file=lib/rdoc/context.rb
@@ -271,7 +271,7 @@ module RDoc
271271 # Adds a module named `name`. If RDoc already knows `name` is a class then that
272272 # class is returned instead. See also #add_class.
273273 #
274- def add_module : (singleton (RDoc::NormalModule) class_type, String name) -> RDoc::NormalModule
274+ def add_module : (singleton (RDoc::NormalModule) class_type, String name, ?Array[RDoc::TypeParameter] ) -> RDoc::NormalModule
275275
276276 # <!--
277277 # rdoc-file=lib/rdoc/context.rb
@@ -749,6 +749,25 @@ module RDoc
749749 def initialize : (String? text, String name, String old_name, RDoc::Comment? comment, ?bool `singleton `) -> void
750750 end
751751
752+ class TypeParameter < CodeObject
753+ type variance = :invariant | :covariant | :contravariant
754+
755+ attr_reader name: String
756+ attr_reader variance: variance
757+ attr_reader upper_bound: String?
758+ attr_reader `unchecked `: bool
759+
760+ def initialize : (String name, Symbol variance, ?bool `unchecked `, ?String? upper_bound) -> void
761+
762+ def == : (untyped other) -> bool
763+
764+ alias eql? ==
765+
766+ def unchecked? : () -> bool
767+
768+ def to_s : () -> String
769+ end
770+
752771 # <!-- rdoc-file=lib/rdoc/stats.rb -->
753772 # RDoc statistics collector which prints a summary and report of a project's
754773 # documentation totals.
0 commit comments