rbi 0.4.3 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a187f51ebadb01bef099fcb043616e2006c6de1ca6c11ee1ad542c5289ae2a79
4
- data.tar.gz: 50ab0f1cdee28c524c4519aee5d67dd67adac2cb6377137f2de84d114ebd4a3f
3
+ metadata.gz: 7abed145bf2c620d24e9b6cd69c6b58e4a1a88230f1fa304018621098f13c89b
4
+ data.tar.gz: 24c00005fa963db2dcec897a7412cb8e953c3f03007e8ab7f986e66a4927ffad
5
5
  SHA512:
6
- metadata.gz: ba665a75493caea2312e6dea8ae3267b2a20a693e51b026b71d5914858cfdc6ce2eb98f665eeb6e307ce51da9446fee82f269984e1872c615414179528c00745
7
- data.tar.gz: a6da77cf6a8ec3a3bc1f9a89378b05d416213aef48bbcffaf699b5e6c43198d9f30a030cd590a0f9deb75dc058f7670743fabbd629e37ac012670ea2a1bd44b2
6
+ metadata.gz: f314b0af5386993a597e17f5276ff960cd200b85fa03263ee3d957026db549ca0282dbc0c351e0719e0f472d37feb0ff976f521dc6266c0e9b5f57730948bafb
7
+ data.tar.gz: bcb533b21bb1850002f6c7bba3bf661586f95e192e5f31b656fdab4992f5c0cd4851b160b37e1cd3ba2296cae630c00bf017d23c613e0c82aad5bc854ebd88d1
data/Gemfile CHANGED
@@ -10,7 +10,7 @@ group(:development, :test) do
10
10
  gem("minitest")
11
11
  gem("minitest-reporters")
12
12
  gem("rake", "~> 13.4")
13
- gem("rubocop", "~> 1.88", require: false)
13
+ gem("rubocop", "~> 1.92", require: false)
14
14
  gem("rubocop-shopify", require: false)
15
15
  gem("rubocop-sorbet", require: false)
16
16
  gem("sorbet", ">= 0.5.9204", require: false)
data/lib/rbi/model.rb CHANGED
@@ -552,6 +552,11 @@ module RBI
552
552
  params << BlockParam.new(name)
553
553
  end
554
554
 
555
+ #: -> void
556
+ def add_forwarding_param
557
+ params << ForwardingParam.new
558
+ end
559
+
555
560
  #: (
556
561
  #| ?params: Array[SigParam]?,
557
562
  #| ?return_type: (String | Type),
@@ -615,7 +620,7 @@ module RBI
615
620
  #: -> String?
616
621
  def name
617
622
  case self
618
- when ReqParam, OptParam, KwParam, KwOptParam, RestParam, KwRestParam, BlockParam
623
+ when ReqParam, OptParam, KwParam, KwOptParam, RestParam, KwRestParam, BlockParam, ForwardingParam
619
624
  name
620
625
  end
621
626
  end
@@ -870,6 +875,38 @@ module RBI
870
875
  end
871
876
  end
872
877
 
878
+ # The `...` in `def m(...)`
879
+ class ForwardingParam < Param
880
+ # @override
881
+ #: -> nil
882
+ def name
883
+ nil
884
+ end
885
+
886
+ #: (?loc: Loc?, ?comments: Array[Comment]?) ?{ (ForwardingParam node) -> void } -> void
887
+ def initialize(loc: nil, comments: nil, &block)
888
+ super(loc: loc, comments: comments)
889
+ block&.call(self)
890
+ end
891
+
892
+ # @override
893
+ #: -> String
894
+ def to_s
895
+ "..."
896
+ end
897
+
898
+ # @override
899
+ #: -> bool
900
+ def anonymous?
901
+ false
902
+ end
903
+
904
+ #: (Object? other) -> bool
905
+ def ==(other)
906
+ ForwardingParam === other
907
+ end
908
+ end
909
+
873
910
  # Mixins
874
911
 
875
912
  # @abstract
data/lib/rbi/parser.rb CHANGED
@@ -552,15 +552,14 @@ module RBI
552
552
  # Collect all the remaining comments within a node
553
553
  #: (Prism::Node node) -> void
554
554
  def collect_dangling_comments(node)
555
- first_line = node.location.start_line
556
555
  last_line = node.location.end_line
557
556
 
558
557
  last_node_last_line = node.child_nodes.last&.location&.end_line
558
+ first_line = last_node_last_line ? last_node_last_line + 1 : node.location.start_line
559
559
 
560
560
  first_line.upto(last_line) do |line|
561
561
  comment = @comments_by_line[line]
562
562
  next unless comment
563
- break if last_node_last_line && line <= last_node_last_line
564
563
 
565
564
  current_scope << parse_comment(comment)
566
565
  @comments_by_line.delete(line)
@@ -775,6 +774,11 @@ module RBI
775
774
  loc: node_loc(param),
776
775
  comments: node_comments(param),
777
776
  )
777
+ when Prism::ForwardingParameterNode
778
+ ForwardingParam.new(
779
+ loc: node_loc(param),
780
+ comments: node_comments(param),
781
+ )
778
782
  else
779
783
  raise ParseError.new("Unexpected parameter node `#{param.class}`", node_loc(param))
780
784
  end
data/lib/rbi/printer.rb CHANGED
@@ -6,7 +6,7 @@ module RBI
6
6
 
7
7
  class Printer < Visitor
8
8
  # Pre-computed indentation strings to avoid allocating " " * indent on every line.
9
- MAX_CACHED_INDENT = 50 #: Integer
9
+ MAX_CACHED_INDENT = 50
10
10
  INDENT_CACHE = Array.new(MAX_CACHED_INDENT + 1) { |i| (" " * i).freeze }.freeze #: Array[String]
11
11
 
12
12
  #: bool
@@ -408,6 +408,12 @@ module RBI
408
408
  self.print(node.to_s)
409
409
  end
410
410
 
411
+ # @override
412
+ #: (ForwardingParam node) -> void
413
+ def visit_forwarding_param(node)
414
+ self.print(node.to_s)
415
+ end
416
+
411
417
  # @override
412
418
  #: (Include node) -> void
413
419
  def visit_include(node)
@@ -206,7 +206,7 @@ module RBI
206
206
  "Module",
207
207
  "Set",
208
208
  "Range",
209
- ].freeze #: Array[String]
209
+ ].freeze
210
210
 
211
211
  GENERIC_TYPE_TO_SORBET_GENERIC_TYPE = RUNTIME_GENERIC_TYPES.flat_map do |type|
212
212
  [[type, "::T::#{type}"], ["::#{type}", "::T::#{type}"]]
@@ -595,6 +595,12 @@ module RBI
595
595
  print("{ (*untyped) -> untyped } ")
596
596
  end
597
597
 
598
+ # @override
599
+ #: (ForwardingParam node) -> void
600
+ def visit_forwarding_param(node)
601
+ print("...")
602
+ end
603
+
598
604
  # @override
599
605
  #: (Include node) -> void
600
606
  def visit_include(node)
@@ -44,6 +44,9 @@ module RBI
44
44
  def add_method_sig(method)
45
45
  return unless method.sigs.empty?
46
46
 
47
+ # Sorbet doesn't support signatures on methods using argument forwarding.
48
+ return if method.params.any?(RBI::ForwardingParam)
49
+
47
50
  method.sigs << Sig.new(
48
51
  params: method.params.filter_map do |param|
49
52
  case param
@@ -324,11 +324,26 @@ module RBI
324
324
  #: (Node other) -> void
325
325
  def merge_with(other)
326
326
  return unless other.is_a?(NodeWithComments)
327
+ return unless other.comments?
328
+
329
+ comments_by_text = {} #: Hash[String, Array[Comment]]
330
+ comments.each { |comment| index_comment(comments_by_text, comment) }
327
331
 
328
332
  other.comments.each do |comment|
329
- comments << comment unless comments.include?(comment)
333
+ comments << comment if index_comment(comments_by_text, comment)
330
334
  end
331
335
  end
336
+
337
+ private
338
+
339
+ #: (Hash[String, Array[Comment]] index, Comment comment) -> bool
340
+ def index_comment(index, comment)
341
+ same_text = index[comment.text] ||= []
342
+ return false if same_text.any? { |indexed| indexed == comment }
343
+
344
+ same_text << comment
345
+ true
346
+ end
332
347
  end
333
348
 
334
349
  class Tree
@@ -467,6 +482,9 @@ module RBI
467
482
  return false unless other.is_a?(Method)
468
483
  return false unless name == other.name
469
484
  return false unless params.size == other.params.size
485
+ if (params_have_forwarding?(params) || params_have_forwarding?(other.params)) && params != other.params
486
+ return false
487
+ end
470
488
 
471
489
  if sigs.empty? && other.sigs.empty?
472
490
  compatible_params?(other)
@@ -485,8 +503,9 @@ module RBI
485
503
  super
486
504
 
487
505
  if sigs.empty? && !other.sigs.empty?
488
- @params = other.params.dup
506
+ @params = other.params.map(&:dup)
489
507
  @sigs = other.sigs.dup
508
+ rename_sigs_params(@sigs, @params)
490
509
  return
491
510
  end
492
511
 
@@ -503,8 +522,10 @@ module RBI
503
522
  #: (Method other) -> bool
504
523
  def compatible_params?(other)
505
524
  return true if params == other.params
525
+ return false unless params.size == other.params.size
506
526
 
507
527
  params.zip(other.params).all? do |p1, p2|
528
+ p2 = p2 #: as !nil
508
529
  p1.compatible_with?(p2)
509
530
  end
510
531
  end
@@ -512,20 +533,26 @@ module RBI
512
533
  #: (Array[Param] preferred, Array[Param] fallback) -> Array[Param]
513
534
  def merge_params(preferred, fallback)
514
535
  preferred.zip(fallback).map do |p1, p2|
536
+ p2 = p2 #: as !nil
515
537
  if p1.anonymous?
516
- p2.dup #: as !nil
538
+ p2.dup
517
539
  else
518
540
  p1.dup
519
541
  end
520
542
  end
521
543
  end
522
544
 
545
+ #: (Array[Param] params) -> bool
546
+ def params_have_forwarding?(params)
547
+ params.any?(ForwardingParam)
548
+ end
549
+
523
550
  #: (Array[Sig] sigs, Array[Param] params) -> void
524
551
  def rename_sigs_params(sigs, params)
525
552
  sigs.each do |sig|
526
- sig_params = sig.params.zip(params).map do |sig_param, param|
527
- param = param #: as !nil
528
- name = if sig_param.anonymous? && !param.anonymous?
553
+ sig_params = sig.params.each_with_index.map do |sig_param, index|
554
+ param = params[index]
555
+ name = if param && sig_param.anonymous? && !param.anonymous?
529
556
  param.name #: as !nil
530
557
  else
531
558
  sig_param.name
data/lib/rbi/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module RBI
5
- VERSION = "0.4.3"
5
+ VERSION = "0.5.0"
6
6
  end
data/lib/rbi/visitor.rb CHANGED
@@ -67,6 +67,8 @@ module RBI
67
67
  visit_no_kw_param(node)
68
68
  when BlockParam
69
69
  visit_block_param(node)
70
+ when ForwardingParam
71
+ visit_forwarding_param(node)
70
72
  when Include
71
73
  visit_include(node)
72
74
  when Extend
@@ -181,6 +183,9 @@ module RBI
181
183
  #: (BlockParam node) -> void
182
184
  def visit_block_param(node); end
183
185
 
186
+ #: (ForwardingParam node) -> void
187
+ def visit_forwarding_param(node); end
188
+
184
189
  #: (Include node) -> void
185
190
  def visit_include(node); end
186
191
 
data/rbi/rbi.rbi CHANGED
@@ -67,7 +67,8 @@ class RBI::Attr < ::RBI::NodeWithComments
67
67
  sig { returns(::RBI::Visibility) }
68
68
  def visibility; end
69
69
 
70
- def visibility=(_arg0); end
70
+ sig { params(visibility: ::RBI::Visibility).returns(::RBI::Visibility) }
71
+ def visibility=(visibility); end
71
72
 
72
73
  private
73
74
 
@@ -232,7 +233,8 @@ class RBI::Class < ::RBI::Scope
232
233
  sig { returns(T.nilable(::String)) }
233
234
  def superclass_name; end
234
235
 
235
- def superclass_name=(_arg0); end
236
+ sig { params(superclass_name: T.nilable(::String)).returns(T.nilable(::String)) }
237
+ def superclass_name=(superclass_name); end
236
238
  end
237
239
 
238
240
  class RBI::Comment < ::RBI::Node
@@ -245,7 +247,8 @@ class RBI::Comment < ::RBI::Node
245
247
  sig { returns(::String) }
246
248
  def text; end
247
249
 
248
- def text=(_arg0); end
250
+ sig { params(text: ::String).returns(::String) }
251
+ def text=(text); end
249
252
  end
250
253
 
251
254
  class RBI::ConflictTree < ::RBI::Tree
@@ -365,12 +368,14 @@ class RBI::File
365
368
  sig { returns(::RBI::Tree) }
366
369
  def root; end
367
370
 
368
- def root=(_arg0); end
371
+ sig { params(root: ::RBI::Tree).returns(::RBI::Tree) }
372
+ def root=(root); end
369
373
 
370
374
  sig { returns(T.nilable(::String)) }
371
375
  def strictness; end
372
376
 
373
- def strictness=(_arg0); end
377
+ sig { params(strictness: T.nilable(::String)).returns(T.nilable(::String)) }
378
+ def strictness=(strictness); end
374
379
 
375
380
  sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) }
376
381
  def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
@@ -399,12 +404,36 @@ class RBI::Formatter
399
404
  sig { returns(T.nilable(::Integer)) }
400
405
  def max_line_length; end
401
406
 
402
- def max_line_length=(_arg0); end
407
+ sig { params(max_line_length: T.nilable(::Integer)).returns(T.nilable(::Integer)) }
408
+ def max_line_length=(max_line_length); end
403
409
 
404
410
  sig { params(file: ::RBI::File).returns(::String) }
405
411
  def print_file(file); end
406
412
  end
407
413
 
414
+ class RBI::ForwardingParam < ::RBI::Param
415
+ sig do
416
+ params(
417
+ loc: T.nilable(::RBI::Loc),
418
+ comments: T.nilable(T::Array[::RBI::Comment]),
419
+ block: T.nilable(T.proc.params(node: ::RBI::ForwardingParam).void)
420
+ ).void
421
+ end
422
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
423
+
424
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
425
+ def ==(other); end
426
+
427
+ sig { override.returns(T::Boolean) }
428
+ def anonymous?; end
429
+
430
+ sig { override.returns(::NilClass) }
431
+ def name; end
432
+
433
+ sig { override.returns(::String) }
434
+ def to_s; end
435
+ end
436
+
408
437
  class RBI::Group < ::RBI::Tree
409
438
  sig { params(kind: ::RBI::Group::Kind).void }
410
439
  def initialize(kind); end
@@ -689,6 +718,9 @@ class RBI::Method < ::RBI::NodeWithComments
689
718
  sig { params(name: ::String).void }
690
719
  def add_block_param(name); end
691
720
 
721
+ sig { void }
722
+ def add_forwarding_param; end
723
+
692
724
  sig { params(name: ::String, default_value: ::String).void }
693
725
  def add_kw_opt_param(name, default_value); end
694
726
 
@@ -738,7 +770,8 @@ class RBI::Method < ::RBI::NodeWithComments
738
770
  sig { returns(T::Boolean) }
739
771
  def is_singleton; end
740
772
 
741
- def is_singleton=(_arg0); end
773
+ sig { params(is_singleton: T::Boolean).returns(T::Boolean) }
774
+ def is_singleton=(is_singleton); end
742
775
 
743
776
  sig { override.params(other: ::RBI::Node).void }
744
777
  def merge_with(other); end
@@ -764,7 +797,8 @@ class RBI::Method < ::RBI::NodeWithComments
764
797
  sig { returns(::RBI::Visibility) }
765
798
  def visibility; end
766
799
 
767
- def visibility=(_arg0); end
800
+ sig { params(visibility: ::RBI::Visibility).returns(::RBI::Visibility) }
801
+ def visibility=(visibility); end
768
802
 
769
803
  private
770
804
 
@@ -774,6 +808,9 @@ class RBI::Method < ::RBI::NodeWithComments
774
808
  sig { params(preferred: T::Array[::RBI::Param], fallback: T::Array[::RBI::Param]).returns(T::Array[::RBI::Param]) }
775
809
  def merge_params(preferred, fallback); end
776
810
 
811
+ sig { params(params: T::Array[::RBI::Param]).returns(T::Boolean) }
812
+ def params_have_forwarding?(params); end
813
+
777
814
  sig { params(sigs: T::Array[::RBI::Sig], params: T::Array[::RBI::Param]).void }
778
815
  def rename_sigs_params(sigs, params); end
779
816
  end
@@ -878,7 +915,8 @@ class RBI::Node
878
915
  sig { returns(T.nilable(::RBI::Loc)) }
879
916
  def loc; end
880
917
 
881
- def loc=(_arg0); end
918
+ sig { params(loc: T.nilable(::RBI::Loc)).returns(T.nilable(::RBI::Loc)) }
919
+ def loc=(loc); end
882
920
 
883
921
  sig { params(other: ::RBI::Node).void }
884
922
  def merge_with(other); end
@@ -892,7 +930,8 @@ class RBI::Node
892
930
  sig { returns(T.nilable(::RBI::Tree)) }
893
931
  def parent_tree; end
894
932
 
895
- def parent_tree=(_arg0); end
933
+ sig { params(parent_tree: T.nilable(::RBI::Tree)).returns(T.nilable(::RBI::Tree)) }
934
+ def parent_tree=(parent_tree); end
896
935
 
897
936
  sig do
898
937
  params(
@@ -950,6 +989,11 @@ class RBI::NodeWithComments < ::RBI::Node
950
989
 
951
990
  sig { returns(T::Array[::Gem::Requirement]) }
952
991
  def version_requirements; end
992
+
993
+ private
994
+
995
+ sig { params(index: T::Hash[::String, T::Array[::RBI::Comment]], comment: ::RBI::Comment).returns(T::Boolean) }
996
+ def index_comment(index, comment); end
953
997
  end
954
998
 
955
999
  class RBI::OptParam < ::RBI::Param
@@ -1237,7 +1281,8 @@ class RBI::Printer < ::RBI::Visitor
1237
1281
  sig { returns(T::Boolean) }
1238
1282
  def print_locs; end
1239
1283
 
1240
- def print_locs=(_arg0); end
1284
+ sig { params(print_locs: T::Boolean).returns(T::Boolean) }
1285
+ def print_locs=(print_locs); end
1241
1286
 
1242
1287
  sig { params(string: ::String).void }
1243
1288
  def printl(string); end
@@ -1316,6 +1361,9 @@ class RBI::Printer < ::RBI::Visitor
1316
1361
  sig { override.params(node: ::RBI::Extend).void }
1317
1362
  def visit_extend(node); end
1318
1363
 
1364
+ sig { override.params(node: ::RBI::ForwardingParam).void }
1365
+ def visit_forwarding_param(node); end
1366
+
1319
1367
  sig { override.params(node: ::RBI::Group).void }
1320
1368
  def visit_group(node); end
1321
1369
 
@@ -1606,7 +1654,8 @@ class RBI::RBSPrinter < ::RBI::Visitor
1606
1654
  sig { returns(T::Boolean) }
1607
1655
  def positional_names; end
1608
1656
 
1609
- def positional_names=(_arg0); end
1657
+ sig { params(positional_names: T::Boolean).returns(T::Boolean) }
1658
+ def positional_names=(positional_names); end
1610
1659
 
1611
1660
  sig { returns(T.nilable(::RBI::Node)) }
1612
1661
  def previous_node; end
@@ -1620,7 +1669,8 @@ class RBI::RBSPrinter < ::RBI::Visitor
1620
1669
  sig { returns(T::Boolean) }
1621
1670
  def print_locs; end
1622
1671
 
1623
- def print_locs=(_arg0); end
1672
+ sig { params(print_locs: T::Boolean).returns(T::Boolean) }
1673
+ def print_locs=(print_locs); end
1624
1674
 
1625
1675
  sig { params(node: ::RBI::Method, sig: ::RBI::Sig).void }
1626
1676
  def print_method_sig(node, sig); end
@@ -1682,6 +1732,9 @@ class RBI::RBSPrinter < ::RBI::Visitor
1682
1732
  sig { override.params(file: ::RBI::File).void }
1683
1733
  def visit_file(file); end
1684
1734
 
1735
+ sig { override.params(node: ::RBI::ForwardingParam).void }
1736
+ def visit_forwarding_param(node); end
1737
+
1685
1738
  sig { override.params(node: ::RBI::Group).void }
1686
1739
  def visit_group(node); end
1687
1740
 
@@ -2297,42 +2350,50 @@ class RBI::Sig < ::RBI::NodeWithComments
2297
2350
  sig { returns(T::Boolean) }
2298
2351
  def allow_incompatible_override; end
2299
2352
 
2300
- def allow_incompatible_override=(_arg0); end
2353
+ sig { params(allow_incompatible_override: T::Boolean).returns(T::Boolean) }
2354
+ def allow_incompatible_override=(allow_incompatible_override); end
2301
2355
 
2302
2356
  sig { returns(T::Boolean) }
2303
2357
  def allow_incompatible_override_visibility; end
2304
2358
 
2305
- def allow_incompatible_override_visibility=(_arg0); end
2359
+ sig { params(allow_incompatible_override_visibility: T::Boolean).returns(T::Boolean) }
2360
+ def allow_incompatible_override_visibility=(allow_incompatible_override_visibility); end
2306
2361
 
2307
2362
  sig { returns(T.nilable(T.any(::RBI::Type, ::String))) }
2308
2363
  def bind_type; end
2309
2364
 
2310
- def bind_type=(_arg0); end
2365
+ sig { params(bind_type: T.nilable(T.any(::RBI::Type, ::String))).returns(T.nilable(T.any(::RBI::Type, ::String))) }
2366
+ def bind_type=(bind_type); end
2311
2367
 
2312
2368
  sig { returns(T.nilable(::Symbol)) }
2313
2369
  def checked; end
2314
2370
 
2315
- def checked=(_arg0); end
2371
+ sig { params(checked: T.nilable(::Symbol)).returns(T.nilable(::Symbol)) }
2372
+ def checked=(checked); end
2316
2373
 
2317
2374
  sig { returns(T::Boolean) }
2318
2375
  def is_abstract; end
2319
2376
 
2320
- def is_abstract=(_arg0); end
2377
+ sig { params(is_abstract: T::Boolean).returns(T::Boolean) }
2378
+ def is_abstract=(is_abstract); end
2321
2379
 
2322
2380
  sig { returns(T::Boolean) }
2323
2381
  def is_final; end
2324
2382
 
2325
- def is_final=(_arg0); end
2383
+ sig { params(is_final: T::Boolean).returns(T::Boolean) }
2384
+ def is_final=(is_final); end
2326
2385
 
2327
2386
  sig { returns(T::Boolean) }
2328
2387
  def is_overridable; end
2329
2388
 
2330
- def is_overridable=(_arg0); end
2389
+ sig { params(is_overridable: T::Boolean).returns(T::Boolean) }
2390
+ def is_overridable=(is_overridable); end
2331
2391
 
2332
2392
  sig { returns(T::Boolean) }
2333
2393
  def is_override; end
2334
2394
 
2335
- def is_override=(_arg0); end
2395
+ sig { params(is_override: T::Boolean).returns(T::Boolean) }
2396
+ def is_override=(is_override); end
2336
2397
 
2337
2398
  sig { returns(T::Array[::RBI::SigParam]) }
2338
2399
  def params; end
@@ -2340,7 +2401,8 @@ class RBI::Sig < ::RBI::NodeWithComments
2340
2401
  sig { returns(T.any(::RBI::Type, ::String)) }
2341
2402
  def return_type; end
2342
2403
 
2343
- def return_type=(_arg0); end
2404
+ sig { params(return_type: T.any(::RBI::Type, ::String)).returns(T.any(::RBI::Type, ::String)) }
2405
+ def return_type=(return_type); end
2344
2406
 
2345
2407
  sig { returns(T::Array[::String]) }
2346
2408
  def type_params; end
@@ -2351,7 +2413,8 @@ class RBI::Sig < ::RBI::NodeWithComments
2351
2413
  sig { returns(T::Boolean) }
2352
2414
  def without_runtime; end
2353
2415
 
2354
- def without_runtime=(_arg0); end
2416
+ sig { params(without_runtime: T::Boolean).returns(T::Boolean) }
2417
+ def without_runtime=(without_runtime); end
2355
2418
  end
2356
2419
 
2357
2420
  class RBI::SigParam < ::RBI::NodeWithComments
@@ -2418,12 +2481,14 @@ class RBI::Struct < ::RBI::Scope
2418
2481
  sig { returns(T::Boolean) }
2419
2482
  def keyword_init; end
2420
2483
 
2421
- def keyword_init=(_arg0); end
2484
+ sig { params(keyword_init: T::Boolean).returns(T::Boolean) }
2485
+ def keyword_init=(keyword_init); end
2422
2486
 
2423
2487
  sig { returns(T::Array[::Symbol]) }
2424
2488
  def members; end
2425
2489
 
2426
- def members=(_arg0); end
2490
+ sig { params(members: T::Array[::Symbol]).returns(T::Array[::Symbol]) }
2491
+ def members=(members); end
2427
2492
 
2428
2493
  sig { returns(::String) }
2429
2494
  def name; end
@@ -2547,7 +2612,8 @@ class RBI::TStructField < ::RBI::NodeWithComments
2547
2612
  sig { returns(T.nilable(::String)) }
2548
2613
  def default; end
2549
2614
 
2550
- def default=(_arg0); end
2615
+ sig { params(default: T.nilable(::String)).returns(T.nilable(::String)) }
2616
+ def default=(default); end
2551
2617
 
2552
2618
  sig { abstract.returns(T::Array[::String]) }
2553
2619
  def fully_qualified_names; end
@@ -2558,7 +2624,8 @@ class RBI::TStructField < ::RBI::NodeWithComments
2558
2624
  sig { returns(T.any(::RBI::Type, ::String)) }
2559
2625
  def type; end
2560
2626
 
2561
- def type=(_arg0); end
2627
+ sig { params(type: T.any(::RBI::Type, ::String)).returns(T.any(::RBI::Type, ::String)) }
2628
+ def type=(type); end
2562
2629
  end
2563
2630
 
2564
2631
  class RBI::TStructProp < ::RBI::TStructField
@@ -3478,6 +3545,9 @@ class RBI::Visitor
3478
3545
  sig { params(node: ::RBI::Extend).void }
3479
3546
  def visit_extend(node); end
3480
3547
 
3548
+ sig { params(node: ::RBI::ForwardingParam).void }
3549
+ def visit_forwarding_param(node); end
3550
+
3481
3551
  sig { params(node: ::RBI::Group).void }
3482
3552
  def visit_group(node); end
3483
3553
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandre Terrasa