primitive 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +7 -0
  2. data/.bundle/config +2 -0
  3. data/.editorconfig +8 -0
  4. data/.github/workflows/ci.yaml +29 -0
  5. data/.gitignore +7 -0
  6. data/.rubocop.yml +16 -0
  7. data/.tool-versions +1 -0
  8. data/CHANGELOG.md +7 -0
  9. data/CODE_OF_CONDUCT.md +73 -0
  10. data/Gemfile +5 -0
  11. data/Guardfile +17 -0
  12. data/LICENSE +5 -0
  13. data/README.md +107 -0
  14. data/Rakefile +12 -0
  15. data/bin/_guard-core +27 -0
  16. data/bin/bundle +109 -0
  17. data/bin/bundle-audit +27 -0
  18. data/bin/bundler-audit +27 -0
  19. data/bin/coderay +27 -0
  20. data/bin/guard +27 -0
  21. data/bin/htmldiff +27 -0
  22. data/bin/ldiff +27 -0
  23. data/bin/listen +27 -0
  24. data/bin/pry +27 -0
  25. data/bin/racc +27 -0
  26. data/bin/rake +27 -0
  27. data/bin/rspec +27 -0
  28. data/bin/rubocop +27 -0
  29. data/bin/ruby-parse +27 -0
  30. data/bin/ruby-rewrite +27 -0
  31. data/bin/spoom +27 -0
  32. data/bin/srb +27 -0
  33. data/bin/srb-rbi +27 -0
  34. data/bin/tapioca +27 -0
  35. data/bin/thor +27 -0
  36. data/bin/yard +27 -0
  37. data/bin/yardoc +27 -0
  38. data/bin/yri +27 -0
  39. data/lib/primitive/entity.rb +50 -0
  40. data/lib/primitive/version.rb +6 -0
  41. data/lib/primitive.rb +6 -0
  42. data/primitive.gemspec +45 -0
  43. data/sorbet/config +4 -0
  44. data/sorbet/rbi/annotations/.gitattributes +1 -0
  45. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  46. data/sorbet/rbi/gems/.gitattributes +1 -0
  47. data/sorbet/rbi/gems/ansi@1.5.0.rbi +8 -0
  48. data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
  49. data/sorbet/rbi/gems/bundler-audit@0.9.1.rbi +8 -0
  50. data/sorbet/rbi/gems/coderay@1.1.3.rbi +8 -0
  51. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +8 -0
  52. data/sorbet/rbi/gems/docile@1.4.0.rbi +8 -0
  53. data/sorbet/rbi/gems/erubi@1.12.0.rbi +145 -0
  54. data/sorbet/rbi/gems/ffi@1.16.3.rbi +8 -0
  55. data/sorbet/rbi/gems/formatador@1.1.0.rbi +8 -0
  56. data/sorbet/rbi/gems/guard-compat@1.2.1.rbi +66 -0
  57. data/sorbet/rbi/gems/guard-rspec@4.7.3.rbi +562 -0
  58. data/sorbet/rbi/gems/guard@2.18.1.rbi +8 -0
  59. data/sorbet/rbi/gems/json@2.7.1.rbi +1561 -0
  60. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +8 -0
  61. data/sorbet/rbi/gems/listen@3.8.0.rbi +8 -0
  62. data/sorbet/rbi/gems/lumberjack@1.2.9.rbi +8 -0
  63. data/sorbet/rbi/gems/method_source@1.0.0.rbi +8 -0
  64. data/sorbet/rbi/gems/nenv@0.3.0.rbi +8 -0
  65. data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
  66. data/sorbet/rbi/gems/notiffany@0.1.3.rbi +8 -0
  67. data/sorbet/rbi/gems/parallel@1.24.0.rbi +280 -0
  68. data/sorbet/rbi/gems/parser@3.3.0.5.rbi +5472 -0
  69. data/sorbet/rbi/gems/prism@0.27.0.rbi +35611 -0
  70. data/sorbet/rbi/gems/pry@0.14.2.rbi +8 -0
  71. data/sorbet/rbi/gems/racc@1.7.3.rbi +161 -0
  72. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +8 -0
  73. data/sorbet/rbi/gems/rake@13.1.0.rbi +3027 -0
  74. data/sorbet/rbi/gems/rb-fsevent@0.11.2.rbi +8 -0
  75. data/sorbet/rbi/gems/rb-inotify@0.10.1.rbi +8 -0
  76. data/sorbet/rbi/gems/rbi@0.1.12.rbi +3071 -0
  77. data/sorbet/rbi/gems/regexp_parser@2.9.0.rbi +8 -0
  78. data/sorbet/rbi/gems/rexml@3.2.6.rbi +8 -0
  79. data/sorbet/rbi/gems/rspec-core@3.12.2.rbi +8 -0
  80. data/sorbet/rbi/gems/rspec-expectations@3.12.3.rbi +8 -0
  81. data/sorbet/rbi/gems/rspec-mocks@3.12.6.rbi +8 -0
  82. data/sorbet/rbi/gems/rspec-support@3.12.1.rbi +8 -0
  83. data/sorbet/rbi/gems/rspec@3.12.0.rbi +8 -0
  84. data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +8 -0
  85. data/sorbet/rbi/gems/rubocop-capybara@2.19.0.rbi +8 -0
  86. data/sorbet/rbi/gems/rubocop-factory_bot@2.24.0.rbi +8 -0
  87. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +8 -0
  88. data/sorbet/rbi/gems/rubocop-rspec@2.24.1.rbi +8 -0
  89. data/sorbet/rbi/gems/rubocop@1.60.2.rbi +8 -0
  90. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +8 -0
  91. data/sorbet/rbi/gems/shellany@0.0.1.rbi +8 -0
  92. data/sorbet/rbi/gems/simplecov-console@0.9.1.rbi +102 -0
  93. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +8 -0
  94. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +2148 -0
  95. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +8 -0
  96. data/sorbet/rbi/gems/spoom@1.3.2.rbi +4420 -0
  97. data/sorbet/rbi/gems/tapioca@0.13.3.rbi +3520 -0
  98. data/sorbet/rbi/gems/terminal-table@3.0.2.rbi +8 -0
  99. data/sorbet/rbi/gems/thor@1.3.1.rbi +4318 -0
  100. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +8 -0
  101. data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +428 -0
  102. data/sorbet/rbi/gems/yard@0.9.36.rbi +18085 -0
  103. data/sorbet/tapioca/config.yml +13 -0
  104. data/sorbet/tapioca/require.rb +4 -0
  105. metadata +363 -0
@@ -0,0 +1,3071 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `rbi` gem.
5
+ # Please instead update this file by running `bin/tapioca gem rbi`.
6
+
7
+ # source://rbi//lib/rbi/loc.rb#4
8
+ module RBI; end
9
+
10
+ # source://rbi//lib/rbi/model.rb#1041
11
+ class RBI::Arg < ::RBI::Node
12
+ # source://rbi//lib/rbi/model.rb#1053
13
+ sig { params(value: ::String, loc: T.nilable(::RBI::Loc)).void }
14
+ def initialize(value, loc: T.unsafe(nil)); end
15
+
16
+ # source://rbi//lib/rbi/model.rb#1059
17
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
18
+ def ==(other); end
19
+
20
+ # source://rbi//lib/rbi/printer.rb#613
21
+ sig { override.params(v: ::RBI::Printer).void }
22
+ def accept_printer(v); end
23
+
24
+ # source://rbi//lib/rbi/model.rb#1064
25
+ sig { returns(::String) }
26
+ def to_s; end
27
+
28
+ # source://rbi//lib/rbi/model.rb#1045
29
+ sig { returns(::String) }
30
+ def value; end
31
+ end
32
+
33
+ # Attributes
34
+ #
35
+ # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
36
+ #
37
+ # source://rbi//lib/rbi/model.rb#349
38
+ class RBI::Attr < ::RBI::NodeWithComments
39
+ include ::RBI::Indexable
40
+
41
+ abstract!
42
+
43
+ # source://rbi//lib/rbi/model.rb#374
44
+ sig do
45
+ params(
46
+ name: ::Symbol,
47
+ names: T::Array[::Symbol],
48
+ visibility: ::RBI::Visibility,
49
+ sigs: T::Array[::RBI::Sig],
50
+ loc: T.nilable(::RBI::Loc),
51
+ comments: T::Array[::RBI::Comment]
52
+ ).void
53
+ end
54
+ def initialize(name, names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end
55
+
56
+ # source://rbi//lib/rbi/printer.rb#348
57
+ sig { override.params(v: ::RBI::Printer).void }
58
+ def accept_printer(v); end
59
+
60
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#412
61
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
62
+ def compatible_with?(other); end
63
+
64
+ # @abstract
65
+ #
66
+ # source://rbi//lib/rbi/model.rb#382
67
+ sig { abstract.returns(T::Array[::String]) }
68
+ def fully_qualified_names; end
69
+
70
+ # source://rbi//lib/rbi/index.rb#113
71
+ sig { override.returns(T::Array[::String]) }
72
+ def index_ids; end
73
+
74
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#420
75
+ sig { override.params(other: ::RBI::Node).void }
76
+ def merge_with(other); end
77
+
78
+ # source://rbi//lib/rbi/model.rb#356
79
+ sig { returns(T::Array[::Symbol]) }
80
+ def names; end
81
+
82
+ # source://rbi//lib/rbi/printer.rb#375
83
+ sig { override.returns(T::Boolean) }
84
+ def oneline?; end
85
+
86
+ # source://rbi//lib/rbi/model.rb#362
87
+ sig { returns(T::Array[::RBI::Sig]) }
88
+ def sigs; end
89
+
90
+ # source://rbi//lib/rbi/model.rb#359
91
+ sig { returns(::RBI::Visibility) }
92
+ def visibility; end
93
+
94
+ # @return [Visibility]
95
+ #
96
+ # source://rbi//lib/rbi/model.rb#359
97
+ def visibility=(_arg0); end
98
+ end
99
+
100
+ # source://rbi//lib/rbi/model.rb#385
101
+ class RBI::AttrAccessor < ::RBI::Attr
102
+ # source://rbi//lib/rbi/model.rb#399
103
+ sig do
104
+ params(
105
+ name: ::Symbol,
106
+ names: ::Symbol,
107
+ visibility: ::RBI::Visibility,
108
+ sigs: T::Array[::RBI::Sig],
109
+ loc: T.nilable(::RBI::Loc),
110
+ comments: T::Array[::RBI::Comment],
111
+ block: T.nilable(T.proc.params(node: ::RBI::AttrAccessor).void)
112
+ ).void
113
+ end
114
+ def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
115
+
116
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#452
117
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
118
+ def compatible_with?(other); end
119
+
120
+ # source://rbi//lib/rbi/model.rb#405
121
+ sig { override.returns(T::Array[::String]) }
122
+ def fully_qualified_names; end
123
+
124
+ # source://rbi//lib/rbi/model.rb#411
125
+ sig { override.returns(::String) }
126
+ def to_s; end
127
+ end
128
+
129
+ # source://rbi//lib/rbi/model.rb#417
130
+ class RBI::AttrReader < ::RBI::Attr
131
+ # source://rbi//lib/rbi/model.rb#431
132
+ sig do
133
+ params(
134
+ name: ::Symbol,
135
+ names: ::Symbol,
136
+ visibility: ::RBI::Visibility,
137
+ sigs: T::Array[::RBI::Sig],
138
+ loc: T.nilable(::RBI::Loc),
139
+ comments: T::Array[::RBI::Comment],
140
+ block: T.nilable(T.proc.params(node: ::RBI::AttrReader).void)
141
+ ).void
142
+ end
143
+ def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
144
+
145
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#434
146
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
147
+ def compatible_with?(other); end
148
+
149
+ # source://rbi//lib/rbi/model.rb#437
150
+ sig { override.returns(T::Array[::String]) }
151
+ def fully_qualified_names; end
152
+
153
+ # source://rbi//lib/rbi/model.rb#443
154
+ sig { override.returns(::String) }
155
+ def to_s; end
156
+ end
157
+
158
+ # source://rbi//lib/rbi/model.rb#449
159
+ class RBI::AttrWriter < ::RBI::Attr
160
+ # source://rbi//lib/rbi/model.rb#463
161
+ sig do
162
+ params(
163
+ name: ::Symbol,
164
+ names: ::Symbol,
165
+ visibility: ::RBI::Visibility,
166
+ sigs: T::Array[::RBI::Sig],
167
+ loc: T.nilable(::RBI::Loc),
168
+ comments: T::Array[::RBI::Comment],
169
+ block: T.nilable(T.proc.params(node: ::RBI::AttrWriter).void)
170
+ ).void
171
+ end
172
+ def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
173
+
174
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#443
175
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
176
+ def compatible_with?(other); end
177
+
178
+ # source://rbi//lib/rbi/model.rb#469
179
+ sig { override.returns(T::Array[::String]) }
180
+ def fully_qualified_names; end
181
+
182
+ # source://rbi//lib/rbi/model.rb#475
183
+ sig { override.returns(::String) }
184
+ def to_s; end
185
+ end
186
+
187
+ # An arbitrary blank line that can be added both in trees and comments
188
+ #
189
+ # source://rbi//lib/rbi/model.rb#74
190
+ class RBI::BlankLine < ::RBI::Comment
191
+ # source://rbi//lib/rbi/model.rb#78
192
+ sig { params(loc: T.nilable(::RBI::Loc)).void }
193
+ def initialize(loc: T.unsafe(nil)); end
194
+
195
+ # source://rbi//lib/rbi/printer.rb#217
196
+ sig { override.params(v: ::RBI::Printer).void }
197
+ def accept_printer(v); end
198
+ end
199
+
200
+ # source://rbi//lib/rbi/model.rb#814
201
+ class RBI::BlockParam < ::RBI::Param
202
+ # source://rbi//lib/rbi/model.rb#825
203
+ sig do
204
+ params(
205
+ name: ::String,
206
+ loc: T.nilable(::RBI::Loc),
207
+ comments: T::Array[::RBI::Comment],
208
+ block: T.nilable(T.proc.params(node: ::RBI::BlockParam).void)
209
+ ).void
210
+ end
211
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
212
+
213
+ # source://rbi//lib/rbi/model.rb#836
214
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
215
+ def ==(other); end
216
+
217
+ # source://rbi//lib/rbi/printer.rb#543
218
+ sig { override.params(v: ::RBI::Printer).void }
219
+ def accept_printer(v); end
220
+
221
+ # source://rbi//lib/rbi/printer.rb#548
222
+ sig { override.params(v: ::RBI::Printer, last: T::Boolean).void }
223
+ def print_comment_leading_space(v, last:); end
224
+
225
+ # source://rbi//lib/rbi/model.rb#831
226
+ sig { override.returns(::String) }
227
+ def to_s; end
228
+ end
229
+
230
+ # source://rbi//lib/rbi/model.rb#218
231
+ class RBI::Class < ::RBI::Scope
232
+ # source://rbi//lib/rbi/model.rb#236
233
+ sig do
234
+ params(
235
+ name: ::String,
236
+ superclass_name: T.nilable(::String),
237
+ loc: T.nilable(::RBI::Loc),
238
+ comments: T::Array[::RBI::Comment],
239
+ block: T.nilable(T.proc.params(node: ::RBI::Class).void)
240
+ ).void
241
+ end
242
+ def initialize(name, superclass_name: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
243
+
244
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#376
245
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
246
+ def compatible_with?(other); end
247
+
248
+ # source://rbi//lib/rbi/model.rb#244
249
+ sig { override.returns(::String) }
250
+ def fully_qualified_name; end
251
+
252
+ # source://rbi//lib/rbi/model.rb#222
253
+ sig { returns(::String) }
254
+ def name; end
255
+
256
+ # @return [String]
257
+ #
258
+ # source://rbi//lib/rbi/model.rb#222
259
+ def name=(_arg0); end
260
+
261
+ # source://rbi//lib/rbi/printer.rb#284
262
+ sig { override.params(v: ::RBI::Printer).void }
263
+ def print_header(v); end
264
+
265
+ # source://rbi//lib/rbi/model.rb#225
266
+ sig { returns(T.nilable(::String)) }
267
+ def superclass_name; end
268
+
269
+ # @return [String, nil]
270
+ #
271
+ # source://rbi//lib/rbi/model.rb#225
272
+ def superclass_name=(_arg0); end
273
+ end
274
+
275
+ # source://rbi//lib/rbi/model.rb#53
276
+ class RBI::Comment < ::RBI::Node
277
+ # source://rbi//lib/rbi/model.rb#60
278
+ sig { params(text: ::String, loc: T.nilable(::RBI::Loc)).void }
279
+ def initialize(text, loc: T.unsafe(nil)); end
280
+
281
+ # source://rbi//lib/rbi/model.rb#66
282
+ sig { params(other: ::Object).returns(T::Boolean) }
283
+ def ==(other); end
284
+
285
+ # source://rbi//lib/rbi/printer.rb#197
286
+ sig { override.params(v: ::RBI::Printer).void }
287
+ def accept_printer(v); end
288
+
289
+ # source://rbi//lib/rbi/model.rb#57
290
+ sig { returns(::String) }
291
+ def text; end
292
+
293
+ # @return [String]
294
+ #
295
+ # source://rbi//lib/rbi/model.rb#57
296
+ def text=(_arg0); end
297
+ end
298
+
299
+ # A tree showing incompatibles nodes
300
+ #
301
+ # Is rendered as a merge conflict between `left` and` right`:
302
+ # ~~~rb
303
+ # class Foo
304
+ # <<<<<<< left
305
+ # def m1; end
306
+ # def m2(a); end
307
+ # =======
308
+ # def m1(a); end
309
+ # def m2; end
310
+ # >>>>>>> right
311
+ # end
312
+ # ~~~
313
+ #
314
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#589
315
+ class RBI::ConflictTree < ::RBI::Tree
316
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#596
317
+ sig { params(left_name: ::String, right_name: ::String).void }
318
+ def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end
319
+
320
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#607
321
+ sig { override.params(v: ::RBI::Printer).void }
322
+ def accept_printer(v); end
323
+
324
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#593
325
+ sig { returns(::RBI::Tree) }
326
+ def left; end
327
+
328
+ # @return [Tree]
329
+ #
330
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#593
331
+ def right; end
332
+ end
333
+
334
+ # Consts
335
+ #
336
+ # source://rbi//lib/rbi/model.rb#312
337
+ class RBI::Const < ::RBI::NodeWithComments
338
+ include ::RBI::Indexable
339
+
340
+ # source://rbi//lib/rbi/model.rb#327
341
+ sig do
342
+ params(
343
+ name: ::String,
344
+ value: ::String,
345
+ loc: T.nilable(::RBI::Loc),
346
+ comments: T::Array[::RBI::Comment],
347
+ block: T.nilable(T.proc.params(node: ::RBI::Const).void)
348
+ ).void
349
+ end
350
+ def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
351
+
352
+ # source://rbi//lib/rbi/printer.rb#335
353
+ sig { override.params(v: ::RBI::Printer).void }
354
+ def accept_printer(v); end
355
+
356
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#403
357
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
358
+ def compatible_with?(other); end
359
+
360
+ # source://rbi//lib/rbi/model.rb#335
361
+ sig { returns(::String) }
362
+ def fully_qualified_name; end
363
+
364
+ # source://rbi//lib/rbi/index.rb#103
365
+ sig { override.returns(T::Array[::String]) }
366
+ def index_ids; end
367
+
368
+ # source://rbi//lib/rbi/model.rb#316
369
+ sig { returns(::String) }
370
+ def name; end
371
+
372
+ # source://rbi//lib/rbi/model.rb#342
373
+ sig { override.returns(::String) }
374
+ def to_s; end
375
+
376
+ # @return [String]
377
+ #
378
+ # source://rbi//lib/rbi/model.rb#316
379
+ def value; end
380
+ end
381
+
382
+ # source://rbi//lib/rbi/model.rb#889
383
+ class RBI::Extend < ::RBI::Mixin
384
+ include ::RBI::Indexable
385
+
386
+ # source://rbi//lib/rbi/model.rb#901
387
+ sig do
388
+ params(
389
+ name: ::String,
390
+ names: ::String,
391
+ loc: T.nilable(::RBI::Loc),
392
+ comments: T::Array[::RBI::Comment],
393
+ block: T.nilable(T.proc.params(node: ::RBI::Extend).void)
394
+ ).void
395
+ end
396
+ def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
397
+
398
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#502
399
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
400
+ def compatible_with?(other); end
401
+
402
+ # source://rbi//lib/rbi/index.rb#143
403
+ sig { override.returns(T::Array[::String]) }
404
+ def index_ids; end
405
+
406
+ # source://rbi//lib/rbi/model.rb#907
407
+ sig { override.returns(::String) }
408
+ def to_s; end
409
+ end
410
+
411
+ # source://rbi//lib/rbi/model.rb#137
412
+ class RBI::File
413
+ # source://rbi//lib/rbi/model.rb#156
414
+ sig do
415
+ params(
416
+ strictness: T.nilable(::String),
417
+ comments: T::Array[::RBI::Comment],
418
+ block: T.nilable(T.proc.params(file: ::RBI::File).void)
419
+ ).void
420
+ end
421
+ def initialize(strictness: T.unsafe(nil), comments: T.unsafe(nil), &block); end
422
+
423
+ # source://rbi//lib/rbi/model.rb#164
424
+ sig { params(node: ::RBI::Node).void }
425
+ def <<(node); end
426
+
427
+ # source://rbi//lib/rbi/printer.rb#105
428
+ sig { params(v: ::RBI::Printer).void }
429
+ def accept_printer(v); end
430
+
431
+ # source://rbi//lib/rbi/model.rb#147
432
+ sig { returns(T::Array[::RBI::Comment]) }
433
+ def comments; end
434
+
435
+ # @return [Array<Comment>]
436
+ #
437
+ # source://rbi//lib/rbi/model.rb#147
438
+ def comments=(_arg0); end
439
+
440
+ # source://rbi//lib/rbi/model.rb#169
441
+ sig { returns(T::Boolean) }
442
+ def empty?; end
443
+
444
+ # source://rbi//lib/rbi/printer.rb#129
445
+ sig do
446
+ params(
447
+ out: T.any(::IO, ::StringIO),
448
+ indent: ::Integer,
449
+ print_locs: T::Boolean,
450
+ max_line_length: T.nilable(::Integer)
451
+ ).void
452
+ end
453
+ def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
454
+
455
+ # source://rbi//lib/rbi/model.rb#141
456
+ sig { returns(::RBI::Tree) }
457
+ def root; end
458
+
459
+ # @return [Tree]
460
+ #
461
+ # source://rbi//lib/rbi/model.rb#141
462
+ def root=(_arg0); end
463
+
464
+ # source://rbi//lib/rbi/model.rb#144
465
+ sig { returns(T.nilable(::String)) }
466
+ def strictness; end
467
+
468
+ # @return [String, nil]
469
+ #
470
+ # source://rbi//lib/rbi/model.rb#144
471
+ def strictness=(_arg0); end
472
+
473
+ # source://rbi//lib/rbi/printer.rb#135
474
+ sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) }
475
+ def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
476
+ end
477
+
478
+ # source://rbi//lib/rbi/formatter.rb#5
479
+ class RBI::Formatter
480
+ # source://rbi//lib/rbi/formatter.rb#36
481
+ sig do
482
+ params(
483
+ add_sig_templates: T::Boolean,
484
+ group_nodes: T::Boolean,
485
+ max_line_length: T.nilable(::Integer),
486
+ nest_singleton_methods: T::Boolean,
487
+ nest_non_public_methods: T::Boolean,
488
+ sort_nodes: T::Boolean
489
+ ).void
490
+ end
491
+ def initialize(add_sig_templates: T.unsafe(nil), group_nodes: T.unsafe(nil), max_line_length: T.unsafe(nil), nest_singleton_methods: T.unsafe(nil), nest_non_public_methods: T.unsafe(nil), sort_nodes: T.unsafe(nil)); end
492
+
493
+ # source://rbi//lib/rbi/formatter.rb#15
494
+ sig { params(add_sig_templates: T::Boolean).returns(T::Boolean) }
495
+ def add_sig_templates=(add_sig_templates); end
496
+
497
+ # source://rbi//lib/rbi/formatter.rb#59
498
+ sig { params(file: ::RBI::File).void }
499
+ def format_file(file); end
500
+
501
+ # source://rbi//lib/rbi/formatter.rb#64
502
+ sig { params(tree: ::RBI::Tree).void }
503
+ def format_tree(tree); end
504
+
505
+ # source://rbi//lib/rbi/formatter.rb#18
506
+ sig { params(group_nodes: T::Boolean).returns(T::Boolean) }
507
+ def group_nodes=(group_nodes); end
508
+
509
+ # source://rbi//lib/rbi/formatter.rb#24
510
+ sig { returns(T.nilable(::Integer)) }
511
+ def max_line_length; end
512
+
513
+ # @return [Integer, nil]
514
+ #
515
+ # source://rbi//lib/rbi/formatter.rb#24
516
+ def max_line_length=(_arg0); end
517
+
518
+ # source://rbi//lib/rbi/formatter.rb#21
519
+ sig { params(nest_non_public_methods: T::Boolean).returns(T::Boolean) }
520
+ def nest_non_public_methods=(nest_non_public_methods); end
521
+
522
+ # source://rbi//lib/rbi/formatter.rb#12
523
+ sig { params(nest_singleton_methods: T::Boolean).returns(T::Boolean) }
524
+ def nest_singleton_methods=(nest_singleton_methods); end
525
+
526
+ # source://rbi//lib/rbi/formatter.rb#53
527
+ sig { params(file: ::RBI::File).returns(::String) }
528
+ def print_file(file); end
529
+
530
+ # source://rbi//lib/rbi/formatter.rb#9
531
+ sig { params(sort_nodes: T::Boolean).returns(T::Boolean) }
532
+ def sort_nodes=(sort_nodes); end
533
+ end
534
+
535
+ # source://rbi//lib/rbi/rewriters/group_nodes.rb#88
536
+ class RBI::Group < ::RBI::Tree
537
+ # source://rbi//lib/rbi/rewriters/group_nodes.rb#95
538
+ sig { params(kind: ::RBI::Group::Kind).void }
539
+ def initialize(kind); end
540
+
541
+ # source://rbi//lib/rbi/printer.rb#838
542
+ sig { override.params(v: ::RBI::Printer).void }
543
+ def accept_printer(v); end
544
+
545
+ # source://rbi//lib/rbi/rewriters/group_nodes.rb#92
546
+ sig { returns(::RBI::Group::Kind) }
547
+ def kind; end
548
+ end
549
+
550
+ # source://rbi//lib/rbi/rewriters/group_nodes.rb#100
551
+ class RBI::Group::Kind < ::T::Enum
552
+ enums do
553
+ Mixins = new
554
+ RequiredAncestors = new
555
+ Helpers = new
556
+ TypeMembers = new
557
+ MixesInClassMethods = new
558
+ Sends = new
559
+ Attrs = new
560
+ TStructFields = new
561
+ TEnums = new
562
+ Inits = new
563
+ Methods = new
564
+ SingletonClasses = new
565
+ Consts = new
566
+ end
567
+ end
568
+
569
+ # Sorbet's misc.
570
+ #
571
+ # source://rbi//lib/rbi/model.rb#1372
572
+ class RBI::Helper < ::RBI::NodeWithComments
573
+ include ::RBI::Indexable
574
+
575
+ # source://rbi//lib/rbi/model.rb#1386
576
+ sig do
577
+ params(
578
+ name: ::String,
579
+ loc: T.nilable(::RBI::Loc),
580
+ comments: T::Array[::RBI::Comment],
581
+ block: T.nilable(T.proc.params(node: ::RBI::Helper).void)
582
+ ).void
583
+ end
584
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
585
+
586
+ # source://rbi//lib/rbi/printer.rb#825
587
+ sig { override.params(v: ::RBI::Printer).void }
588
+ def accept_printer(v); end
589
+
590
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#520
591
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
592
+ def compatible_with?(other); end
593
+
594
+ # source://rbi//lib/rbi/index.rb#173
595
+ sig { override.returns(T::Array[::String]) }
596
+ def index_ids; end
597
+
598
+ # source://rbi//lib/rbi/model.rb#1376
599
+ sig { returns(::String) }
600
+ def name; end
601
+
602
+ # source://rbi//lib/rbi/model.rb#1393
603
+ sig { override.returns(::String) }
604
+ def to_s; end
605
+ end
606
+
607
+ # source://rbi//lib/rbi/model.rb#866
608
+ class RBI::Include < ::RBI::Mixin
609
+ include ::RBI::Indexable
610
+
611
+ # source://rbi//lib/rbi/model.rb#878
612
+ sig do
613
+ params(
614
+ name: ::String,
615
+ names: ::String,
616
+ loc: T.nilable(::RBI::Loc),
617
+ comments: T::Array[::RBI::Comment],
618
+ block: T.nilable(T.proc.params(node: ::RBI::Include).void)
619
+ ).void
620
+ end
621
+ def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
622
+
623
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#493
624
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
625
+ def compatible_with?(other); end
626
+
627
+ # source://rbi//lib/rbi/index.rb#133
628
+ sig { override.returns(T::Array[::String]) }
629
+ def index_ids; end
630
+
631
+ # source://rbi//lib/rbi/model.rb#884
632
+ sig { override.returns(::String) }
633
+ def to_s; end
634
+ end
635
+
636
+ # source://rbi//lib/rbi/index.rb#5
637
+ class RBI::Index < ::RBI::Visitor
638
+ # source://rbi//lib/rbi/index.rb#21
639
+ sig { void }
640
+ def initialize; end
641
+
642
+ # source://rbi//lib/rbi/index.rb#32
643
+ sig { params(id: ::String).returns(T::Array[::RBI::Node]) }
644
+ def [](id); end
645
+
646
+ # source://rbi//lib/rbi/index.rb#37
647
+ sig { params(nodes: ::RBI::Node).void }
648
+ def index(*nodes); end
649
+
650
+ # source://rbi//lib/rbi/index.rb#27
651
+ sig { returns(T::Array[::String]) }
652
+ def keys; end
653
+
654
+ # source://rbi//lib/rbi/index.rb#42
655
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
656
+ def visit(node); end
657
+
658
+ private
659
+
660
+ # source://rbi//lib/rbi/index.rb#59
661
+ sig { params(node: T.all(::RBI::Indexable, ::RBI::Node)).void }
662
+ def index_node(node); end
663
+
664
+ class << self
665
+ # source://rbi//lib/rbi/index.rb#13
666
+ sig { params(node: ::RBI::Node).returns(::RBI::Index) }
667
+ def index(*node); end
668
+ end
669
+ end
670
+
671
+ # A Node that can be referred to by a unique ID inside an index
672
+ #
673
+ # @abstract Subclasses must implement the `abstract` methods below.
674
+ #
675
+ # source://rbi//lib/rbi/index.rb#74
676
+ module RBI::Indexable
677
+ interface!
678
+
679
+ # Unique IDs that refer to this node.
680
+ #
681
+ # Some nodes can have multiple ids, for example an attribute accessor matches the ID of the
682
+ # getter and the setter.
683
+ #
684
+ # @abstract
685
+ #
686
+ # source://rbi//lib/rbi/index.rb#85
687
+ sig { abstract.returns(T::Array[::String]) }
688
+ def index_ids; end
689
+ end
690
+
691
+ # source://rbi//lib/rbi/model.rb#1069
692
+ class RBI::KwArg < ::RBI::Arg
693
+ # source://rbi//lib/rbi/model.rb#1082
694
+ sig { params(keyword: ::String, value: ::String, loc: T.nilable(::RBI::Loc)).void }
695
+ def initialize(keyword, value, loc: T.unsafe(nil)); end
696
+
697
+ # source://rbi//lib/rbi/model.rb#1088
698
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
699
+ def ==(other); end
700
+
701
+ # source://rbi//lib/rbi/printer.rb#622
702
+ sig { override.params(v: ::RBI::Printer).void }
703
+ def accept_printer(v); end
704
+
705
+ # source://rbi//lib/rbi/model.rb#1073
706
+ sig { returns(::String) }
707
+ def keyword; end
708
+
709
+ # source://rbi//lib/rbi/model.rb#1093
710
+ sig { returns(::String) }
711
+ def to_s; end
712
+ end
713
+
714
+ # source://rbi//lib/rbi/model.rb#755
715
+ class RBI::KwOptParam < ::RBI::Param
716
+ # source://rbi//lib/rbi/model.rb#770
717
+ sig do
718
+ params(
719
+ name: ::String,
720
+ value: ::String,
721
+ loc: T.nilable(::RBI::Loc),
722
+ comments: T::Array[::RBI::Comment],
723
+ block: T.nilable(T.proc.params(node: ::RBI::KwOptParam).void)
724
+ ).void
725
+ end
726
+ def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
727
+
728
+ # source://rbi//lib/rbi/model.rb#782
729
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
730
+ def ==(other); end
731
+
732
+ # source://rbi//lib/rbi/printer.rb#513
733
+ sig { override.params(v: ::RBI::Printer).void }
734
+ def accept_printer(v); end
735
+
736
+ # source://rbi//lib/rbi/printer.rb#518
737
+ sig { override.params(v: ::RBI::Printer, last: T::Boolean).void }
738
+ def print_comment_leading_space(v, last:); end
739
+
740
+ # source://rbi//lib/rbi/model.rb#777
741
+ sig { override.returns(::String) }
742
+ def to_s; end
743
+
744
+ # source://rbi//lib/rbi/model.rb#759
745
+ sig { returns(::String) }
746
+ def value; end
747
+ end
748
+
749
+ # source://rbi//lib/rbi/model.rb#728
750
+ class RBI::KwParam < ::RBI::Param
751
+ # source://rbi//lib/rbi/model.rb#739
752
+ sig do
753
+ params(
754
+ name: ::String,
755
+ loc: T.nilable(::RBI::Loc),
756
+ comments: T::Array[::RBI::Comment],
757
+ block: T.nilable(T.proc.params(node: ::RBI::KwParam).void)
758
+ ).void
759
+ end
760
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
761
+
762
+ # source://rbi//lib/rbi/model.rb#750
763
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
764
+ def ==(other); end
765
+
766
+ # source://rbi//lib/rbi/printer.rb#498
767
+ sig { override.params(v: ::RBI::Printer).void }
768
+ def accept_printer(v); end
769
+
770
+ # source://rbi//lib/rbi/printer.rb#503
771
+ sig { override.params(v: ::RBI::Printer, last: T::Boolean).void }
772
+ def print_comment_leading_space(v, last:); end
773
+
774
+ # source://rbi//lib/rbi/model.rb#745
775
+ sig { override.returns(::String) }
776
+ def to_s; end
777
+ end
778
+
779
+ # source://rbi//lib/rbi/model.rb#787
780
+ class RBI::KwRestParam < ::RBI::Param
781
+ # source://rbi//lib/rbi/model.rb#798
782
+ sig do
783
+ params(
784
+ name: ::String,
785
+ loc: T.nilable(::RBI::Loc),
786
+ comments: T::Array[::RBI::Comment],
787
+ block: T.nilable(T.proc.params(node: ::RBI::KwRestParam).void)
788
+ ).void
789
+ end
790
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
791
+
792
+ # source://rbi//lib/rbi/model.rb#809
793
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
794
+ def ==(other); end
795
+
796
+ # source://rbi//lib/rbi/printer.rb#528
797
+ sig { override.params(v: ::RBI::Printer).void }
798
+ def accept_printer(v); end
799
+
800
+ # source://rbi//lib/rbi/printer.rb#533
801
+ sig { override.params(v: ::RBI::Printer, last: T::Boolean).void }
802
+ def print_comment_leading_space(v, last:); end
803
+
804
+ # source://rbi//lib/rbi/model.rb#804
805
+ sig { override.returns(::String) }
806
+ def to_s; end
807
+ end
808
+
809
+ # source://rbi//lib/rbi/loc.rb#5
810
+ class RBI::Loc
811
+ # source://rbi//lib/rbi/loc.rb#38
812
+ sig do
813
+ params(
814
+ file: T.nilable(::String),
815
+ begin_line: T.nilable(::Integer),
816
+ end_line: T.nilable(::Integer),
817
+ begin_column: T.nilable(::Integer),
818
+ end_column: T.nilable(::Integer)
819
+ ).void
820
+ end
821
+ def initialize(file: T.unsafe(nil), begin_line: T.unsafe(nil), end_line: T.unsafe(nil), begin_column: T.unsafe(nil), end_column: T.unsafe(nil)); end
822
+
823
+ # @return [Integer, nil]
824
+ #
825
+ # source://rbi//lib/rbi/loc.rb#27
826
+ def begin_column; end
827
+
828
+ # source://rbi//lib/rbi/loc.rb#27
829
+ sig { returns(T.nilable(::Integer)) }
830
+ def begin_line; end
831
+
832
+ # @return [Integer, nil]
833
+ #
834
+ # source://rbi//lib/rbi/loc.rb#27
835
+ def end_column; end
836
+
837
+ # @return [Integer, nil]
838
+ #
839
+ # source://rbi//lib/rbi/loc.rb#27
840
+ def end_line; end
841
+
842
+ # source://rbi//lib/rbi/loc.rb#24
843
+ sig { returns(T.nilable(::String)) }
844
+ def file; end
845
+
846
+ # source://rbi//lib/rbi/loc.rb#56
847
+ sig { returns(T.nilable(::String)) }
848
+ def source; end
849
+
850
+ # source://rbi//lib/rbi/loc.rb#47
851
+ sig { returns(::String) }
852
+ def to_s; end
853
+
854
+ class << self
855
+ # source://rbi//lib/rbi/loc.rb#12
856
+ sig { params(file: ::String, prism_location: ::Prism::Location).returns(::RBI::Loc) }
857
+ def from_prism(file, prism_location); end
858
+ end
859
+ end
860
+
861
+ # A tree that _might_ contain conflicts
862
+ #
863
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#330
864
+ class RBI::MergeTree < ::RBI::Tree
865
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#344
866
+ sig do
867
+ params(
868
+ loc: T.nilable(::RBI::Loc),
869
+ comments: T::Array[::RBI::Comment],
870
+ conflicts: T::Array[::RBI::Rewriters::Merge::Conflict],
871
+ block: T.nilable(T.proc.params(node: ::RBI::Tree).void)
872
+ ).void
873
+ end
874
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), conflicts: T.unsafe(nil), &block); end
875
+
876
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#334
877
+ sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) }
878
+ def conflicts; end
879
+ end
880
+
881
+ # Methods and args
882
+ #
883
+ # source://rbi//lib/rbi/model.rb#483
884
+ class RBI::Method < ::RBI::NodeWithComments
885
+ include ::RBI::Indexable
886
+
887
+ # source://rbi//lib/rbi/model.rb#513
888
+ sig do
889
+ params(
890
+ name: ::String,
891
+ params: T::Array[::RBI::Param],
892
+ is_singleton: T::Boolean,
893
+ visibility: ::RBI::Visibility,
894
+ sigs: T::Array[::RBI::Sig],
895
+ loc: T.nilable(::RBI::Loc),
896
+ comments: T::Array[::RBI::Comment],
897
+ block: T.nilable(T.proc.params(node: ::RBI::Method).void)
898
+ ).void
899
+ end
900
+ def initialize(name, params: T.unsafe(nil), is_singleton: T.unsafe(nil), visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
901
+
902
+ # source://rbi//lib/rbi/model.rb#533
903
+ sig { params(param: ::RBI::Param).void }
904
+ def <<(param); end
905
+
906
+ # source://rbi//lib/rbi/printer.rb#384
907
+ sig { override.params(v: ::RBI::Printer).void }
908
+ def accept_printer(v); end
909
+
910
+ # source://rbi//lib/rbi/model.rb#568
911
+ sig { params(name: ::String).void }
912
+ def add_block_param(name); end
913
+
914
+ # source://rbi//lib/rbi/model.rb#558
915
+ sig { params(name: ::String, default_value: ::String).void }
916
+ def add_kw_opt_param(name, default_value); end
917
+
918
+ # source://rbi//lib/rbi/model.rb#553
919
+ sig { params(name: ::String).void }
920
+ def add_kw_param(name); end
921
+
922
+ # source://rbi//lib/rbi/model.rb#563
923
+ sig { params(name: ::String).void }
924
+ def add_kw_rest_param(name); end
925
+
926
+ # source://rbi//lib/rbi/model.rb#543
927
+ sig { params(name: ::String, default_value: ::String).void }
928
+ def add_opt_param(name, default_value); end
929
+
930
+ # source://rbi//lib/rbi/model.rb#538
931
+ sig { params(name: ::String).void }
932
+ def add_param(name); end
933
+
934
+ # source://rbi//lib/rbi/model.rb#548
935
+ sig { params(name: ::String).void }
936
+ def add_rest_param(name); end
937
+
938
+ # source://rbi//lib/rbi/model.rb#585
939
+ sig do
940
+ params(
941
+ params: T::Array[::RBI::SigParam],
942
+ return_type: T.nilable(::String),
943
+ is_abstract: T::Boolean,
944
+ is_override: T::Boolean,
945
+ is_overridable: T::Boolean,
946
+ is_final: T::Boolean,
947
+ type_params: T::Array[::String],
948
+ checked: T.nilable(::Symbol),
949
+ block: T.proc.params(node: ::RBI::Sig).void
950
+ ).void
951
+ end
952
+ def add_sig(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), &block); end
953
+
954
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#461
955
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
956
+ def compatible_with?(other); end
957
+
958
+ # source://rbi//lib/rbi/model.rb#611
959
+ sig { returns(::String) }
960
+ def fully_qualified_name; end
961
+
962
+ # source://rbi//lib/rbi/index.rb#123
963
+ sig { override.returns(T::Array[::String]) }
964
+ def index_ids; end
965
+
966
+ # source://rbi//lib/rbi/printer.rb#437
967
+ sig { returns(T::Boolean) }
968
+ def inline_params?; end
969
+
970
+ # source://rbi//lib/rbi/model.rb#493
971
+ sig { returns(T::Boolean) }
972
+ def is_singleton; end
973
+
974
+ # @return [Boolean]
975
+ #
976
+ # source://rbi//lib/rbi/model.rb#493
977
+ def is_singleton=(_arg0); end
978
+
979
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#470
980
+ sig { override.params(other: ::RBI::Node).void }
981
+ def merge_with(other); end
982
+
983
+ # source://rbi//lib/rbi/model.rb#487
984
+ sig { returns(::String) }
985
+ def name; end
986
+
987
+ # @return [String]
988
+ #
989
+ # source://rbi//lib/rbi/model.rb#487
990
+ def name=(_arg0); end
991
+
992
+ # source://rbi//lib/rbi/printer.rb#432
993
+ sig { override.returns(T::Boolean) }
994
+ def oneline?; end
995
+
996
+ # source://rbi//lib/rbi/model.rb#490
997
+ sig { returns(T::Array[::RBI::Param]) }
998
+ def params; end
999
+
1000
+ # source://rbi//lib/rbi/model.rb#499
1001
+ sig { returns(T::Array[::RBI::Sig]) }
1002
+ def sigs; end
1003
+
1004
+ # @return [Array<Sig>]
1005
+ #
1006
+ # source://rbi//lib/rbi/model.rb#499
1007
+ def sigs=(_arg0); end
1008
+
1009
+ # source://rbi//lib/rbi/model.rb#620
1010
+ sig { override.returns(::String) }
1011
+ def to_s; end
1012
+
1013
+ # source://rbi//lib/rbi/model.rb#496
1014
+ sig { returns(::RBI::Visibility) }
1015
+ def visibility; end
1016
+
1017
+ # @return [Visibility]
1018
+ #
1019
+ # source://rbi//lib/rbi/model.rb#496
1020
+ def visibility=(_arg0); end
1021
+ end
1022
+
1023
+ # source://rbi//lib/rbi/model.rb#1433
1024
+ class RBI::MixesInClassMethods < ::RBI::Mixin
1025
+ include ::RBI::Indexable
1026
+
1027
+ # source://rbi//lib/rbi/model.rb#1445
1028
+ sig do
1029
+ params(
1030
+ name: ::String,
1031
+ names: ::String,
1032
+ loc: T.nilable(::RBI::Loc),
1033
+ comments: T::Array[::RBI::Comment],
1034
+ block: T.nilable(T.proc.params(node: ::RBI::MixesInClassMethods).void)
1035
+ ).void
1036
+ end
1037
+ def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
1038
+
1039
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#511
1040
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
1041
+ def compatible_with?(other); end
1042
+
1043
+ # source://rbi//lib/rbi/index.rb#153
1044
+ sig { override.returns(T::Array[::String]) }
1045
+ def index_ids; end
1046
+
1047
+ # source://rbi//lib/rbi/model.rb#1451
1048
+ sig { override.returns(::String) }
1049
+ def to_s; end
1050
+ end
1051
+
1052
+ # Mixins
1053
+ #
1054
+ # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
1055
+ #
1056
+ # source://rbi//lib/rbi/model.rb#843
1057
+ class RBI::Mixin < ::RBI::NodeWithComments
1058
+ abstract!
1059
+
1060
+ # source://rbi//lib/rbi/model.rb#860
1061
+ sig do
1062
+ params(
1063
+ name: ::String,
1064
+ names: T::Array[::String],
1065
+ loc: T.nilable(::RBI::Loc),
1066
+ comments: T::Array[::RBI::Comment]
1067
+ ).void
1068
+ end
1069
+ def initialize(name, names, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
1070
+
1071
+ # source://rbi//lib/rbi/printer.rb#558
1072
+ sig { override.params(v: ::RBI::Printer).void }
1073
+ def accept_printer(v); end
1074
+
1075
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#484
1076
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
1077
+ def compatible_with?(other); end
1078
+
1079
+ # source://rbi//lib/rbi/model.rb#850
1080
+ sig { returns(T::Array[::String]) }
1081
+ def names; end
1082
+ end
1083
+
1084
+ # source://rbi//lib/rbi/model.rb#190
1085
+ class RBI::Module < ::RBI::Scope
1086
+ # source://rbi//lib/rbi/model.rb#204
1087
+ sig do
1088
+ params(
1089
+ name: ::String,
1090
+ loc: T.nilable(::RBI::Loc),
1091
+ comments: T::Array[::RBI::Comment],
1092
+ block: T.nilable(T.proc.params(node: ::RBI::Module).void)
1093
+ ).void
1094
+ end
1095
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
1096
+
1097
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#385
1098
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
1099
+ def compatible_with?(other); end
1100
+
1101
+ # source://rbi//lib/rbi/model.rb#211
1102
+ sig { override.returns(::String) }
1103
+ def fully_qualified_name; end
1104
+
1105
+ # source://rbi//lib/rbi/model.rb#194
1106
+ sig { returns(::String) }
1107
+ def name; end
1108
+
1109
+ # @return [String]
1110
+ #
1111
+ # source://rbi//lib/rbi/model.rb#194
1112
+ def name=(_arg0); end
1113
+
1114
+ # source://rbi//lib/rbi/printer.rb#270
1115
+ sig { override.params(v: ::RBI::Printer).void }
1116
+ def print_header(v); end
1117
+ end
1118
+
1119
+ # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
1120
+ #
1121
+ # source://rbi//lib/rbi/model.rb#5
1122
+ class RBI::Node
1123
+ abstract!
1124
+
1125
+ # source://rbi//lib/rbi/model.rb#18
1126
+ sig { params(loc: T.nilable(::RBI::Loc)).void }
1127
+ def initialize(loc: T.unsafe(nil)); end
1128
+
1129
+ # @abstract
1130
+ #
1131
+ # source://rbi//lib/rbi/printer.rb#146
1132
+ sig { abstract.params(v: ::RBI::Printer).void }
1133
+ def accept_printer(v); end
1134
+
1135
+ # Can `self` and `_other` be merged into a single definition?
1136
+ #
1137
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#287
1138
+ sig { params(_other: ::RBI::Node).returns(T::Boolean) }
1139
+ def compatible_with?(_other); end
1140
+
1141
+ # source://rbi//lib/rbi/model.rb#24
1142
+ sig { void }
1143
+ def detach; end
1144
+
1145
+ # source://rbi//lib/rbi/rewriters/group_nodes.rb#48
1146
+ sig { returns(::RBI::Group::Kind) }
1147
+ def group_kind; end
1148
+
1149
+ # source://rbi//lib/rbi/model.rb#15
1150
+ sig { returns(T.nilable(::RBI::Loc)) }
1151
+ def loc; end
1152
+
1153
+ # @return [Loc, nil]
1154
+ #
1155
+ # source://rbi//lib/rbi/model.rb#15
1156
+ def loc=(_arg0); end
1157
+
1158
+ # Merge `self` and `other` into a single definition
1159
+ #
1160
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#293
1161
+ sig { params(other: ::RBI::Node).void }
1162
+ def merge_with(other); end
1163
+
1164
+ # source://rbi//lib/rbi/printer.rb#179
1165
+ sig { returns(T::Boolean) }
1166
+ def oneline?; end
1167
+
1168
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#296
1169
+ sig { returns(T.nilable(::RBI::ConflictTree)) }
1170
+ def parent_conflict_tree; end
1171
+
1172
+ # source://rbi//lib/rbi/model.rb#46
1173
+ sig { returns(T.nilable(::RBI::Scope)) }
1174
+ def parent_scope; end
1175
+
1176
+ # source://rbi//lib/rbi/model.rb#12
1177
+ sig { returns(T.nilable(::RBI::Tree)) }
1178
+ def parent_tree; end
1179
+
1180
+ # @return [Tree, nil]
1181
+ #
1182
+ # source://rbi//lib/rbi/model.rb#12
1183
+ def parent_tree=(_arg0); end
1184
+
1185
+ # source://rbi//lib/rbi/printer.rb#156
1186
+ sig do
1187
+ params(
1188
+ out: T.any(::IO, ::StringIO),
1189
+ indent: ::Integer,
1190
+ print_locs: T::Boolean,
1191
+ max_line_length: T.nilable(::Integer)
1192
+ ).void
1193
+ end
1194
+ def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
1195
+
1196
+ # source://rbi//lib/rbi/printer.rb#169
1197
+ sig { params(v: ::RBI::Printer).void }
1198
+ def print_blank_line_before(v); end
1199
+
1200
+ # source://rbi//lib/rbi/model.rb#33
1201
+ sig { params(node: ::RBI::Node).void }
1202
+ def replace(node); end
1203
+
1204
+ # source://rbi//lib/rbi/rewriters/filter_versions.rb#94
1205
+ sig { params(version: ::Gem::Version).returns(T::Boolean) }
1206
+ def satisfies_version?(version); end
1207
+
1208
+ # source://rbi//lib/rbi/printer.rb#162
1209
+ sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) }
1210
+ def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
1211
+ end
1212
+
1213
+ # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
1214
+ #
1215
+ # source://rbi//lib/rbi/model.rb#83
1216
+ class RBI::NodeWithComments < ::RBI::Node
1217
+ abstract!
1218
+
1219
+ # source://rbi//lib/rbi/model.rb#93
1220
+ sig { params(loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void }
1221
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil)); end
1222
+
1223
+ # source://rbi//lib/rbi/model.rb#99
1224
+ sig { returns(T::Array[::String]) }
1225
+ def annotations; end
1226
+
1227
+ # source://rbi//lib/rbi/model.rb#90
1228
+ sig { returns(T::Array[::RBI::Comment]) }
1229
+ def comments; end
1230
+
1231
+ # @return [Array<Comment>]
1232
+ #
1233
+ # source://rbi//lib/rbi/model.rb#90
1234
+ def comments=(_arg0); end
1235
+
1236
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#311
1237
+ sig { override.params(other: ::RBI::Node).void }
1238
+ def merge_with(other); end
1239
+
1240
+ # source://rbi//lib/rbi/printer.rb#188
1241
+ sig { override.returns(T::Boolean) }
1242
+ def oneline?; end
1243
+
1244
+ # source://rbi//lib/rbi/rewriters/filter_versions.rb#104
1245
+ sig { returns(T::Array[::Gem::Requirement]) }
1246
+ def version_requirements; end
1247
+ end
1248
+
1249
+ # source://rbi//lib/rbi/model.rb#674
1250
+ class RBI::OptParam < ::RBI::Param
1251
+ # source://rbi//lib/rbi/model.rb#689
1252
+ sig do
1253
+ params(
1254
+ name: ::String,
1255
+ value: ::String,
1256
+ loc: T.nilable(::RBI::Loc),
1257
+ comments: T::Array[::RBI::Comment],
1258
+ block: T.nilable(T.proc.params(node: ::RBI::OptParam).void)
1259
+ ).void
1260
+ end
1261
+ def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
1262
+
1263
+ # source://rbi//lib/rbi/model.rb#696
1264
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
1265
+ def ==(other); end
1266
+
1267
+ # source://rbi//lib/rbi/printer.rb#468
1268
+ sig { override.params(v: ::RBI::Printer).void }
1269
+ def accept_printer(v); end
1270
+
1271
+ # source://rbi//lib/rbi/printer.rb#473
1272
+ sig { override.params(v: ::RBI::Printer, last: T::Boolean).void }
1273
+ def print_comment_leading_space(v, last:); end
1274
+
1275
+ # source://rbi//lib/rbi/model.rb#678
1276
+ sig { returns(::String) }
1277
+ def value; end
1278
+ end
1279
+
1280
+ # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
1281
+ #
1282
+ # source://rbi//lib/rbi/model.rb#625
1283
+ class RBI::Param < ::RBI::NodeWithComments
1284
+ abstract!
1285
+
1286
+ # source://rbi//lib/rbi/model.rb#641
1287
+ sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void }
1288
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
1289
+
1290
+ # source://rbi//lib/rbi/printer.rb#446
1291
+ sig { override.params(v: ::RBI::Printer).void }
1292
+ def accept_printer(v); end
1293
+
1294
+ # source://rbi//lib/rbi/printer.rb#459
1295
+ sig { returns(T::Array[::String]) }
1296
+ def comments_lines; end
1297
+
1298
+ # source://rbi//lib/rbi/model.rb#632
1299
+ sig { returns(::String) }
1300
+ def name; end
1301
+
1302
+ # source://rbi//lib/rbi/printer.rb#451
1303
+ sig { params(v: ::RBI::Printer, last: T::Boolean).void }
1304
+ def print_comment_leading_space(v, last:); end
1305
+
1306
+ # source://rbi//lib/rbi/model.rb#647
1307
+ sig { override.returns(::String) }
1308
+ def to_s; end
1309
+ end
1310
+
1311
+ # source://rbi//lib/rbi/parser.rb#7
1312
+ class RBI::ParseError < ::StandardError
1313
+ # source://rbi//lib/rbi/parser.rb#14
1314
+ sig { params(message: ::String, location: ::RBI::Loc).void }
1315
+ def initialize(message, location); end
1316
+
1317
+ # source://rbi//lib/rbi/parser.rb#11
1318
+ sig { returns(::RBI::Loc) }
1319
+ def location; end
1320
+ end
1321
+
1322
+ # source://rbi//lib/rbi/parser.rb#53
1323
+ class RBI::Parser
1324
+ # source://rbi//lib/rbi/parser.rb#88
1325
+ sig { params(path: ::String).returns(::RBI::Tree) }
1326
+ def parse_file(path); end
1327
+
1328
+ # source://rbi//lib/rbi/parser.rb#83
1329
+ sig { params(string: ::String).returns(::RBI::Tree) }
1330
+ def parse_string(string); end
1331
+
1332
+ private
1333
+
1334
+ # source://rbi//lib/rbi/parser.rb#95
1335
+ sig { params(source: ::String, file: ::String).returns(::RBI::Tree) }
1336
+ def parse(source, file:); end
1337
+
1338
+ class << self
1339
+ # source://rbi//lib/rbi/parser.rb#65
1340
+ sig { params(path: ::String).returns(::RBI::Tree) }
1341
+ def parse_file(path); end
1342
+
1343
+ # source://rbi//lib/rbi/parser.rb#70
1344
+ sig { params(paths: T::Array[::String]).returns(T::Array[::RBI::Tree]) }
1345
+ def parse_files(paths); end
1346
+
1347
+ # source://rbi//lib/rbi/parser.rb#60
1348
+ sig { params(string: ::String).returns(::RBI::Tree) }
1349
+ def parse_string(string); end
1350
+
1351
+ # source://rbi//lib/rbi/parser.rb#76
1352
+ sig { params(strings: T::Array[::String]).returns(T::Array[::RBI::Tree]) }
1353
+ def parse_strings(strings); end
1354
+ end
1355
+ end
1356
+
1357
+ # source://rbi//lib/rbi/parser.rb#791
1358
+ class RBI::Parser::SigBuilder < ::RBI::Parser::Visitor
1359
+ # source://rbi//lib/rbi/parser.rb#798
1360
+ sig { params(content: ::String, file: ::String).void }
1361
+ def initialize(content, file:); end
1362
+
1363
+ # source://rbi//lib/rbi/parser.rb#795
1364
+ sig { returns(::RBI::Sig) }
1365
+ def current; end
1366
+
1367
+ # source://rbi//lib/rbi/parser.rb#850
1368
+ sig { override.params(node: ::Prism::AssocNode).void }
1369
+ def visit_assoc_node(node); end
1370
+
1371
+ # source://rbi//lib/rbi/parser.rb#805
1372
+ sig { override.params(node: ::Prism::CallNode).void }
1373
+ def visit_call_node(node); end
1374
+ end
1375
+
1376
+ # source://rbi//lib/rbi/parser.rb#153
1377
+ class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor
1378
+ # source://rbi//lib/rbi/parser.rb#163
1379
+ sig { params(source: ::String, comments: T::Array[::Prism::Comment], file: ::String).void }
1380
+ def initialize(source, comments:, file:); end
1381
+
1382
+ # source://rbi//lib/rbi/parser.rb#160
1383
+ sig { returns(T.nilable(::Prism::Node)) }
1384
+ def last_node; end
1385
+
1386
+ # source://rbi//lib/rbi/parser.rb#157
1387
+ sig { returns(::RBI::Tree) }
1388
+ def tree; end
1389
+
1390
+ # source://rbi//lib/rbi/parser.rb#299
1391
+ sig { params(node: ::Prism::CallNode).void }
1392
+ def visit_call_node(node); end
1393
+
1394
+ # source://rbi//lib/rbi/parser.rb#176
1395
+ sig { override.params(node: ::Prism::ClassNode).void }
1396
+ def visit_class_node(node); end
1397
+
1398
+ # source://rbi//lib/rbi/parser.rb#208
1399
+ sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).void }
1400
+ def visit_constant_assign(node); end
1401
+
1402
+ # source://rbi//lib/rbi/parser.rb#201
1403
+ sig { override.params(node: ::Prism::ConstantPathWriteNode).void }
1404
+ def visit_constant_path_write_node(node); end
1405
+
1406
+ # source://rbi//lib/rbi/parser.rb#194
1407
+ sig { override.params(node: ::Prism::ConstantWriteNode).void }
1408
+ def visit_constant_write_node(node); end
1409
+
1410
+ # source://rbi//lib/rbi/parser.rb#241
1411
+ sig { override.params(node: ::Prism::DefNode).void }
1412
+ def visit_def_node(node); end
1413
+
1414
+ # source://rbi//lib/rbi/parser.rb#255
1415
+ sig { override.params(node: ::Prism::ModuleNode).void }
1416
+ def visit_module_node(node); end
1417
+
1418
+ # source://rbi//lib/rbi/parser.rb#272
1419
+ sig { override.params(node: ::Prism::ProgramNode).void }
1420
+ def visit_program_node(node); end
1421
+
1422
+ # source://rbi//lib/rbi/parser.rb#283
1423
+ sig { override.params(node: ::Prism::SingletonClassNode).void }
1424
+ def visit_singleton_class_node(node); end
1425
+
1426
+ private
1427
+
1428
+ # Collect all the remaining comments within a node
1429
+ #
1430
+ # source://rbi//lib/rbi/parser.rb#467
1431
+ sig { params(node: ::Prism::Node).void }
1432
+ def collect_dangling_comments(node); end
1433
+
1434
+ # Collect all the remaining comments after visiting the tree
1435
+ #
1436
+ # source://rbi//lib/rbi/parser.rb#485
1437
+ sig { void }
1438
+ def collect_orphan_comments; end
1439
+
1440
+ # source://rbi//lib/rbi/parser.rb#508
1441
+ sig { returns(::RBI::Tree) }
1442
+ def current_scope; end
1443
+
1444
+ # source://rbi//lib/rbi/parser.rb#513
1445
+ sig { returns(T::Array[::RBI::Sig]) }
1446
+ def current_sigs; end
1447
+
1448
+ # source://rbi//lib/rbi/parser.rb#520
1449
+ sig { returns(T::Array[::RBI::Comment]) }
1450
+ def current_sigs_comments; end
1451
+
1452
+ # source://rbi//lib/rbi/parser.rb#527
1453
+ sig { params(node: ::Prism::Node).returns(T::Array[::RBI::Comment]) }
1454
+ def node_comments(node); end
1455
+
1456
+ # source://rbi//lib/rbi/parser.rb#545
1457
+ sig { params(node: ::Prism::Comment).returns(::RBI::Comment) }
1458
+ def parse_comment(node); end
1459
+
1460
+ # source://rbi//lib/rbi/parser.rb#574
1461
+ sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Param]) }
1462
+ def parse_params(node); end
1463
+
1464
+ # source://rbi//lib/rbi/parser.rb#550
1465
+ sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Arg]) }
1466
+ def parse_send_args(node); end
1467
+
1468
+ # source://rbi//lib/rbi/parser.rb#648
1469
+ sig { params(node: ::Prism::CallNode).returns(::RBI::Sig) }
1470
+ def parse_sig(node); end
1471
+
1472
+ # source://rbi//lib/rbi/parser.rb#658
1473
+ sig do
1474
+ params(
1475
+ node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)
1476
+ ).returns(T.nilable(::RBI::Struct))
1477
+ end
1478
+ def parse_struct(node); end
1479
+
1480
+ # source://rbi//lib/rbi/parser.rb#708
1481
+ sig { params(send: ::Prism::CallNode).void }
1482
+ def parse_tstruct_field(send); end
1483
+
1484
+ # source://rbi//lib/rbi/parser.rb#745
1485
+ sig { params(name: ::String, node: ::Prism::Node).returns(::RBI::Visibility) }
1486
+ def parse_visibility(name, node); end
1487
+
1488
+ # source://rbi//lib/rbi/parser.rb#759
1489
+ sig { void }
1490
+ def separate_header_comments; end
1491
+
1492
+ # source://rbi//lib/rbi/parser.rb#769
1493
+ sig { void }
1494
+ def set_root_tree_loc; end
1495
+
1496
+ # source://rbi//lib/rbi/parser.rb#783
1497
+ sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) }
1498
+ def type_variable_definition?(node); end
1499
+ end
1500
+
1501
+ # source://rbi//lib/rbi/parser.rb#122
1502
+ class RBI::Parser::Visitor < ::Prism::Visitor
1503
+ # source://rbi//lib/rbi/parser.rb#126
1504
+ sig { params(source: ::String, file: ::String).void }
1505
+ def initialize(source, file:); end
1506
+
1507
+ private
1508
+
1509
+ # source://rbi//lib/rbi/parser.rb#136
1510
+ sig { params(node: ::Prism::Node).returns(::RBI::Loc) }
1511
+ def node_loc(node); end
1512
+
1513
+ # source://rbi//lib/rbi/parser.rb#141
1514
+ sig { params(node: T.nilable(::Prism::Node)).returns(T.nilable(::String)) }
1515
+ def node_string(node); end
1516
+
1517
+ # source://rbi//lib/rbi/parser.rb#148
1518
+ sig { params(node: ::Prism::Node).returns(::String) }
1519
+ def node_string!(node); end
1520
+ end
1521
+
1522
+ # source://rbi//lib/rbi/printer.rb#5
1523
+ class RBI::Printer < ::RBI::Visitor
1524
+ # source://rbi//lib/rbi/printer.rb#28
1525
+ sig do
1526
+ params(
1527
+ out: T.any(::IO, ::StringIO),
1528
+ indent: ::Integer,
1529
+ print_locs: T::Boolean,
1530
+ max_line_length: T.nilable(::Integer)
1531
+ ).void
1532
+ end
1533
+ def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
1534
+
1535
+ # source://rbi//lib/rbi/printer.rb#15
1536
+ sig { returns(::Integer) }
1537
+ def current_indent; end
1538
+
1539
+ # source://rbi//lib/rbi/printer.rb#46
1540
+ sig { void }
1541
+ def dedent; end
1542
+
1543
+ # @return [Boolean]
1544
+ #
1545
+ # source://rbi//lib/rbi/printer.rb#9
1546
+ def in_visibility_group; end
1547
+
1548
+ # @return [Boolean]
1549
+ #
1550
+ # source://rbi//lib/rbi/printer.rb#9
1551
+ def in_visibility_group=(_arg0); end
1552
+
1553
+ # Printing
1554
+ #
1555
+ # source://rbi//lib/rbi/printer.rb#41
1556
+ sig { void }
1557
+ def indent; end
1558
+
1559
+ # source://rbi//lib/rbi/printer.rb#18
1560
+ sig { returns(T.nilable(::Integer)) }
1561
+ def max_line_length; end
1562
+
1563
+ # source://rbi//lib/rbi/printer.rb#12
1564
+ sig { returns(T.nilable(::RBI::Node)) }
1565
+ def previous_node; end
1566
+
1567
+ # Print a string without indentation nor `\n` at the end.
1568
+ #
1569
+ # source://rbi//lib/rbi/printer.rb#52
1570
+ sig { params(string: ::String).void }
1571
+ def print(string); end
1572
+
1573
+ # source://rbi//lib/rbi/printer.rb#9
1574
+ sig { returns(T::Boolean) }
1575
+ def print_locs; end
1576
+
1577
+ # @return [Boolean]
1578
+ #
1579
+ # source://rbi//lib/rbi/printer.rb#9
1580
+ def print_locs=(_arg0); end
1581
+
1582
+ # Print a string with indentation and `\n` at the end.
1583
+ #
1584
+ # source://rbi//lib/rbi/printer.rb#72
1585
+ sig { params(string: ::String).void }
1586
+ def printl(string); end
1587
+
1588
+ # Print a string without indentation but with a `\n` at the end.
1589
+ #
1590
+ # source://rbi//lib/rbi/printer.rb#58
1591
+ sig { params(string: T.nilable(::String)).void }
1592
+ def printn(string = T.unsafe(nil)); end
1593
+
1594
+ # Print a string with indentation but without a `\n` at the end.
1595
+ #
1596
+ # source://rbi//lib/rbi/printer.rb#65
1597
+ sig { params(string: T.nilable(::String)).void }
1598
+ def printt(string = T.unsafe(nil)); end
1599
+
1600
+ # source://rbi//lib/rbi/printer.rb#83
1601
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
1602
+ def visit(node); end
1603
+
1604
+ # source://rbi//lib/rbi/printer.rb#90
1605
+ sig { override.params(nodes: T::Array[::RBI::Node]).void }
1606
+ def visit_all(nodes); end
1607
+
1608
+ # source://rbi//lib/rbi/printer.rb#78
1609
+ sig { params(file: ::RBI::File).void }
1610
+ def visit_file(file); end
1611
+ end
1612
+
1613
+ # source://rbi//lib/rbi/model.rb#982
1614
+ class RBI::Private < ::RBI::Visibility
1615
+ # source://rbi//lib/rbi/model.rb#992
1616
+ sig do
1617
+ params(
1618
+ loc: T.nilable(::RBI::Loc),
1619
+ comments: T::Array[::RBI::Comment],
1620
+ block: T.nilable(T.proc.params(node: ::RBI::Private).void)
1621
+ ).void
1622
+ end
1623
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
1624
+ end
1625
+
1626
+ # source://rbi//lib/rbi/model.rb#966
1627
+ class RBI::Protected < ::RBI::Visibility
1628
+ # source://rbi//lib/rbi/model.rb#976
1629
+ sig do
1630
+ params(
1631
+ loc: T.nilable(::RBI::Loc),
1632
+ comments: T::Array[::RBI::Comment],
1633
+ block: T.nilable(T.proc.params(node: ::RBI::Protected).void)
1634
+ ).void
1635
+ end
1636
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
1637
+ end
1638
+
1639
+ # source://rbi//lib/rbi/model.rb#950
1640
+ class RBI::Public < ::RBI::Visibility
1641
+ # source://rbi//lib/rbi/model.rb#960
1642
+ sig do
1643
+ params(
1644
+ loc: T.nilable(::RBI::Loc),
1645
+ comments: T::Array[::RBI::Comment],
1646
+ block: T.nilable(T.proc.params(node: ::RBI::Public).void)
1647
+ ).void
1648
+ end
1649
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
1650
+ end
1651
+
1652
+ # source://rbi//lib/rbi/model.rb#652
1653
+ class RBI::ReqParam < ::RBI::Param
1654
+ # source://rbi//lib/rbi/model.rb#663
1655
+ sig do
1656
+ params(
1657
+ name: ::String,
1658
+ loc: T.nilable(::RBI::Loc),
1659
+ comments: T::Array[::RBI::Comment],
1660
+ block: T.nilable(T.proc.params(node: ::RBI::ReqParam).void)
1661
+ ).void
1662
+ end
1663
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
1664
+
1665
+ # source://rbi//lib/rbi/model.rb#669
1666
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
1667
+ def ==(other); end
1668
+ end
1669
+
1670
+ # source://rbi//lib/rbi/model.rb#1456
1671
+ class RBI::RequiresAncestor < ::RBI::NodeWithComments
1672
+ include ::RBI::Indexable
1673
+
1674
+ # source://rbi//lib/rbi/model.rb#1469
1675
+ sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void }
1676
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
1677
+
1678
+ # source://rbi//lib/rbi/printer.rb#870
1679
+ sig { override.params(v: ::RBI::Printer).void }
1680
+ def accept_printer(v); end
1681
+
1682
+ # source://rbi//lib/rbi/index.rb#163
1683
+ sig { override.returns(T::Array[::String]) }
1684
+ def index_ids; end
1685
+
1686
+ # source://rbi//lib/rbi/model.rb#1460
1687
+ sig { returns(::String) }
1688
+ def name; end
1689
+
1690
+ # source://rbi//lib/rbi/model.rb#1475
1691
+ sig { override.returns(::String) }
1692
+ def to_s; end
1693
+ end
1694
+
1695
+ # source://rbi//lib/rbi/model.rb#701
1696
+ class RBI::RestParam < ::RBI::Param
1697
+ # source://rbi//lib/rbi/model.rb#712
1698
+ sig do
1699
+ params(
1700
+ name: ::String,
1701
+ loc: T.nilable(::RBI::Loc),
1702
+ comments: T::Array[::RBI::Comment],
1703
+ block: T.nilable(T.proc.params(node: ::RBI::RestParam).void)
1704
+ ).void
1705
+ end
1706
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
1707
+
1708
+ # source://rbi//lib/rbi/model.rb#723
1709
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
1710
+ def ==(other); end
1711
+
1712
+ # source://rbi//lib/rbi/printer.rb#483
1713
+ sig { override.params(v: ::RBI::Printer).void }
1714
+ def accept_printer(v); end
1715
+
1716
+ # source://rbi//lib/rbi/printer.rb#488
1717
+ sig { override.params(v: ::RBI::Printer, last: T::Boolean).void }
1718
+ def print_comment_leading_space(v, last:); end
1719
+
1720
+ # source://rbi//lib/rbi/model.rb#718
1721
+ sig { override.returns(::String) }
1722
+ def to_s; end
1723
+ end
1724
+
1725
+ # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#5
1726
+ module RBI::Rewriters; end
1727
+
1728
+ # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#6
1729
+ class RBI::Rewriters::AddSigTemplates < ::RBI::Visitor
1730
+ # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#10
1731
+ sig { params(with_todo_comment: T::Boolean).void }
1732
+ def initialize(with_todo_comment: T.unsafe(nil)); end
1733
+
1734
+ # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#16
1735
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
1736
+ def visit(node); end
1737
+
1738
+ private
1739
+
1740
+ # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#30
1741
+ sig { params(attr: ::RBI::Attr).void }
1742
+ def add_attr_sig(attr); end
1743
+
1744
+ # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#45
1745
+ sig { params(method: ::RBI::Method).void }
1746
+ def add_method_sig(method); end
1747
+
1748
+ # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#56
1749
+ sig { params(node: ::RBI::NodeWithComments).void }
1750
+ def add_todo_comment(node); end
1751
+ end
1752
+
1753
+ # source://rbi//lib/rbi/rewriters/annotate.rb#6
1754
+ class RBI::Rewriters::Annotate < ::RBI::Visitor
1755
+ # source://rbi//lib/rbi/rewriters/annotate.rb#10
1756
+ sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void }
1757
+ def initialize(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end
1758
+
1759
+ # source://rbi//lib/rbi/rewriters/annotate.rb#18
1760
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
1761
+ def visit(node); end
1762
+
1763
+ private
1764
+
1765
+ # source://rbi//lib/rbi/rewriters/annotate.rb#31
1766
+ sig { params(node: ::RBI::NodeWithComments).void }
1767
+ def annotate_node(node); end
1768
+
1769
+ # source://rbi//lib/rbi/rewriters/annotate.rb#38
1770
+ sig { params(node: ::RBI::Node).returns(T::Boolean) }
1771
+ def root?(node); end
1772
+ end
1773
+
1774
+ # source://rbi//lib/rbi/rewriters/deannotate.rb#6
1775
+ class RBI::Rewriters::Deannotate < ::RBI::Visitor
1776
+ # source://rbi//lib/rbi/rewriters/deannotate.rb#10
1777
+ sig { params(annotation: ::String).void }
1778
+ def initialize(annotation); end
1779
+
1780
+ # source://rbi//lib/rbi/rewriters/deannotate.rb#16
1781
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
1782
+ def visit(node); end
1783
+
1784
+ private
1785
+
1786
+ # source://rbi//lib/rbi/rewriters/deannotate.rb#27
1787
+ sig { params(node: ::RBI::NodeWithComments).void }
1788
+ def deannotate_node(node); end
1789
+ end
1790
+
1791
+ # Take a gem version and filter out all RBI that is not relevant to that version based on @version annotations
1792
+ # in comments. As an example:
1793
+ #
1794
+ # ~~~rb
1795
+ # tree = Parser.parse_string(<<~RBI)
1796
+ # class Foo
1797
+ # # @version > 0.3.0
1798
+ # def bar
1799
+ # end
1800
+ #
1801
+ # # @version <= 0.3.0
1802
+ # def bar(arg1)
1803
+ # end
1804
+ # end
1805
+ # RBI
1806
+ #
1807
+ # Rewriters::FilterVersions.filter(tree, Gem::Version.new("0.3.1"))
1808
+ #
1809
+ # assert_equal(<<~RBI, tree.string)
1810
+ # class Foo
1811
+ # # @version > 0.3.0
1812
+ # def bar
1813
+ # end
1814
+ # end
1815
+ # RBI
1816
+ # ~~~
1817
+ #
1818
+ # Supported operators:
1819
+ # - equals `=`
1820
+ # - not equals `!=`
1821
+ # - greater than `>`
1822
+ # - greater than or equal to `>=`
1823
+ # - less than `<`
1824
+ # - less than or equal to `<=`
1825
+ # - pessimistic or twiddle-wakka`~>`
1826
+ #
1827
+ # And/or logic:
1828
+ # - "And" logic: put multiple versions on the same line
1829
+ # - e.g. `@version > 0.3.0, <1.0.0` means version must be greater than 0.3.0 AND less than 1.0.0
1830
+ # - "Or" logic: put multiple versions on subsequent lines
1831
+ # - e.g. the following means version must be less than 0.3.0 OR greater than 1.0.0
1832
+ # ```
1833
+ # # @version < 0.3.0
1834
+ # # @version > 1.0.0
1835
+ # ```
1836
+ # Prerelease versions:
1837
+ # - Prerelease versions are considered less than their non-prerelease counterparts
1838
+ # - e.g. `0.4.0-prerelease` is less than `0.4.0`
1839
+ #
1840
+ # RBI with no versions:
1841
+ # - RBI with no version annotations are automatically counted towards ALL versions
1842
+ #
1843
+ # source://rbi//lib/rbi/rewriters/filter_versions.rb#57
1844
+ class RBI::Rewriters::FilterVersions < ::RBI::Visitor
1845
+ # source://rbi//lib/rbi/rewriters/filter_versions.rb#73
1846
+ sig { params(version: ::Gem::Version).void }
1847
+ def initialize(version); end
1848
+
1849
+ # source://rbi//lib/rbi/rewriters/filter_versions.rb#79
1850
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
1851
+ def visit(node); end
1852
+
1853
+ class << self
1854
+ # source://rbi//lib/rbi/rewriters/filter_versions.rb#66
1855
+ sig { params(tree: ::RBI::Tree, version: ::Gem::Version).void }
1856
+ def filter(tree, version); end
1857
+ end
1858
+ end
1859
+
1860
+ # source://rbi//lib/rbi/rewriters/filter_versions.rb#60
1861
+ RBI::Rewriters::FilterVersions::VERSION_PREFIX = T.let(T.unsafe(nil), String)
1862
+
1863
+ # source://rbi//lib/rbi/rewriters/group_nodes.rb#6
1864
+ class RBI::Rewriters::GroupNodes < ::RBI::Visitor
1865
+ # source://rbi//lib/rbi/rewriters/group_nodes.rb#10
1866
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
1867
+ def visit(node); end
1868
+ end
1869
+
1870
+ # Merge two RBI trees together
1871
+ #
1872
+ # Be this `Tree`:
1873
+ # ~~~rb
1874
+ # class Foo
1875
+ # attr_accessor :a
1876
+ # def m; end
1877
+ # C = 10
1878
+ # end
1879
+ # ~~~
1880
+ #
1881
+ # Merged with this one:
1882
+ # ~~~rb
1883
+ # class Foo
1884
+ # attr_reader :a
1885
+ # def m(x); end
1886
+ # C = 10
1887
+ # end
1888
+ # ~~~
1889
+ #
1890
+ # Compatible definitions are merged together while incompatible definitions are moved into a `ConflictTree`:
1891
+ # ~~~rb
1892
+ # class Foo
1893
+ # <<<<<<< left
1894
+ # attr_accessor :a
1895
+ # def m; end
1896
+ # =======
1897
+ # attr_reader :a
1898
+ # def m(x); end
1899
+ # >>>>>>> right
1900
+ # C = 10
1901
+ # end
1902
+ # ~~~
1903
+ #
1904
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#39
1905
+ class RBI::Rewriters::Merge
1906
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#70
1907
+ sig { params(left_name: ::String, right_name: ::String, keep: ::RBI::Rewriters::Merge::Keep).void }
1908
+ def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
1909
+
1910
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#79
1911
+ sig { params(tree: ::RBI::Tree).void }
1912
+ def merge(tree); end
1913
+
1914
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#67
1915
+ sig { returns(::RBI::MergeTree) }
1916
+ def tree; end
1917
+
1918
+ class << self
1919
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#54
1920
+ sig do
1921
+ params(
1922
+ left: ::RBI::Tree,
1923
+ right: ::RBI::Tree,
1924
+ left_name: ::String,
1925
+ right_name: ::String,
1926
+ keep: ::RBI::Rewriters::Merge::Keep
1927
+ ).returns(::RBI::MergeTree)
1928
+ end
1929
+ def merge_trees(left, right, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
1930
+ end
1931
+ end
1932
+
1933
+ # Used for logging / error displaying purpose
1934
+ #
1935
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#86
1936
+ class RBI::Rewriters::Merge::Conflict < ::T::Struct
1937
+ const :left, ::RBI::Node
1938
+ const :right, ::RBI::Node
1939
+ const :left_name, ::String
1940
+ const :right_name, ::String
1941
+
1942
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#95
1943
+ sig { returns(::String) }
1944
+ def to_s; end
1945
+
1946
+ class << self
1947
+ # source://sorbet-runtime/0.5.11368/lib/types/struct.rb#13
1948
+ def inherited(s); end
1949
+ end
1950
+ end
1951
+
1952
+ # Merge adjacent conflict trees
1953
+ #
1954
+ # Transform this:
1955
+ # ~~~rb
1956
+ # class Foo
1957
+ # <<<<<<< left
1958
+ # def m1; end
1959
+ # =======
1960
+ # def m1(a); end
1961
+ # >>>>>>> right
1962
+ # <<<<<<< left
1963
+ # def m2(a); end
1964
+ # =======
1965
+ # def m2; end
1966
+ # >>>>>>> right
1967
+ # end
1968
+ # ~~~
1969
+ #
1970
+ # Into this:
1971
+ # ~~~rb
1972
+ # class Foo
1973
+ # <<<<<<< left
1974
+ # def m1; end
1975
+ # def m2(a); end
1976
+ # =======
1977
+ # def m1(a); end
1978
+ # def m2; end
1979
+ # >>>>>>> right
1980
+ # end
1981
+ # ~~~
1982
+ #
1983
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#245
1984
+ class RBI::Rewriters::Merge::ConflictTreeMerger < ::RBI::Visitor
1985
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#247
1986
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
1987
+ def visit(node); end
1988
+
1989
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#252
1990
+ sig { override.params(nodes: T::Array[::RBI::Node]).void }
1991
+ def visit_all(nodes); end
1992
+
1993
+ private
1994
+
1995
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#273
1996
+ sig { params(left: ::RBI::Tree, right: ::RBI::Tree).void }
1997
+ def merge_conflict_trees(left, right); end
1998
+ end
1999
+
2000
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#42
2001
+ class RBI::Rewriters::Merge::Keep < ::T::Enum
2002
+ enums do
2003
+ NONE = new
2004
+ LEFT = new
2005
+ RIGHT = new
2006
+ end
2007
+ end
2008
+
2009
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#100
2010
+ class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor
2011
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#107
2012
+ sig do
2013
+ params(
2014
+ output: ::RBI::Tree,
2015
+ left_name: ::String,
2016
+ right_name: ::String,
2017
+ keep: ::RBI::Rewriters::Merge::Keep
2018
+ ).void
2019
+ end
2020
+ def initialize(output, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
2021
+
2022
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#104
2023
+ sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) }
2024
+ def conflicts; end
2025
+
2026
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#119
2027
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
2028
+ def visit(node); end
2029
+
2030
+ private
2031
+
2032
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#168
2033
+ sig { returns(::RBI::Tree) }
2034
+ def current_scope; end
2035
+
2036
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#185
2037
+ sig { params(left: ::RBI::Scope, right: ::RBI::Scope).void }
2038
+ def make_conflict_scope(left, right); end
2039
+
2040
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#192
2041
+ sig { params(left: ::RBI::Node, right: ::RBI::Node).void }
2042
+ def make_conflict_tree(left, right); end
2043
+
2044
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#173
2045
+ sig { params(node: ::RBI::Node).returns(T.nilable(::RBI::Node)) }
2046
+ def previous_definition(node); end
2047
+
2048
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#204
2049
+ sig { params(left: ::RBI::Scope, right: ::RBI::Scope).returns(::RBI::Scope) }
2050
+ def replace_scope_header(left, right); end
2051
+ end
2052
+
2053
+ # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#6
2054
+ class RBI::Rewriters::NestNonPublicMethods < ::RBI::Visitor
2055
+ # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#10
2056
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
2057
+ def visit(node); end
2058
+ end
2059
+
2060
+ # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#6
2061
+ class RBI::Rewriters::NestSingletonMethods < ::RBI::Visitor
2062
+ # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#10
2063
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
2064
+ def visit(node); end
2065
+ end
2066
+
2067
+ # Remove all definitions existing in the index from the current tree
2068
+ #
2069
+ # Let's create an `Index` from two different `Tree`s:
2070
+ # ~~~rb
2071
+ # tree1 = Parse.parse_string(<<~RBI)
2072
+ # class Foo
2073
+ # def foo; end
2074
+ # end
2075
+ # RBI
2076
+ #
2077
+ # tree2 = Parse.parse_string(<<~RBI)
2078
+ # FOO = 10
2079
+ # RBI
2080
+ #
2081
+ # index = Index.index(tree1, tree2)
2082
+ # ~~~
2083
+ #
2084
+ # We can use `RemoveKnownDefinitions` to remove the definitions found in the `index` from the `Tree` to clean:
2085
+ # ~~~rb
2086
+ # tree_to_clean = Parser.parse_string(<<~RBI)
2087
+ # class Foo
2088
+ # def foo; end
2089
+ # def bar; end
2090
+ # end
2091
+ # FOO = 10
2092
+ # BAR = 42
2093
+ # RBI
2094
+ #
2095
+ # cleaned_tree, operations = RemoveKnownDefinitions.remove(tree_to_clean, index)
2096
+ #
2097
+ # assert_equal(<<~RBI, cleaned_tree)
2098
+ # class Foo
2099
+ # def bar; end
2100
+ # end
2101
+ # BAR = 42
2102
+ # RBI
2103
+ #
2104
+ # assert_equal(<<~OPERATIONS, operations.join("\n"))
2105
+ # Deleted ::Foo#foo at -:2:2-2-16 (duplicate from -:2:2-2:16)
2106
+ # Deleted ::FOO at -:5:0-5:8 (duplicate from -:1:0-1:8)
2107
+ # OPERATIONS
2108
+ # ~~~
2109
+ #
2110
+ # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#48
2111
+ class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor
2112
+ # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#55
2113
+ sig { params(index: ::RBI::Index).void }
2114
+ def initialize(index); end
2115
+
2116
+ # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#52
2117
+ sig { returns(T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]) }
2118
+ def operations; end
2119
+
2120
+ # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#83
2121
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
2122
+ def visit(node); end
2123
+
2124
+ # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#78
2125
+ sig { params(nodes: T::Array[::RBI::Node]).void }
2126
+ def visit_all(nodes); end
2127
+
2128
+ private
2129
+
2130
+ # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#111
2131
+ sig { params(node: ::RBI::Node, previous: ::RBI::Node).returns(T::Boolean) }
2132
+ def can_delete_node?(node, previous); end
2133
+
2134
+ # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#129
2135
+ sig { params(node: ::RBI::Node, previous: ::RBI::Node).void }
2136
+ def delete_node(node, previous); end
2137
+
2138
+ # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#102
2139
+ sig { params(node: ::RBI::Indexable).returns(T.nilable(::RBI::Node)) }
2140
+ def previous_definition_for(node); end
2141
+
2142
+ class << self
2143
+ # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#70
2144
+ sig do
2145
+ params(
2146
+ tree: ::RBI::Tree,
2147
+ index: ::RBI::Index
2148
+ ).returns([::RBI::Tree, T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]])
2149
+ end
2150
+ def remove(tree, index); end
2151
+ end
2152
+ end
2153
+
2154
+ # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#134
2155
+ class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct
2156
+ const :deleted_node, ::RBI::Node
2157
+ const :duplicate_of, ::RBI::Node
2158
+
2159
+ # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#141
2160
+ sig { returns(::String) }
2161
+ def to_s; end
2162
+
2163
+ class << self
2164
+ # source://sorbet-runtime/0.5.11368/lib/types/struct.rb#13
2165
+ def inherited(s); end
2166
+ end
2167
+ end
2168
+
2169
+ # source://rbi//lib/rbi/rewriters/sort_nodes.rb#6
2170
+ class RBI::Rewriters::SortNodes < ::RBI::Visitor
2171
+ # source://rbi//lib/rbi/rewriters/sort_nodes.rb#10
2172
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
2173
+ def visit(node); end
2174
+
2175
+ private
2176
+
2177
+ # source://rbi//lib/rbi/rewriters/sort_nodes.rb#73
2178
+ sig { params(kind: ::RBI::Group::Kind).returns(::Integer) }
2179
+ def group_rank(kind); end
2180
+
2181
+ # source://rbi//lib/rbi/rewriters/sort_nodes.rb#94
2182
+ sig { params(node: ::RBI::Node).returns(T.nilable(::String)) }
2183
+ def node_name(node); end
2184
+
2185
+ # source://rbi//lib/rbi/rewriters/sort_nodes.rb#45
2186
+ sig { params(node: ::RBI::Node).returns(::Integer) }
2187
+ def node_rank(node); end
2188
+
2189
+ # source://rbi//lib/rbi/rewriters/sort_nodes.rb#106
2190
+ sig { params(node: ::RBI::Node).void }
2191
+ def sort_node_names!(node); end
2192
+ end
2193
+
2194
+ # Scopes
2195
+ #
2196
+ # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
2197
+ #
2198
+ # source://rbi//lib/rbi/model.rb#176
2199
+ class RBI::Scope < ::RBI::Tree
2200
+ include ::RBI::Indexable
2201
+
2202
+ abstract!
2203
+
2204
+ # source://rbi//lib/rbi/printer.rb#242
2205
+ sig { override.params(v: ::RBI::Printer).void }
2206
+ def accept_printer(v); end
2207
+
2208
+ # Duplicate `self` scope without its body
2209
+ #
2210
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#356
2211
+ sig { returns(T.self_type) }
2212
+ def dup_empty; end
2213
+
2214
+ # @abstract
2215
+ #
2216
+ # source://rbi//lib/rbi/model.rb#182
2217
+ sig { abstract.returns(::String) }
2218
+ def fully_qualified_name; end
2219
+
2220
+ # source://rbi//lib/rbi/index.rb#93
2221
+ sig { override.returns(T::Array[::String]) }
2222
+ def index_ids; end
2223
+
2224
+ # source://rbi//lib/rbi/printer.rb#256
2225
+ sig { params(v: ::RBI::Printer).void }
2226
+ def print_body(v); end
2227
+
2228
+ # @abstract
2229
+ #
2230
+ # source://rbi//lib/rbi/printer.rb#253
2231
+ sig { abstract.params(v: ::RBI::Printer).void }
2232
+ def print_header(v); end
2233
+
2234
+ # source://rbi//lib/rbi/model.rb#185
2235
+ sig { override.returns(::String) }
2236
+ def to_s; end
2237
+ end
2238
+
2239
+ # A conflict between two scope headers
2240
+ #
2241
+ # Is rendered as a merge conflict between `left` and` right` for scope definitions:
2242
+ # ~~~rb
2243
+ # <<<<<<< left
2244
+ # class Foo
2245
+ # =======
2246
+ # module Foo
2247
+ # >>>>>>> right
2248
+ # def m1; end
2249
+ # end
2250
+ # ~~~
2251
+ #
2252
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#628
2253
+ class RBI::ScopeConflict < ::RBI::Tree
2254
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#642
2255
+ sig { params(left: ::RBI::Scope, right: ::RBI::Scope, left_name: ::String, right_name: ::String).void }
2256
+ def initialize(left:, right:, left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end
2257
+
2258
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#651
2259
+ sig { override.params(v: ::RBI::Printer).void }
2260
+ def accept_printer(v); end
2261
+
2262
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#632
2263
+ sig { returns(::RBI::Scope) }
2264
+ def left; end
2265
+
2266
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#667
2267
+ sig { override.returns(T::Boolean) }
2268
+ def oneline?; end
2269
+
2270
+ # @return [Scope]
2271
+ #
2272
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#632
2273
+ def right; end
2274
+ end
2275
+
2276
+ # Sends
2277
+ #
2278
+ # source://rbi//lib/rbi/model.rb#1000
2279
+ class RBI::Send < ::RBI::NodeWithComments
2280
+ include ::RBI::Indexable
2281
+
2282
+ # source://rbi//lib/rbi/model.rb#1018
2283
+ sig do
2284
+ params(
2285
+ method: ::String,
2286
+ args: T::Array[::RBI::Arg],
2287
+ loc: T.nilable(::RBI::Loc),
2288
+ comments: T::Array[::RBI::Comment],
2289
+ block: T.nilable(T.proc.params(node: ::RBI::Send).void)
2290
+ ).void
2291
+ end
2292
+ def initialize(method, args = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
2293
+
2294
+ # source://rbi//lib/rbi/model.rb#1026
2295
+ sig { params(arg: ::RBI::Arg).void }
2296
+ def <<(arg); end
2297
+
2298
+ # source://rbi//lib/rbi/model.rb#1031
2299
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
2300
+ def ==(other); end
2301
+
2302
+ # source://rbi//lib/rbi/printer.rb#592
2303
+ sig { override.params(v: ::RBI::Printer).void }
2304
+ def accept_printer(v); end
2305
+
2306
+ # source://rbi//lib/rbi/model.rb#1007
2307
+ sig { returns(T::Array[::RBI::Arg]) }
2308
+ def args; end
2309
+
2310
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#529
2311
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
2312
+ def compatible_with?(other); end
2313
+
2314
+ # source://rbi//lib/rbi/index.rb#193
2315
+ sig { override.returns(T::Array[::String]) }
2316
+ def index_ids; end
2317
+
2318
+ # source://rbi//lib/rbi/model.rb#1004
2319
+ sig { returns(::String) }
2320
+ def method; end
2321
+
2322
+ # source://rbi//lib/rbi/model.rb#1036
2323
+ sig { returns(::String) }
2324
+ def to_s; end
2325
+ end
2326
+
2327
+ # Sorbet's sigs
2328
+ #
2329
+ # source://rbi//lib/rbi/model.rb#1100
2330
+ class RBI::Sig < ::RBI::Node
2331
+ # source://rbi//lib/rbi/model.rb#1132
2332
+ sig do
2333
+ params(
2334
+ params: T::Array[::RBI::SigParam],
2335
+ return_type: T.nilable(::String),
2336
+ is_abstract: T::Boolean,
2337
+ is_override: T::Boolean,
2338
+ is_overridable: T::Boolean,
2339
+ is_final: T::Boolean,
2340
+ type_params: T::Array[::String],
2341
+ checked: T.nilable(::Symbol),
2342
+ loc: T.nilable(::RBI::Loc),
2343
+ block: T.nilable(T.proc.params(node: ::RBI::Sig).void)
2344
+ ).void
2345
+ end
2346
+ def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), &block); end
2347
+
2348
+ # source://rbi//lib/rbi/model.rb#1157
2349
+ sig { params(param: ::RBI::SigParam).void }
2350
+ def <<(param); end
2351
+
2352
+ # source://rbi//lib/rbi/model.rb#1167
2353
+ sig { params(other: ::Object).returns(T::Boolean) }
2354
+ def ==(other); end
2355
+
2356
+ # source://rbi//lib/rbi/printer.rb#633
2357
+ sig { override.params(v: ::RBI::Printer).void }
2358
+ def accept_printer(v); end
2359
+
2360
+ # source://rbi//lib/rbi/model.rb#1162
2361
+ sig { params(name: ::String, type: ::String).void }
2362
+ def add_param(name, type); end
2363
+
2364
+ # source://rbi//lib/rbi/model.rb#1116
2365
+ sig { returns(T.nilable(::Symbol)) }
2366
+ def checked; end
2367
+
2368
+ # @return [Symbol, nil]
2369
+ #
2370
+ # source://rbi//lib/rbi/model.rb#1116
2371
+ def checked=(_arg0); end
2372
+
2373
+ # source://rbi//lib/rbi/printer.rb#656
2374
+ sig { returns(T::Boolean) }
2375
+ def inline_params?; end
2376
+
2377
+ # source://rbi//lib/rbi/model.rb#1110
2378
+ sig { returns(T::Boolean) }
2379
+ def is_abstract; end
2380
+
2381
+ # @return [Boolean]
2382
+ #
2383
+ # source://rbi//lib/rbi/model.rb#1110
2384
+ def is_abstract=(_arg0); end
2385
+
2386
+ # @return [Boolean]
2387
+ #
2388
+ # source://rbi//lib/rbi/model.rb#1110
2389
+ def is_final; end
2390
+
2391
+ # @return [Boolean]
2392
+ #
2393
+ # source://rbi//lib/rbi/model.rb#1110
2394
+ def is_final=(_arg0); end
2395
+
2396
+ # @return [Boolean]
2397
+ #
2398
+ # source://rbi//lib/rbi/model.rb#1110
2399
+ def is_overridable; end
2400
+
2401
+ # @return [Boolean]
2402
+ #
2403
+ # source://rbi//lib/rbi/model.rb#1110
2404
+ def is_overridable=(_arg0); end
2405
+
2406
+ # @return [Boolean]
2407
+ #
2408
+ # source://rbi//lib/rbi/model.rb#1110
2409
+ def is_override; end
2410
+
2411
+ # @return [Boolean]
2412
+ #
2413
+ # source://rbi//lib/rbi/model.rb#1110
2414
+ def is_override=(_arg0); end
2415
+
2416
+ # source://rbi//lib/rbi/printer.rb#651
2417
+ sig { override.returns(T::Boolean) }
2418
+ def oneline?; end
2419
+
2420
+ # source://rbi//lib/rbi/model.rb#1104
2421
+ sig { returns(T::Array[::RBI::SigParam]) }
2422
+ def params; end
2423
+
2424
+ # source://rbi//lib/rbi/model.rb#1107
2425
+ sig { returns(T.nilable(::String)) }
2426
+ def return_type; end
2427
+
2428
+ # @return [String, nil]
2429
+ #
2430
+ # source://rbi//lib/rbi/model.rb#1107
2431
+ def return_type=(_arg0); end
2432
+
2433
+ # source://rbi//lib/rbi/model.rb#1113
2434
+ sig { returns(T::Array[::String]) }
2435
+ def type_params; end
2436
+
2437
+ private
2438
+
2439
+ # source://rbi//lib/rbi/printer.rb#698
2440
+ sig { params(v: ::RBI::Printer).void }
2441
+ def print_as_block(v); end
2442
+
2443
+ # source://rbi//lib/rbi/printer.rb#674
2444
+ sig { params(v: ::RBI::Printer).void }
2445
+ def print_as_line(v); end
2446
+
2447
+ # source://rbi//lib/rbi/printer.rb#663
2448
+ sig { returns(T::Array[::String]) }
2449
+ def sig_modifiers; end
2450
+ end
2451
+
2452
+ # source://rbi//lib/rbi/model.rb#1176
2453
+ class RBI::SigParam < ::RBI::NodeWithComments
2454
+ # source://rbi//lib/rbi/model.rb#1191
2455
+ sig do
2456
+ params(
2457
+ name: ::String,
2458
+ type: ::String,
2459
+ loc: T.nilable(::RBI::Loc),
2460
+ comments: T::Array[::RBI::Comment],
2461
+ block: T.nilable(T.proc.params(node: ::RBI::SigParam).void)
2462
+ ).void
2463
+ end
2464
+ def initialize(name, type, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
2465
+
2466
+ # source://rbi//lib/rbi/model.rb#1199
2467
+ sig { params(other: ::Object).returns(T::Boolean) }
2468
+ def ==(other); end
2469
+
2470
+ # source://rbi//lib/rbi/printer.rb#751
2471
+ sig { override.params(v: ::RBI::Printer).void }
2472
+ def accept_printer(v); end
2473
+
2474
+ # source://rbi//lib/rbi/printer.rb#764
2475
+ sig { returns(T::Array[::String]) }
2476
+ def comments_lines; end
2477
+
2478
+ # source://rbi//lib/rbi/model.rb#1180
2479
+ sig { returns(::String) }
2480
+ def name; end
2481
+
2482
+ # source://rbi//lib/rbi/printer.rb#756
2483
+ sig { params(v: ::RBI::Printer, last: T::Boolean).void }
2484
+ def print_comment_leading_space(v, last:); end
2485
+
2486
+ # @return [String]
2487
+ #
2488
+ # source://rbi//lib/rbi/model.rb#1180
2489
+ def type; end
2490
+ end
2491
+
2492
+ # source://rbi//lib/rbi/model.rb#251
2493
+ class RBI::SingletonClass < ::RBI::Scope
2494
+ # source://rbi//lib/rbi/model.rb#261
2495
+ sig do
2496
+ params(
2497
+ loc: T.nilable(::RBI::Loc),
2498
+ comments: T::Array[::RBI::Comment],
2499
+ block: T.nilable(T.proc.params(node: ::RBI::SingletonClass).void)
2500
+ ).void
2501
+ end
2502
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
2503
+
2504
+ # source://rbi//lib/rbi/model.rb#267
2505
+ sig { override.returns(::String) }
2506
+ def fully_qualified_name; end
2507
+
2508
+ # source://rbi//lib/rbi/printer.rb#321
2509
+ sig { override.params(v: ::RBI::Printer).void }
2510
+ def print_header(v); end
2511
+ end
2512
+
2513
+ # source://rbi//lib/rbi/model.rb#272
2514
+ class RBI::Struct < ::RBI::Scope
2515
+ # source://rbi//lib/rbi/model.rb#294
2516
+ sig do
2517
+ params(
2518
+ name: ::String,
2519
+ members: T::Array[::Symbol],
2520
+ keyword_init: T::Boolean,
2521
+ loc: T.nilable(::RBI::Loc),
2522
+ comments: T::Array[::RBI::Comment],
2523
+ block: T.nilable(T.proc.params(struct: ::RBI::Struct).void)
2524
+ ).void
2525
+ end
2526
+ def initialize(name, members: T.unsafe(nil), keyword_init: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
2527
+
2528
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#394
2529
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
2530
+ def compatible_with?(other); end
2531
+
2532
+ # source://rbi//lib/rbi/model.rb#303
2533
+ sig { override.returns(::String) }
2534
+ def fully_qualified_name; end
2535
+
2536
+ # source://rbi//lib/rbi/model.rb#282
2537
+ sig { returns(T::Boolean) }
2538
+ def keyword_init; end
2539
+
2540
+ # @return [Boolean]
2541
+ #
2542
+ # source://rbi//lib/rbi/model.rb#282
2543
+ def keyword_init=(_arg0); end
2544
+
2545
+ # source://rbi//lib/rbi/model.rb#279
2546
+ sig { returns(T::Array[::Symbol]) }
2547
+ def members; end
2548
+
2549
+ # @return [Array<Symbol>]
2550
+ #
2551
+ # source://rbi//lib/rbi/model.rb#279
2552
+ def members=(_arg0); end
2553
+
2554
+ # source://rbi//lib/rbi/model.rb#276
2555
+ sig { returns(::String) }
2556
+ def name; end
2557
+
2558
+ # @return [String]
2559
+ #
2560
+ # source://rbi//lib/rbi/model.rb#276
2561
+ def name=(_arg0); end
2562
+
2563
+ # source://rbi//lib/rbi/printer.rb#300
2564
+ sig { override.params(v: ::RBI::Printer).void }
2565
+ def print_header(v); end
2566
+ end
2567
+
2568
+ # Sorbet's T::Enum
2569
+ #
2570
+ # source://rbi//lib/rbi/model.rb#1317
2571
+ class RBI::TEnum < ::RBI::Class
2572
+ # source://rbi//lib/rbi/model.rb#1328
2573
+ sig do
2574
+ params(
2575
+ name: ::String,
2576
+ loc: T.nilable(::RBI::Loc),
2577
+ comments: T::Array[::RBI::Comment],
2578
+ block: T.nilable(T.proc.params(klass: ::RBI::TEnum).void)
2579
+ ).void
2580
+ end
2581
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
2582
+ end
2583
+
2584
+ # source://rbi//lib/rbi/model.rb#1334
2585
+ class RBI::TEnumBlock < ::RBI::NodeWithComments
2586
+ include ::RBI::Indexable
2587
+
2588
+ # source://rbi//lib/rbi/model.rb#1348
2589
+ sig do
2590
+ params(
2591
+ names: T::Array[::String],
2592
+ loc: T.nilable(::RBI::Loc),
2593
+ comments: T::Array[::RBI::Comment],
2594
+ block: T.nilable(T.proc.params(node: ::RBI::TEnumBlock).void)
2595
+ ).void
2596
+ end
2597
+ def initialize(names = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
2598
+
2599
+ # source://rbi//lib/rbi/model.rb#1360
2600
+ sig { params(name: ::String).void }
2601
+ def <<(name); end
2602
+
2603
+ # source://rbi//lib/rbi/printer.rb#795
2604
+ sig { override.params(v: ::RBI::Printer).void }
2605
+ def accept_printer(v); end
2606
+
2607
+ # source://rbi//lib/rbi/model.rb#1355
2608
+ sig { returns(T::Boolean) }
2609
+ def empty?; end
2610
+
2611
+ # source://rbi//lib/rbi/index.rb#223
2612
+ sig { override.returns(T::Array[::String]) }
2613
+ def index_ids; end
2614
+
2615
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#556
2616
+ sig { override.params(other: ::RBI::Node).void }
2617
+ def merge_with(other); end
2618
+
2619
+ # source://rbi//lib/rbi/model.rb#1338
2620
+ sig { returns(T::Array[::String]) }
2621
+ def names; end
2622
+
2623
+ # source://rbi//lib/rbi/model.rb#1365
2624
+ sig { override.returns(::String) }
2625
+ def to_s; end
2626
+ end
2627
+
2628
+ # Sorbet's T::Struct
2629
+ #
2630
+ # source://rbi//lib/rbi/model.rb#1206
2631
+ class RBI::TStruct < ::RBI::Class
2632
+ # source://rbi//lib/rbi/model.rb#1217
2633
+ sig do
2634
+ params(
2635
+ name: ::String,
2636
+ loc: T.nilable(::RBI::Loc),
2637
+ comments: T::Array[::RBI::Comment],
2638
+ block: T.nilable(T.proc.params(klass: ::RBI::TStruct).void)
2639
+ ).void
2640
+ end
2641
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
2642
+ end
2643
+
2644
+ # source://rbi//lib/rbi/model.rb#1255
2645
+ class RBI::TStructConst < ::RBI::TStructField
2646
+ include ::RBI::Indexable
2647
+
2648
+ # source://rbi//lib/rbi/model.rb#1268
2649
+ sig do
2650
+ params(
2651
+ name: ::String,
2652
+ type: ::String,
2653
+ default: T.nilable(::String),
2654
+ loc: T.nilable(::RBI::Loc),
2655
+ comments: T::Array[::RBI::Comment],
2656
+ block: T.nilable(T.proc.params(node: ::RBI::TStructConst).void)
2657
+ ).void
2658
+ end
2659
+ def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
2660
+
2661
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#547
2662
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
2663
+ def compatible_with?(other); end
2664
+
2665
+ # source://rbi//lib/rbi/model.rb#1274
2666
+ sig { override.returns(T::Array[::String]) }
2667
+ def fully_qualified_names; end
2668
+
2669
+ # source://rbi//lib/rbi/index.rb#203
2670
+ sig { override.returns(T::Array[::String]) }
2671
+ def index_ids; end
2672
+
2673
+ # source://rbi//lib/rbi/model.rb#1280
2674
+ sig { override.returns(::String) }
2675
+ def to_s; end
2676
+ end
2677
+
2678
+ # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
2679
+ #
2680
+ # source://rbi//lib/rbi/model.rb#1223
2681
+ class RBI::TStructField < ::RBI::NodeWithComments
2682
+ abstract!
2683
+
2684
+ # source://rbi//lib/rbi/model.rb#1244
2685
+ sig do
2686
+ params(
2687
+ name: ::String,
2688
+ type: ::String,
2689
+ default: T.nilable(::String),
2690
+ loc: T.nilable(::RBI::Loc),
2691
+ comments: T::Array[::RBI::Comment]
2692
+ ).void
2693
+ end
2694
+ def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end
2695
+
2696
+ # source://rbi//lib/rbi/printer.rb#773
2697
+ sig { override.params(v: ::RBI::Printer).void }
2698
+ def accept_printer(v); end
2699
+
2700
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#538
2701
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
2702
+ def compatible_with?(other); end
2703
+
2704
+ # source://rbi//lib/rbi/model.rb#1233
2705
+ sig { returns(T.nilable(::String)) }
2706
+ def default; end
2707
+
2708
+ # @return [String, nil]
2709
+ #
2710
+ # source://rbi//lib/rbi/model.rb#1233
2711
+ def default=(_arg0); end
2712
+
2713
+ # @abstract
2714
+ #
2715
+ # source://rbi//lib/rbi/model.rb#1252
2716
+ sig { abstract.returns(T::Array[::String]) }
2717
+ def fully_qualified_names; end
2718
+
2719
+ # source://rbi//lib/rbi/model.rb#1230
2720
+ sig { returns(::String) }
2721
+ def name; end
2722
+
2723
+ # @return [String]
2724
+ #
2725
+ # source://rbi//lib/rbi/model.rb#1230
2726
+ def name=(_arg0); end
2727
+
2728
+ # @return [String]
2729
+ #
2730
+ # source://rbi//lib/rbi/model.rb#1230
2731
+ def type; end
2732
+
2733
+ # @return [String]
2734
+ #
2735
+ # source://rbi//lib/rbi/model.rb#1230
2736
+ def type=(_arg0); end
2737
+ end
2738
+
2739
+ # source://rbi//lib/rbi/model.rb#1285
2740
+ class RBI::TStructProp < ::RBI::TStructField
2741
+ include ::RBI::Indexable
2742
+
2743
+ # source://rbi//lib/rbi/model.rb#1298
2744
+ sig do
2745
+ params(
2746
+ name: ::String,
2747
+ type: ::String,
2748
+ default: T.nilable(::String),
2749
+ loc: T.nilable(::RBI::Loc),
2750
+ comments: T::Array[::RBI::Comment],
2751
+ block: T.nilable(T.proc.params(node: ::RBI::TStructProp).void)
2752
+ ).void
2753
+ end
2754
+ def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
2755
+
2756
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#570
2757
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
2758
+ def compatible_with?(other); end
2759
+
2760
+ # source://rbi//lib/rbi/model.rb#1304
2761
+ sig { override.returns(T::Array[::String]) }
2762
+ def fully_qualified_names; end
2763
+
2764
+ # source://rbi//lib/rbi/index.rb#213
2765
+ sig { override.returns(T::Array[::String]) }
2766
+ def index_ids; end
2767
+
2768
+ # source://rbi//lib/rbi/model.rb#1310
2769
+ sig { override.returns(::String) }
2770
+ def to_s; end
2771
+ end
2772
+
2773
+ # source://rbi//lib/rbi/model.rb#106
2774
+ class RBI::Tree < ::RBI::NodeWithComments
2775
+ # source://rbi//lib/rbi/model.rb#119
2776
+ sig do
2777
+ params(
2778
+ loc: T.nilable(::RBI::Loc),
2779
+ comments: T::Array[::RBI::Comment],
2780
+ block: T.nilable(T.proc.params(node: ::RBI::Tree).void)
2781
+ ).void
2782
+ end
2783
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
2784
+
2785
+ # source://rbi//lib/rbi/model.rb#126
2786
+ sig { params(node: ::RBI::Node).void }
2787
+ def <<(node); end
2788
+
2789
+ # source://rbi//lib/rbi/printer.rb#226
2790
+ sig { override.params(v: ::RBI::Printer).void }
2791
+ def accept_printer(v); end
2792
+
2793
+ # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#66
2794
+ sig { params(with_todo_comment: T::Boolean).void }
2795
+ def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end
2796
+
2797
+ # source://rbi//lib/rbi/rewriters/annotate.rb#49
2798
+ sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void }
2799
+ def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end
2800
+
2801
+ # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#38
2802
+ sig do
2803
+ params(
2804
+ name: ::String,
2805
+ superclass_name: T.nilable(::String),
2806
+ block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)
2807
+ ).returns(::RBI::Scope)
2808
+ end
2809
+ def create_class(name, superclass_name: T.unsafe(nil), &block); end
2810
+
2811
+ # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#45
2812
+ sig { params(name: ::String, value: ::String).void }
2813
+ def create_constant(name, value:); end
2814
+
2815
+ # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#55
2816
+ sig { params(name: ::String).void }
2817
+ def create_extend(name); end
2818
+
2819
+ # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#50
2820
+ sig { params(name: ::String).void }
2821
+ def create_include(name); end
2822
+
2823
+ # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#89
2824
+ sig do
2825
+ params(
2826
+ name: ::String,
2827
+ parameters: T::Array[::RBI::TypedParam],
2828
+ return_type: ::String,
2829
+ class_method: T::Boolean,
2830
+ visibility: ::RBI::Visibility,
2831
+ comments: T::Array[::RBI::Comment]
2832
+ ).void
2833
+ end
2834
+ def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end
2835
+
2836
+ # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#113
2837
+ sig do
2838
+ params(
2839
+ name: ::String,
2840
+ sigs: T::Array[::RBI::Sig],
2841
+ parameters: T::Array[::RBI::Param],
2842
+ class_method: T::Boolean,
2843
+ visibility: ::RBI::Visibility,
2844
+ comments: T::Array[::RBI::Comment]
2845
+ ).void
2846
+ end
2847
+ def create_method_with_sigs(name, sigs:, parameters: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end
2848
+
2849
+ # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#60
2850
+ sig { params(name: ::String).void }
2851
+ def create_mixes_in_class_methods(name); end
2852
+
2853
+ # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#25
2854
+ sig { params(name: ::String, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) }
2855
+ def create_module(name, &block); end
2856
+
2857
+ # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#9
2858
+ sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) }
2859
+ def create_path(constant, &block); end
2860
+
2861
+ # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#134
2862
+ sig { params(parameters: T::Hash[T.any(::String, ::Symbol), ::String], return_type: ::String).returns(::RBI::Sig) }
2863
+ def create_sig(parameters:, return_type: T.unsafe(nil)); end
2864
+
2865
+ # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#74
2866
+ sig do
2867
+ params(
2868
+ name: ::String,
2869
+ type: ::String,
2870
+ variance: ::Symbol,
2871
+ fixed: T.nilable(::String),
2872
+ upper: T.nilable(::String),
2873
+ lower: T.nilable(::String)
2874
+ ).void
2875
+ end
2876
+ def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end
2877
+
2878
+ # source://rbi//lib/rbi/rewriters/deannotate.rb#41
2879
+ sig { params(annotation: ::String).void }
2880
+ def deannotate!(annotation); end
2881
+
2882
+ # source://rbi//lib/rbi/model.rb#132
2883
+ sig { returns(T::Boolean) }
2884
+ def empty?; end
2885
+
2886
+ # source://rbi//lib/rbi/rewriters/filter_versions.rb#118
2887
+ sig { params(version: ::Gem::Version).void }
2888
+ def filter_versions!(version); end
2889
+
2890
+ # source://rbi//lib/rbi/rewriters/group_nodes.rb#38
2891
+ sig { void }
2892
+ def group_nodes!; end
2893
+
2894
+ # source://rbi//lib/rbi/index.rb#68
2895
+ sig { returns(::RBI::Index) }
2896
+ def index; end
2897
+
2898
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#324
2899
+ sig do
2900
+ params(
2901
+ other: ::RBI::Tree,
2902
+ left_name: ::String,
2903
+ right_name: ::String,
2904
+ keep: ::RBI::Rewriters::Merge::Keep
2905
+ ).returns(::RBI::MergeTree)
2906
+ end
2907
+ def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
2908
+
2909
+ # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#46
2910
+ sig { void }
2911
+ def nest_non_public_methods!; end
2912
+
2913
+ # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#36
2914
+ sig { void }
2915
+ def nest_singleton_methods!; end
2916
+
2917
+ # source://rbi//lib/rbi/model.rb#110
2918
+ sig { returns(T::Array[::RBI::Node]) }
2919
+ def nodes; end
2920
+
2921
+ # source://rbi//lib/rbi/printer.rb#233
2922
+ sig { override.returns(T::Boolean) }
2923
+ def oneline?; end
2924
+
2925
+ # source://rbi//lib/rbi/rewriters/sort_nodes.rb#119
2926
+ sig { void }
2927
+ def sort_nodes!; end
2928
+
2929
+ private
2930
+
2931
+ # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#149
2932
+ sig { params(node: ::RBI::Node).returns(::RBI::Node) }
2933
+ def create_node(node); end
2934
+
2935
+ # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#144
2936
+ sig { returns(T::Hash[::String, ::RBI::Node]) }
2937
+ def nodes_cache; end
2938
+ end
2939
+
2940
+ # source://rbi//lib/rbi/model.rb#1398
2941
+ class RBI::TypeMember < ::RBI::NodeWithComments
2942
+ include ::RBI::Indexable
2943
+
2944
+ # source://rbi//lib/rbi/model.rb#1413
2945
+ sig do
2946
+ params(
2947
+ name: ::String,
2948
+ value: ::String,
2949
+ loc: T.nilable(::RBI::Loc),
2950
+ comments: T::Array[::RBI::Comment],
2951
+ block: T.nilable(T.proc.params(node: ::RBI::TypeMember).void)
2952
+ ).void
2953
+ end
2954
+ def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
2955
+
2956
+ # source://rbi//lib/rbi/printer.rb#812
2957
+ sig { override.params(v: ::RBI::Printer).void }
2958
+ def accept_printer(v); end
2959
+
2960
+ # source://rbi//lib/rbi/model.rb#1421
2961
+ sig { returns(::String) }
2962
+ def fully_qualified_name; end
2963
+
2964
+ # source://rbi//lib/rbi/index.rb#183
2965
+ sig { override.returns(T::Array[::String]) }
2966
+ def index_ids; end
2967
+
2968
+ # source://rbi//lib/rbi/model.rb#1402
2969
+ sig { returns(::String) }
2970
+ def name; end
2971
+
2972
+ # source://rbi//lib/rbi/model.rb#1428
2973
+ sig { override.returns(::String) }
2974
+ def to_s; end
2975
+
2976
+ # @return [String]
2977
+ #
2978
+ # source://rbi//lib/rbi/model.rb#1402
2979
+ def value; end
2980
+ end
2981
+
2982
+ # source://rbi//lib/rbi/parser.rb#20
2983
+ class RBI::UnexpectedParserError < ::StandardError
2984
+ # source://rbi//lib/rbi/parser.rb#27
2985
+ sig { params(parent_exception: ::Exception, last_location: ::RBI::Loc).void }
2986
+ def initialize(parent_exception, last_location); end
2987
+
2988
+ # source://rbi//lib/rbi/parser.rb#24
2989
+ sig { returns(::RBI::Loc) }
2990
+ def last_location; end
2991
+
2992
+ # source://rbi//lib/rbi/parser.rb#34
2993
+ sig { params(io: T.any(::IO, ::StringIO)).void }
2994
+ def print_debug(io: T.unsafe(nil)); end
2995
+ end
2996
+
2997
+ # source://rbi//lib/rbi/version.rb#5
2998
+ RBI::VERSION = T.let(T.unsafe(nil), String)
2999
+
3000
+ # Visibility
3001
+ #
3002
+ # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
3003
+ #
3004
+ # source://rbi//lib/rbi/model.rb#914
3005
+ class RBI::Visibility < ::RBI::NodeWithComments
3006
+ abstract!
3007
+
3008
+ # source://rbi//lib/rbi/model.rb#924
3009
+ sig { params(visibility: ::Symbol, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void }
3010
+ def initialize(visibility, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
3011
+
3012
+ # source://rbi//lib/rbi/model.rb#930
3013
+ sig { params(other: ::RBI::Visibility).returns(T::Boolean) }
3014
+ def ==(other); end
3015
+
3016
+ # source://rbi//lib/rbi/printer.rb#579
3017
+ sig { override.params(v: ::RBI::Printer).void }
3018
+ def accept_printer(v); end
3019
+
3020
+ # source://rbi//lib/rbi/model.rb#945
3021
+ sig { returns(T::Boolean) }
3022
+ def private?; end
3023
+
3024
+ # source://rbi//lib/rbi/model.rb#940
3025
+ sig { returns(T::Boolean) }
3026
+ def protected?; end
3027
+
3028
+ # source://rbi//lib/rbi/model.rb#935
3029
+ sig { returns(T::Boolean) }
3030
+ def public?; end
3031
+
3032
+ # source://rbi//lib/rbi/model.rb#921
3033
+ sig { returns(::Symbol) }
3034
+ def visibility; end
3035
+ end
3036
+
3037
+ # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#52
3038
+ class RBI::VisibilityGroup < ::RBI::Tree
3039
+ # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#59
3040
+ sig { params(visibility: ::RBI::Visibility).void }
3041
+ def initialize(visibility); end
3042
+
3043
+ # source://rbi//lib/rbi/printer.rb#848
3044
+ sig { override.params(v: ::RBI::Printer).void }
3045
+ def accept_printer(v); end
3046
+
3047
+ # source://rbi//lib/rbi/printer.rb#861
3048
+ sig { override.returns(T::Boolean) }
3049
+ def oneline?; end
3050
+
3051
+ # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#56
3052
+ sig { returns(::RBI::Visibility) }
3053
+ def visibility; end
3054
+ end
3055
+
3056
+ # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
3057
+ #
3058
+ # source://rbi//lib/rbi/visitor.rb#5
3059
+ class RBI::Visitor
3060
+ abstract!
3061
+
3062
+ # @abstract
3063
+ #
3064
+ # source://rbi//lib/rbi/visitor.rb#12
3065
+ sig { abstract.params(node: T.nilable(::RBI::Node)).void }
3066
+ def visit(node); end
3067
+
3068
+ # source://rbi//lib/rbi/visitor.rb#15
3069
+ sig { params(nodes: T::Array[::RBI::Node]).void }
3070
+ def visit_all(nodes); end
3071
+ end