sorbet-result 1.0.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.standard.yml +6 -0
- data/.tool-versions +1 -1
- data/CHANGELOG.md +21 -0
- data/Gemfile +3 -5
- data/Gemfile.lock +79 -64
- data/README.md +25 -2
- data/Rakefile +3 -5
- data/lib/minitest/result_assertions.rb +48 -0
- data/lib/sorbet-result.rb +1 -5
- data/lib/typed/result.rb +199 -7
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +1 -0
- data/sorbet/rbi/gems/erubi@1.13.0.rbi +150 -0
- data/sorbet/rbi/gems/{io-console@0.6.0.rbi → io-console@0.7.2.rbi} +1 -0
- data/sorbet/rbi/gems/{json@2.6.3.rbi → json@2.7.5.rbi} +168 -72
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14238 -0
- data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +240 -0
- data/sorbet/rbi/gems/{minitest@5.18.1.rbi → minitest@5.25.1.rbi} +337 -282
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +1 -0
- data/sorbet/rbi/gems/{parallel@1.23.0.rbi → parallel@1.26.3.rbi} +38 -20
- data/sorbet/rbi/gems/{parser@3.2.2.3.rbi → parser@3.3.5.1.rbi} +663 -2397
- data/sorbet/rbi/gems/prism@1.2.0.rbi +39085 -0
- data/sorbet/rbi/gems/psych@5.1.2.rbi +1732 -0
- data/sorbet/rbi/gems/{racc@1.7.1.rbi → racc@1.8.1.rbi} +37 -36
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +1 -0
- data/sorbet/rbi/gems/{rake@13.0.6.rbi → rake@13.2.1.rbi} +79 -75
- data/sorbet/rbi/gems/rbi@0.2.1.rbi +4535 -0
- data/sorbet/rbi/gems/{regexp_parser@2.8.1.rbi → regexp_parser@2.9.2.rbi} +190 -167
- data/sorbet/rbi/gems/{reline@0.3.5.rbi → reline@0.5.10.rbi} +1 -0
- data/sorbet/rbi/gems/{rubocop-ast@1.29.0.rbi → rubocop-ast@1.33.1.rbi} +1220 -748
- data/sorbet/rbi/gems/rubocop-performance@1.22.1.rbi +9 -0
- data/sorbet/rbi/gems/rubocop-sorbet@0.7.8.rbi +9 -0
- data/sorbet/rbi/gems/{rubocop@1.52.1.rbi → rubocop@1.66.1.rbi} +6236 -3446
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1 -0
- data/sorbet/rbi/gems/spoom@1.5.0.rbi +4932 -0
- data/sorbet/rbi/gems/standard-custom@1.0.2.rbi +9 -0
- data/sorbet/rbi/gems/standard-performance@1.5.0.rbi +9 -0
- data/sorbet/rbi/gems/standard-sorbet@0.0.2.rbi +53 -0
- data/sorbet/rbi/gems/standard@1.41.1.rbi +926 -0
- data/sorbet/rbi/gems/stringio@3.1.1.rbi +9 -0
- data/sorbet/rbi/gems/{tapioca@0.11.6.rbi → tapioca@0.16.3.rbi} +937 -635
- data/sorbet/rbi/gems/{thor@1.2.2.rbi → thor@1.3.2.rbi} +832 -419
- data/sorbet/rbi/gems/{unicode-display_width@2.4.2.rbi → unicode-display_width@2.6.0.rbi} +1 -0
- data/sorbet/rbi/gems/{yard-sorbet@0.8.1.rbi → yard-sorbet@0.9.0.rbi} +36 -29
- data/sorbet/rbi/gems/{yard@0.9.34.rbi → yard@0.9.37.rbi} +431 -271
- data/sorbet/tapioca/config.yml +3 -12
- data/sorbet/tapioca/require.rb +0 -1
- metadata +37 -47
- data/.rubocop.yml +0 -33
- data/lib/typed/failure.rb +0 -81
- data/lib/typed/success.rb +0 -80
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +0 -1083
- data/sorbet/rbi/gems/irb@1.7.0.rbi +0 -342
- data/sorbet/rbi/gems/rbi@0.0.16.rbi +0 -3008
- data/sorbet/rbi/gems/rexml@3.2.5.rbi +0 -4717
- data/sorbet/rbi/gems/rubocop-minitest@0.31.0.rbi +0 -2528
- data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +0 -328
- data/sorbet/rbi/gems/rubocop-sorbet@0.7.0.rbi +0 -1043
- data/sorbet/rbi/gems/spoom@1.2.1.rbi +0 -2503
- data/sorbet/rbi/gems/unparser@0.6.8.rbi +0 -4525
- data/sorbet/rbi/gems/zeitwerk@2.6.8.rbi +0 -986
@@ -0,0 +1,4535 @@
|
|
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
|
+
|
8
|
+
# source://rbi//lib/rbi.rb#7
|
9
|
+
module RBI; end
|
10
|
+
|
11
|
+
# source://rbi//lib/rbi/model.rb#1045
|
12
|
+
class RBI::Arg < ::RBI::Node
|
13
|
+
# source://rbi//lib/rbi/model.rb#1057
|
14
|
+
sig { params(value: ::String, loc: T.nilable(::RBI::Loc)).void }
|
15
|
+
def initialize(value, loc: T.unsafe(nil)); end
|
16
|
+
|
17
|
+
# source://rbi//lib/rbi/model.rb#1063
|
18
|
+
sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
|
19
|
+
def ==(other); end
|
20
|
+
|
21
|
+
# source://rbi//lib/rbi/model.rb#1068
|
22
|
+
sig { returns(::String) }
|
23
|
+
def to_s; end
|
24
|
+
|
25
|
+
# source://rbi//lib/rbi/model.rb#1049
|
26
|
+
sig { returns(::String) }
|
27
|
+
def value; end
|
28
|
+
end
|
29
|
+
|
30
|
+
# Attributes
|
31
|
+
#
|
32
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
33
|
+
#
|
34
|
+
# source://rbi//lib/rbi/model.rb#351
|
35
|
+
class RBI::Attr < ::RBI::NodeWithComments
|
36
|
+
include ::RBI::Indexable
|
37
|
+
|
38
|
+
abstract!
|
39
|
+
|
40
|
+
# source://rbi//lib/rbi/model.rb#376
|
41
|
+
sig do
|
42
|
+
params(
|
43
|
+
name: ::Symbol,
|
44
|
+
names: T::Array[::Symbol],
|
45
|
+
visibility: ::RBI::Visibility,
|
46
|
+
sigs: T::Array[::RBI::Sig],
|
47
|
+
loc: T.nilable(::RBI::Loc),
|
48
|
+
comments: T::Array[::RBI::Comment]
|
49
|
+
).void
|
50
|
+
end
|
51
|
+
def initialize(name, names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end
|
52
|
+
|
53
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#420
|
54
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
55
|
+
def compatible_with?(other); end
|
56
|
+
|
57
|
+
# @abstract
|
58
|
+
#
|
59
|
+
# source://rbi//lib/rbi/rewriters/attr_to_methods.rb#61
|
60
|
+
sig { abstract.returns(T::Array[::RBI::Method]) }
|
61
|
+
def convert_to_methods; end
|
62
|
+
|
63
|
+
# @abstract
|
64
|
+
#
|
65
|
+
# source://rbi//lib/rbi/model.rb#384
|
66
|
+
sig { abstract.returns(T::Array[::String]) }
|
67
|
+
def fully_qualified_names; end
|
68
|
+
|
69
|
+
# source://rbi//lib/rbi/index.rb#113
|
70
|
+
sig { override.returns(T::Array[::String]) }
|
71
|
+
def index_ids; end
|
72
|
+
|
73
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#428
|
74
|
+
sig { override.params(other: ::RBI::Node).void }
|
75
|
+
def merge_with(other); end
|
76
|
+
|
77
|
+
# source://rbi//lib/rbi/model.rb#358
|
78
|
+
sig { returns(T::Array[::Symbol]) }
|
79
|
+
def names; end
|
80
|
+
|
81
|
+
# source://rbi//lib/rbi/model.rb#364
|
82
|
+
sig { returns(T::Array[::RBI::Sig]) }
|
83
|
+
def sigs; end
|
84
|
+
|
85
|
+
# source://rbi//lib/rbi/model.rb#361
|
86
|
+
sig { returns(::RBI::Visibility) }
|
87
|
+
def visibility; end
|
88
|
+
|
89
|
+
# @return [Visibility]
|
90
|
+
#
|
91
|
+
# source://rbi//lib/rbi/model.rb#361
|
92
|
+
def visibility=(_arg0); end
|
93
|
+
|
94
|
+
private
|
95
|
+
|
96
|
+
# source://rbi//lib/rbi/rewriters/attr_to_methods.rb#89
|
97
|
+
sig do
|
98
|
+
params(
|
99
|
+
name: ::String,
|
100
|
+
sig: T.nilable(::RBI::Sig),
|
101
|
+
visibility: ::RBI::Visibility,
|
102
|
+
loc: T.nilable(::RBI::Loc),
|
103
|
+
comments: T::Array[::RBI::Comment]
|
104
|
+
).returns(::RBI::Method)
|
105
|
+
end
|
106
|
+
def create_getter_method(name, sig, visibility, loc, comments); end
|
107
|
+
|
108
|
+
# source://rbi//lib/rbi/rewriters/attr_to_methods.rb#110
|
109
|
+
sig do
|
110
|
+
params(
|
111
|
+
name: ::String,
|
112
|
+
sig: T.nilable(::RBI::Sig),
|
113
|
+
attribute_type: T.nilable(T.any(::RBI::Type, ::String)),
|
114
|
+
visibility: ::RBI::Visibility,
|
115
|
+
loc: T.nilable(::RBI::Loc),
|
116
|
+
comments: T::Array[::RBI::Comment]
|
117
|
+
).returns(::RBI::Method)
|
118
|
+
end
|
119
|
+
def create_setter_method(name, sig, attribute_type, visibility, loc, comments); end
|
120
|
+
|
121
|
+
# @raise [UnexpectedMultipleSigsError]
|
122
|
+
#
|
123
|
+
# source://rbi//lib/rbi/rewriters/attr_to_methods.rb#66
|
124
|
+
sig(:final) { returns([T.nilable(::RBI::Sig), T.nilable(T.any(::RBI::Type, ::String))]) }
|
125
|
+
def parse_sig; end
|
126
|
+
end
|
127
|
+
|
128
|
+
# source://rbi//lib/rbi/model.rb#387
|
129
|
+
class RBI::AttrAccessor < ::RBI::Attr
|
130
|
+
# source://rbi//lib/rbi/model.rb#401
|
131
|
+
sig do
|
132
|
+
params(
|
133
|
+
name: ::Symbol,
|
134
|
+
names: ::Symbol,
|
135
|
+
visibility: ::RBI::Visibility,
|
136
|
+
sigs: T::Array[::RBI::Sig],
|
137
|
+
loc: T.nilable(::RBI::Loc),
|
138
|
+
comments: T::Array[::RBI::Comment],
|
139
|
+
block: T.nilable(T.proc.params(node: ::RBI::AttrAccessor).void)
|
140
|
+
).void
|
141
|
+
end
|
142
|
+
def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
143
|
+
|
144
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#460
|
145
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
146
|
+
def compatible_with?(other); end
|
147
|
+
|
148
|
+
# source://rbi//lib/rbi/rewriters/attr_to_methods.rb#140
|
149
|
+
sig { override.returns(T::Array[::RBI::Method]) }
|
150
|
+
def convert_to_methods; end
|
151
|
+
|
152
|
+
# source://rbi//lib/rbi/model.rb#407
|
153
|
+
sig { override.returns(T::Array[::String]) }
|
154
|
+
def fully_qualified_names; end
|
155
|
+
|
156
|
+
# source://rbi//lib/rbi/model.rb#413
|
157
|
+
sig { override.returns(::String) }
|
158
|
+
def to_s; end
|
159
|
+
end
|
160
|
+
|
161
|
+
# source://rbi//lib/rbi/model.rb#419
|
162
|
+
class RBI::AttrReader < ::RBI::Attr
|
163
|
+
# source://rbi//lib/rbi/model.rb#433
|
164
|
+
sig do
|
165
|
+
params(
|
166
|
+
name: ::Symbol,
|
167
|
+
names: ::Symbol,
|
168
|
+
visibility: ::RBI::Visibility,
|
169
|
+
sigs: T::Array[::RBI::Sig],
|
170
|
+
loc: T.nilable(::RBI::Loc),
|
171
|
+
comments: T::Array[::RBI::Comment],
|
172
|
+
block: T.nilable(T.proc.params(node: ::RBI::AttrReader).void)
|
173
|
+
).void
|
174
|
+
end
|
175
|
+
def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
176
|
+
|
177
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#442
|
178
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
179
|
+
def compatible_with?(other); end
|
180
|
+
|
181
|
+
# source://rbi//lib/rbi/rewriters/attr_to_methods.rb#154
|
182
|
+
sig { override.returns(T::Array[::RBI::Method]) }
|
183
|
+
def convert_to_methods; end
|
184
|
+
|
185
|
+
# source://rbi//lib/rbi/model.rb#439
|
186
|
+
sig { override.returns(T::Array[::String]) }
|
187
|
+
def fully_qualified_names; end
|
188
|
+
|
189
|
+
# source://rbi//lib/rbi/model.rb#445
|
190
|
+
sig { override.returns(::String) }
|
191
|
+
def to_s; end
|
192
|
+
end
|
193
|
+
|
194
|
+
# source://rbi//lib/rbi/model.rb#451
|
195
|
+
class RBI::AttrWriter < ::RBI::Attr
|
196
|
+
# source://rbi//lib/rbi/model.rb#465
|
197
|
+
sig do
|
198
|
+
params(
|
199
|
+
name: ::Symbol,
|
200
|
+
names: ::Symbol,
|
201
|
+
visibility: ::RBI::Visibility,
|
202
|
+
sigs: T::Array[::RBI::Sig],
|
203
|
+
loc: T.nilable(::RBI::Loc),
|
204
|
+
comments: T::Array[::RBI::Comment],
|
205
|
+
block: T.nilable(T.proc.params(node: ::RBI::AttrWriter).void)
|
206
|
+
).void
|
207
|
+
end
|
208
|
+
def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
209
|
+
|
210
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#451
|
211
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
212
|
+
def compatible_with?(other); end
|
213
|
+
|
214
|
+
# source://rbi//lib/rbi/rewriters/attr_to_methods.rb#163
|
215
|
+
sig { override.returns(T::Array[::RBI::Method]) }
|
216
|
+
def convert_to_methods; end
|
217
|
+
|
218
|
+
# source://rbi//lib/rbi/model.rb#471
|
219
|
+
sig { override.returns(T::Array[::String]) }
|
220
|
+
def fully_qualified_names; end
|
221
|
+
|
222
|
+
# source://rbi//lib/rbi/model.rb#477
|
223
|
+
sig { override.returns(::String) }
|
224
|
+
def to_s; end
|
225
|
+
end
|
226
|
+
|
227
|
+
# An arbitrary blank line that can be added both in trees and comments
|
228
|
+
#
|
229
|
+
# source://rbi//lib/rbi/model.rb#76
|
230
|
+
class RBI::BlankLine < ::RBI::Comment
|
231
|
+
# source://rbi//lib/rbi/model.rb#80
|
232
|
+
sig { params(loc: T.nilable(::RBI::Loc)).void }
|
233
|
+
def initialize(loc: T.unsafe(nil)); end
|
234
|
+
end
|
235
|
+
|
236
|
+
# source://rbi//lib/rbi/model.rb#816
|
237
|
+
class RBI::BlockParam < ::RBI::Param
|
238
|
+
# source://rbi//lib/rbi/model.rb#827
|
239
|
+
sig do
|
240
|
+
params(
|
241
|
+
name: ::String,
|
242
|
+
loc: T.nilable(::RBI::Loc),
|
243
|
+
comments: T::Array[::RBI::Comment],
|
244
|
+
block: T.nilable(T.proc.params(node: ::RBI::BlockParam).void)
|
245
|
+
).void
|
246
|
+
end
|
247
|
+
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
248
|
+
|
249
|
+
# source://rbi//lib/rbi/model.rb#838
|
250
|
+
sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
|
251
|
+
def ==(other); end
|
252
|
+
|
253
|
+
# source://rbi//lib/rbi/model.rb#833
|
254
|
+
sig { override.returns(::String) }
|
255
|
+
def to_s; end
|
256
|
+
end
|
257
|
+
|
258
|
+
# source://rbi//lib/rbi/model.rb#220
|
259
|
+
class RBI::Class < ::RBI::Scope
|
260
|
+
# source://rbi//lib/rbi/model.rb#238
|
261
|
+
sig do
|
262
|
+
params(
|
263
|
+
name: ::String,
|
264
|
+
superclass_name: T.nilable(::String),
|
265
|
+
loc: T.nilable(::RBI::Loc),
|
266
|
+
comments: T::Array[::RBI::Comment],
|
267
|
+
block: T.nilable(T.proc.params(node: ::RBI::Class).void)
|
268
|
+
).void
|
269
|
+
end
|
270
|
+
def initialize(name, superclass_name: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
271
|
+
|
272
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#384
|
273
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
274
|
+
def compatible_with?(other); end
|
275
|
+
|
276
|
+
# source://rbi//lib/rbi/model.rb#246
|
277
|
+
sig { override.returns(::String) }
|
278
|
+
def fully_qualified_name; end
|
279
|
+
|
280
|
+
# source://rbi//lib/rbi/model.rb#224
|
281
|
+
sig { returns(::String) }
|
282
|
+
def name; end
|
283
|
+
|
284
|
+
# @return [String]
|
285
|
+
#
|
286
|
+
# source://rbi//lib/rbi/model.rb#224
|
287
|
+
def name=(_arg0); end
|
288
|
+
|
289
|
+
# source://rbi//lib/rbi/model.rb#227
|
290
|
+
sig { returns(T.nilable(::String)) }
|
291
|
+
def superclass_name; end
|
292
|
+
|
293
|
+
# @return [String, nil]
|
294
|
+
#
|
295
|
+
# source://rbi//lib/rbi/model.rb#227
|
296
|
+
def superclass_name=(_arg0); end
|
297
|
+
end
|
298
|
+
|
299
|
+
# source://rbi//lib/rbi/model.rb#55
|
300
|
+
class RBI::Comment < ::RBI::Node
|
301
|
+
# source://rbi//lib/rbi/model.rb#62
|
302
|
+
sig { params(text: ::String, loc: T.nilable(::RBI::Loc)).void }
|
303
|
+
def initialize(text, loc: T.unsafe(nil)); end
|
304
|
+
|
305
|
+
# source://rbi//lib/rbi/model.rb#68
|
306
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
307
|
+
def ==(other); end
|
308
|
+
|
309
|
+
# source://rbi//lib/rbi/model.rb#59
|
310
|
+
sig { returns(::String) }
|
311
|
+
def text; end
|
312
|
+
|
313
|
+
# @return [String]
|
314
|
+
#
|
315
|
+
# source://rbi//lib/rbi/model.rb#59
|
316
|
+
def text=(_arg0); end
|
317
|
+
end
|
318
|
+
|
319
|
+
# A tree showing incompatibles nodes
|
320
|
+
#
|
321
|
+
# Is rendered as a merge conflict between `left` and` right`:
|
322
|
+
# ~~~rb
|
323
|
+
# class Foo
|
324
|
+
# <<<<<<< left
|
325
|
+
# def m1; end
|
326
|
+
# def m2(a); end
|
327
|
+
# =======
|
328
|
+
# def m1(a); end
|
329
|
+
# def m2; end
|
330
|
+
# >>>>>>> right
|
331
|
+
# end
|
332
|
+
# ~~~
|
333
|
+
#
|
334
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#583
|
335
|
+
class RBI::ConflictTree < ::RBI::Tree
|
336
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#593
|
337
|
+
sig { params(left_name: ::String, right_name: ::String).void }
|
338
|
+
def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end
|
339
|
+
|
340
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#587
|
341
|
+
sig { returns(::RBI::Tree) }
|
342
|
+
def left; end
|
343
|
+
|
344
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#590
|
345
|
+
sig { returns(::String) }
|
346
|
+
def left_name; end
|
347
|
+
|
348
|
+
# @return [Tree]
|
349
|
+
#
|
350
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#587
|
351
|
+
def right; end
|
352
|
+
|
353
|
+
# @return [String]
|
354
|
+
#
|
355
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#590
|
356
|
+
def right_name; end
|
357
|
+
end
|
358
|
+
|
359
|
+
# Consts
|
360
|
+
#
|
361
|
+
# source://rbi//lib/rbi/model.rb#314
|
362
|
+
class RBI::Const < ::RBI::NodeWithComments
|
363
|
+
include ::RBI::Indexable
|
364
|
+
|
365
|
+
# source://rbi//lib/rbi/model.rb#329
|
366
|
+
sig do
|
367
|
+
params(
|
368
|
+
name: ::String,
|
369
|
+
value: ::String,
|
370
|
+
loc: T.nilable(::RBI::Loc),
|
371
|
+
comments: T::Array[::RBI::Comment],
|
372
|
+
block: T.nilable(T.proc.params(node: ::RBI::Const).void)
|
373
|
+
).void
|
374
|
+
end
|
375
|
+
def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
376
|
+
|
377
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#411
|
378
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
379
|
+
def compatible_with?(other); end
|
380
|
+
|
381
|
+
# source://rbi//lib/rbi/model.rb#337
|
382
|
+
sig { returns(::String) }
|
383
|
+
def fully_qualified_name; end
|
384
|
+
|
385
|
+
# source://rbi//lib/rbi/index.rb#103
|
386
|
+
sig { override.returns(T::Array[::String]) }
|
387
|
+
def index_ids; end
|
388
|
+
|
389
|
+
# source://rbi//lib/rbi/model.rb#318
|
390
|
+
sig { returns(::String) }
|
391
|
+
def name; end
|
392
|
+
|
393
|
+
# source://rbi//lib/rbi/model.rb#344
|
394
|
+
sig { override.returns(::String) }
|
395
|
+
def to_s; end
|
396
|
+
|
397
|
+
# @return [String]
|
398
|
+
#
|
399
|
+
# source://rbi//lib/rbi/model.rb#318
|
400
|
+
def value; end
|
401
|
+
end
|
402
|
+
|
403
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#351
|
404
|
+
class RBI::DuplicateNodeError < ::RBI::Error; end
|
405
|
+
|
406
|
+
# source://rbi//lib/rbi.rb#8
|
407
|
+
class RBI::Error < ::StandardError; end
|
408
|
+
|
409
|
+
# source://rbi//lib/rbi/model.rb#891
|
410
|
+
class RBI::Extend < ::RBI::Mixin
|
411
|
+
include ::RBI::Indexable
|
412
|
+
|
413
|
+
# source://rbi//lib/rbi/model.rb#903
|
414
|
+
sig do
|
415
|
+
params(
|
416
|
+
name: ::String,
|
417
|
+
names: ::String,
|
418
|
+
loc: T.nilable(::RBI::Loc),
|
419
|
+
comments: T::Array[::RBI::Comment],
|
420
|
+
block: T.nilable(T.proc.params(node: ::RBI::Extend).void)
|
421
|
+
).void
|
422
|
+
end
|
423
|
+
def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
424
|
+
|
425
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#510
|
426
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
427
|
+
def compatible_with?(other); end
|
428
|
+
|
429
|
+
# source://rbi//lib/rbi/index.rb#143
|
430
|
+
sig { override.returns(T::Array[::String]) }
|
431
|
+
def index_ids; end
|
432
|
+
|
433
|
+
# source://rbi//lib/rbi/model.rb#909
|
434
|
+
sig { override.returns(::String) }
|
435
|
+
def to_s; end
|
436
|
+
end
|
437
|
+
|
438
|
+
# source://rbi//lib/rbi/model.rb#139
|
439
|
+
class RBI::File
|
440
|
+
# source://rbi//lib/rbi/model.rb#158
|
441
|
+
sig do
|
442
|
+
params(
|
443
|
+
strictness: T.nilable(::String),
|
444
|
+
comments: T::Array[::RBI::Comment],
|
445
|
+
block: T.nilable(T.proc.params(file: ::RBI::File).void)
|
446
|
+
).void
|
447
|
+
end
|
448
|
+
def initialize(strictness: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
449
|
+
|
450
|
+
# source://rbi//lib/rbi/model.rb#166
|
451
|
+
sig { params(node: ::RBI::Node).void }
|
452
|
+
def <<(node); end
|
453
|
+
|
454
|
+
# source://rbi//lib/rbi/model.rb#149
|
455
|
+
sig { returns(T::Array[::RBI::Comment]) }
|
456
|
+
def comments; end
|
457
|
+
|
458
|
+
# @return [Array<Comment>]
|
459
|
+
#
|
460
|
+
# source://rbi//lib/rbi/model.rb#149
|
461
|
+
def comments=(_arg0); end
|
462
|
+
|
463
|
+
# source://rbi//lib/rbi/model.rb#171
|
464
|
+
sig { returns(T::Boolean) }
|
465
|
+
def empty?; end
|
466
|
+
|
467
|
+
# source://rbi//lib/rbi/printer.rb#743
|
468
|
+
sig do
|
469
|
+
params(
|
470
|
+
out: T.any(::IO, ::StringIO),
|
471
|
+
indent: ::Integer,
|
472
|
+
print_locs: T::Boolean,
|
473
|
+
max_line_length: T.nilable(::Integer)
|
474
|
+
).void
|
475
|
+
end
|
476
|
+
def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
|
477
|
+
|
478
|
+
# source://rbi//lib/rbi/rbs_printer.rb#996
|
479
|
+
sig { params(out: T.any(::IO, ::StringIO), indent: ::Integer, print_locs: T::Boolean).void }
|
480
|
+
def rbs_print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end
|
481
|
+
|
482
|
+
# source://rbi//lib/rbi/rbs_printer.rb#1002
|
483
|
+
sig { params(indent: ::Integer, print_locs: T::Boolean).returns(::String) }
|
484
|
+
def rbs_string(indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end
|
485
|
+
|
486
|
+
# source://rbi//lib/rbi/model.rb#143
|
487
|
+
sig { returns(::RBI::Tree) }
|
488
|
+
def root; end
|
489
|
+
|
490
|
+
# @return [Tree]
|
491
|
+
#
|
492
|
+
# source://rbi//lib/rbi/model.rb#143
|
493
|
+
def root=(_arg0); end
|
494
|
+
|
495
|
+
# source://rbi//lib/rbi/model.rb#146
|
496
|
+
sig { returns(T.nilable(::String)) }
|
497
|
+
def strictness; end
|
498
|
+
|
499
|
+
# @return [String, nil]
|
500
|
+
#
|
501
|
+
# source://rbi//lib/rbi/model.rb#146
|
502
|
+
def strictness=(_arg0); end
|
503
|
+
|
504
|
+
# source://rbi//lib/rbi/printer.rb#749
|
505
|
+
sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) }
|
506
|
+
def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
|
507
|
+
end
|
508
|
+
|
509
|
+
# source://rbi//lib/rbi/formatter.rb#5
|
510
|
+
class RBI::Formatter
|
511
|
+
# source://rbi//lib/rbi/formatter.rb#24
|
512
|
+
sig do
|
513
|
+
params(
|
514
|
+
add_sig_templates: T::Boolean,
|
515
|
+
group_nodes: T::Boolean,
|
516
|
+
max_line_length: T.nilable(::Integer),
|
517
|
+
nest_singleton_methods: T::Boolean,
|
518
|
+
nest_non_public_members: T::Boolean,
|
519
|
+
sort_nodes: T::Boolean
|
520
|
+
).void
|
521
|
+
end
|
522
|
+
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_members: T.unsafe(nil), sort_nodes: T.unsafe(nil)); end
|
523
|
+
|
524
|
+
# source://rbi//lib/rbi/formatter.rb#47
|
525
|
+
sig { params(file: ::RBI::File).void }
|
526
|
+
def format_file(file); end
|
527
|
+
|
528
|
+
# source://rbi//lib/rbi/formatter.rb#52
|
529
|
+
sig { params(tree: ::RBI::Tree).void }
|
530
|
+
def format_tree(tree); end
|
531
|
+
|
532
|
+
# source://rbi//lib/rbi/formatter.rb#12
|
533
|
+
sig { returns(T.nilable(::Integer)) }
|
534
|
+
def max_line_length; end
|
535
|
+
|
536
|
+
# @return [Integer, nil]
|
537
|
+
#
|
538
|
+
# source://rbi//lib/rbi/formatter.rb#12
|
539
|
+
def max_line_length=(_arg0); end
|
540
|
+
|
541
|
+
# source://rbi//lib/rbi/formatter.rb#41
|
542
|
+
sig { params(file: ::RBI::File).returns(::String) }
|
543
|
+
def print_file(file); end
|
544
|
+
|
545
|
+
# source://rbi//lib/rbi/formatter.rb#9
|
546
|
+
sig { params(sort_nodes: T::Boolean).returns(T::Boolean) }
|
547
|
+
def sort_nodes=(sort_nodes); end
|
548
|
+
end
|
549
|
+
|
550
|
+
# source://rbi//lib/rbi/rewriters/group_nodes.rb#87
|
551
|
+
class RBI::Group < ::RBI::Tree
|
552
|
+
# source://rbi//lib/rbi/rewriters/group_nodes.rb#94
|
553
|
+
sig { params(kind: ::RBI::Group::Kind).void }
|
554
|
+
def initialize(kind); end
|
555
|
+
|
556
|
+
# source://rbi//lib/rbi/rewriters/group_nodes.rb#91
|
557
|
+
sig { returns(::RBI::Group::Kind) }
|
558
|
+
def kind; end
|
559
|
+
end
|
560
|
+
|
561
|
+
# source://rbi//lib/rbi/rewriters/group_nodes.rb#99
|
562
|
+
class RBI::Group::Kind < ::T::Enum
|
563
|
+
enums do
|
564
|
+
Attrs = new
|
565
|
+
Consts = new
|
566
|
+
Helpers = new
|
567
|
+
Inits = new
|
568
|
+
Methods = new
|
569
|
+
MixesInClassMethods = new
|
570
|
+
Mixins = new
|
571
|
+
RequiredAncestors = new
|
572
|
+
Sends = new
|
573
|
+
SingletonClasses = new
|
574
|
+
TEnums = new
|
575
|
+
TStructFields = new
|
576
|
+
TypeMembers = new
|
577
|
+
end
|
578
|
+
end
|
579
|
+
|
580
|
+
# source://rbi//lib/rbi/rewriters/group_nodes.rb#5
|
581
|
+
class RBI::GroupNodesError < ::RBI::Error; end
|
582
|
+
|
583
|
+
# Sorbet's misc.
|
584
|
+
#
|
585
|
+
# source://rbi//lib/rbi/model.rb#1374
|
586
|
+
class RBI::Helper < ::RBI::NodeWithComments
|
587
|
+
include ::RBI::Indexable
|
588
|
+
|
589
|
+
# source://rbi//lib/rbi/model.rb#1388
|
590
|
+
sig do
|
591
|
+
params(
|
592
|
+
name: ::String,
|
593
|
+
loc: T.nilable(::RBI::Loc),
|
594
|
+
comments: T::Array[::RBI::Comment],
|
595
|
+
block: T.nilable(T.proc.params(node: ::RBI::Helper).void)
|
596
|
+
).void
|
597
|
+
end
|
598
|
+
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
599
|
+
|
600
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#528
|
601
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
602
|
+
def compatible_with?(other); end
|
603
|
+
|
604
|
+
# source://rbi//lib/rbi/index.rb#173
|
605
|
+
sig { override.returns(T::Array[::String]) }
|
606
|
+
def index_ids; end
|
607
|
+
|
608
|
+
# source://rbi//lib/rbi/model.rb#1378
|
609
|
+
sig { returns(::String) }
|
610
|
+
def name; end
|
611
|
+
|
612
|
+
# source://rbi//lib/rbi/model.rb#1395
|
613
|
+
sig { override.returns(::String) }
|
614
|
+
def to_s; end
|
615
|
+
end
|
616
|
+
|
617
|
+
# source://rbi//lib/rbi/model.rb#868
|
618
|
+
class RBI::Include < ::RBI::Mixin
|
619
|
+
include ::RBI::Indexable
|
620
|
+
|
621
|
+
# source://rbi//lib/rbi/model.rb#880
|
622
|
+
sig do
|
623
|
+
params(
|
624
|
+
name: ::String,
|
625
|
+
names: ::String,
|
626
|
+
loc: T.nilable(::RBI::Loc),
|
627
|
+
comments: T::Array[::RBI::Comment],
|
628
|
+
block: T.nilable(T.proc.params(node: ::RBI::Include).void)
|
629
|
+
).void
|
630
|
+
end
|
631
|
+
def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
632
|
+
|
633
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#501
|
634
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
635
|
+
def compatible_with?(other); end
|
636
|
+
|
637
|
+
# source://rbi//lib/rbi/index.rb#133
|
638
|
+
sig { override.returns(T::Array[::String]) }
|
639
|
+
def index_ids; end
|
640
|
+
|
641
|
+
# source://rbi//lib/rbi/model.rb#886
|
642
|
+
sig { override.returns(::String) }
|
643
|
+
def to_s; end
|
644
|
+
end
|
645
|
+
|
646
|
+
# source://rbi//lib/rbi/index.rb#5
|
647
|
+
class RBI::Index < ::RBI::Visitor
|
648
|
+
# source://rbi//lib/rbi/index.rb#21
|
649
|
+
sig { void }
|
650
|
+
def initialize; end
|
651
|
+
|
652
|
+
# source://rbi//lib/rbi/index.rb#32
|
653
|
+
sig { params(id: ::String).returns(T::Array[::RBI::Node]) }
|
654
|
+
def [](id); end
|
655
|
+
|
656
|
+
# source://rbi//lib/rbi/index.rb#37
|
657
|
+
sig { params(nodes: ::RBI::Node).void }
|
658
|
+
def index(*nodes); end
|
659
|
+
|
660
|
+
# source://rbi//lib/rbi/index.rb#27
|
661
|
+
sig { returns(T::Array[::String]) }
|
662
|
+
def keys; end
|
663
|
+
|
664
|
+
# source://rbi//lib/rbi/index.rb#42
|
665
|
+
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
666
|
+
def visit(node); end
|
667
|
+
|
668
|
+
private
|
669
|
+
|
670
|
+
# source://rbi//lib/rbi/index.rb#59
|
671
|
+
sig { params(node: T.all(::RBI::Indexable, ::RBI::Node)).void }
|
672
|
+
def index_node(node); end
|
673
|
+
|
674
|
+
class << self
|
675
|
+
# source://rbi//lib/rbi/index.rb#13
|
676
|
+
sig { params(node: ::RBI::Node).returns(::RBI::Index) }
|
677
|
+
def index(*node); end
|
678
|
+
end
|
679
|
+
end
|
680
|
+
|
681
|
+
# A Node that can be referred to by a unique ID inside an index
|
682
|
+
#
|
683
|
+
# @abstract Subclasses must implement the `abstract` methods below.
|
684
|
+
#
|
685
|
+
# source://rbi//lib/rbi/index.rb#74
|
686
|
+
module RBI::Indexable
|
687
|
+
interface!
|
688
|
+
|
689
|
+
# Unique IDs that refer to this node.
|
690
|
+
#
|
691
|
+
# Some nodes can have multiple ids, for example an attribute accessor matches the ID of the
|
692
|
+
# getter and the setter.
|
693
|
+
#
|
694
|
+
# @abstract
|
695
|
+
#
|
696
|
+
# source://rbi//lib/rbi/index.rb#85
|
697
|
+
sig { abstract.returns(T::Array[::String]) }
|
698
|
+
def index_ids; end
|
699
|
+
end
|
700
|
+
|
701
|
+
# source://rbi//lib/rbi/model.rb#1073
|
702
|
+
class RBI::KwArg < ::RBI::Arg
|
703
|
+
# source://rbi//lib/rbi/model.rb#1086
|
704
|
+
sig { params(keyword: ::String, value: ::String, loc: T.nilable(::RBI::Loc)).void }
|
705
|
+
def initialize(keyword, value, loc: T.unsafe(nil)); end
|
706
|
+
|
707
|
+
# source://rbi//lib/rbi/model.rb#1092
|
708
|
+
sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
|
709
|
+
def ==(other); end
|
710
|
+
|
711
|
+
# source://rbi//lib/rbi/model.rb#1077
|
712
|
+
sig { returns(::String) }
|
713
|
+
def keyword; end
|
714
|
+
|
715
|
+
# source://rbi//lib/rbi/model.rb#1097
|
716
|
+
sig { returns(::String) }
|
717
|
+
def to_s; end
|
718
|
+
end
|
719
|
+
|
720
|
+
# source://rbi//lib/rbi/model.rb#757
|
721
|
+
class RBI::KwOptParam < ::RBI::Param
|
722
|
+
# source://rbi//lib/rbi/model.rb#772
|
723
|
+
sig do
|
724
|
+
params(
|
725
|
+
name: ::String,
|
726
|
+
value: ::String,
|
727
|
+
loc: T.nilable(::RBI::Loc),
|
728
|
+
comments: T::Array[::RBI::Comment],
|
729
|
+
block: T.nilable(T.proc.params(node: ::RBI::KwOptParam).void)
|
730
|
+
).void
|
731
|
+
end
|
732
|
+
def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
733
|
+
|
734
|
+
# source://rbi//lib/rbi/model.rb#784
|
735
|
+
sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
|
736
|
+
def ==(other); end
|
737
|
+
|
738
|
+
# source://rbi//lib/rbi/model.rb#779
|
739
|
+
sig { override.returns(::String) }
|
740
|
+
def to_s; end
|
741
|
+
|
742
|
+
# source://rbi//lib/rbi/model.rb#761
|
743
|
+
sig { returns(::String) }
|
744
|
+
def value; end
|
745
|
+
end
|
746
|
+
|
747
|
+
# source://rbi//lib/rbi/model.rb#730
|
748
|
+
class RBI::KwParam < ::RBI::Param
|
749
|
+
# source://rbi//lib/rbi/model.rb#741
|
750
|
+
sig do
|
751
|
+
params(
|
752
|
+
name: ::String,
|
753
|
+
loc: T.nilable(::RBI::Loc),
|
754
|
+
comments: T::Array[::RBI::Comment],
|
755
|
+
block: T.nilable(T.proc.params(node: ::RBI::KwParam).void)
|
756
|
+
).void
|
757
|
+
end
|
758
|
+
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
759
|
+
|
760
|
+
# source://rbi//lib/rbi/model.rb#752
|
761
|
+
sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
|
762
|
+
def ==(other); end
|
763
|
+
|
764
|
+
# source://rbi//lib/rbi/model.rb#747
|
765
|
+
sig { override.returns(::String) }
|
766
|
+
def to_s; end
|
767
|
+
end
|
768
|
+
|
769
|
+
# source://rbi//lib/rbi/model.rb#789
|
770
|
+
class RBI::KwRestParam < ::RBI::Param
|
771
|
+
# source://rbi//lib/rbi/model.rb#800
|
772
|
+
sig do
|
773
|
+
params(
|
774
|
+
name: ::String,
|
775
|
+
loc: T.nilable(::RBI::Loc),
|
776
|
+
comments: T::Array[::RBI::Comment],
|
777
|
+
block: T.nilable(T.proc.params(node: ::RBI::KwRestParam).void)
|
778
|
+
).void
|
779
|
+
end
|
780
|
+
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
781
|
+
|
782
|
+
# source://rbi//lib/rbi/model.rb#811
|
783
|
+
sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
|
784
|
+
def ==(other); end
|
785
|
+
|
786
|
+
# source://rbi//lib/rbi/model.rb#806
|
787
|
+
sig { override.returns(::String) }
|
788
|
+
def to_s; end
|
789
|
+
end
|
790
|
+
|
791
|
+
# source://rbi//lib/rbi/loc.rb#5
|
792
|
+
class RBI::Loc
|
793
|
+
# source://rbi//lib/rbi/loc.rb#38
|
794
|
+
sig do
|
795
|
+
params(
|
796
|
+
file: T.nilable(::String),
|
797
|
+
begin_line: T.nilable(::Integer),
|
798
|
+
end_line: T.nilable(::Integer),
|
799
|
+
begin_column: T.nilable(::Integer),
|
800
|
+
end_column: T.nilable(::Integer)
|
801
|
+
).void
|
802
|
+
end
|
803
|
+
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
|
804
|
+
|
805
|
+
# @return [Integer, nil]
|
806
|
+
#
|
807
|
+
# source://rbi//lib/rbi/loc.rb#27
|
808
|
+
def begin_column; end
|
809
|
+
|
810
|
+
# source://rbi//lib/rbi/loc.rb#27
|
811
|
+
sig { returns(T.nilable(::Integer)) }
|
812
|
+
def begin_line; end
|
813
|
+
|
814
|
+
# @return [Integer, nil]
|
815
|
+
#
|
816
|
+
# source://rbi//lib/rbi/loc.rb#27
|
817
|
+
def end_column; end
|
818
|
+
|
819
|
+
# @return [Integer, nil]
|
820
|
+
#
|
821
|
+
# source://rbi//lib/rbi/loc.rb#27
|
822
|
+
def end_line; end
|
823
|
+
|
824
|
+
# source://rbi//lib/rbi/loc.rb#24
|
825
|
+
sig { returns(T.nilable(::String)) }
|
826
|
+
def file; end
|
827
|
+
|
828
|
+
# source://rbi//lib/rbi/loc.rb#56
|
829
|
+
sig { returns(T.nilable(::String)) }
|
830
|
+
def source; end
|
831
|
+
|
832
|
+
# source://rbi//lib/rbi/loc.rb#47
|
833
|
+
sig { returns(::String) }
|
834
|
+
def to_s; end
|
835
|
+
|
836
|
+
class << self
|
837
|
+
# source://rbi//lib/rbi/loc.rb#12
|
838
|
+
sig { params(file: ::String, prism_location: ::Prism::Location).returns(::RBI::Loc) }
|
839
|
+
def from_prism(file, prism_location); end
|
840
|
+
end
|
841
|
+
end
|
842
|
+
|
843
|
+
# A tree that _might_ contain conflicts
|
844
|
+
#
|
845
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#330
|
846
|
+
class RBI::MergeTree < ::RBI::Tree
|
847
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#344
|
848
|
+
sig do
|
849
|
+
params(
|
850
|
+
loc: T.nilable(::RBI::Loc),
|
851
|
+
comments: T::Array[::RBI::Comment],
|
852
|
+
conflicts: T::Array[::RBI::Rewriters::Merge::Conflict],
|
853
|
+
block: T.nilable(T.proc.params(node: ::RBI::Tree).void)
|
854
|
+
).void
|
855
|
+
end
|
856
|
+
def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), conflicts: T.unsafe(nil), &block); end
|
857
|
+
|
858
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#334
|
859
|
+
sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) }
|
860
|
+
def conflicts; end
|
861
|
+
end
|
862
|
+
|
863
|
+
# Methods and args
|
864
|
+
#
|
865
|
+
# source://rbi//lib/rbi/model.rb#485
|
866
|
+
class RBI::Method < ::RBI::NodeWithComments
|
867
|
+
include ::RBI::Indexable
|
868
|
+
|
869
|
+
# source://rbi//lib/rbi/model.rb#515
|
870
|
+
sig do
|
871
|
+
params(
|
872
|
+
name: ::String,
|
873
|
+
params: T::Array[::RBI::Param],
|
874
|
+
is_singleton: T::Boolean,
|
875
|
+
visibility: ::RBI::Visibility,
|
876
|
+
sigs: T::Array[::RBI::Sig],
|
877
|
+
loc: T.nilable(::RBI::Loc),
|
878
|
+
comments: T::Array[::RBI::Comment],
|
879
|
+
block: T.nilable(T.proc.params(node: ::RBI::Method).void)
|
880
|
+
).void
|
881
|
+
end
|
882
|
+
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
|
883
|
+
|
884
|
+
# source://rbi//lib/rbi/model.rb#535
|
885
|
+
sig { params(param: ::RBI::Param).void }
|
886
|
+
def <<(param); end
|
887
|
+
|
888
|
+
# source://rbi//lib/rbi/model.rb#570
|
889
|
+
sig { params(name: ::String).void }
|
890
|
+
def add_block_param(name); end
|
891
|
+
|
892
|
+
# source://rbi//lib/rbi/model.rb#560
|
893
|
+
sig { params(name: ::String, default_value: ::String).void }
|
894
|
+
def add_kw_opt_param(name, default_value); end
|
895
|
+
|
896
|
+
# source://rbi//lib/rbi/model.rb#555
|
897
|
+
sig { params(name: ::String).void }
|
898
|
+
def add_kw_param(name); end
|
899
|
+
|
900
|
+
# source://rbi//lib/rbi/model.rb#565
|
901
|
+
sig { params(name: ::String).void }
|
902
|
+
def add_kw_rest_param(name); end
|
903
|
+
|
904
|
+
# source://rbi//lib/rbi/model.rb#545
|
905
|
+
sig { params(name: ::String, default_value: ::String).void }
|
906
|
+
def add_opt_param(name, default_value); end
|
907
|
+
|
908
|
+
# source://rbi//lib/rbi/model.rb#540
|
909
|
+
sig { params(name: ::String).void }
|
910
|
+
def add_param(name); end
|
911
|
+
|
912
|
+
# source://rbi//lib/rbi/model.rb#550
|
913
|
+
sig { params(name: ::String).void }
|
914
|
+
def add_rest_param(name); end
|
915
|
+
|
916
|
+
# source://rbi//lib/rbi/model.rb#587
|
917
|
+
sig do
|
918
|
+
params(
|
919
|
+
params: T::Array[::RBI::SigParam],
|
920
|
+
return_type: T.any(::RBI::Type, ::String),
|
921
|
+
is_abstract: T::Boolean,
|
922
|
+
is_override: T::Boolean,
|
923
|
+
is_overridable: T::Boolean,
|
924
|
+
is_final: T::Boolean,
|
925
|
+
type_params: T::Array[::String],
|
926
|
+
checked: T.nilable(::Symbol),
|
927
|
+
block: T.proc.params(node: ::RBI::Sig).void
|
928
|
+
).void
|
929
|
+
end
|
930
|
+
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
|
931
|
+
|
932
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#469
|
933
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
934
|
+
def compatible_with?(other); end
|
935
|
+
|
936
|
+
# source://rbi//lib/rbi/model.rb#613
|
937
|
+
sig { returns(::String) }
|
938
|
+
def fully_qualified_name; end
|
939
|
+
|
940
|
+
# source://rbi//lib/rbi/index.rb#123
|
941
|
+
sig { override.returns(T::Array[::String]) }
|
942
|
+
def index_ids; end
|
943
|
+
|
944
|
+
# source://rbi//lib/rbi/model.rb#495
|
945
|
+
sig { returns(T::Boolean) }
|
946
|
+
def is_singleton; end
|
947
|
+
|
948
|
+
# @return [Boolean]
|
949
|
+
#
|
950
|
+
# source://rbi//lib/rbi/model.rb#495
|
951
|
+
def is_singleton=(_arg0); end
|
952
|
+
|
953
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#478
|
954
|
+
sig { override.params(other: ::RBI::Node).void }
|
955
|
+
def merge_with(other); end
|
956
|
+
|
957
|
+
# source://rbi//lib/rbi/model.rb#489
|
958
|
+
sig { returns(::String) }
|
959
|
+
def name; end
|
960
|
+
|
961
|
+
# @return [String]
|
962
|
+
#
|
963
|
+
# source://rbi//lib/rbi/model.rb#489
|
964
|
+
def name=(_arg0); end
|
965
|
+
|
966
|
+
# source://rbi//lib/rbi/model.rb#492
|
967
|
+
sig { returns(T::Array[::RBI::Param]) }
|
968
|
+
def params; end
|
969
|
+
|
970
|
+
# source://rbi//lib/rbi/model.rb#501
|
971
|
+
sig { returns(T::Array[::RBI::Sig]) }
|
972
|
+
def sigs; end
|
973
|
+
|
974
|
+
# @return [Array<Sig>]
|
975
|
+
#
|
976
|
+
# source://rbi//lib/rbi/model.rb#501
|
977
|
+
def sigs=(_arg0); end
|
978
|
+
|
979
|
+
# source://rbi//lib/rbi/model.rb#622
|
980
|
+
sig { override.returns(::String) }
|
981
|
+
def to_s; end
|
982
|
+
|
983
|
+
# source://rbi//lib/rbi/model.rb#498
|
984
|
+
sig { returns(::RBI::Visibility) }
|
985
|
+
def visibility; end
|
986
|
+
|
987
|
+
# @return [Visibility]
|
988
|
+
#
|
989
|
+
# source://rbi//lib/rbi/model.rb#498
|
990
|
+
def visibility=(_arg0); end
|
991
|
+
end
|
992
|
+
|
993
|
+
# source://rbi//lib/rbi/model.rb#1435
|
994
|
+
class RBI::MixesInClassMethods < ::RBI::Mixin
|
995
|
+
include ::RBI::Indexable
|
996
|
+
|
997
|
+
# source://rbi//lib/rbi/model.rb#1447
|
998
|
+
sig do
|
999
|
+
params(
|
1000
|
+
name: ::String,
|
1001
|
+
names: ::String,
|
1002
|
+
loc: T.nilable(::RBI::Loc),
|
1003
|
+
comments: T::Array[::RBI::Comment],
|
1004
|
+
block: T.nilable(T.proc.params(node: ::RBI::MixesInClassMethods).void)
|
1005
|
+
).void
|
1006
|
+
end
|
1007
|
+
def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
1008
|
+
|
1009
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#519
|
1010
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
1011
|
+
def compatible_with?(other); end
|
1012
|
+
|
1013
|
+
# source://rbi//lib/rbi/index.rb#153
|
1014
|
+
sig { override.returns(T::Array[::String]) }
|
1015
|
+
def index_ids; end
|
1016
|
+
|
1017
|
+
# source://rbi//lib/rbi/model.rb#1453
|
1018
|
+
sig { override.returns(::String) }
|
1019
|
+
def to_s; end
|
1020
|
+
end
|
1021
|
+
|
1022
|
+
# Mixins
|
1023
|
+
#
|
1024
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
1025
|
+
#
|
1026
|
+
# source://rbi//lib/rbi/model.rb#845
|
1027
|
+
class RBI::Mixin < ::RBI::NodeWithComments
|
1028
|
+
abstract!
|
1029
|
+
|
1030
|
+
# source://rbi//lib/rbi/model.rb#862
|
1031
|
+
sig do
|
1032
|
+
params(
|
1033
|
+
name: ::String,
|
1034
|
+
names: T::Array[::String],
|
1035
|
+
loc: T.nilable(::RBI::Loc),
|
1036
|
+
comments: T::Array[::RBI::Comment]
|
1037
|
+
).void
|
1038
|
+
end
|
1039
|
+
def initialize(name, names, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
|
1040
|
+
|
1041
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#492
|
1042
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
1043
|
+
def compatible_with?(other); end
|
1044
|
+
|
1045
|
+
# source://rbi//lib/rbi/model.rb#852
|
1046
|
+
sig { returns(T::Array[::String]) }
|
1047
|
+
def names; end
|
1048
|
+
end
|
1049
|
+
|
1050
|
+
# source://rbi//lib/rbi/model.rb#192
|
1051
|
+
class RBI::Module < ::RBI::Scope
|
1052
|
+
# source://rbi//lib/rbi/model.rb#206
|
1053
|
+
sig do
|
1054
|
+
params(
|
1055
|
+
name: ::String,
|
1056
|
+
loc: T.nilable(::RBI::Loc),
|
1057
|
+
comments: T::Array[::RBI::Comment],
|
1058
|
+
block: T.nilable(T.proc.params(node: ::RBI::Module).void)
|
1059
|
+
).void
|
1060
|
+
end
|
1061
|
+
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
1062
|
+
|
1063
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#393
|
1064
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
1065
|
+
def compatible_with?(other); end
|
1066
|
+
|
1067
|
+
# source://rbi//lib/rbi/model.rb#213
|
1068
|
+
sig { override.returns(::String) }
|
1069
|
+
def fully_qualified_name; end
|
1070
|
+
|
1071
|
+
# source://rbi//lib/rbi/model.rb#196
|
1072
|
+
sig { returns(::String) }
|
1073
|
+
def name; end
|
1074
|
+
|
1075
|
+
# @return [String]
|
1076
|
+
#
|
1077
|
+
# source://rbi//lib/rbi/model.rb#196
|
1078
|
+
def name=(_arg0); end
|
1079
|
+
end
|
1080
|
+
|
1081
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
1082
|
+
#
|
1083
|
+
# source://rbi//lib/rbi/model.rb#7
|
1084
|
+
class RBI::Node
|
1085
|
+
abstract!
|
1086
|
+
|
1087
|
+
# source://rbi//lib/rbi/model.rb#20
|
1088
|
+
sig { params(loc: T.nilable(::RBI::Loc)).void }
|
1089
|
+
def initialize(loc: T.unsafe(nil)); end
|
1090
|
+
|
1091
|
+
# Can `self` and `_other` be merged into a single definition?
|
1092
|
+
#
|
1093
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#287
|
1094
|
+
sig { params(_other: ::RBI::Node).returns(T::Boolean) }
|
1095
|
+
def compatible_with?(_other); end
|
1096
|
+
|
1097
|
+
# source://rbi//lib/rbi/model.rb#26
|
1098
|
+
sig { void }
|
1099
|
+
def detach; end
|
1100
|
+
|
1101
|
+
# source://rbi//lib/rbi/model.rb#17
|
1102
|
+
sig { returns(T.nilable(::RBI::Loc)) }
|
1103
|
+
def loc; end
|
1104
|
+
|
1105
|
+
# @return [Loc, nil]
|
1106
|
+
#
|
1107
|
+
# source://rbi//lib/rbi/model.rb#17
|
1108
|
+
def loc=(_arg0); end
|
1109
|
+
|
1110
|
+
# Merge `self` and `other` into a single definition
|
1111
|
+
#
|
1112
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#293
|
1113
|
+
sig { params(other: ::RBI::Node).void }
|
1114
|
+
def merge_with(other); end
|
1115
|
+
|
1116
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#296
|
1117
|
+
sig { returns(T.nilable(::RBI::ConflictTree)) }
|
1118
|
+
def parent_conflict_tree; end
|
1119
|
+
|
1120
|
+
# source://rbi//lib/rbi/model.rb#48
|
1121
|
+
sig { returns(T.nilable(::RBI::Scope)) }
|
1122
|
+
def parent_scope; end
|
1123
|
+
|
1124
|
+
# source://rbi//lib/rbi/model.rb#14
|
1125
|
+
sig { returns(T.nilable(::RBI::Tree)) }
|
1126
|
+
def parent_tree; end
|
1127
|
+
|
1128
|
+
# @return [Tree, nil]
|
1129
|
+
#
|
1130
|
+
# source://rbi//lib/rbi/model.rb#14
|
1131
|
+
def parent_tree=(_arg0); end
|
1132
|
+
|
1133
|
+
# source://rbi//lib/rbi/printer.rb#767
|
1134
|
+
sig do
|
1135
|
+
params(
|
1136
|
+
out: T.any(::IO, ::StringIO),
|
1137
|
+
indent: ::Integer,
|
1138
|
+
print_locs: T::Boolean,
|
1139
|
+
max_line_length: T.nilable(::Integer)
|
1140
|
+
).void
|
1141
|
+
end
|
1142
|
+
def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
|
1143
|
+
|
1144
|
+
# source://rbi//lib/rbi/rbs_printer.rb#1013
|
1145
|
+
sig { params(out: T.any(::IO, ::StringIO), indent: ::Integer, print_locs: T::Boolean).void }
|
1146
|
+
def rbs_print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end
|
1147
|
+
|
1148
|
+
# source://rbi//lib/rbi/rbs_printer.rb#1019
|
1149
|
+
sig { params(indent: ::Integer, print_locs: T::Boolean).returns(::String) }
|
1150
|
+
def rbs_string(indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end
|
1151
|
+
|
1152
|
+
# @raise [ReplaceNodeError]
|
1153
|
+
#
|
1154
|
+
# source://rbi//lib/rbi/model.rb#35
|
1155
|
+
sig { params(node: ::RBI::Node).void }
|
1156
|
+
def replace(node); end
|
1157
|
+
|
1158
|
+
# source://rbi//lib/rbi/rewriters/filter_versions.rb#94
|
1159
|
+
sig { params(version: ::Gem::Version).returns(T::Boolean) }
|
1160
|
+
def satisfies_version?(version); end
|
1161
|
+
|
1162
|
+
# source://rbi//lib/rbi/printer.rb#773
|
1163
|
+
sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) }
|
1164
|
+
def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
|
1165
|
+
end
|
1166
|
+
|
1167
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
1168
|
+
#
|
1169
|
+
# source://rbi//lib/rbi/model.rb#85
|
1170
|
+
class RBI::NodeWithComments < ::RBI::Node
|
1171
|
+
abstract!
|
1172
|
+
|
1173
|
+
# source://rbi//lib/rbi/model.rb#95
|
1174
|
+
sig { params(loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void }
|
1175
|
+
def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil)); end
|
1176
|
+
|
1177
|
+
# source://rbi//lib/rbi/model.rb#101
|
1178
|
+
sig { returns(T::Array[::String]) }
|
1179
|
+
def annotations; end
|
1180
|
+
|
1181
|
+
# source://rbi//lib/rbi/model.rb#92
|
1182
|
+
sig { returns(T::Array[::RBI::Comment]) }
|
1183
|
+
def comments; end
|
1184
|
+
|
1185
|
+
# @return [Array<Comment>]
|
1186
|
+
#
|
1187
|
+
# source://rbi//lib/rbi/model.rb#92
|
1188
|
+
def comments=(_arg0); end
|
1189
|
+
|
1190
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#311
|
1191
|
+
sig { override.params(other: ::RBI::Node).void }
|
1192
|
+
def merge_with(other); end
|
1193
|
+
|
1194
|
+
# source://rbi//lib/rbi/rewriters/filter_versions.rb#104
|
1195
|
+
sig { returns(T::Array[::Gem::Requirement]) }
|
1196
|
+
def version_requirements; end
|
1197
|
+
end
|
1198
|
+
|
1199
|
+
# source://rbi//lib/rbi/model.rb#676
|
1200
|
+
class RBI::OptParam < ::RBI::Param
|
1201
|
+
# source://rbi//lib/rbi/model.rb#691
|
1202
|
+
sig do
|
1203
|
+
params(
|
1204
|
+
name: ::String,
|
1205
|
+
value: ::String,
|
1206
|
+
loc: T.nilable(::RBI::Loc),
|
1207
|
+
comments: T::Array[::RBI::Comment],
|
1208
|
+
block: T.nilable(T.proc.params(node: ::RBI::OptParam).void)
|
1209
|
+
).void
|
1210
|
+
end
|
1211
|
+
def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
1212
|
+
|
1213
|
+
# source://rbi//lib/rbi/model.rb#698
|
1214
|
+
sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
|
1215
|
+
def ==(other); end
|
1216
|
+
|
1217
|
+
# source://rbi//lib/rbi/model.rb#680
|
1218
|
+
sig { returns(::String) }
|
1219
|
+
def value; end
|
1220
|
+
end
|
1221
|
+
|
1222
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
1223
|
+
#
|
1224
|
+
# source://rbi//lib/rbi/model.rb#627
|
1225
|
+
class RBI::Param < ::RBI::NodeWithComments
|
1226
|
+
abstract!
|
1227
|
+
|
1228
|
+
# source://rbi//lib/rbi/model.rb#643
|
1229
|
+
sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void }
|
1230
|
+
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
|
1231
|
+
|
1232
|
+
# source://rbi//lib/rbi/model.rb#634
|
1233
|
+
sig { returns(::String) }
|
1234
|
+
def name; end
|
1235
|
+
|
1236
|
+
# source://rbi//lib/rbi/model.rb#649
|
1237
|
+
sig { override.returns(::String) }
|
1238
|
+
def to_s; end
|
1239
|
+
end
|
1240
|
+
|
1241
|
+
# source://rbi//lib/rbi/parser.rb#7
|
1242
|
+
class RBI::ParseError < ::RBI::Error
|
1243
|
+
# source://rbi//lib/rbi/parser.rb#14
|
1244
|
+
sig { params(message: ::String, location: ::RBI::Loc).void }
|
1245
|
+
def initialize(message, location); end
|
1246
|
+
|
1247
|
+
# source://rbi//lib/rbi/parser.rb#11
|
1248
|
+
sig { returns(::RBI::Loc) }
|
1249
|
+
def location; end
|
1250
|
+
end
|
1251
|
+
|
1252
|
+
# source://rbi//lib/rbi/parser.rb#53
|
1253
|
+
class RBI::Parser
|
1254
|
+
# source://rbi//lib/rbi/parser.rb#88
|
1255
|
+
sig { params(path: ::String).returns(::RBI::Tree) }
|
1256
|
+
def parse_file(path); end
|
1257
|
+
|
1258
|
+
# source://rbi//lib/rbi/parser.rb#83
|
1259
|
+
sig { params(string: ::String).returns(::RBI::Tree) }
|
1260
|
+
def parse_string(string); end
|
1261
|
+
|
1262
|
+
private
|
1263
|
+
|
1264
|
+
# source://rbi//lib/rbi/parser.rb#95
|
1265
|
+
sig { params(source: ::String, file: ::String).returns(::RBI::Tree) }
|
1266
|
+
def parse(source, file:); end
|
1267
|
+
|
1268
|
+
class << self
|
1269
|
+
# source://rbi//lib/rbi/parser.rb#65
|
1270
|
+
sig { params(path: ::String).returns(::RBI::Tree) }
|
1271
|
+
def parse_file(path); end
|
1272
|
+
|
1273
|
+
# source://rbi//lib/rbi/parser.rb#70
|
1274
|
+
sig { params(paths: T::Array[::String]).returns(T::Array[::RBI::Tree]) }
|
1275
|
+
def parse_files(paths); end
|
1276
|
+
|
1277
|
+
# source://rbi//lib/rbi/parser.rb#60
|
1278
|
+
sig { params(string: ::String).returns(::RBI::Tree) }
|
1279
|
+
def parse_string(string); end
|
1280
|
+
|
1281
|
+
# source://rbi//lib/rbi/parser.rb#76
|
1282
|
+
sig { params(strings: T::Array[::String]).returns(T::Array[::RBI::Tree]) }
|
1283
|
+
def parse_strings(strings); end
|
1284
|
+
end
|
1285
|
+
end
|
1286
|
+
|
1287
|
+
# source://rbi//lib/rbi/parser.rb#828
|
1288
|
+
class RBI::Parser::SigBuilder < ::RBI::Parser::Visitor
|
1289
|
+
# source://rbi//lib/rbi/parser.rb#835
|
1290
|
+
sig { params(content: ::String, file: ::String).void }
|
1291
|
+
def initialize(content, file:); end
|
1292
|
+
|
1293
|
+
# source://rbi//lib/rbi/parser.rb#832
|
1294
|
+
sig { returns(::RBI::Sig) }
|
1295
|
+
def current; end
|
1296
|
+
|
1297
|
+
# source://rbi//lib/rbi/parser.rb#887
|
1298
|
+
sig { override.params(node: ::Prism::AssocNode).void }
|
1299
|
+
def visit_assoc_node(node); end
|
1300
|
+
|
1301
|
+
# source://rbi//lib/rbi/parser.rb#842
|
1302
|
+
sig { override.params(node: ::Prism::CallNode).void }
|
1303
|
+
def visit_call_node(node); end
|
1304
|
+
end
|
1305
|
+
|
1306
|
+
# source://rbi//lib/rbi/parser.rb#153
|
1307
|
+
class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor
|
1308
|
+
# source://rbi//lib/rbi/parser.rb#163
|
1309
|
+
sig { params(source: ::String, comments: T::Array[::Prism::Comment], file: ::String).void }
|
1310
|
+
def initialize(source, comments:, file:); end
|
1311
|
+
|
1312
|
+
# source://rbi//lib/rbi/parser.rb#160
|
1313
|
+
sig { returns(T.nilable(::Prism::Node)) }
|
1314
|
+
def last_node; end
|
1315
|
+
|
1316
|
+
# source://rbi//lib/rbi/parser.rb#157
|
1317
|
+
sig { returns(::RBI::Tree) }
|
1318
|
+
def tree; end
|
1319
|
+
|
1320
|
+
# source://rbi//lib/rbi/parser.rb#324
|
1321
|
+
sig { params(node: ::Prism::CallNode).void }
|
1322
|
+
def visit_call_node(node); end
|
1323
|
+
|
1324
|
+
# source://rbi//lib/rbi/parser.rb#175
|
1325
|
+
sig { override.params(node: ::Prism::ClassNode).void }
|
1326
|
+
def visit_class_node(node); end
|
1327
|
+
|
1328
|
+
# source://rbi//lib/rbi/parser.rb#224
|
1329
|
+
sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).void }
|
1330
|
+
def visit_constant_assign(node); end
|
1331
|
+
|
1332
|
+
# source://rbi//lib/rbi/parser.rb#217
|
1333
|
+
sig { override.params(node: ::Prism::ConstantPathWriteNode).void }
|
1334
|
+
def visit_constant_path_write_node(node); end
|
1335
|
+
|
1336
|
+
# source://rbi//lib/rbi/parser.rb#210
|
1337
|
+
sig { override.params(node: ::Prism::ConstantWriteNode).void }
|
1338
|
+
def visit_constant_write_node(node); end
|
1339
|
+
|
1340
|
+
# source://rbi//lib/rbi/parser.rb#257
|
1341
|
+
sig { override.params(node: ::Prism::DefNode).void }
|
1342
|
+
def visit_def_node(node); end
|
1343
|
+
|
1344
|
+
# source://rbi//lib/rbi/parser.rb#278
|
1345
|
+
sig { override.params(node: ::Prism::ModuleNode).void }
|
1346
|
+
def visit_module_node(node); end
|
1347
|
+
|
1348
|
+
# source://rbi//lib/rbi/parser.rb#296
|
1349
|
+
sig { override.params(node: ::Prism::ProgramNode).void }
|
1350
|
+
def visit_program_node(node); end
|
1351
|
+
|
1352
|
+
# source://rbi//lib/rbi/parser.rb#307
|
1353
|
+
sig { override.params(node: ::Prism::SingletonClassNode).void }
|
1354
|
+
def visit_singleton_class_node(node); end
|
1355
|
+
|
1356
|
+
private
|
1357
|
+
|
1358
|
+
# Collect all the remaining comments within a node
|
1359
|
+
#
|
1360
|
+
# source://rbi//lib/rbi/parser.rb#503
|
1361
|
+
sig { params(node: ::Prism::Node).void }
|
1362
|
+
def collect_dangling_comments(node); end
|
1363
|
+
|
1364
|
+
# Collect all the remaining comments after visiting the tree
|
1365
|
+
#
|
1366
|
+
# source://rbi//lib/rbi/parser.rb#521
|
1367
|
+
sig { void }
|
1368
|
+
def collect_orphan_comments; end
|
1369
|
+
|
1370
|
+
# source://rbi//lib/rbi/parser.rb#544
|
1371
|
+
sig { returns(::RBI::Tree) }
|
1372
|
+
def current_scope; end
|
1373
|
+
|
1374
|
+
# source://rbi//lib/rbi/parser.rb#549
|
1375
|
+
sig { returns(T::Array[::RBI::Sig]) }
|
1376
|
+
def current_sigs; end
|
1377
|
+
|
1378
|
+
# source://rbi//lib/rbi/parser.rb#556
|
1379
|
+
sig { params(sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Comment]) }
|
1380
|
+
def detach_comments_from_sigs(sigs); end
|
1381
|
+
|
1382
|
+
# source://rbi//lib/rbi/parser.rb#568
|
1383
|
+
sig { params(node: ::Prism::Node).returns(T::Array[::RBI::Comment]) }
|
1384
|
+
def node_comments(node); end
|
1385
|
+
|
1386
|
+
# source://rbi//lib/rbi/parser.rb#586
|
1387
|
+
sig { params(node: ::Prism::Comment).returns(::RBI::Comment) }
|
1388
|
+
def parse_comment(node); end
|
1389
|
+
|
1390
|
+
# source://rbi//lib/rbi/parser.rb#615
|
1391
|
+
sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Param]) }
|
1392
|
+
def parse_params(node); end
|
1393
|
+
|
1394
|
+
# source://rbi//lib/rbi/parser.rb#591
|
1395
|
+
sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Arg]) }
|
1396
|
+
def parse_send_args(node); end
|
1397
|
+
|
1398
|
+
# source://rbi//lib/rbi/parser.rb#689
|
1399
|
+
sig { params(node: ::Prism::CallNode).returns(::RBI::Sig) }
|
1400
|
+
def parse_sig(node); end
|
1401
|
+
|
1402
|
+
# source://rbi//lib/rbi/parser.rb#698
|
1403
|
+
sig do
|
1404
|
+
params(
|
1405
|
+
node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)
|
1406
|
+
).returns(T.nilable(::RBI::Struct))
|
1407
|
+
end
|
1408
|
+
def parse_struct(node); end
|
1409
|
+
|
1410
|
+
# source://rbi//lib/rbi/parser.rb#748
|
1411
|
+
sig { params(send: ::Prism::CallNode).void }
|
1412
|
+
def parse_tstruct_field(send); end
|
1413
|
+
|
1414
|
+
# source://rbi//lib/rbi/parser.rb#785
|
1415
|
+
sig { params(name: ::String, node: ::Prism::Node).returns(::RBI::Visibility) }
|
1416
|
+
def parse_visibility(name, node); end
|
1417
|
+
|
1418
|
+
# source://rbi//lib/rbi/parser.rb#799
|
1419
|
+
sig { void }
|
1420
|
+
def separate_header_comments; end
|
1421
|
+
|
1422
|
+
# source://rbi//lib/rbi/parser.rb#809
|
1423
|
+
sig { void }
|
1424
|
+
def set_root_tree_loc; end
|
1425
|
+
|
1426
|
+
# source://rbi//lib/rbi/parser.rb#823
|
1427
|
+
sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) }
|
1428
|
+
def type_variable_definition?(node); end
|
1429
|
+
end
|
1430
|
+
|
1431
|
+
# source://rbi//lib/rbi/parser.rb#122
|
1432
|
+
class RBI::Parser::Visitor < ::Prism::Visitor
|
1433
|
+
# source://rbi//lib/rbi/parser.rb#126
|
1434
|
+
sig { params(source: ::String, file: ::String).void }
|
1435
|
+
def initialize(source, file:); end
|
1436
|
+
|
1437
|
+
private
|
1438
|
+
|
1439
|
+
# source://rbi//lib/rbi/parser.rb#136
|
1440
|
+
sig { params(node: ::Prism::Node).returns(::RBI::Loc) }
|
1441
|
+
def node_loc(node); end
|
1442
|
+
|
1443
|
+
# source://rbi//lib/rbi/parser.rb#141
|
1444
|
+
sig { params(node: T.nilable(::Prism::Node)).returns(T.nilable(::String)) }
|
1445
|
+
def node_string(node); end
|
1446
|
+
|
1447
|
+
# source://rbi//lib/rbi/parser.rb#148
|
1448
|
+
sig { params(node: ::Prism::Node).returns(::String) }
|
1449
|
+
def node_string!(node); end
|
1450
|
+
end
|
1451
|
+
|
1452
|
+
# source://rbi//lib/rbi/printer.rb#7
|
1453
|
+
class RBI::Printer < ::RBI::Visitor
|
1454
|
+
# source://rbi//lib/rbi/printer.rb#30
|
1455
|
+
sig do
|
1456
|
+
params(
|
1457
|
+
out: T.any(::IO, ::StringIO),
|
1458
|
+
indent: ::Integer,
|
1459
|
+
print_locs: T::Boolean,
|
1460
|
+
max_line_length: T.nilable(::Integer)
|
1461
|
+
).void
|
1462
|
+
end
|
1463
|
+
def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
|
1464
|
+
|
1465
|
+
# source://rbi//lib/rbi/printer.rb#17
|
1466
|
+
sig { returns(::Integer) }
|
1467
|
+
def current_indent; end
|
1468
|
+
|
1469
|
+
# source://rbi//lib/rbi/printer.rb#48
|
1470
|
+
sig { void }
|
1471
|
+
def dedent; end
|
1472
|
+
|
1473
|
+
# @return [Boolean]
|
1474
|
+
#
|
1475
|
+
# source://rbi//lib/rbi/printer.rb#11
|
1476
|
+
def in_visibility_group; end
|
1477
|
+
|
1478
|
+
# @return [Boolean]
|
1479
|
+
#
|
1480
|
+
# source://rbi//lib/rbi/printer.rb#11
|
1481
|
+
def in_visibility_group=(_arg0); end
|
1482
|
+
|
1483
|
+
# Printing
|
1484
|
+
#
|
1485
|
+
# source://rbi//lib/rbi/printer.rb#43
|
1486
|
+
sig { void }
|
1487
|
+
def indent; end
|
1488
|
+
|
1489
|
+
# source://rbi//lib/rbi/printer.rb#20
|
1490
|
+
sig { returns(T.nilable(::Integer)) }
|
1491
|
+
def max_line_length; end
|
1492
|
+
|
1493
|
+
# source://rbi//lib/rbi/printer.rb#14
|
1494
|
+
sig { returns(T.nilable(::RBI::Node)) }
|
1495
|
+
def previous_node; end
|
1496
|
+
|
1497
|
+
# Print a string without indentation nor `\n` at the end.
|
1498
|
+
#
|
1499
|
+
# source://rbi//lib/rbi/printer.rb#54
|
1500
|
+
sig { params(string: ::String).void }
|
1501
|
+
def print(string); end
|
1502
|
+
|
1503
|
+
# source://rbi//lib/rbi/printer.rb#11
|
1504
|
+
sig { returns(T::Boolean) }
|
1505
|
+
def print_locs; end
|
1506
|
+
|
1507
|
+
# @return [Boolean]
|
1508
|
+
#
|
1509
|
+
# source://rbi//lib/rbi/printer.rb#11
|
1510
|
+
def print_locs=(_arg0); end
|
1511
|
+
|
1512
|
+
# Print a string with indentation and `\n` at the end.
|
1513
|
+
#
|
1514
|
+
# source://rbi//lib/rbi/printer.rb#74
|
1515
|
+
sig { params(string: ::String).void }
|
1516
|
+
def printl(string); end
|
1517
|
+
|
1518
|
+
# Print a string without indentation but with a `\n` at the end.
|
1519
|
+
#
|
1520
|
+
# source://rbi//lib/rbi/printer.rb#60
|
1521
|
+
sig { params(string: T.nilable(::String)).void }
|
1522
|
+
def printn(string = T.unsafe(nil)); end
|
1523
|
+
|
1524
|
+
# Print a string with indentation but without a `\n` at the end.
|
1525
|
+
#
|
1526
|
+
# source://rbi//lib/rbi/printer.rb#67
|
1527
|
+
sig { params(string: T.nilable(::String)).void }
|
1528
|
+
def printt(string = T.unsafe(nil)); end
|
1529
|
+
|
1530
|
+
# source://rbi//lib/rbi/printer.rb#80
|
1531
|
+
sig { override.params(nodes: T::Array[::RBI::Node]).void }
|
1532
|
+
def visit_all(nodes); end
|
1533
|
+
|
1534
|
+
# source://rbi//lib/rbi/printer.rb#91
|
1535
|
+
sig { override.params(file: ::RBI::File).void }
|
1536
|
+
def visit_file(file); end
|
1537
|
+
|
1538
|
+
private
|
1539
|
+
|
1540
|
+
# source://rbi//lib/rbi/printer.rb#618
|
1541
|
+
sig { params(node: ::RBI::Node).returns(T::Boolean) }
|
1542
|
+
def oneline?(node); end
|
1543
|
+
|
1544
|
+
# source://rbi//lib/rbi/printer.rb#576
|
1545
|
+
sig { params(node: ::RBI::Node).void }
|
1546
|
+
def print_blank_line_before(node); end
|
1547
|
+
|
1548
|
+
# source://rbi//lib/rbi/printer.rb#586
|
1549
|
+
sig { params(node: ::RBI::Node).void }
|
1550
|
+
def print_loc(node); end
|
1551
|
+
|
1552
|
+
# source://rbi//lib/rbi/printer.rb#592
|
1553
|
+
sig { params(node: ::RBI::Param, last: T::Boolean).void }
|
1554
|
+
def print_param_comment_leading_space(node, last:); end
|
1555
|
+
|
1556
|
+
# source://rbi//lib/rbi/printer.rb#665
|
1557
|
+
sig { params(node: ::RBI::Sig).void }
|
1558
|
+
def print_sig_as_block(node); end
|
1559
|
+
|
1560
|
+
# source://rbi//lib/rbi/printer.rb#640
|
1561
|
+
sig { params(node: ::RBI::Sig).void }
|
1562
|
+
def print_sig_as_line(node); end
|
1563
|
+
|
1564
|
+
# source://rbi//lib/rbi/printer.rb#610
|
1565
|
+
sig { params(node: ::RBI::SigParam, last: T::Boolean).void }
|
1566
|
+
def print_sig_param_comment_leading_space(node, last:); end
|
1567
|
+
|
1568
|
+
# source://rbi//lib/rbi/printer.rb#721
|
1569
|
+
sig { params(node: ::RBI::Sig).returns(T::Array[::String]) }
|
1570
|
+
def sig_modifiers(node); end
|
1571
|
+
|
1572
|
+
# source://rbi//lib/rbi/printer.rb#417
|
1573
|
+
sig { override.params(node: ::RBI::Arg).void }
|
1574
|
+
def visit_arg(node); end
|
1575
|
+
|
1576
|
+
# source://rbi//lib/rbi/printer.rb#237
|
1577
|
+
sig { params(node: ::RBI::Attr).void }
|
1578
|
+
def visit_attr(node); end
|
1579
|
+
|
1580
|
+
# source://rbi//lib/rbi/printer.rb#222
|
1581
|
+
sig { override.params(node: ::RBI::AttrAccessor).void }
|
1582
|
+
def visit_attr_accessor(node); end
|
1583
|
+
|
1584
|
+
# source://rbi//lib/rbi/printer.rb#227
|
1585
|
+
sig { override.params(node: ::RBI::AttrReader).void }
|
1586
|
+
def visit_attr_reader(node); end
|
1587
|
+
|
1588
|
+
# source://rbi//lib/rbi/printer.rb#232
|
1589
|
+
sig { override.params(node: ::RBI::AttrWriter).void }
|
1590
|
+
def visit_attr_writer(node); end
|
1591
|
+
|
1592
|
+
# source://rbi//lib/rbi/printer.rb#126
|
1593
|
+
sig { override.params(node: ::RBI::BlankLine).void }
|
1594
|
+
def visit_blank_line(node); end
|
1595
|
+
|
1596
|
+
# source://rbi//lib/rbi/printer.rb#344
|
1597
|
+
sig { override.params(node: ::RBI::BlockParam).void }
|
1598
|
+
def visit_block_param(node); end
|
1599
|
+
|
1600
|
+
# source://rbi//lib/rbi/printer.rb#143
|
1601
|
+
sig { override.params(node: ::RBI::Class).void }
|
1602
|
+
def visit_class(node); end
|
1603
|
+
|
1604
|
+
# source://rbi//lib/rbi/printer.rb#110
|
1605
|
+
sig { override.params(node: ::RBI::Comment).void }
|
1606
|
+
def visit_comment(node); end
|
1607
|
+
|
1608
|
+
# source://rbi//lib/rbi/printer.rb#553
|
1609
|
+
sig { override.params(node: ::RBI::ConflictTree).void }
|
1610
|
+
def visit_conflict_tree(node); end
|
1611
|
+
|
1612
|
+
# source://rbi//lib/rbi/printer.rb#213
|
1613
|
+
sig { override.params(node: ::RBI::Const).void }
|
1614
|
+
def visit_const(node); end
|
1615
|
+
|
1616
|
+
# source://rbi//lib/rbi/printer.rb#354
|
1617
|
+
sig { override.params(node: ::RBI::Extend).void }
|
1618
|
+
def visit_extend(node); end
|
1619
|
+
|
1620
|
+
# source://rbi//lib/rbi/printer.rb#525
|
1621
|
+
sig { override.params(node: ::RBI::Group).void }
|
1622
|
+
def visit_group(node); end
|
1623
|
+
|
1624
|
+
# source://rbi//lib/rbi/printer.rb#511
|
1625
|
+
sig { override.params(node: ::RBI::Helper).void }
|
1626
|
+
def visit_helper(node); end
|
1627
|
+
|
1628
|
+
# source://rbi//lib/rbi/printer.rb#349
|
1629
|
+
sig { override.params(node: ::RBI::Include).void }
|
1630
|
+
def visit_include(node); end
|
1631
|
+
|
1632
|
+
# source://rbi//lib/rbi/printer.rb#422
|
1633
|
+
sig { override.params(node: ::RBI::KwArg).void }
|
1634
|
+
def visit_kw_arg(node); end
|
1635
|
+
|
1636
|
+
# source://rbi//lib/rbi/printer.rb#334
|
1637
|
+
sig { override.params(node: ::RBI::KwOptParam).void }
|
1638
|
+
def visit_kw_opt_param(node); end
|
1639
|
+
|
1640
|
+
# source://rbi//lib/rbi/printer.rb#329
|
1641
|
+
sig { override.params(node: ::RBI::KwParam).void }
|
1642
|
+
def visit_kw_param(node); end
|
1643
|
+
|
1644
|
+
# source://rbi//lib/rbi/printer.rb#339
|
1645
|
+
sig { override.params(node: ::RBI::KwRestParam).void }
|
1646
|
+
def visit_kw_rest_param(node); end
|
1647
|
+
|
1648
|
+
# source://rbi//lib/rbi/printer.rb#265
|
1649
|
+
sig { override.params(node: ::RBI::Method).void }
|
1650
|
+
def visit_method(node); end
|
1651
|
+
|
1652
|
+
# source://rbi//lib/rbi/printer.rb#520
|
1653
|
+
sig { override.params(node: ::RBI::MixesInClassMethods).void }
|
1654
|
+
def visit_mixes_in_class_methods(node); end
|
1655
|
+
|
1656
|
+
# source://rbi//lib/rbi/printer.rb#359
|
1657
|
+
sig { params(node: ::RBI::Mixin).void }
|
1658
|
+
def visit_mixin(node); end
|
1659
|
+
|
1660
|
+
# source://rbi//lib/rbi/printer.rb#138
|
1661
|
+
sig { override.params(node: ::RBI::Module).void }
|
1662
|
+
def visit_module(node); end
|
1663
|
+
|
1664
|
+
# source://rbi//lib/rbi/printer.rb#319
|
1665
|
+
sig { override.params(node: ::RBI::OptParam).void }
|
1666
|
+
def visit_opt_param(node); end
|
1667
|
+
|
1668
|
+
# source://rbi//lib/rbi/printer.rb#386
|
1669
|
+
sig { override.params(node: ::RBI::Private).void }
|
1670
|
+
def visit_private(node); end
|
1671
|
+
|
1672
|
+
# source://rbi//lib/rbi/printer.rb#381
|
1673
|
+
sig { override.params(node: ::RBI::Protected).void }
|
1674
|
+
def visit_protected(node); end
|
1675
|
+
|
1676
|
+
# source://rbi//lib/rbi/printer.rb#376
|
1677
|
+
sig { override.params(node: ::RBI::Public).void }
|
1678
|
+
def visit_public(node); end
|
1679
|
+
|
1680
|
+
# source://rbi//lib/rbi/printer.rb#314
|
1681
|
+
sig { override.params(node: ::RBI::ReqParam).void }
|
1682
|
+
def visit_req_param(node); end
|
1683
|
+
|
1684
|
+
# source://rbi//lib/rbi/printer.rb#544
|
1685
|
+
sig { override.params(node: ::RBI::RequiresAncestor).void }
|
1686
|
+
def visit_requires_ancestor(node); end
|
1687
|
+
|
1688
|
+
# source://rbi//lib/rbi/printer.rb#324
|
1689
|
+
sig { override.params(node: ::RBI::RestParam).void }
|
1690
|
+
def visit_rest_param(node); end
|
1691
|
+
|
1692
|
+
# source://rbi//lib/rbi/printer.rb#158
|
1693
|
+
sig { params(node: ::RBI::Scope).void }
|
1694
|
+
def visit_scope(node); end
|
1695
|
+
|
1696
|
+
# source://rbi//lib/rbi/printer.rb#203
|
1697
|
+
sig { params(node: ::RBI::Scope).void }
|
1698
|
+
def visit_scope_body(node); end
|
1699
|
+
|
1700
|
+
# source://rbi//lib/rbi/printer.rb#562
|
1701
|
+
sig { override.params(node: ::RBI::ScopeConflict).void }
|
1702
|
+
def visit_scope_conflict(node); end
|
1703
|
+
|
1704
|
+
# source://rbi//lib/rbi/printer.rb#168
|
1705
|
+
sig { params(node: ::RBI::Scope).void }
|
1706
|
+
def visit_scope_header(node); end
|
1707
|
+
|
1708
|
+
# source://rbi//lib/rbi/printer.rb#400
|
1709
|
+
sig { override.params(node: ::RBI::Send).void }
|
1710
|
+
def visit_send(node); end
|
1711
|
+
|
1712
|
+
# source://rbi//lib/rbi/printer.rb#427
|
1713
|
+
sig { override.params(node: ::RBI::Sig).void }
|
1714
|
+
def visit_sig(node); end
|
1715
|
+
|
1716
|
+
# source://rbi//lib/rbi/printer.rb#447
|
1717
|
+
sig { override.params(node: ::RBI::SigParam).void }
|
1718
|
+
def visit_sig_param(node); end
|
1719
|
+
|
1720
|
+
# source://rbi//lib/rbi/printer.rb#153
|
1721
|
+
sig { override.params(node: ::RBI::SingletonClass).void }
|
1722
|
+
def visit_singleton_class(node); end
|
1723
|
+
|
1724
|
+
# source://rbi//lib/rbi/printer.rb#148
|
1725
|
+
sig { override.params(node: ::RBI::Struct).void }
|
1726
|
+
def visit_struct(node); end
|
1727
|
+
|
1728
|
+
# source://rbi//lib/rbi/printer.rb#467
|
1729
|
+
sig { params(node: ::RBI::TStructField).void }
|
1730
|
+
def visit_t_struct_field(node); end
|
1731
|
+
|
1732
|
+
# source://rbi//lib/rbi/printer.rb#485
|
1733
|
+
sig { override.params(node: ::RBI::TEnum).void }
|
1734
|
+
def visit_tenum(node); end
|
1735
|
+
|
1736
|
+
# source://rbi//lib/rbi/printer.rb#490
|
1737
|
+
sig { override.params(node: ::RBI::TEnumBlock).void }
|
1738
|
+
def visit_tenum_block(node); end
|
1739
|
+
|
1740
|
+
# source://rbi//lib/rbi/printer.rb#131
|
1741
|
+
sig { override.params(node: ::RBI::Tree).void }
|
1742
|
+
def visit_tree(node); end
|
1743
|
+
|
1744
|
+
# source://rbi//lib/rbi/printer.rb#452
|
1745
|
+
sig { override.params(node: ::RBI::TStruct).void }
|
1746
|
+
def visit_tstruct(node); end
|
1747
|
+
|
1748
|
+
# source://rbi//lib/rbi/printer.rb#457
|
1749
|
+
sig { override.params(node: ::RBI::TStructConst).void }
|
1750
|
+
def visit_tstruct_const(node); end
|
1751
|
+
|
1752
|
+
# source://rbi//lib/rbi/printer.rb#462
|
1753
|
+
sig { override.params(node: ::RBI::TStructProp).void }
|
1754
|
+
def visit_tstruct_prop(node); end
|
1755
|
+
|
1756
|
+
# source://rbi//lib/rbi/printer.rb#502
|
1757
|
+
sig { override.params(node: ::RBI::TypeMember).void }
|
1758
|
+
def visit_type_member(node); end
|
1759
|
+
|
1760
|
+
# source://rbi//lib/rbi/printer.rb#391
|
1761
|
+
sig { params(node: ::RBI::Visibility).void }
|
1762
|
+
def visit_visibility(node); end
|
1763
|
+
|
1764
|
+
# source://rbi//lib/rbi/printer.rb#531
|
1765
|
+
sig { override.params(node: ::RBI::VisibilityGroup).void }
|
1766
|
+
def visit_visibility_group(node); end
|
1767
|
+
end
|
1768
|
+
|
1769
|
+
# source://rbi//lib/rbi/printer.rb#5
|
1770
|
+
class RBI::PrinterError < ::RBI::Error; end
|
1771
|
+
|
1772
|
+
# source://rbi//lib/rbi/model.rb#986
|
1773
|
+
class RBI::Private < ::RBI::Visibility
|
1774
|
+
# source://rbi//lib/rbi/model.rb#996
|
1775
|
+
sig do
|
1776
|
+
params(
|
1777
|
+
loc: T.nilable(::RBI::Loc),
|
1778
|
+
comments: T::Array[::RBI::Comment],
|
1779
|
+
block: T.nilable(T.proc.params(node: ::RBI::Private).void)
|
1780
|
+
).void
|
1781
|
+
end
|
1782
|
+
def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
1783
|
+
end
|
1784
|
+
|
1785
|
+
# source://rbi//lib/rbi/model.rb#970
|
1786
|
+
class RBI::Protected < ::RBI::Visibility
|
1787
|
+
# source://rbi//lib/rbi/model.rb#980
|
1788
|
+
sig do
|
1789
|
+
params(
|
1790
|
+
loc: T.nilable(::RBI::Loc),
|
1791
|
+
comments: T::Array[::RBI::Comment],
|
1792
|
+
block: T.nilable(T.proc.params(node: ::RBI::Protected).void)
|
1793
|
+
).void
|
1794
|
+
end
|
1795
|
+
def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
1796
|
+
end
|
1797
|
+
|
1798
|
+
# source://rbi//lib/rbi/model.rb#954
|
1799
|
+
class RBI::Public < ::RBI::Visibility
|
1800
|
+
# source://rbi//lib/rbi/model.rb#964
|
1801
|
+
sig do
|
1802
|
+
params(
|
1803
|
+
loc: T.nilable(::RBI::Loc),
|
1804
|
+
comments: T::Array[::RBI::Comment],
|
1805
|
+
block: T.nilable(T.proc.params(node: ::RBI::Public).void)
|
1806
|
+
).void
|
1807
|
+
end
|
1808
|
+
def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
1809
|
+
end
|
1810
|
+
|
1811
|
+
# source://rbi//lib/rbi/rbs_printer.rb#5
|
1812
|
+
class RBI::RBSPrinter < ::RBI::Visitor
|
1813
|
+
# source://rbi//lib/rbi/rbs_printer.rb#18
|
1814
|
+
sig { params(out: T.any(::IO, ::StringIO), indent: ::Integer, print_locs: T::Boolean).void }
|
1815
|
+
def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end
|
1816
|
+
|
1817
|
+
# source://rbi//lib/rbi/rbs_printer.rb#15
|
1818
|
+
sig { returns(::Integer) }
|
1819
|
+
def current_indent; end
|
1820
|
+
|
1821
|
+
# source://rbi//lib/rbi/rbs_printer.rb#35
|
1822
|
+
sig { void }
|
1823
|
+
def dedent; end
|
1824
|
+
|
1825
|
+
# @return [Boolean]
|
1826
|
+
#
|
1827
|
+
# source://rbi//lib/rbi/rbs_printer.rb#9
|
1828
|
+
def in_visibility_group; end
|
1829
|
+
|
1830
|
+
# @return [Boolean]
|
1831
|
+
#
|
1832
|
+
# source://rbi//lib/rbi/rbs_printer.rb#9
|
1833
|
+
def in_visibility_group=(_arg0); end
|
1834
|
+
|
1835
|
+
# Printing
|
1836
|
+
#
|
1837
|
+
# source://rbi//lib/rbi/rbs_printer.rb#30
|
1838
|
+
sig { void }
|
1839
|
+
def indent; end
|
1840
|
+
|
1841
|
+
# source://rbi//lib/rbi/rbs_printer.rb#12
|
1842
|
+
sig { returns(T.nilable(::RBI::Node)) }
|
1843
|
+
def previous_node; end
|
1844
|
+
|
1845
|
+
# Print a string without indentation nor `\n` at the end.
|
1846
|
+
#
|
1847
|
+
# source://rbi//lib/rbi/rbs_printer.rb#41
|
1848
|
+
sig { params(string: ::String).void }
|
1849
|
+
def print(string); end
|
1850
|
+
|
1851
|
+
# source://rbi//lib/rbi/rbs_printer.rb#275
|
1852
|
+
sig { params(node: ::RBI::Attr, sig: ::RBI::Sig).void }
|
1853
|
+
def print_attr_sig(node, sig); end
|
1854
|
+
|
1855
|
+
# source://rbi//lib/rbi/rbs_printer.rb#9
|
1856
|
+
sig { returns(T::Boolean) }
|
1857
|
+
def print_locs; end
|
1858
|
+
|
1859
|
+
# @return [Boolean]
|
1860
|
+
#
|
1861
|
+
# source://rbi//lib/rbi/rbs_printer.rb#9
|
1862
|
+
def print_locs=(_arg0); end
|
1863
|
+
|
1864
|
+
# source://rbi//lib/rbi/rbs_printer.rb#350
|
1865
|
+
sig { params(node: ::RBI::Method, sig: ::RBI::Sig).void }
|
1866
|
+
def print_method_sig(node, sig); end
|
1867
|
+
|
1868
|
+
# Print a string with indentation and `\n` at the end.
|
1869
|
+
#
|
1870
|
+
# source://rbi//lib/rbi/rbs_printer.rb#61
|
1871
|
+
sig { params(string: ::String).void }
|
1872
|
+
def printl(string); end
|
1873
|
+
|
1874
|
+
# Print a string without indentation but with a `\n` at the end.
|
1875
|
+
#
|
1876
|
+
# source://rbi//lib/rbi/rbs_printer.rb#47
|
1877
|
+
sig { params(string: T.nilable(::String)).void }
|
1878
|
+
def printn(string = T.unsafe(nil)); end
|
1879
|
+
|
1880
|
+
# Print a string with indentation but without a `\n` at the end.
|
1881
|
+
#
|
1882
|
+
# source://rbi//lib/rbi/rbs_printer.rb#54
|
1883
|
+
sig { params(string: T.nilable(::String)).void }
|
1884
|
+
def printt(string = T.unsafe(nil)); end
|
1885
|
+
|
1886
|
+
# source://rbi//lib/rbi/rbs_printer.rb#67
|
1887
|
+
sig { override.params(nodes: T::Array[::RBI::Node]).void }
|
1888
|
+
def visit_all(nodes); end
|
1889
|
+
|
1890
|
+
# source://rbi//lib/rbi/rbs_printer.rb#505
|
1891
|
+
sig { override.params(node: ::RBI::Arg).void }
|
1892
|
+
def visit_arg(node); end
|
1893
|
+
|
1894
|
+
# source://rbi//lib/rbi/rbs_printer.rb#243
|
1895
|
+
sig { params(node: ::RBI::Attr).void }
|
1896
|
+
def visit_attr(node); end
|
1897
|
+
|
1898
|
+
# source://rbi//lib/rbi/rbs_printer.rb#228
|
1899
|
+
sig { override.params(node: ::RBI::AttrAccessor).void }
|
1900
|
+
def visit_attr_accessor(node); end
|
1901
|
+
|
1902
|
+
# source://rbi//lib/rbi/rbs_printer.rb#233
|
1903
|
+
sig { override.params(node: ::RBI::AttrReader).void }
|
1904
|
+
def visit_attr_reader(node); end
|
1905
|
+
|
1906
|
+
# source://rbi//lib/rbi/rbs_printer.rb#238
|
1907
|
+
sig { override.params(node: ::RBI::AttrWriter).void }
|
1908
|
+
def visit_attr_writer(node); end
|
1909
|
+
|
1910
|
+
# source://rbi//lib/rbi/rbs_printer.rb#106
|
1911
|
+
sig { override.params(node: ::RBI::BlankLine).void }
|
1912
|
+
def visit_blank_line(node); end
|
1913
|
+
|
1914
|
+
# source://rbi//lib/rbi/rbs_printer.rb#444
|
1915
|
+
sig { override.params(node: ::RBI::BlockParam).void }
|
1916
|
+
def visit_block_param(node); end
|
1917
|
+
|
1918
|
+
# source://rbi//lib/rbi/rbs_printer.rb#123
|
1919
|
+
sig { override.params(node: ::RBI::Class).void }
|
1920
|
+
def visit_class(node); end
|
1921
|
+
|
1922
|
+
# source://rbi//lib/rbi/rbs_printer.rb#90
|
1923
|
+
sig { override.params(node: ::RBI::Comment).void }
|
1924
|
+
def visit_comment(node); end
|
1925
|
+
|
1926
|
+
# source://rbi//lib/rbi/rbs_printer.rb#625
|
1927
|
+
sig { override.params(node: ::RBI::ConflictTree).void }
|
1928
|
+
def visit_conflict_tree(node); end
|
1929
|
+
|
1930
|
+
# source://rbi//lib/rbi/rbs_printer.rb#213
|
1931
|
+
sig { override.params(node: ::RBI::Const).void }
|
1932
|
+
def visit_const(node); end
|
1933
|
+
|
1934
|
+
# source://rbi//lib/rbi/rbs_printer.rb#454
|
1935
|
+
sig { override.params(node: ::RBI::Extend).void }
|
1936
|
+
def visit_extend(node); end
|
1937
|
+
|
1938
|
+
# source://rbi//lib/rbi/rbs_printer.rb#78
|
1939
|
+
sig { override.params(file: ::RBI::File).void }
|
1940
|
+
def visit_file(file); end
|
1941
|
+
|
1942
|
+
# source://rbi//lib/rbi/rbs_printer.rb#601
|
1943
|
+
sig { override.params(node: ::RBI::Group).void }
|
1944
|
+
def visit_group(node); end
|
1945
|
+
|
1946
|
+
# source://rbi//lib/rbi/rbs_printer.rb#591
|
1947
|
+
sig { override.params(node: ::RBI::Helper).void }
|
1948
|
+
def visit_helper(node); end
|
1949
|
+
|
1950
|
+
# source://rbi//lib/rbi/rbs_printer.rb#449
|
1951
|
+
sig { override.params(node: ::RBI::Include).void }
|
1952
|
+
def visit_include(node); end
|
1953
|
+
|
1954
|
+
# source://rbi//lib/rbi/rbs_printer.rb#510
|
1955
|
+
sig { override.params(node: ::RBI::KwArg).void }
|
1956
|
+
def visit_kw_arg(node); end
|
1957
|
+
|
1958
|
+
# source://rbi//lib/rbi/rbs_printer.rb#434
|
1959
|
+
sig { override.params(node: ::RBI::KwOptParam).void }
|
1960
|
+
def visit_kw_opt_param(node); end
|
1961
|
+
|
1962
|
+
# source://rbi//lib/rbi/rbs_printer.rb#429
|
1963
|
+
sig { override.params(node: ::RBI::KwParam).void }
|
1964
|
+
def visit_kw_param(node); end
|
1965
|
+
|
1966
|
+
# source://rbi//lib/rbi/rbs_printer.rb#439
|
1967
|
+
sig { override.params(node: ::RBI::KwRestParam).void }
|
1968
|
+
def visit_kw_rest_param(node); end
|
1969
|
+
|
1970
|
+
# source://rbi//lib/rbi/rbs_printer.rb#292
|
1971
|
+
sig { override.params(node: ::RBI::Method).void }
|
1972
|
+
def visit_method(node); end
|
1973
|
+
|
1974
|
+
# source://rbi//lib/rbi/rbs_printer.rb#596
|
1975
|
+
sig { override.params(node: ::RBI::MixesInClassMethods).void }
|
1976
|
+
def visit_mixes_in_class_methods(node); end
|
1977
|
+
|
1978
|
+
# source://rbi//lib/rbi/rbs_printer.rb#459
|
1979
|
+
sig { params(node: ::RBI::Mixin).void }
|
1980
|
+
def visit_mixin(node); end
|
1981
|
+
|
1982
|
+
# source://rbi//lib/rbi/rbs_printer.rb#118
|
1983
|
+
sig { override.params(node: ::RBI::Module).void }
|
1984
|
+
def visit_module(node); end
|
1985
|
+
|
1986
|
+
# source://rbi//lib/rbi/rbs_printer.rb#419
|
1987
|
+
sig { override.params(node: ::RBI::OptParam).void }
|
1988
|
+
def visit_opt_param(node); end
|
1989
|
+
|
1990
|
+
# source://rbi//lib/rbi/rbs_printer.rb#486
|
1991
|
+
sig { override.params(node: ::RBI::Private).void }
|
1992
|
+
def visit_private(node); end
|
1993
|
+
|
1994
|
+
# source://rbi//lib/rbi/rbs_printer.rb#481
|
1995
|
+
sig { override.params(node: ::RBI::Protected).void }
|
1996
|
+
def visit_protected(node); end
|
1997
|
+
|
1998
|
+
# source://rbi//lib/rbi/rbs_printer.rb#476
|
1999
|
+
sig { override.params(node: ::RBI::Public).void }
|
2000
|
+
def visit_public(node); end
|
2001
|
+
|
2002
|
+
# source://rbi//lib/rbi/rbs_printer.rb#414
|
2003
|
+
sig { override.params(node: ::RBI::ReqParam).void }
|
2004
|
+
def visit_req_param(node); end
|
2005
|
+
|
2006
|
+
# source://rbi//lib/rbi/rbs_printer.rb#620
|
2007
|
+
sig { override.params(node: ::RBI::RequiresAncestor).void }
|
2008
|
+
def visit_requires_ancestor(node); end
|
2009
|
+
|
2010
|
+
# source://rbi//lib/rbi/rbs_printer.rb#424
|
2011
|
+
sig { override.params(node: ::RBI::RestParam).void }
|
2012
|
+
def visit_rest_param(node); end
|
2013
|
+
|
2014
|
+
# source://rbi//lib/rbi/rbs_printer.rb#138
|
2015
|
+
sig { params(node: ::RBI::Scope).void }
|
2016
|
+
def visit_scope(node); end
|
2017
|
+
|
2018
|
+
# source://rbi//lib/rbi/rbs_printer.rb#201
|
2019
|
+
sig { params(node: ::RBI::Scope).void }
|
2020
|
+
def visit_scope_body(node); end
|
2021
|
+
|
2022
|
+
# source://rbi//lib/rbi/rbs_printer.rb#634
|
2023
|
+
sig { override.params(node: ::RBI::ScopeConflict).void }
|
2024
|
+
def visit_scope_conflict(node); end
|
2025
|
+
|
2026
|
+
# source://rbi//lib/rbi/rbs_printer.rb#148
|
2027
|
+
sig { params(node: ::RBI::Scope).void }
|
2028
|
+
def visit_scope_header(node); end
|
2029
|
+
|
2030
|
+
# source://rbi//lib/rbi/rbs_printer.rb#500
|
2031
|
+
sig { override.params(node: ::RBI::Send).void }
|
2032
|
+
def visit_send(node); end
|
2033
|
+
|
2034
|
+
# source://rbi//lib/rbi/rbs_printer.rb#133
|
2035
|
+
sig { override.params(node: ::RBI::SingletonClass).void }
|
2036
|
+
def visit_singleton_class(node); end
|
2037
|
+
|
2038
|
+
# source://rbi//lib/rbi/rbs_printer.rb#128
|
2039
|
+
sig { override.params(node: ::RBI::Struct).void }
|
2040
|
+
def visit_struct(node); end
|
2041
|
+
|
2042
|
+
# source://rbi//lib/rbi/rbs_printer.rb#563
|
2043
|
+
sig { override.params(node: ::RBI::TEnum).void }
|
2044
|
+
def visit_tenum(node); end
|
2045
|
+
|
2046
|
+
# source://rbi//lib/rbi/rbs_printer.rb#568
|
2047
|
+
sig { override.params(node: ::RBI::TEnumBlock).void }
|
2048
|
+
def visit_tenum_block(node); end
|
2049
|
+
|
2050
|
+
# source://rbi//lib/rbi/rbs_printer.rb#111
|
2051
|
+
sig { override.params(node: ::RBI::Tree).void }
|
2052
|
+
def visit_tree(node); end
|
2053
|
+
|
2054
|
+
# source://rbi//lib/rbi/rbs_printer.rb#515
|
2055
|
+
sig { override.params(node: ::RBI::TStruct).void }
|
2056
|
+
def visit_tstruct(node); end
|
2057
|
+
|
2058
|
+
# source://rbi//lib/rbi/rbs_printer.rb#549
|
2059
|
+
sig { override.params(node: ::RBI::TStructConst).void }
|
2060
|
+
def visit_tstruct_const(node); end
|
2061
|
+
|
2062
|
+
# source://rbi//lib/rbi/rbs_printer.rb#556
|
2063
|
+
sig { override.params(node: ::RBI::TStructProp).void }
|
2064
|
+
def visit_tstruct_prop(node); end
|
2065
|
+
|
2066
|
+
# source://rbi//lib/rbi/rbs_printer.rb#586
|
2067
|
+
sig { override.params(node: ::RBI::TypeMember).void }
|
2068
|
+
def visit_type_member(node); end
|
2069
|
+
|
2070
|
+
# source://rbi//lib/rbi/rbs_printer.rb#491
|
2071
|
+
sig { params(node: ::RBI::Visibility).void }
|
2072
|
+
def visit_visibility(node); end
|
2073
|
+
|
2074
|
+
# source://rbi//lib/rbi/rbs_printer.rb#607
|
2075
|
+
sig { override.params(node: ::RBI::VisibilityGroup).void }
|
2076
|
+
def visit_visibility_group(node); end
|
2077
|
+
|
2078
|
+
private
|
2079
|
+
|
2080
|
+
# source://rbi//lib/rbi/rbs_printer.rb#782
|
2081
|
+
sig { params(node: ::RBI::Type).returns(T::Boolean) }
|
2082
|
+
def bare_nilable_proc?(node); end
|
2083
|
+
|
2084
|
+
# source://rbi//lib/rbi/rbs_printer.rb#777
|
2085
|
+
sig { params(node: ::RBI::Type).returns(T::Boolean) }
|
2086
|
+
def bare_proc?(node); end
|
2087
|
+
|
2088
|
+
# source://rbi//lib/rbi/rbs_printer.rb#725
|
2089
|
+
sig { params(node: ::RBI::Node).returns(T::Boolean) }
|
2090
|
+
def oneline?(node); end
|
2091
|
+
|
2092
|
+
# Parse a string containing a `T.let(x, X)` and extract the type
|
2093
|
+
#
|
2094
|
+
# Returns `nil` is the string is not a `T.let`.
|
2095
|
+
#
|
2096
|
+
# source://rbi//lib/rbi/rbs_printer.rb#759
|
2097
|
+
sig { params(code: T.nilable(::String)).returns(T.nilable(::String)) }
|
2098
|
+
def parse_t_let(code); end
|
2099
|
+
|
2100
|
+
# source://rbi//lib/rbi/rbs_printer.rb#747
|
2101
|
+
sig { params(type: T.any(::RBI::Type, ::String)).returns(::RBI::Type) }
|
2102
|
+
def parse_type(type); end
|
2103
|
+
|
2104
|
+
# source://rbi//lib/rbi/rbs_printer.rb#650
|
2105
|
+
sig { params(node: ::RBI::Node).void }
|
2106
|
+
def print_blank_line_before(node); end
|
2107
|
+
|
2108
|
+
# source://rbi//lib/rbi/rbs_printer.rb#669
|
2109
|
+
sig { params(node: ::RBI::Node).void }
|
2110
|
+
def print_loc(node); end
|
2111
|
+
|
2112
|
+
# source://rbi//lib/rbi/rbs_printer.rb#699
|
2113
|
+
sig { params(node: ::RBI::Param, last: T::Boolean).void }
|
2114
|
+
def print_param_comment_leading_space(node, last:); end
|
2115
|
+
|
2116
|
+
# source://rbi//lib/rbi/rbs_printer.rb#675
|
2117
|
+
sig { params(node: ::RBI::Method, param: ::RBI::SigParam).void }
|
2118
|
+
def print_sig_param(node, param); end
|
2119
|
+
|
2120
|
+
# source://rbi//lib/rbi/rbs_printer.rb#717
|
2121
|
+
sig { params(node: ::RBI::SigParam, last: T::Boolean).void }
|
2122
|
+
def print_sig_param_comment_leading_space(node, last:); end
|
2123
|
+
end
|
2124
|
+
|
2125
|
+
# source://rbi//lib/rbi/rbs_printer.rb#6
|
2126
|
+
class RBI::RBSPrinter::Error < ::RBI::Error; end
|
2127
|
+
|
2128
|
+
# source://rbi//lib/rbi/model.rb#5
|
2129
|
+
class RBI::ReplaceNodeError < ::RBI::Error; end
|
2130
|
+
|
2131
|
+
# source://rbi//lib/rbi/model.rb#654
|
2132
|
+
class RBI::ReqParam < ::RBI::Param
|
2133
|
+
# source://rbi//lib/rbi/model.rb#665
|
2134
|
+
sig do
|
2135
|
+
params(
|
2136
|
+
name: ::String,
|
2137
|
+
loc: T.nilable(::RBI::Loc),
|
2138
|
+
comments: T::Array[::RBI::Comment],
|
2139
|
+
block: T.nilable(T.proc.params(node: ::RBI::ReqParam).void)
|
2140
|
+
).void
|
2141
|
+
end
|
2142
|
+
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
2143
|
+
|
2144
|
+
# source://rbi//lib/rbi/model.rb#671
|
2145
|
+
sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
|
2146
|
+
def ==(other); end
|
2147
|
+
end
|
2148
|
+
|
2149
|
+
# source://rbi//lib/rbi/model.rb#1458
|
2150
|
+
class RBI::RequiresAncestor < ::RBI::NodeWithComments
|
2151
|
+
include ::RBI::Indexable
|
2152
|
+
|
2153
|
+
# source://rbi//lib/rbi/model.rb#1471
|
2154
|
+
sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void }
|
2155
|
+
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
|
2156
|
+
|
2157
|
+
# source://rbi//lib/rbi/index.rb#163
|
2158
|
+
sig { override.returns(T::Array[::String]) }
|
2159
|
+
def index_ids; end
|
2160
|
+
|
2161
|
+
# source://rbi//lib/rbi/model.rb#1462
|
2162
|
+
sig { returns(::String) }
|
2163
|
+
def name; end
|
2164
|
+
|
2165
|
+
# source://rbi//lib/rbi/model.rb#1477
|
2166
|
+
sig { override.returns(::String) }
|
2167
|
+
def to_s; end
|
2168
|
+
end
|
2169
|
+
|
2170
|
+
# source://rbi//lib/rbi/model.rb#703
|
2171
|
+
class RBI::RestParam < ::RBI::Param
|
2172
|
+
# source://rbi//lib/rbi/model.rb#714
|
2173
|
+
sig do
|
2174
|
+
params(
|
2175
|
+
name: ::String,
|
2176
|
+
loc: T.nilable(::RBI::Loc),
|
2177
|
+
comments: T::Array[::RBI::Comment],
|
2178
|
+
block: T.nilable(T.proc.params(node: ::RBI::RestParam).void)
|
2179
|
+
).void
|
2180
|
+
end
|
2181
|
+
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
2182
|
+
|
2183
|
+
# source://rbi//lib/rbi/model.rb#725
|
2184
|
+
sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
|
2185
|
+
def ==(other); end
|
2186
|
+
|
2187
|
+
# source://rbi//lib/rbi/model.rb#720
|
2188
|
+
sig { override.returns(::String) }
|
2189
|
+
def to_s; end
|
2190
|
+
end
|
2191
|
+
|
2192
|
+
# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#5
|
2193
|
+
module RBI::Rewriters; end
|
2194
|
+
|
2195
|
+
# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#6
|
2196
|
+
class RBI::Rewriters::AddSigTemplates < ::RBI::Visitor
|
2197
|
+
# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#10
|
2198
|
+
sig { params(with_todo_comment: T::Boolean).void }
|
2199
|
+
def initialize(with_todo_comment: T.unsafe(nil)); end
|
2200
|
+
|
2201
|
+
# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#16
|
2202
|
+
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
2203
|
+
def visit(node); end
|
2204
|
+
|
2205
|
+
private
|
2206
|
+
|
2207
|
+
# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#30
|
2208
|
+
sig { params(attr: ::RBI::Attr).void }
|
2209
|
+
def add_attr_sig(attr); end
|
2210
|
+
|
2211
|
+
# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#45
|
2212
|
+
sig { params(method: ::RBI::Method).void }
|
2213
|
+
def add_method_sig(method); end
|
2214
|
+
|
2215
|
+
# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#56
|
2216
|
+
sig { params(node: ::RBI::NodeWithComments).void }
|
2217
|
+
def add_todo_comment(node); end
|
2218
|
+
end
|
2219
|
+
|
2220
|
+
# source://rbi//lib/rbi/rewriters/annotate.rb#6
|
2221
|
+
class RBI::Rewriters::Annotate < ::RBI::Visitor
|
2222
|
+
# source://rbi//lib/rbi/rewriters/annotate.rb#10
|
2223
|
+
sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void }
|
2224
|
+
def initialize(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end
|
2225
|
+
|
2226
|
+
# source://rbi//lib/rbi/rewriters/annotate.rb#18
|
2227
|
+
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
2228
|
+
def visit(node); end
|
2229
|
+
|
2230
|
+
private
|
2231
|
+
|
2232
|
+
# source://rbi//lib/rbi/rewriters/annotate.rb#31
|
2233
|
+
sig { params(node: ::RBI::NodeWithComments).void }
|
2234
|
+
def annotate_node(node); end
|
2235
|
+
|
2236
|
+
# source://rbi//lib/rbi/rewriters/annotate.rb#38
|
2237
|
+
sig { params(node: ::RBI::Node).returns(T::Boolean) }
|
2238
|
+
def root?(node); end
|
2239
|
+
end
|
2240
|
+
|
2241
|
+
# source://rbi//lib/rbi/rewriters/attr_to_methods.rb#22
|
2242
|
+
class RBI::Rewriters::AttrToMethods < ::RBI::Visitor
|
2243
|
+
# source://rbi//lib/rbi/rewriters/attr_to_methods.rb#26
|
2244
|
+
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
2245
|
+
def visit(node); end
|
2246
|
+
|
2247
|
+
private
|
2248
|
+
|
2249
|
+
# @raise [ReplaceNodeError]
|
2250
|
+
#
|
2251
|
+
# source://rbi//lib/rbi/rewriters/attr_to_methods.rb#39
|
2252
|
+
sig { params(node: ::RBI::Node, with: T::Array[::RBI::Node]).void }
|
2253
|
+
def replace(node, with:); end
|
2254
|
+
end
|
2255
|
+
|
2256
|
+
# source://rbi//lib/rbi/rewriters/deannotate.rb#6
|
2257
|
+
class RBI::Rewriters::Deannotate < ::RBI::Visitor
|
2258
|
+
# source://rbi//lib/rbi/rewriters/deannotate.rb#10
|
2259
|
+
sig { params(annotation: ::String).void }
|
2260
|
+
def initialize(annotation); end
|
2261
|
+
|
2262
|
+
# source://rbi//lib/rbi/rewriters/deannotate.rb#16
|
2263
|
+
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
2264
|
+
def visit(node); end
|
2265
|
+
|
2266
|
+
private
|
2267
|
+
|
2268
|
+
# source://rbi//lib/rbi/rewriters/deannotate.rb#27
|
2269
|
+
sig { params(node: ::RBI::NodeWithComments).void }
|
2270
|
+
def deannotate_node(node); end
|
2271
|
+
end
|
2272
|
+
|
2273
|
+
# Take a gem version and filter out all RBI that is not relevant to that version based on @version annotations
|
2274
|
+
# in comments. As an example:
|
2275
|
+
#
|
2276
|
+
# ~~~rb
|
2277
|
+
# tree = Parser.parse_string(<<~RBI)
|
2278
|
+
# class Foo
|
2279
|
+
# # @version > 0.3.0
|
2280
|
+
# def bar
|
2281
|
+
# end
|
2282
|
+
#
|
2283
|
+
# # @version <= 0.3.0
|
2284
|
+
# def bar(arg1)
|
2285
|
+
# end
|
2286
|
+
# end
|
2287
|
+
# RBI
|
2288
|
+
#
|
2289
|
+
# Rewriters::FilterVersions.filter(tree, Gem::Version.new("0.3.1"))
|
2290
|
+
#
|
2291
|
+
# assert_equal(<<~RBI, tree.string)
|
2292
|
+
# class Foo
|
2293
|
+
# # @version > 0.3.0
|
2294
|
+
# def bar
|
2295
|
+
# end
|
2296
|
+
# end
|
2297
|
+
# RBI
|
2298
|
+
# ~~~
|
2299
|
+
#
|
2300
|
+
# Supported operators:
|
2301
|
+
# - equals `=`
|
2302
|
+
# - not equals `!=`
|
2303
|
+
# - greater than `>`
|
2304
|
+
# - greater than or equal to `>=`
|
2305
|
+
# - less than `<`
|
2306
|
+
# - less than or equal to `<=`
|
2307
|
+
# - pessimistic or twiddle-wakka`~>`
|
2308
|
+
#
|
2309
|
+
# And/or logic:
|
2310
|
+
# - "And" logic: put multiple versions on the same line
|
2311
|
+
# - e.g. `@version > 0.3.0, <1.0.0` means version must be greater than 0.3.0 AND less than 1.0.0
|
2312
|
+
# - "Or" logic: put multiple versions on subsequent lines
|
2313
|
+
# - e.g. the following means version must be less than 0.3.0 OR greater than 1.0.0
|
2314
|
+
# ```
|
2315
|
+
# # @version < 0.3.0
|
2316
|
+
# # @version > 1.0.0
|
2317
|
+
# ```
|
2318
|
+
# Prerelease versions:
|
2319
|
+
# - Prerelease versions are considered less than their non-prerelease counterparts
|
2320
|
+
# - e.g. `0.4.0-prerelease` is less than `0.4.0`
|
2321
|
+
#
|
2322
|
+
# RBI with no versions:
|
2323
|
+
# - RBI with no version annotations are automatically counted towards ALL versions
|
2324
|
+
#
|
2325
|
+
# source://rbi//lib/rbi/rewriters/filter_versions.rb#57
|
2326
|
+
class RBI::Rewriters::FilterVersions < ::RBI::Visitor
|
2327
|
+
# source://rbi//lib/rbi/rewriters/filter_versions.rb#73
|
2328
|
+
sig { params(version: ::Gem::Version).void }
|
2329
|
+
def initialize(version); end
|
2330
|
+
|
2331
|
+
# source://rbi//lib/rbi/rewriters/filter_versions.rb#79
|
2332
|
+
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
2333
|
+
def visit(node); end
|
2334
|
+
|
2335
|
+
class << self
|
2336
|
+
# source://rbi//lib/rbi/rewriters/filter_versions.rb#66
|
2337
|
+
sig { params(tree: ::RBI::Tree, version: ::Gem::Version).void }
|
2338
|
+
def filter(tree, version); end
|
2339
|
+
end
|
2340
|
+
end
|
2341
|
+
|
2342
|
+
# source://rbi//lib/rbi/rewriters/filter_versions.rb#60
|
2343
|
+
RBI::Rewriters::FilterVersions::VERSION_PREFIX = T.let(T.unsafe(nil), String)
|
2344
|
+
|
2345
|
+
# Rewrite non-singleton methods inside singleton classes to singleton methods
|
2346
|
+
#
|
2347
|
+
# Example:
|
2348
|
+
# ~~~rb
|
2349
|
+
# class << self
|
2350
|
+
# def m1; end
|
2351
|
+
# def self.m2; end
|
2352
|
+
#
|
2353
|
+
# class << self
|
2354
|
+
# def m3; end
|
2355
|
+
# end
|
2356
|
+
# end
|
2357
|
+
# ~~~
|
2358
|
+
#
|
2359
|
+
# will be rewritten to:
|
2360
|
+
#
|
2361
|
+
# ~~~rb
|
2362
|
+
# def self.m1; end
|
2363
|
+
#
|
2364
|
+
# class << self
|
2365
|
+
# def self.m2; end
|
2366
|
+
# def self.m3; end
|
2367
|
+
# end
|
2368
|
+
# ~~~
|
2369
|
+
#
|
2370
|
+
# source://rbi//lib/rbi/rewriters/flatten_singleton_methods.rb#30
|
2371
|
+
class RBI::Rewriters::FlattenSingletonMethods < ::RBI::Visitor
|
2372
|
+
# source://rbi//lib/rbi/rewriters/flatten_singleton_methods.rb#34
|
2373
|
+
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
2374
|
+
def visit(node); end
|
2375
|
+
end
|
2376
|
+
|
2377
|
+
# Flattens visibility nodes into method nodes
|
2378
|
+
#
|
2379
|
+
# Example:
|
2380
|
+
# ~~~rb
|
2381
|
+
# class A
|
2382
|
+
# def m1; end
|
2383
|
+
# private
|
2384
|
+
# def m2; end
|
2385
|
+
# def m3; end
|
2386
|
+
# end
|
2387
|
+
# ~~~
|
2388
|
+
#
|
2389
|
+
# will be transformed into:
|
2390
|
+
#
|
2391
|
+
# ~~~rb
|
2392
|
+
# class A
|
2393
|
+
# def m1; end
|
2394
|
+
# private def m2; end
|
2395
|
+
# private def m3; end
|
2396
|
+
# end
|
2397
|
+
# ~~~
|
2398
|
+
#
|
2399
|
+
# source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#27
|
2400
|
+
class RBI::Rewriters::FlattenVisibilities < ::RBI::Visitor
|
2401
|
+
# source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#31
|
2402
|
+
sig { void }
|
2403
|
+
def initialize; end
|
2404
|
+
|
2405
|
+
# source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#38
|
2406
|
+
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
2407
|
+
def visit(node); end
|
2408
|
+
end
|
2409
|
+
|
2410
|
+
# source://rbi//lib/rbi/rewriters/group_nodes.rb#8
|
2411
|
+
class RBI::Rewriters::GroupNodes < ::RBI::Visitor
|
2412
|
+
# source://rbi//lib/rbi/rewriters/group_nodes.rb#12
|
2413
|
+
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
2414
|
+
def visit(node); end
|
2415
|
+
|
2416
|
+
private
|
2417
|
+
|
2418
|
+
# source://rbi//lib/rbi/rewriters/group_nodes.rb#36
|
2419
|
+
sig { params(node: ::RBI::Node).returns(::RBI::Group::Kind) }
|
2420
|
+
def group_kind(node); end
|
2421
|
+
end
|
2422
|
+
|
2423
|
+
# Merge two RBI trees together
|
2424
|
+
#
|
2425
|
+
# Be this `Tree`:
|
2426
|
+
# ~~~rb
|
2427
|
+
# class Foo
|
2428
|
+
# attr_accessor :a
|
2429
|
+
# def m; end
|
2430
|
+
# C = 10
|
2431
|
+
# end
|
2432
|
+
# ~~~
|
2433
|
+
#
|
2434
|
+
# Merged with this one:
|
2435
|
+
# ~~~rb
|
2436
|
+
# class Foo
|
2437
|
+
# attr_reader :a
|
2438
|
+
# def m(x); end
|
2439
|
+
# C = 10
|
2440
|
+
# end
|
2441
|
+
# ~~~
|
2442
|
+
#
|
2443
|
+
# Compatible definitions are merged together while incompatible definitions are moved into a `ConflictTree`:
|
2444
|
+
# ~~~rb
|
2445
|
+
# class Foo
|
2446
|
+
# <<<<<<< left
|
2447
|
+
# attr_accessor :a
|
2448
|
+
# def m; end
|
2449
|
+
# =======
|
2450
|
+
# attr_reader :a
|
2451
|
+
# def m(x); end
|
2452
|
+
# >>>>>>> right
|
2453
|
+
# C = 10
|
2454
|
+
# end
|
2455
|
+
# ~~~
|
2456
|
+
#
|
2457
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#39
|
2458
|
+
class RBI::Rewriters::Merge
|
2459
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#70
|
2460
|
+
sig { params(left_name: ::String, right_name: ::String, keep: ::RBI::Rewriters::Merge::Keep).void }
|
2461
|
+
def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
|
2462
|
+
|
2463
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#79
|
2464
|
+
sig { params(tree: ::RBI::Tree).void }
|
2465
|
+
def merge(tree); end
|
2466
|
+
|
2467
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#67
|
2468
|
+
sig { returns(::RBI::MergeTree) }
|
2469
|
+
def tree; end
|
2470
|
+
|
2471
|
+
class << self
|
2472
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#54
|
2473
|
+
sig do
|
2474
|
+
params(
|
2475
|
+
left: ::RBI::Tree,
|
2476
|
+
right: ::RBI::Tree,
|
2477
|
+
left_name: ::String,
|
2478
|
+
right_name: ::String,
|
2479
|
+
keep: ::RBI::Rewriters::Merge::Keep
|
2480
|
+
).returns(::RBI::MergeTree)
|
2481
|
+
end
|
2482
|
+
def merge_trees(left, right, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
|
2483
|
+
end
|
2484
|
+
end
|
2485
|
+
|
2486
|
+
# Used for logging / error displaying purpose
|
2487
|
+
#
|
2488
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#86
|
2489
|
+
class RBI::Rewriters::Merge::Conflict < ::T::Struct
|
2490
|
+
const :left, ::RBI::Node
|
2491
|
+
const :right, ::RBI::Node
|
2492
|
+
const :left_name, ::String
|
2493
|
+
const :right_name, ::String
|
2494
|
+
|
2495
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#95
|
2496
|
+
sig { returns(::String) }
|
2497
|
+
def to_s; end
|
2498
|
+
|
2499
|
+
class << self
|
2500
|
+
# source://sorbet-runtime/0.5.11633/lib/types/struct.rb#13
|
2501
|
+
def inherited(s); end
|
2502
|
+
end
|
2503
|
+
end
|
2504
|
+
|
2505
|
+
# Merge adjacent conflict trees
|
2506
|
+
#
|
2507
|
+
# Transform this:
|
2508
|
+
# ~~~rb
|
2509
|
+
# class Foo
|
2510
|
+
# <<<<<<< left
|
2511
|
+
# def m1; end
|
2512
|
+
# =======
|
2513
|
+
# def m1(a); end
|
2514
|
+
# >>>>>>> right
|
2515
|
+
# <<<<<<< left
|
2516
|
+
# def m2(a); end
|
2517
|
+
# =======
|
2518
|
+
# def m2; end
|
2519
|
+
# >>>>>>> right
|
2520
|
+
# end
|
2521
|
+
# ~~~
|
2522
|
+
#
|
2523
|
+
# Into this:
|
2524
|
+
# ~~~rb
|
2525
|
+
# class Foo
|
2526
|
+
# <<<<<<< left
|
2527
|
+
# def m1; end
|
2528
|
+
# def m2(a); end
|
2529
|
+
# =======
|
2530
|
+
# def m1(a); end
|
2531
|
+
# def m2; end
|
2532
|
+
# >>>>>>> right
|
2533
|
+
# end
|
2534
|
+
# ~~~
|
2535
|
+
#
|
2536
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#245
|
2537
|
+
class RBI::Rewriters::Merge::ConflictTreeMerger < ::RBI::Visitor
|
2538
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#247
|
2539
|
+
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
2540
|
+
def visit(node); end
|
2541
|
+
|
2542
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#252
|
2543
|
+
sig { override.params(nodes: T::Array[::RBI::Node]).void }
|
2544
|
+
def visit_all(nodes); end
|
2545
|
+
|
2546
|
+
private
|
2547
|
+
|
2548
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#273
|
2549
|
+
sig { params(left: ::RBI::Tree, right: ::RBI::Tree).void }
|
2550
|
+
def merge_conflict_trees(left, right); end
|
2551
|
+
end
|
2552
|
+
|
2553
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#42
|
2554
|
+
class RBI::Rewriters::Merge::Keep < ::T::Enum
|
2555
|
+
enums do
|
2556
|
+
LEFT = new
|
2557
|
+
NONE = new
|
2558
|
+
RIGHT = new
|
2559
|
+
end
|
2560
|
+
end
|
2561
|
+
|
2562
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#100
|
2563
|
+
class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor
|
2564
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#107
|
2565
|
+
sig do
|
2566
|
+
params(
|
2567
|
+
output: ::RBI::Tree,
|
2568
|
+
left_name: ::String,
|
2569
|
+
right_name: ::String,
|
2570
|
+
keep: ::RBI::Rewriters::Merge::Keep
|
2571
|
+
).void
|
2572
|
+
end
|
2573
|
+
def initialize(output, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
|
2574
|
+
|
2575
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#104
|
2576
|
+
sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) }
|
2577
|
+
def conflicts; end
|
2578
|
+
|
2579
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#119
|
2580
|
+
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
2581
|
+
def visit(node); end
|
2582
|
+
|
2583
|
+
private
|
2584
|
+
|
2585
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#168
|
2586
|
+
sig { returns(::RBI::Tree) }
|
2587
|
+
def current_scope; end
|
2588
|
+
|
2589
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#185
|
2590
|
+
sig { params(left: ::RBI::Scope, right: ::RBI::Scope).void }
|
2591
|
+
def make_conflict_scope(left, right); end
|
2592
|
+
|
2593
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#192
|
2594
|
+
sig { params(left: ::RBI::Node, right: ::RBI::Node).void }
|
2595
|
+
def make_conflict_tree(left, right); end
|
2596
|
+
|
2597
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#173
|
2598
|
+
sig { params(node: ::RBI::Node).returns(T.nilable(::RBI::Node)) }
|
2599
|
+
def previous_definition(node); end
|
2600
|
+
|
2601
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#204
|
2602
|
+
sig { params(left: ::RBI::Scope, right: ::RBI::Scope).returns(::RBI::Scope) }
|
2603
|
+
def replace_scope_header(left, right); end
|
2604
|
+
end
|
2605
|
+
|
2606
|
+
# source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#6
|
2607
|
+
class RBI::Rewriters::NestNonPublicMembers < ::RBI::Visitor
|
2608
|
+
# source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#10
|
2609
|
+
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
2610
|
+
def visit(node); end
|
2611
|
+
end
|
2612
|
+
|
2613
|
+
# source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#6
|
2614
|
+
class RBI::Rewriters::NestSingletonMethods < ::RBI::Visitor
|
2615
|
+
# source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#10
|
2616
|
+
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
2617
|
+
def visit(node); end
|
2618
|
+
end
|
2619
|
+
|
2620
|
+
# This rewriter moves top-level members into a top-level Object class
|
2621
|
+
#
|
2622
|
+
# Example:
|
2623
|
+
# ~~~rb
|
2624
|
+
# def foo; end
|
2625
|
+
# attr_reader :bar
|
2626
|
+
# ~~~
|
2627
|
+
#
|
2628
|
+
# will be rewritten to:
|
2629
|
+
#
|
2630
|
+
# ~~~rb
|
2631
|
+
# class Object
|
2632
|
+
# def foo; end
|
2633
|
+
# attr_reader :bar
|
2634
|
+
# end
|
2635
|
+
# ~~~
|
2636
|
+
#
|
2637
|
+
# source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#22
|
2638
|
+
class RBI::Rewriters::NestTopLevelMembers < ::RBI::Visitor
|
2639
|
+
# source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#26
|
2640
|
+
sig { void }
|
2641
|
+
def initialize; end
|
2642
|
+
|
2643
|
+
# source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#33
|
2644
|
+
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
2645
|
+
def visit(node); end
|
2646
|
+
end
|
2647
|
+
|
2648
|
+
# Remove all definitions existing in the index from the current tree
|
2649
|
+
#
|
2650
|
+
# Let's create an `Index` from two different `Tree`s:
|
2651
|
+
# ~~~rb
|
2652
|
+
# tree1 = Parse.parse_string(<<~RBI)
|
2653
|
+
# class Foo
|
2654
|
+
# def foo; end
|
2655
|
+
# end
|
2656
|
+
# RBI
|
2657
|
+
#
|
2658
|
+
# tree2 = Parse.parse_string(<<~RBI)
|
2659
|
+
# FOO = 10
|
2660
|
+
# RBI
|
2661
|
+
#
|
2662
|
+
# index = Index.index(tree1, tree2)
|
2663
|
+
# ~~~
|
2664
|
+
#
|
2665
|
+
# We can use `RemoveKnownDefinitions` to remove the definitions found in the `index` from the `Tree` to clean:
|
2666
|
+
# ~~~rb
|
2667
|
+
# tree_to_clean = Parser.parse_string(<<~RBI)
|
2668
|
+
# class Foo
|
2669
|
+
# def foo; end
|
2670
|
+
# def bar; end
|
2671
|
+
# end
|
2672
|
+
# FOO = 10
|
2673
|
+
# BAR = 42
|
2674
|
+
# RBI
|
2675
|
+
#
|
2676
|
+
# cleaned_tree, operations = RemoveKnownDefinitions.remove(tree_to_clean, index)
|
2677
|
+
#
|
2678
|
+
# assert_equal(<<~RBI, cleaned_tree)
|
2679
|
+
# class Foo
|
2680
|
+
# def bar; end
|
2681
|
+
# end
|
2682
|
+
# BAR = 42
|
2683
|
+
# RBI
|
2684
|
+
#
|
2685
|
+
# assert_equal(<<~OPERATIONS, operations.join("\n"))
|
2686
|
+
# Deleted ::Foo#foo at -:2:2-2-16 (duplicate from -:2:2-2:16)
|
2687
|
+
# Deleted ::FOO at -:5:0-5:8 (duplicate from -:1:0-1:8)
|
2688
|
+
# OPERATIONS
|
2689
|
+
# ~~~
|
2690
|
+
#
|
2691
|
+
# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#48
|
2692
|
+
class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor
|
2693
|
+
# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#55
|
2694
|
+
sig { params(index: ::RBI::Index).void }
|
2695
|
+
def initialize(index); end
|
2696
|
+
|
2697
|
+
# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#52
|
2698
|
+
sig { returns(T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]) }
|
2699
|
+
def operations; end
|
2700
|
+
|
2701
|
+
# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#83
|
2702
|
+
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
2703
|
+
def visit(node); end
|
2704
|
+
|
2705
|
+
# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#78
|
2706
|
+
sig { params(nodes: T::Array[::RBI::Node]).void }
|
2707
|
+
def visit_all(nodes); end
|
2708
|
+
|
2709
|
+
private
|
2710
|
+
|
2711
|
+
# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#111
|
2712
|
+
sig { params(node: ::RBI::Node, previous: ::RBI::Node).returns(T::Boolean) }
|
2713
|
+
def can_delete_node?(node, previous); end
|
2714
|
+
|
2715
|
+
# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#129
|
2716
|
+
sig { params(node: ::RBI::Node, previous: ::RBI::Node).void }
|
2717
|
+
def delete_node(node, previous); end
|
2718
|
+
|
2719
|
+
# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#102
|
2720
|
+
sig { params(node: ::RBI::Indexable).returns(T.nilable(::RBI::Node)) }
|
2721
|
+
def previous_definition_for(node); end
|
2722
|
+
|
2723
|
+
class << self
|
2724
|
+
# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#70
|
2725
|
+
sig do
|
2726
|
+
params(
|
2727
|
+
tree: ::RBI::Tree,
|
2728
|
+
index: ::RBI::Index
|
2729
|
+
).returns([::RBI::Tree, T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]])
|
2730
|
+
end
|
2731
|
+
def remove(tree, index); end
|
2732
|
+
end
|
2733
|
+
end
|
2734
|
+
|
2735
|
+
# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#134
|
2736
|
+
class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct
|
2737
|
+
const :deleted_node, ::RBI::Node
|
2738
|
+
const :duplicate_of, ::RBI::Node
|
2739
|
+
|
2740
|
+
# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#141
|
2741
|
+
sig { returns(::String) }
|
2742
|
+
def to_s; end
|
2743
|
+
|
2744
|
+
class << self
|
2745
|
+
# source://sorbet-runtime/0.5.11633/lib/types/struct.rb#13
|
2746
|
+
def inherited(s); end
|
2747
|
+
end
|
2748
|
+
end
|
2749
|
+
|
2750
|
+
# source://rbi//lib/rbi/rewriters/sort_nodes.rb#6
|
2751
|
+
class RBI::Rewriters::SortNodes < ::RBI::Visitor
|
2752
|
+
# source://rbi//lib/rbi/rewriters/sort_nodes.rb#10
|
2753
|
+
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
2754
|
+
def visit(node); end
|
2755
|
+
|
2756
|
+
private
|
2757
|
+
|
2758
|
+
# source://rbi//lib/rbi/rewriters/sort_nodes.rb#73
|
2759
|
+
sig { params(kind: ::RBI::Group::Kind).returns(::Integer) }
|
2760
|
+
def group_rank(kind); end
|
2761
|
+
|
2762
|
+
# source://rbi//lib/rbi/rewriters/sort_nodes.rb#94
|
2763
|
+
sig { params(node: ::RBI::Node).returns(T.nilable(::String)) }
|
2764
|
+
def node_name(node); end
|
2765
|
+
|
2766
|
+
# source://rbi//lib/rbi/rewriters/sort_nodes.rb#45
|
2767
|
+
sig { params(node: ::RBI::Node).returns(::Integer) }
|
2768
|
+
def node_rank(node); end
|
2769
|
+
|
2770
|
+
# source://rbi//lib/rbi/rewriters/sort_nodes.rb#106
|
2771
|
+
sig { params(node: ::RBI::Node).void }
|
2772
|
+
def sort_node_names!(node); end
|
2773
|
+
end
|
2774
|
+
|
2775
|
+
# Scopes
|
2776
|
+
#
|
2777
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
2778
|
+
#
|
2779
|
+
# source://rbi//lib/rbi/model.rb#178
|
2780
|
+
class RBI::Scope < ::RBI::Tree
|
2781
|
+
include ::RBI::Indexable
|
2782
|
+
|
2783
|
+
abstract!
|
2784
|
+
|
2785
|
+
# Duplicate `self` scope without its body
|
2786
|
+
#
|
2787
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#358
|
2788
|
+
sig { returns(T.self_type) }
|
2789
|
+
def dup_empty; end
|
2790
|
+
|
2791
|
+
# @abstract
|
2792
|
+
#
|
2793
|
+
# source://rbi//lib/rbi/model.rb#184
|
2794
|
+
sig { abstract.returns(::String) }
|
2795
|
+
def fully_qualified_name; end
|
2796
|
+
|
2797
|
+
# source://rbi//lib/rbi/index.rb#93
|
2798
|
+
sig { override.returns(T::Array[::String]) }
|
2799
|
+
def index_ids; end
|
2800
|
+
|
2801
|
+
# source://rbi//lib/rbi/model.rb#187
|
2802
|
+
sig { override.returns(::String) }
|
2803
|
+
def to_s; end
|
2804
|
+
end
|
2805
|
+
|
2806
|
+
# A conflict between two scope headers
|
2807
|
+
#
|
2808
|
+
# Is rendered as a merge conflict between `left` and` right` for scope definitions:
|
2809
|
+
# ~~~rb
|
2810
|
+
# <<<<<<< left
|
2811
|
+
# class Foo
|
2812
|
+
# =======
|
2813
|
+
# module Foo
|
2814
|
+
# >>>>>>> right
|
2815
|
+
# def m1; end
|
2816
|
+
# end
|
2817
|
+
# ~~~
|
2818
|
+
#
|
2819
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#616
|
2820
|
+
class RBI::ScopeConflict < ::RBI::Tree
|
2821
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#633
|
2822
|
+
sig { params(left: ::RBI::Scope, right: ::RBI::Scope, left_name: ::String, right_name: ::String).void }
|
2823
|
+
def initialize(left:, right:, left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end
|
2824
|
+
|
2825
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#620
|
2826
|
+
sig { returns(::RBI::Scope) }
|
2827
|
+
def left; end
|
2828
|
+
|
2829
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#623
|
2830
|
+
sig { returns(::String) }
|
2831
|
+
def left_name; end
|
2832
|
+
|
2833
|
+
# @return [Scope]
|
2834
|
+
#
|
2835
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#620
|
2836
|
+
def right; end
|
2837
|
+
|
2838
|
+
# @return [String]
|
2839
|
+
#
|
2840
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#623
|
2841
|
+
def right_name; end
|
2842
|
+
end
|
2843
|
+
|
2844
|
+
# Sends
|
2845
|
+
#
|
2846
|
+
# source://rbi//lib/rbi/model.rb#1004
|
2847
|
+
class RBI::Send < ::RBI::NodeWithComments
|
2848
|
+
include ::RBI::Indexable
|
2849
|
+
|
2850
|
+
# source://rbi//lib/rbi/model.rb#1022
|
2851
|
+
sig do
|
2852
|
+
params(
|
2853
|
+
method: ::String,
|
2854
|
+
args: T::Array[::RBI::Arg],
|
2855
|
+
loc: T.nilable(::RBI::Loc),
|
2856
|
+
comments: T::Array[::RBI::Comment],
|
2857
|
+
block: T.nilable(T.proc.params(node: ::RBI::Send).void)
|
2858
|
+
).void
|
2859
|
+
end
|
2860
|
+
def initialize(method, args = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
2861
|
+
|
2862
|
+
# source://rbi//lib/rbi/model.rb#1030
|
2863
|
+
sig { params(arg: ::RBI::Arg).void }
|
2864
|
+
def <<(arg); end
|
2865
|
+
|
2866
|
+
# source://rbi//lib/rbi/model.rb#1035
|
2867
|
+
sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
|
2868
|
+
def ==(other); end
|
2869
|
+
|
2870
|
+
# source://rbi//lib/rbi/model.rb#1011
|
2871
|
+
sig { returns(T::Array[::RBI::Arg]) }
|
2872
|
+
def args; end
|
2873
|
+
|
2874
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#537
|
2875
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
2876
|
+
def compatible_with?(other); end
|
2877
|
+
|
2878
|
+
# source://rbi//lib/rbi/index.rb#193
|
2879
|
+
sig { override.returns(T::Array[::String]) }
|
2880
|
+
def index_ids; end
|
2881
|
+
|
2882
|
+
# source://rbi//lib/rbi/model.rb#1008
|
2883
|
+
sig { returns(::String) }
|
2884
|
+
def method; end
|
2885
|
+
|
2886
|
+
# source://rbi//lib/rbi/model.rb#1040
|
2887
|
+
sig { returns(::String) }
|
2888
|
+
def to_s; end
|
2889
|
+
end
|
2890
|
+
|
2891
|
+
# Sorbet's sigs
|
2892
|
+
#
|
2893
|
+
# source://rbi//lib/rbi/model.rb#1104
|
2894
|
+
class RBI::Sig < ::RBI::NodeWithComments
|
2895
|
+
# source://rbi//lib/rbi/model.rb#1137
|
2896
|
+
sig do
|
2897
|
+
params(
|
2898
|
+
params: T::Array[::RBI::SigParam],
|
2899
|
+
return_type: T.any(::RBI::Type, ::String),
|
2900
|
+
is_abstract: T::Boolean,
|
2901
|
+
is_override: T::Boolean,
|
2902
|
+
is_overridable: T::Boolean,
|
2903
|
+
is_final: T::Boolean,
|
2904
|
+
type_params: T::Array[::String],
|
2905
|
+
checked: T.nilable(::Symbol),
|
2906
|
+
loc: T.nilable(::RBI::Loc),
|
2907
|
+
comments: T::Array[::RBI::Comment],
|
2908
|
+
block: T.nilable(T.proc.params(node: ::RBI::Sig).void)
|
2909
|
+
).void
|
2910
|
+
end
|
2911
|
+
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), comments: T.unsafe(nil), &block); end
|
2912
|
+
|
2913
|
+
# source://rbi//lib/rbi/model.rb#1163
|
2914
|
+
sig { params(param: ::RBI::SigParam).void }
|
2915
|
+
def <<(param); end
|
2916
|
+
|
2917
|
+
# source://rbi//lib/rbi/model.rb#1173
|
2918
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
2919
|
+
def ==(other); end
|
2920
|
+
|
2921
|
+
# source://rbi//lib/rbi/model.rb#1168
|
2922
|
+
sig { params(name: ::String, type: T.any(::RBI::Type, ::String)).void }
|
2923
|
+
def add_param(name, type); end
|
2924
|
+
|
2925
|
+
# source://rbi//lib/rbi/model.rb#1120
|
2926
|
+
sig { returns(T.nilable(::Symbol)) }
|
2927
|
+
def checked; end
|
2928
|
+
|
2929
|
+
# @return [Symbol, nil]
|
2930
|
+
#
|
2931
|
+
# source://rbi//lib/rbi/model.rb#1120
|
2932
|
+
def checked=(_arg0); end
|
2933
|
+
|
2934
|
+
# source://rbi//lib/rbi/model.rb#1114
|
2935
|
+
sig { returns(T::Boolean) }
|
2936
|
+
def is_abstract; end
|
2937
|
+
|
2938
|
+
# @return [Boolean]
|
2939
|
+
#
|
2940
|
+
# source://rbi//lib/rbi/model.rb#1114
|
2941
|
+
def is_abstract=(_arg0); end
|
2942
|
+
|
2943
|
+
# @return [Boolean]
|
2944
|
+
#
|
2945
|
+
# source://rbi//lib/rbi/model.rb#1114
|
2946
|
+
def is_final; end
|
2947
|
+
|
2948
|
+
# @return [Boolean]
|
2949
|
+
#
|
2950
|
+
# source://rbi//lib/rbi/model.rb#1114
|
2951
|
+
def is_final=(_arg0); end
|
2952
|
+
|
2953
|
+
# @return [Boolean]
|
2954
|
+
#
|
2955
|
+
# source://rbi//lib/rbi/model.rb#1114
|
2956
|
+
def is_overridable; end
|
2957
|
+
|
2958
|
+
# @return [Boolean]
|
2959
|
+
#
|
2960
|
+
# source://rbi//lib/rbi/model.rb#1114
|
2961
|
+
def is_overridable=(_arg0); end
|
2962
|
+
|
2963
|
+
# @return [Boolean]
|
2964
|
+
#
|
2965
|
+
# source://rbi//lib/rbi/model.rb#1114
|
2966
|
+
def is_override; end
|
2967
|
+
|
2968
|
+
# @return [Boolean]
|
2969
|
+
#
|
2970
|
+
# source://rbi//lib/rbi/model.rb#1114
|
2971
|
+
def is_override=(_arg0); end
|
2972
|
+
|
2973
|
+
# source://rbi//lib/rbi/model.rb#1108
|
2974
|
+
sig { returns(T::Array[::RBI::SigParam]) }
|
2975
|
+
def params; end
|
2976
|
+
|
2977
|
+
# source://rbi//lib/rbi/model.rb#1111
|
2978
|
+
sig { returns(T.any(::RBI::Type, ::String)) }
|
2979
|
+
def return_type; end
|
2980
|
+
|
2981
|
+
# @return [Type, String]
|
2982
|
+
#
|
2983
|
+
# source://rbi//lib/rbi/model.rb#1111
|
2984
|
+
def return_type=(_arg0); end
|
2985
|
+
|
2986
|
+
# source://rbi//lib/rbi/model.rb#1117
|
2987
|
+
sig { returns(T::Array[::String]) }
|
2988
|
+
def type_params; end
|
2989
|
+
end
|
2990
|
+
|
2991
|
+
# source://rbi//lib/rbi/model.rb#1182
|
2992
|
+
class RBI::SigParam < ::RBI::NodeWithComments
|
2993
|
+
# source://rbi//lib/rbi/model.rb#1200
|
2994
|
+
sig do
|
2995
|
+
params(
|
2996
|
+
name: ::String,
|
2997
|
+
type: T.any(::RBI::Type, ::String),
|
2998
|
+
loc: T.nilable(::RBI::Loc),
|
2999
|
+
comments: T::Array[::RBI::Comment],
|
3000
|
+
block: T.nilable(T.proc.params(node: ::RBI::SigParam).void)
|
3001
|
+
).void
|
3002
|
+
end
|
3003
|
+
def initialize(name, type, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
3004
|
+
|
3005
|
+
# source://rbi//lib/rbi/model.rb#1208
|
3006
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
3007
|
+
def ==(other); end
|
3008
|
+
|
3009
|
+
# source://rbi//lib/rbi/model.rb#1186
|
3010
|
+
sig { returns(::String) }
|
3011
|
+
def name; end
|
3012
|
+
|
3013
|
+
# source://rbi//lib/rbi/model.rb#1189
|
3014
|
+
sig { returns(T.any(::RBI::Type, ::String)) }
|
3015
|
+
def type; end
|
3016
|
+
end
|
3017
|
+
|
3018
|
+
# source://rbi//lib/rbi/model.rb#253
|
3019
|
+
class RBI::SingletonClass < ::RBI::Scope
|
3020
|
+
# source://rbi//lib/rbi/model.rb#263
|
3021
|
+
sig do
|
3022
|
+
params(
|
3023
|
+
loc: T.nilable(::RBI::Loc),
|
3024
|
+
comments: T::Array[::RBI::Comment],
|
3025
|
+
block: T.nilable(T.proc.params(node: ::RBI::SingletonClass).void)
|
3026
|
+
).void
|
3027
|
+
end
|
3028
|
+
def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
3029
|
+
|
3030
|
+
# source://rbi//lib/rbi/model.rb#269
|
3031
|
+
sig { override.returns(::String) }
|
3032
|
+
def fully_qualified_name; end
|
3033
|
+
end
|
3034
|
+
|
3035
|
+
# source://rbi//lib/rbi/model.rb#274
|
3036
|
+
class RBI::Struct < ::RBI::Scope
|
3037
|
+
# source://rbi//lib/rbi/model.rb#296
|
3038
|
+
sig do
|
3039
|
+
params(
|
3040
|
+
name: ::String,
|
3041
|
+
members: T::Array[::Symbol],
|
3042
|
+
keyword_init: T::Boolean,
|
3043
|
+
loc: T.nilable(::RBI::Loc),
|
3044
|
+
comments: T::Array[::RBI::Comment],
|
3045
|
+
block: T.nilable(T.proc.params(struct: ::RBI::Struct).void)
|
3046
|
+
).void
|
3047
|
+
end
|
3048
|
+
def initialize(name, members: T.unsafe(nil), keyword_init: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
3049
|
+
|
3050
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#402
|
3051
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
3052
|
+
def compatible_with?(other); end
|
3053
|
+
|
3054
|
+
# source://rbi//lib/rbi/model.rb#305
|
3055
|
+
sig { override.returns(::String) }
|
3056
|
+
def fully_qualified_name; end
|
3057
|
+
|
3058
|
+
# source://rbi//lib/rbi/model.rb#284
|
3059
|
+
sig { returns(T::Boolean) }
|
3060
|
+
def keyword_init; end
|
3061
|
+
|
3062
|
+
# @return [Boolean]
|
3063
|
+
#
|
3064
|
+
# source://rbi//lib/rbi/model.rb#284
|
3065
|
+
def keyword_init=(_arg0); end
|
3066
|
+
|
3067
|
+
# source://rbi//lib/rbi/model.rb#281
|
3068
|
+
sig { returns(T::Array[::Symbol]) }
|
3069
|
+
def members; end
|
3070
|
+
|
3071
|
+
# @return [Array<Symbol>]
|
3072
|
+
#
|
3073
|
+
# source://rbi//lib/rbi/model.rb#281
|
3074
|
+
def members=(_arg0); end
|
3075
|
+
|
3076
|
+
# source://rbi//lib/rbi/model.rb#278
|
3077
|
+
sig { returns(::String) }
|
3078
|
+
def name; end
|
3079
|
+
|
3080
|
+
# @return [String]
|
3081
|
+
#
|
3082
|
+
# source://rbi//lib/rbi/model.rb#278
|
3083
|
+
def name=(_arg0); end
|
3084
|
+
end
|
3085
|
+
|
3086
|
+
# Sorbet's T::Enum
|
3087
|
+
#
|
3088
|
+
# source://rbi//lib/rbi/model.rb#1329
|
3089
|
+
class RBI::TEnum < ::RBI::Class
|
3090
|
+
# source://rbi//lib/rbi/model.rb#1340
|
3091
|
+
sig do
|
3092
|
+
params(
|
3093
|
+
name: ::String,
|
3094
|
+
loc: T.nilable(::RBI::Loc),
|
3095
|
+
comments: T::Array[::RBI::Comment],
|
3096
|
+
block: T.nilable(T.proc.params(klass: ::RBI::TEnum).void)
|
3097
|
+
).void
|
3098
|
+
end
|
3099
|
+
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
3100
|
+
end
|
3101
|
+
|
3102
|
+
# source://rbi//lib/rbi/model.rb#1346
|
3103
|
+
class RBI::TEnumBlock < ::RBI::Scope
|
3104
|
+
# source://rbi//lib/rbi/model.rb#1356
|
3105
|
+
sig do
|
3106
|
+
params(
|
3107
|
+
loc: T.nilable(::RBI::Loc),
|
3108
|
+
comments: T::Array[::RBI::Comment],
|
3109
|
+
block: T.nilable(T.proc.params(node: ::RBI::TEnumBlock).void)
|
3110
|
+
).void
|
3111
|
+
end
|
3112
|
+
def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
3113
|
+
|
3114
|
+
# source://rbi//lib/rbi/model.rb#1362
|
3115
|
+
sig { override.returns(::String) }
|
3116
|
+
def fully_qualified_name; end
|
3117
|
+
|
3118
|
+
# source://rbi//lib/rbi/index.rb#223
|
3119
|
+
sig { override.returns(T::Array[::String]) }
|
3120
|
+
def index_ids; end
|
3121
|
+
|
3122
|
+
# source://rbi//lib/rbi/model.rb#1367
|
3123
|
+
sig { override.returns(::String) }
|
3124
|
+
def to_s; end
|
3125
|
+
end
|
3126
|
+
|
3127
|
+
# Sorbet's T::Struct
|
3128
|
+
#
|
3129
|
+
# source://rbi//lib/rbi/model.rb#1215
|
3130
|
+
class RBI::TStruct < ::RBI::Class
|
3131
|
+
# source://rbi//lib/rbi/model.rb#1226
|
3132
|
+
sig do
|
3133
|
+
params(
|
3134
|
+
name: ::String,
|
3135
|
+
loc: T.nilable(::RBI::Loc),
|
3136
|
+
comments: T::Array[::RBI::Comment],
|
3137
|
+
block: T.nilable(T.proc.params(klass: ::RBI::TStruct).void)
|
3138
|
+
).void
|
3139
|
+
end
|
3140
|
+
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
3141
|
+
end
|
3142
|
+
|
3143
|
+
# source://rbi//lib/rbi/model.rb#1267
|
3144
|
+
class RBI::TStructConst < ::RBI::TStructField
|
3145
|
+
include ::RBI::Indexable
|
3146
|
+
|
3147
|
+
# source://rbi//lib/rbi/model.rb#1280
|
3148
|
+
sig do
|
3149
|
+
params(
|
3150
|
+
name: ::String,
|
3151
|
+
type: T.any(::RBI::Type, ::String),
|
3152
|
+
default: T.nilable(::String),
|
3153
|
+
loc: T.nilable(::RBI::Loc),
|
3154
|
+
comments: T::Array[::RBI::Comment],
|
3155
|
+
block: T.nilable(T.proc.params(node: ::RBI::TStructConst).void)
|
3156
|
+
).void
|
3157
|
+
end
|
3158
|
+
def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
3159
|
+
|
3160
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#555
|
3161
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
3162
|
+
def compatible_with?(other); end
|
3163
|
+
|
3164
|
+
# source://rbi//lib/rbi/model.rb#1286
|
3165
|
+
sig { override.returns(T::Array[::String]) }
|
3166
|
+
def fully_qualified_names; end
|
3167
|
+
|
3168
|
+
# source://rbi//lib/rbi/index.rb#203
|
3169
|
+
sig { override.returns(T::Array[::String]) }
|
3170
|
+
def index_ids; end
|
3171
|
+
|
3172
|
+
# source://rbi//lib/rbi/model.rb#1292
|
3173
|
+
sig { override.returns(::String) }
|
3174
|
+
def to_s; end
|
3175
|
+
end
|
3176
|
+
|
3177
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
3178
|
+
#
|
3179
|
+
# source://rbi//lib/rbi/model.rb#1232
|
3180
|
+
class RBI::TStructField < ::RBI::NodeWithComments
|
3181
|
+
abstract!
|
3182
|
+
|
3183
|
+
# source://rbi//lib/rbi/model.rb#1256
|
3184
|
+
sig do
|
3185
|
+
params(
|
3186
|
+
name: ::String,
|
3187
|
+
type: T.any(::RBI::Type, ::String),
|
3188
|
+
default: T.nilable(::String),
|
3189
|
+
loc: T.nilable(::RBI::Loc),
|
3190
|
+
comments: T::Array[::RBI::Comment]
|
3191
|
+
).void
|
3192
|
+
end
|
3193
|
+
def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end
|
3194
|
+
|
3195
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#546
|
3196
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
3197
|
+
def compatible_with?(other); end
|
3198
|
+
|
3199
|
+
# source://rbi//lib/rbi/model.rb#1245
|
3200
|
+
sig { returns(T.nilable(::String)) }
|
3201
|
+
def default; end
|
3202
|
+
|
3203
|
+
# @return [String, nil]
|
3204
|
+
#
|
3205
|
+
# source://rbi//lib/rbi/model.rb#1245
|
3206
|
+
def default=(_arg0); end
|
3207
|
+
|
3208
|
+
# @abstract
|
3209
|
+
#
|
3210
|
+
# source://rbi//lib/rbi/model.rb#1264
|
3211
|
+
sig { abstract.returns(T::Array[::String]) }
|
3212
|
+
def fully_qualified_names; end
|
3213
|
+
|
3214
|
+
# source://rbi//lib/rbi/model.rb#1239
|
3215
|
+
sig { returns(::String) }
|
3216
|
+
def name; end
|
3217
|
+
|
3218
|
+
# @return [String]
|
3219
|
+
#
|
3220
|
+
# source://rbi//lib/rbi/model.rb#1239
|
3221
|
+
def name=(_arg0); end
|
3222
|
+
|
3223
|
+
# source://rbi//lib/rbi/model.rb#1242
|
3224
|
+
sig { returns(T.any(::RBI::Type, ::String)) }
|
3225
|
+
def type; end
|
3226
|
+
|
3227
|
+
# @return [Type, String]
|
3228
|
+
#
|
3229
|
+
# source://rbi//lib/rbi/model.rb#1242
|
3230
|
+
def type=(_arg0); end
|
3231
|
+
end
|
3232
|
+
|
3233
|
+
# source://rbi//lib/rbi/model.rb#1297
|
3234
|
+
class RBI::TStructProp < ::RBI::TStructField
|
3235
|
+
include ::RBI::Indexable
|
3236
|
+
|
3237
|
+
# source://rbi//lib/rbi/model.rb#1310
|
3238
|
+
sig do
|
3239
|
+
params(
|
3240
|
+
name: ::String,
|
3241
|
+
type: T.any(::RBI::Type, ::String),
|
3242
|
+
default: T.nilable(::String),
|
3243
|
+
loc: T.nilable(::RBI::Loc),
|
3244
|
+
comments: T::Array[::RBI::Comment],
|
3245
|
+
block: T.nilable(T.proc.params(node: ::RBI::TStructProp).void)
|
3246
|
+
).void
|
3247
|
+
end
|
3248
|
+
def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
3249
|
+
|
3250
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#564
|
3251
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
3252
|
+
def compatible_with?(other); end
|
3253
|
+
|
3254
|
+
# source://rbi//lib/rbi/model.rb#1316
|
3255
|
+
sig { override.returns(T::Array[::String]) }
|
3256
|
+
def fully_qualified_names; end
|
3257
|
+
|
3258
|
+
# source://rbi//lib/rbi/index.rb#213
|
3259
|
+
sig { override.returns(T::Array[::String]) }
|
3260
|
+
def index_ids; end
|
3261
|
+
|
3262
|
+
# source://rbi//lib/rbi/model.rb#1322
|
3263
|
+
sig { override.returns(::String) }
|
3264
|
+
def to_s; end
|
3265
|
+
end
|
3266
|
+
|
3267
|
+
# source://rbi//lib/rbi/model.rb#108
|
3268
|
+
class RBI::Tree < ::RBI::NodeWithComments
|
3269
|
+
# source://rbi//lib/rbi/model.rb#121
|
3270
|
+
sig do
|
3271
|
+
params(
|
3272
|
+
loc: T.nilable(::RBI::Loc),
|
3273
|
+
comments: T::Array[::RBI::Comment],
|
3274
|
+
block: T.nilable(T.proc.params(node: ::RBI::Tree).void)
|
3275
|
+
).void
|
3276
|
+
end
|
3277
|
+
def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
3278
|
+
|
3279
|
+
# source://rbi//lib/rbi/model.rb#128
|
3280
|
+
sig { params(node: ::RBI::Node).void }
|
3281
|
+
def <<(node); end
|
3282
|
+
|
3283
|
+
# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#66
|
3284
|
+
sig { params(with_todo_comment: T::Boolean).void }
|
3285
|
+
def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end
|
3286
|
+
|
3287
|
+
# source://rbi//lib/rbi/rewriters/annotate.rb#49
|
3288
|
+
sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void }
|
3289
|
+
def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end
|
3290
|
+
|
3291
|
+
# source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#38
|
3292
|
+
sig do
|
3293
|
+
params(
|
3294
|
+
name: ::String,
|
3295
|
+
superclass_name: T.nilable(::String),
|
3296
|
+
block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)
|
3297
|
+
).returns(::RBI::Scope)
|
3298
|
+
end
|
3299
|
+
def create_class(name, superclass_name: T.unsafe(nil), &block); end
|
3300
|
+
|
3301
|
+
# source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#45
|
3302
|
+
sig { params(name: ::String, value: ::String).void }
|
3303
|
+
def create_constant(name, value:); end
|
3304
|
+
|
3305
|
+
# source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#55
|
3306
|
+
sig { params(name: ::String).void }
|
3307
|
+
def create_extend(name); end
|
3308
|
+
|
3309
|
+
# source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#50
|
3310
|
+
sig { params(name: ::String).void }
|
3311
|
+
def create_include(name); end
|
3312
|
+
|
3313
|
+
# source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#90
|
3314
|
+
sig do
|
3315
|
+
params(
|
3316
|
+
name: ::String,
|
3317
|
+
parameters: T::Array[::RBI::TypedParam],
|
3318
|
+
return_type: T.nilable(::String),
|
3319
|
+
class_method: T::Boolean,
|
3320
|
+
visibility: ::RBI::Visibility,
|
3321
|
+
comments: T::Array[::RBI::Comment],
|
3322
|
+
block: T.nilable(T.proc.params(node: ::RBI::Method).void)
|
3323
|
+
).void
|
3324
|
+
end
|
3325
|
+
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), &block); end
|
3326
|
+
|
3327
|
+
# source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#60
|
3328
|
+
sig { params(name: ::String).void }
|
3329
|
+
def create_mixes_in_class_methods(name); end
|
3330
|
+
|
3331
|
+
# source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#25
|
3332
|
+
sig { params(name: ::String, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) }
|
3333
|
+
def create_module(name, &block); end
|
3334
|
+
|
3335
|
+
# source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#9
|
3336
|
+
sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) }
|
3337
|
+
def create_path(constant, &block); end
|
3338
|
+
|
3339
|
+
# source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#74
|
3340
|
+
sig do
|
3341
|
+
params(
|
3342
|
+
name: ::String,
|
3343
|
+
type: ::String,
|
3344
|
+
variance: ::Symbol,
|
3345
|
+
fixed: T.nilable(::String),
|
3346
|
+
upper: T.nilable(::String),
|
3347
|
+
lower: T.nilable(::String)
|
3348
|
+
).void
|
3349
|
+
end
|
3350
|
+
def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end
|
3351
|
+
|
3352
|
+
# source://rbi//lib/rbi/rewriters/deannotate.rb#41
|
3353
|
+
sig { params(annotation: ::String).void }
|
3354
|
+
def deannotate!(annotation); end
|
3355
|
+
|
3356
|
+
# source://rbi//lib/rbi/model.rb#134
|
3357
|
+
sig { returns(T::Boolean) }
|
3358
|
+
def empty?; end
|
3359
|
+
|
3360
|
+
# source://rbi//lib/rbi/rewriters/filter_versions.rb#118
|
3361
|
+
sig { params(version: ::Gem::Version).void }
|
3362
|
+
def filter_versions!(version); end
|
3363
|
+
|
3364
|
+
# source://rbi//lib/rbi/rewriters/flatten_singleton_methods.rb#60
|
3365
|
+
sig { void }
|
3366
|
+
def flatten_singleton_methods!; end
|
3367
|
+
|
3368
|
+
# source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#60
|
3369
|
+
sig { void }
|
3370
|
+
def flatten_visibilities!; end
|
3371
|
+
|
3372
|
+
# source://rbi//lib/rbi/rewriters/group_nodes.rb#81
|
3373
|
+
sig { void }
|
3374
|
+
def group_nodes!; end
|
3375
|
+
|
3376
|
+
# source://rbi//lib/rbi/index.rb#68
|
3377
|
+
sig { returns(::RBI::Index) }
|
3378
|
+
def index; end
|
3379
|
+
|
3380
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#324
|
3381
|
+
sig do
|
3382
|
+
params(
|
3383
|
+
other: ::RBI::Tree,
|
3384
|
+
left_name: ::String,
|
3385
|
+
right_name: ::String,
|
3386
|
+
keep: ::RBI::Rewriters::Merge::Keep
|
3387
|
+
).returns(::RBI::MergeTree)
|
3388
|
+
end
|
3389
|
+
def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
|
3390
|
+
|
3391
|
+
# source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#46
|
3392
|
+
sig { void }
|
3393
|
+
def nest_non_public_members!; end
|
3394
|
+
|
3395
|
+
# source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#36
|
3396
|
+
sig { void }
|
3397
|
+
def nest_singleton_methods!; end
|
3398
|
+
|
3399
|
+
# source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#63
|
3400
|
+
sig { void }
|
3401
|
+
def nest_top_level_members!; end
|
3402
|
+
|
3403
|
+
# source://rbi//lib/rbi/model.rb#112
|
3404
|
+
sig { returns(T::Array[::RBI::Node]) }
|
3405
|
+
def nodes; end
|
3406
|
+
|
3407
|
+
# source://rbi//lib/rbi/rewriters/attr_to_methods.rb#53
|
3408
|
+
sig { void }
|
3409
|
+
def replace_attributes_with_methods!; end
|
3410
|
+
|
3411
|
+
# source://rbi//lib/rbi/rewriters/sort_nodes.rb#119
|
3412
|
+
sig { void }
|
3413
|
+
def sort_nodes!; end
|
3414
|
+
|
3415
|
+
private
|
3416
|
+
|
3417
|
+
# source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#123
|
3418
|
+
sig { params(node: ::RBI::Node).returns(::RBI::Node) }
|
3419
|
+
def create_node(node); end
|
3420
|
+
|
3421
|
+
# source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#118
|
3422
|
+
sig { returns(T::Hash[::String, ::RBI::Node]) }
|
3423
|
+
def nodes_cache; end
|
3424
|
+
end
|
3425
|
+
|
3426
|
+
# The base class for all RBI types.
|
3427
|
+
#
|
3428
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
3429
|
+
#
|
3430
|
+
# source://rbi//lib/rbi/type.rb#6
|
3431
|
+
class RBI::Type
|
3432
|
+
abstract!
|
3433
|
+
|
3434
|
+
# source://rbi//lib/rbi/type.rb#699
|
3435
|
+
sig { void }
|
3436
|
+
def initialize; end
|
3437
|
+
|
3438
|
+
# @abstract
|
3439
|
+
#
|
3440
|
+
# source://rbi//lib/rbi/type.rb#745
|
3441
|
+
sig { abstract.params(other: ::BasicObject).returns(T::Boolean) }
|
3442
|
+
def ==(other); end
|
3443
|
+
|
3444
|
+
# source://rbi//lib/rbi/type.rb#748
|
3445
|
+
sig { params(other: ::BasicObject).returns(T::Boolean) }
|
3446
|
+
def eql?(other); end
|
3447
|
+
|
3448
|
+
# source://rbi//lib/rbi/type.rb#753
|
3449
|
+
sig { override.returns(::Integer) }
|
3450
|
+
def hash; end
|
3451
|
+
|
3452
|
+
# Returns a new type that is `nilable` if it is not already.
|
3453
|
+
#
|
3454
|
+
# If the type is already nilable, it returns itself.
|
3455
|
+
# ```ruby
|
3456
|
+
# type = RBI::Type.simple("String")
|
3457
|
+
# type.to_rbi # => "String"
|
3458
|
+
# type.nilable.to_rbi # => "T.nilable(String)"
|
3459
|
+
# type.nilable.nilable.to_rbi # => "T.nilable(String)"
|
3460
|
+
# ```
|
3461
|
+
#
|
3462
|
+
# source://rbi//lib/rbi/type.rb#713
|
3463
|
+
sig { returns(::RBI::Type) }
|
3464
|
+
def nilable; end
|
3465
|
+
|
3466
|
+
# Returns whether the type is nilable.
|
3467
|
+
#
|
3468
|
+
# source://rbi//lib/rbi/type.rb#740
|
3469
|
+
sig { returns(T::Boolean) }
|
3470
|
+
def nilable?; end
|
3471
|
+
|
3472
|
+
# Returns the non-nilable version of the type.
|
3473
|
+
# If the type is already non-nilable, it returns itself.
|
3474
|
+
# If the type is nilable, it returns the inner type.
|
3475
|
+
#
|
3476
|
+
# ```ruby
|
3477
|
+
# type = RBI::Type.nilable(RBI::Type.simple("String"))
|
3478
|
+
# type.to_rbi # => "T.nilable(String)"
|
3479
|
+
# type.non_nilable.to_rbi # => "String"
|
3480
|
+
# type.non_nilable.non_nilable.to_rbi # => "String"
|
3481
|
+
# ```
|
3482
|
+
#
|
3483
|
+
# source://rbi//lib/rbi/type.rb#728
|
3484
|
+
sig { returns(::RBI::Type) }
|
3485
|
+
def non_nilable; end
|
3486
|
+
|
3487
|
+
# source://rbi//lib/rbi/rbs_printer.rb#1030
|
3488
|
+
sig { returns(::String) }
|
3489
|
+
def rbs_string; end
|
3490
|
+
|
3491
|
+
# @abstract
|
3492
|
+
#
|
3493
|
+
# source://rbi//lib/rbi/type.rb#758
|
3494
|
+
sig { abstract.returns(::String) }
|
3495
|
+
def to_rbi; end
|
3496
|
+
|
3497
|
+
# source://rbi//lib/rbi/type.rb#761
|
3498
|
+
sig { override.returns(::String) }
|
3499
|
+
def to_s; end
|
3500
|
+
|
3501
|
+
class << self
|
3502
|
+
# Builds a type that represents an intersection of multiple types like `T.all(String, Integer)`.
|
3503
|
+
#
|
3504
|
+
# Note that this method transforms types such as `T.all(String, String)` into `String`, so
|
3505
|
+
# it may return something other than a `All`.
|
3506
|
+
#
|
3507
|
+
# source://rbi//lib/rbi/type.rb#563
|
3508
|
+
sig { params(type1: ::RBI::Type, type2: ::RBI::Type, types: ::RBI::Type).returns(::RBI::Type) }
|
3509
|
+
def all(type1, type2, *types); end
|
3510
|
+
|
3511
|
+
# Builds a type that represents a union of multiple types like `T.any(String, Integer)`.
|
3512
|
+
#
|
3513
|
+
# Note that this method transforms types such as `T.any(String, NilClass)` into `T.nilable(String)`, so
|
3514
|
+
# it may return something other than a `Any`.
|
3515
|
+
#
|
3516
|
+
# source://rbi//lib/rbi/type.rb#590
|
3517
|
+
sig { params(type1: ::RBI::Type, type2: ::RBI::Type, types: ::RBI::Type).returns(::RBI::Type) }
|
3518
|
+
def any(type1, type2, *types); end
|
3519
|
+
|
3520
|
+
# Builds a type that represents `T.anything`.
|
3521
|
+
#
|
3522
|
+
# source://rbi//lib/rbi/type.rb#488
|
3523
|
+
sig { returns(::RBI::Type::Anything) }
|
3524
|
+
def anything; end
|
3525
|
+
|
3526
|
+
# Builds a type that represents `T.attached_class`.
|
3527
|
+
#
|
3528
|
+
# source://rbi//lib/rbi/type.rb#494
|
3529
|
+
sig { returns(::RBI::Type::AttachedClass) }
|
3530
|
+
def attached_class; end
|
3531
|
+
|
3532
|
+
# Builds a type that represents `T::Boolean`.
|
3533
|
+
#
|
3534
|
+
# source://rbi//lib/rbi/type.rb#500
|
3535
|
+
sig { returns(::RBI::Type::Boolean) }
|
3536
|
+
def boolean; end
|
3537
|
+
|
3538
|
+
# Builds a type that represents the singleton class of another type like `T.class_of(Foo)`.
|
3539
|
+
#
|
3540
|
+
# source://rbi//lib/rbi/type.rb#538
|
3541
|
+
sig { params(type: ::RBI::Type::Simple, type_parameter: T.nilable(::RBI::Type)).returns(::RBI::Type::ClassOf) }
|
3542
|
+
def class_of(type, type_parameter = T.unsafe(nil)); end
|
3543
|
+
|
3544
|
+
# Builds a type that represents a generic type like `T::Array[String]` or `T::Hash[Symbol, Integer]`.
|
3545
|
+
#
|
3546
|
+
# source://rbi//lib/rbi/type.rb#655
|
3547
|
+
sig { params(name: ::String, params: T.any(::RBI::Type, T::Array[::RBI::Type])).returns(::RBI::Type::Generic) }
|
3548
|
+
def generic(name, *params); end
|
3549
|
+
|
3550
|
+
# Builds a type that represents a nilable of another type like `T.nilable(String)`.
|
3551
|
+
#
|
3552
|
+
# Note that this method transforms types such as `T.nilable(T.untyped)` into `T.untyped`, so
|
3553
|
+
# it may return something other than a `RBI::Type::Nilable`.
|
3554
|
+
#
|
3555
|
+
# source://rbi//lib/rbi/type.rb#547
|
3556
|
+
sig { params(type: ::RBI::Type).returns(::RBI::Type) }
|
3557
|
+
def nilable(type); end
|
3558
|
+
|
3559
|
+
# Builds a type that represents `T.noreturn`.
|
3560
|
+
#
|
3561
|
+
# source://rbi//lib/rbi/type.rb#506
|
3562
|
+
sig { returns(::RBI::Type::NoReturn) }
|
3563
|
+
def noreturn; end
|
3564
|
+
|
3565
|
+
# source://rbi//lib/rbi/type_parser.rb#26
|
3566
|
+
sig { params(node: ::Prism::Node).returns(::RBI::Type) }
|
3567
|
+
def parse_node(node); end
|
3568
|
+
|
3569
|
+
# @raise [Error]
|
3570
|
+
#
|
3571
|
+
# source://rbi//lib/rbi/type_parser.rb#10
|
3572
|
+
sig { params(string: ::String).returns(::RBI::Type) }
|
3573
|
+
def parse_string(string); end
|
3574
|
+
|
3575
|
+
# Builds a type that represents a proc type like `T.proc.void`.
|
3576
|
+
#
|
3577
|
+
# source://rbi//lib/rbi/type.rb#683
|
3578
|
+
sig { returns(::RBI::Type::Proc) }
|
3579
|
+
def proc; end
|
3580
|
+
|
3581
|
+
# Builds a type that represents `T.self_type`.
|
3582
|
+
#
|
3583
|
+
# source://rbi//lib/rbi/type.rb#512
|
3584
|
+
sig { returns(::RBI::Type::SelfType) }
|
3585
|
+
def self_type; end
|
3586
|
+
|
3587
|
+
# Builds a type that represents a shape type like `{name: String, age: Integer}`.
|
3588
|
+
#
|
3589
|
+
# source://rbi//lib/rbi/type.rb#675
|
3590
|
+
sig { params(types: T::Hash[T.any(::String, ::Symbol), ::RBI::Type]).returns(::RBI::Type::Shape) }
|
3591
|
+
def shape(types = T.unsafe(nil)); end
|
3592
|
+
|
3593
|
+
# Builds a simple type like `String` or `::Foo::Bar`.
|
3594
|
+
#
|
3595
|
+
# It raises a `NameError` if the name is not a valid Ruby class identifier.
|
3596
|
+
#
|
3597
|
+
# @raise [NameError]
|
3598
|
+
#
|
3599
|
+
# source://rbi//lib/rbi/type.rb#477
|
3600
|
+
sig { params(name: ::String).returns(::RBI::Type::Simple) }
|
3601
|
+
def simple(name); end
|
3602
|
+
|
3603
|
+
# Builds a type that represents the class of another type like `T::Class[Foo]`.
|
3604
|
+
#
|
3605
|
+
# source://rbi//lib/rbi/type.rb#532
|
3606
|
+
sig { params(type: ::RBI::Type).returns(::RBI::Type::Class) }
|
3607
|
+
def t_class(type); end
|
3608
|
+
|
3609
|
+
# Builds a type that represents a tuple type like `[String, Integer]`.
|
3610
|
+
#
|
3611
|
+
# source://rbi//lib/rbi/type.rb#669
|
3612
|
+
sig { params(types: T.any(::RBI::Type, T::Array[::RBI::Type])).returns(::RBI::Type::Tuple) }
|
3613
|
+
def tuple(*types); end
|
3614
|
+
|
3615
|
+
# Builds a type that represents a type parameter like `T.type_parameter(:U)`.
|
3616
|
+
#
|
3617
|
+
# source://rbi//lib/rbi/type.rb#661
|
3618
|
+
sig { params(name: ::Symbol).returns(::RBI::Type::TypeParameter) }
|
3619
|
+
def type_parameter(name); end
|
3620
|
+
|
3621
|
+
# Builds a type that represents `T.untyped`.
|
3622
|
+
#
|
3623
|
+
# source://rbi//lib/rbi/type.rb#518
|
3624
|
+
sig { returns(::RBI::Type::Untyped) }
|
3625
|
+
def untyped; end
|
3626
|
+
|
3627
|
+
# Builds a type that represents `void`.
|
3628
|
+
#
|
3629
|
+
# source://rbi//lib/rbi/type.rb#524
|
3630
|
+
sig { returns(::RBI::Type::Void) }
|
3631
|
+
def void; end
|
3632
|
+
|
3633
|
+
private
|
3634
|
+
|
3635
|
+
# source://rbi//lib/rbi/type_parser.rb#263
|
3636
|
+
sig { params(node: ::Prism::CallNode).returns(T::Array[::Prism::Node]) }
|
3637
|
+
def call_chain(node); end
|
3638
|
+
|
3639
|
+
# source://rbi//lib/rbi/type_parser.rb#250
|
3640
|
+
sig { params(node: ::Prism::CallNode, count: ::Integer).returns(T::Array[::Prism::Node]) }
|
3641
|
+
def check_arguments_at_least!(node, count); end
|
3642
|
+
|
3643
|
+
# source://rbi//lib/rbi/type_parser.rb#235
|
3644
|
+
sig { params(node: ::Prism::CallNode, count: ::Integer).returns(T::Array[::Prism::Node]) }
|
3645
|
+
def check_arguments_exactly!(node, count); end
|
3646
|
+
|
3647
|
+
# @raise [Error]
|
3648
|
+
#
|
3649
|
+
# source://rbi//lib/rbi/type_parser.rb#69
|
3650
|
+
sig { params(node: ::Prism::CallNode).returns(::RBI::Type) }
|
3651
|
+
def parse_call(node); end
|
3652
|
+
|
3653
|
+
# source://rbi//lib/rbi/type_parser.rb#52
|
3654
|
+
sig { params(node: T.any(::Prism::ConstantPathNode, ::Prism::ConstantReadNode)).returns(::RBI::Type) }
|
3655
|
+
def parse_constant(node); end
|
3656
|
+
|
3657
|
+
# @raise [Error]
|
3658
|
+
#
|
3659
|
+
# source://rbi//lib/rbi/type_parser.rb#195
|
3660
|
+
sig { params(node: ::Prism::CallNode).returns(::RBI::Type) }
|
3661
|
+
def parse_proc(node); end
|
3662
|
+
|
3663
|
+
# source://rbi//lib/rbi/type_parser.rb#176
|
3664
|
+
sig { params(node: T.any(::Prism::HashNode, ::Prism::KeywordHashNode)).returns(::RBI::Type) }
|
3665
|
+
def parse_shape(node); end
|
3666
|
+
|
3667
|
+
# source://rbi//lib/rbi/type_parser.rb#171
|
3668
|
+
sig { params(node: ::Prism::ArrayNode).returns(::RBI::Type) }
|
3669
|
+
def parse_tuple(node); end
|
3670
|
+
|
3671
|
+
# source://rbi//lib/rbi/type_parser.rb#276
|
3672
|
+
sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) }
|
3673
|
+
def t?(node); end
|
3674
|
+
|
3675
|
+
# source://rbi//lib/rbi/type_parser.rb#288
|
3676
|
+
sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) }
|
3677
|
+
def t_boolean?(node); end
|
3678
|
+
|
3679
|
+
# source://rbi//lib/rbi/type_parser.rb#295
|
3680
|
+
sig { params(node: ::Prism::ConstantPathNode).returns(T::Boolean) }
|
3681
|
+
def t_class?(node); end
|
3682
|
+
|
3683
|
+
# source://rbi//lib/rbi/type_parser.rb#300
|
3684
|
+
sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) }
|
3685
|
+
def t_class_of?(node); end
|
3686
|
+
|
3687
|
+
# source://rbi//lib/rbi/type_parser.rb#307
|
3688
|
+
sig { params(node: ::Prism::CallNode).returns(T::Boolean) }
|
3689
|
+
def t_proc?(node); end
|
3690
|
+
|
3691
|
+
# source://rbi//lib/rbi/type.rb#693
|
3692
|
+
sig { params(name: ::String).returns(T::Boolean) }
|
3693
|
+
def valid_identifier?(name); end
|
3694
|
+
end
|
3695
|
+
end
|
3696
|
+
|
3697
|
+
# A type that is intersection of multiple types like `T.all(String, Integer)`.
|
3698
|
+
#
|
3699
|
+
# source://rbi//lib/rbi/type.rb#252
|
3700
|
+
class RBI::Type::All < ::RBI::Type::Composite
|
3701
|
+
# source://rbi//lib/rbi/type.rb#256
|
3702
|
+
sig { override.returns(::String) }
|
3703
|
+
def to_rbi; end
|
3704
|
+
end
|
3705
|
+
|
3706
|
+
# A type that is union of multiple types like `T.any(String, Integer)`.
|
3707
|
+
#
|
3708
|
+
# source://rbi//lib/rbi/type.rb#262
|
3709
|
+
class RBI::Type::Any < ::RBI::Type::Composite
|
3710
|
+
# source://rbi//lib/rbi/type.rb#271
|
3711
|
+
sig { returns(T::Boolean) }
|
3712
|
+
def nilable?; end
|
3713
|
+
|
3714
|
+
# source://rbi//lib/rbi/type.rb#266
|
3715
|
+
sig { override.returns(::String) }
|
3716
|
+
def to_rbi; end
|
3717
|
+
end
|
3718
|
+
|
3719
|
+
# `T.anything`.
|
3720
|
+
#
|
3721
|
+
# source://rbi//lib/rbi/type.rb#43
|
3722
|
+
class RBI::Type::Anything < ::RBI::Type
|
3723
|
+
# source://rbi//lib/rbi/type.rb#47
|
3724
|
+
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
|
3725
|
+
def ==(other); end
|
3726
|
+
|
3727
|
+
# source://rbi//lib/rbi/type.rb#52
|
3728
|
+
sig { override.returns(::String) }
|
3729
|
+
def to_rbi; end
|
3730
|
+
end
|
3731
|
+
|
3732
|
+
# `T.attached_class`.
|
3733
|
+
#
|
3734
|
+
# source://rbi//lib/rbi/type.rb#58
|
3735
|
+
class RBI::Type::AttachedClass < ::RBI::Type
|
3736
|
+
# source://rbi//lib/rbi/type.rb#62
|
3737
|
+
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
|
3738
|
+
def ==(other); end
|
3739
|
+
|
3740
|
+
# source://rbi//lib/rbi/type.rb#67
|
3741
|
+
sig { override.returns(::String) }
|
3742
|
+
def to_rbi; end
|
3743
|
+
end
|
3744
|
+
|
3745
|
+
# `T::Boolean`.
|
3746
|
+
#
|
3747
|
+
# source://rbi//lib/rbi/type.rb#73
|
3748
|
+
class RBI::Type::Boolean < ::RBI::Type
|
3749
|
+
# source://rbi//lib/rbi/type.rb#77
|
3750
|
+
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
|
3751
|
+
def ==(other); end
|
3752
|
+
|
3753
|
+
# source://rbi//lib/rbi/type.rb#82
|
3754
|
+
sig { override.returns(::String) }
|
3755
|
+
def to_rbi; end
|
3756
|
+
end
|
3757
|
+
|
3758
|
+
# The class of another type like `T::Class[Foo]`.
|
3759
|
+
#
|
3760
|
+
# source://rbi//lib/rbi/type.rb#150
|
3761
|
+
class RBI::Type::Class < ::RBI::Type
|
3762
|
+
# source://rbi//lib/rbi/type.rb#157
|
3763
|
+
sig { params(type: ::RBI::Type).void }
|
3764
|
+
def initialize(type); end
|
3765
|
+
|
3766
|
+
# source://rbi//lib/rbi/type.rb#163
|
3767
|
+
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
|
3768
|
+
def ==(other); end
|
3769
|
+
|
3770
|
+
# source://rbi//lib/rbi/type.rb#168
|
3771
|
+
sig { override.returns(::String) }
|
3772
|
+
def to_rbi; end
|
3773
|
+
|
3774
|
+
# source://rbi//lib/rbi/type.rb#154
|
3775
|
+
sig { returns(::RBI::Type) }
|
3776
|
+
def type; end
|
3777
|
+
end
|
3778
|
+
|
3779
|
+
# The singleton class of another type like `T.class_of(Foo)`.
|
3780
|
+
#
|
3781
|
+
# source://rbi//lib/rbi/type.rb#174
|
3782
|
+
class RBI::Type::ClassOf < ::RBI::Type
|
3783
|
+
# source://rbi//lib/rbi/type.rb#184
|
3784
|
+
sig { params(type: ::RBI::Type::Simple, type_parameter: T.nilable(::RBI::Type)).void }
|
3785
|
+
def initialize(type, type_parameter = T.unsafe(nil)); end
|
3786
|
+
|
3787
|
+
# source://rbi//lib/rbi/type.rb#191
|
3788
|
+
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
|
3789
|
+
def ==(other); end
|
3790
|
+
|
3791
|
+
# source://rbi//lib/rbi/type.rb#196
|
3792
|
+
sig { override.returns(::String) }
|
3793
|
+
def to_rbi; end
|
3794
|
+
|
3795
|
+
# source://rbi//lib/rbi/type.rb#178
|
3796
|
+
sig { returns(::RBI::Type::Simple) }
|
3797
|
+
def type; end
|
3798
|
+
|
3799
|
+
# source://rbi//lib/rbi/type.rb#181
|
3800
|
+
sig { returns(T.nilable(::RBI::Type)) }
|
3801
|
+
def type_parameter; end
|
3802
|
+
end
|
3803
|
+
|
3804
|
+
# A type that is composed of multiple types like `T.all(String, Integer)`.
|
3805
|
+
#
|
3806
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
3807
|
+
#
|
3808
|
+
# source://rbi//lib/rbi/type.rb#230
|
3809
|
+
class RBI::Type::Composite < ::RBI::Type
|
3810
|
+
abstract!
|
3811
|
+
|
3812
|
+
# source://rbi//lib/rbi/type.rb#240
|
3813
|
+
sig { params(types: T::Array[::RBI::Type]).void }
|
3814
|
+
def initialize(types); end
|
3815
|
+
|
3816
|
+
# source://rbi//lib/rbi/type.rb#246
|
3817
|
+
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
|
3818
|
+
def ==(other); end
|
3819
|
+
|
3820
|
+
# source://rbi//lib/rbi/type.rb#237
|
3821
|
+
sig { returns(T::Array[::RBI::Type]) }
|
3822
|
+
def types; end
|
3823
|
+
end
|
3824
|
+
|
3825
|
+
# source://rbi//lib/rbi/type_parser.rb#6
|
3826
|
+
class RBI::Type::Error < ::RBI::Error; end
|
3827
|
+
|
3828
|
+
# A generic type like `T::Array[String]` or `T::Hash[Symbol, Integer]`.
|
3829
|
+
#
|
3830
|
+
# source://rbi//lib/rbi/type.rb#279
|
3831
|
+
class RBI::Type::Generic < ::RBI::Type
|
3832
|
+
# source://rbi//lib/rbi/type.rb#289
|
3833
|
+
sig { params(name: ::String, params: ::RBI::Type).void }
|
3834
|
+
def initialize(name, *params); end
|
3835
|
+
|
3836
|
+
# source://rbi//lib/rbi/type.rb#296
|
3837
|
+
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
|
3838
|
+
def ==(other); end
|
3839
|
+
|
3840
|
+
# source://rbi//lib/rbi/type.rb#283
|
3841
|
+
sig { returns(::String) }
|
3842
|
+
def name; end
|
3843
|
+
|
3844
|
+
# source://rbi//lib/rbi/type.rb#286
|
3845
|
+
sig { returns(T::Array[::RBI::Type]) }
|
3846
|
+
def params; end
|
3847
|
+
|
3848
|
+
# source://rbi//lib/rbi/type.rb#301
|
3849
|
+
sig { override.returns(::String) }
|
3850
|
+
def to_rbi; end
|
3851
|
+
end
|
3852
|
+
|
3853
|
+
# A type that can be `nil` like `T.nilable(String)`.
|
3854
|
+
#
|
3855
|
+
# source://rbi//lib/rbi/type.rb#206
|
3856
|
+
class RBI::Type::Nilable < ::RBI::Type
|
3857
|
+
# source://rbi//lib/rbi/type.rb#213
|
3858
|
+
sig { params(type: ::RBI::Type).void }
|
3859
|
+
def initialize(type); end
|
3860
|
+
|
3861
|
+
# source://rbi//lib/rbi/type.rb#219
|
3862
|
+
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
|
3863
|
+
def ==(other); end
|
3864
|
+
|
3865
|
+
# source://rbi//lib/rbi/type.rb#224
|
3866
|
+
sig { override.returns(::String) }
|
3867
|
+
def to_rbi; end
|
3868
|
+
|
3869
|
+
# source://rbi//lib/rbi/type.rb#210
|
3870
|
+
sig { returns(::RBI::Type) }
|
3871
|
+
def type; end
|
3872
|
+
end
|
3873
|
+
|
3874
|
+
# `T.noreturn`.
|
3875
|
+
#
|
3876
|
+
# source://rbi//lib/rbi/type.rb#88
|
3877
|
+
class RBI::Type::NoReturn < ::RBI::Type
|
3878
|
+
# source://rbi//lib/rbi/type.rb#92
|
3879
|
+
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
|
3880
|
+
def ==(other); end
|
3881
|
+
|
3882
|
+
# source://rbi//lib/rbi/type.rb#97
|
3883
|
+
sig { override.returns(::String) }
|
3884
|
+
def to_rbi; end
|
3885
|
+
end
|
3886
|
+
|
3887
|
+
# A proc type like `T.proc.void`.
|
3888
|
+
#
|
3889
|
+
# source://rbi//lib/rbi/type.rb#387
|
3890
|
+
class RBI::Type::Proc < ::RBI::Type
|
3891
|
+
# source://rbi//lib/rbi/type.rb#400
|
3892
|
+
sig { void }
|
3893
|
+
def initialize; end
|
3894
|
+
|
3895
|
+
# source://rbi//lib/rbi/type.rb#408
|
3896
|
+
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
|
3897
|
+
def ==(other); end
|
3898
|
+
|
3899
|
+
# source://rbi//lib/rbi/type.rb#436
|
3900
|
+
sig { params(type: T.untyped).returns(T.self_type) }
|
3901
|
+
def bind(type); end
|
3902
|
+
|
3903
|
+
# source://rbi//lib/rbi/type.rb#418
|
3904
|
+
sig { params(params: ::RBI::Type).returns(T.self_type) }
|
3905
|
+
def params(**params); end
|
3906
|
+
|
3907
|
+
# source://rbi//lib/rbi/type.rb#397
|
3908
|
+
sig { returns(T.nilable(::RBI::Type)) }
|
3909
|
+
def proc_bind; end
|
3910
|
+
|
3911
|
+
# source://rbi//lib/rbi/type.rb#391
|
3912
|
+
sig { returns(T::Hash[::Symbol, ::RBI::Type]) }
|
3913
|
+
def proc_params; end
|
3914
|
+
|
3915
|
+
# source://rbi//lib/rbi/type.rb#394
|
3916
|
+
sig { returns(::RBI::Type) }
|
3917
|
+
def proc_returns; end
|
3918
|
+
|
3919
|
+
# source://rbi//lib/rbi/type.rb#424
|
3920
|
+
sig { params(type: T.untyped).returns(T.self_type) }
|
3921
|
+
def returns(type); end
|
3922
|
+
|
3923
|
+
# source://rbi//lib/rbi/type.rb#442
|
3924
|
+
sig { override.returns(::String) }
|
3925
|
+
def to_rbi; end
|
3926
|
+
|
3927
|
+
# source://rbi//lib/rbi/type.rb#430
|
3928
|
+
sig { returns(T.self_type) }
|
3929
|
+
def void; end
|
3930
|
+
end
|
3931
|
+
|
3932
|
+
# `T.self_type`.
|
3933
|
+
#
|
3934
|
+
# source://rbi//lib/rbi/type.rb#103
|
3935
|
+
class RBI::Type::SelfType < ::RBI::Type
|
3936
|
+
# source://rbi//lib/rbi/type.rb#107
|
3937
|
+
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
|
3938
|
+
def ==(other); end
|
3939
|
+
|
3940
|
+
# source://rbi//lib/rbi/type.rb#112
|
3941
|
+
sig { override.returns(::String) }
|
3942
|
+
def to_rbi; end
|
3943
|
+
end
|
3944
|
+
|
3945
|
+
# A shape type like `{name: String, age: Integer}`.
|
3946
|
+
#
|
3947
|
+
# source://rbi//lib/rbi/type.rb#357
|
3948
|
+
class RBI::Type::Shape < ::RBI::Type
|
3949
|
+
# source://rbi//lib/rbi/type.rb#364
|
3950
|
+
sig { params(types: T::Hash[T.any(::String, ::Symbol), ::RBI::Type]).void }
|
3951
|
+
def initialize(types); end
|
3952
|
+
|
3953
|
+
# source://rbi//lib/rbi/type.rb#370
|
3954
|
+
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
|
3955
|
+
def ==(other); end
|
3956
|
+
|
3957
|
+
# source://rbi//lib/rbi/type.rb#375
|
3958
|
+
sig { override.returns(::String) }
|
3959
|
+
def to_rbi; end
|
3960
|
+
|
3961
|
+
# source://rbi//lib/rbi/type.rb#361
|
3962
|
+
sig { returns(T::Hash[T.any(::String, ::Symbol), ::RBI::Type]) }
|
3963
|
+
def types; end
|
3964
|
+
end
|
3965
|
+
|
3966
|
+
# A type that represents a simple class name like `String` or `Foo`.
|
3967
|
+
#
|
3968
|
+
# It can also be a qualified name like `::Foo` or `Foo::Bar`.
|
3969
|
+
#
|
3970
|
+
# source://rbi//lib/rbi/type.rb#17
|
3971
|
+
class RBI::Type::Simple < ::RBI::Type
|
3972
|
+
# source://rbi//lib/rbi/type.rb#24
|
3973
|
+
sig { params(name: ::String).void }
|
3974
|
+
def initialize(name); end
|
3975
|
+
|
3976
|
+
# source://rbi//lib/rbi/type.rb#30
|
3977
|
+
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
|
3978
|
+
def ==(other); end
|
3979
|
+
|
3980
|
+
# source://rbi//lib/rbi/type.rb#21
|
3981
|
+
sig { returns(::String) }
|
3982
|
+
def name; end
|
3983
|
+
|
3984
|
+
# source://rbi//lib/rbi/type.rb#35
|
3985
|
+
sig { override.returns(::String) }
|
3986
|
+
def to_rbi; end
|
3987
|
+
end
|
3988
|
+
|
3989
|
+
# A tuple type like `[String, Integer]`.
|
3990
|
+
#
|
3991
|
+
# source://rbi//lib/rbi/type.rb#333
|
3992
|
+
class RBI::Type::Tuple < ::RBI::Type
|
3993
|
+
# source://rbi//lib/rbi/type.rb#340
|
3994
|
+
sig { params(types: T::Array[::RBI::Type]).void }
|
3995
|
+
def initialize(types); end
|
3996
|
+
|
3997
|
+
# source://rbi//lib/rbi/type.rb#346
|
3998
|
+
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
|
3999
|
+
def ==(other); end
|
4000
|
+
|
4001
|
+
# source://rbi//lib/rbi/type.rb#351
|
4002
|
+
sig { override.returns(::String) }
|
4003
|
+
def to_rbi; end
|
4004
|
+
|
4005
|
+
# source://rbi//lib/rbi/type.rb#337
|
4006
|
+
sig { returns(T::Array[::RBI::Type]) }
|
4007
|
+
def types; end
|
4008
|
+
end
|
4009
|
+
|
4010
|
+
# A type parameter like `T.type_parameter(:U)`.
|
4011
|
+
#
|
4012
|
+
# source://rbi//lib/rbi/type.rb#307
|
4013
|
+
class RBI::Type::TypeParameter < ::RBI::Type
|
4014
|
+
# source://rbi//lib/rbi/type.rb#314
|
4015
|
+
sig { params(name: ::Symbol).void }
|
4016
|
+
def initialize(name); end
|
4017
|
+
|
4018
|
+
# source://rbi//lib/rbi/type.rb#320
|
4019
|
+
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
|
4020
|
+
def ==(other); end
|
4021
|
+
|
4022
|
+
# source://rbi//lib/rbi/type.rb#311
|
4023
|
+
sig { returns(::Symbol) }
|
4024
|
+
def name; end
|
4025
|
+
|
4026
|
+
# source://rbi//lib/rbi/type.rb#325
|
4027
|
+
sig { override.returns(::String) }
|
4028
|
+
def to_rbi; end
|
4029
|
+
end
|
4030
|
+
|
4031
|
+
# `T.untyped`.
|
4032
|
+
#
|
4033
|
+
# source://rbi//lib/rbi/type.rb#118
|
4034
|
+
class RBI::Type::Untyped < ::RBI::Type
|
4035
|
+
# source://rbi//lib/rbi/type.rb#122
|
4036
|
+
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
|
4037
|
+
def ==(other); end
|
4038
|
+
|
4039
|
+
# source://rbi//lib/rbi/type.rb#127
|
4040
|
+
sig { override.returns(::String) }
|
4041
|
+
def to_rbi; end
|
4042
|
+
end
|
4043
|
+
|
4044
|
+
# source://rbi//lib/rbi/type_visitor.rb#6
|
4045
|
+
class RBI::Type::Visitor
|
4046
|
+
# source://rbi//lib/rbi/type_visitor.rb#12
|
4047
|
+
sig { params(node: ::RBI::Type).void }
|
4048
|
+
def visit(node); end
|
4049
|
+
|
4050
|
+
private
|
4051
|
+
|
4052
|
+
# source://rbi//lib/rbi/type_visitor.rb#58
|
4053
|
+
sig { params(type: ::RBI::Type::All).void }
|
4054
|
+
def visit_all(type); end
|
4055
|
+
|
4056
|
+
# source://rbi//lib/rbi/type_visitor.rb#61
|
4057
|
+
sig { params(type: ::RBI::Type::Any).void }
|
4058
|
+
def visit_any(type); end
|
4059
|
+
|
4060
|
+
# source://rbi//lib/rbi/type_visitor.rb#64
|
4061
|
+
sig { params(type: ::RBI::Type::Anything).void }
|
4062
|
+
def visit_anything(type); end
|
4063
|
+
|
4064
|
+
# source://rbi//lib/rbi/type_visitor.rb#67
|
4065
|
+
sig { params(type: ::RBI::Type::AttachedClass).void }
|
4066
|
+
def visit_attached_class(type); end
|
4067
|
+
|
4068
|
+
# source://rbi//lib/rbi/type_visitor.rb#70
|
4069
|
+
sig { params(type: ::RBI::Type::Boolean).void }
|
4070
|
+
def visit_boolean(type); end
|
4071
|
+
|
4072
|
+
# source://rbi//lib/rbi/type_visitor.rb#73
|
4073
|
+
sig { params(type: ::RBI::Type::Class).void }
|
4074
|
+
def visit_class(type); end
|
4075
|
+
|
4076
|
+
# source://rbi//lib/rbi/type_visitor.rb#76
|
4077
|
+
sig { params(type: ::RBI::Type::ClassOf).void }
|
4078
|
+
def visit_class_of(type); end
|
4079
|
+
|
4080
|
+
# source://rbi//lib/rbi/type_visitor.rb#79
|
4081
|
+
sig { params(type: ::RBI::Type::Generic).void }
|
4082
|
+
def visit_generic(type); end
|
4083
|
+
|
4084
|
+
# source://rbi//lib/rbi/type_visitor.rb#82
|
4085
|
+
sig { params(type: ::RBI::Type::Nilable).void }
|
4086
|
+
def visit_nilable(type); end
|
4087
|
+
|
4088
|
+
# source://rbi//lib/rbi/type_visitor.rb#88
|
4089
|
+
sig { params(type: ::RBI::Type::NoReturn).void }
|
4090
|
+
def visit_no_return(type); end
|
4091
|
+
|
4092
|
+
# source://rbi//lib/rbi/type_visitor.rb#91
|
4093
|
+
sig { params(type: ::RBI::Type::Proc).void }
|
4094
|
+
def visit_proc(type); end
|
4095
|
+
|
4096
|
+
# source://rbi//lib/rbi/type_visitor.rb#94
|
4097
|
+
sig { params(type: ::RBI::Type::SelfType).void }
|
4098
|
+
def visit_self_type(type); end
|
4099
|
+
|
4100
|
+
# source://rbi//lib/rbi/type_visitor.rb#100
|
4101
|
+
sig { params(type: ::RBI::Type::Shape).void }
|
4102
|
+
def visit_shape(type); end
|
4103
|
+
|
4104
|
+
# source://rbi//lib/rbi/type_visitor.rb#85
|
4105
|
+
sig { params(type: ::RBI::Type::Simple).void }
|
4106
|
+
def visit_simple(type); end
|
4107
|
+
|
4108
|
+
# source://rbi//lib/rbi/type_visitor.rb#103
|
4109
|
+
sig { params(type: ::RBI::Type::Tuple).void }
|
4110
|
+
def visit_tuple(type); end
|
4111
|
+
|
4112
|
+
# source://rbi//lib/rbi/type_visitor.rb#106
|
4113
|
+
sig { params(type: ::RBI::Type::TypeParameter).void }
|
4114
|
+
def visit_type_parameter(type); end
|
4115
|
+
|
4116
|
+
# source://rbi//lib/rbi/type_visitor.rb#109
|
4117
|
+
sig { params(type: ::RBI::Type::Untyped).void }
|
4118
|
+
def visit_untyped(type); end
|
4119
|
+
|
4120
|
+
# source://rbi//lib/rbi/type_visitor.rb#97
|
4121
|
+
sig { params(type: ::RBI::Type::Void).void }
|
4122
|
+
def visit_void(type); end
|
4123
|
+
end
|
4124
|
+
|
4125
|
+
# source://rbi//lib/rbi/type_visitor.rb#9
|
4126
|
+
class RBI::Type::Visitor::Error < ::RBI::Error; end
|
4127
|
+
|
4128
|
+
# `void`.
|
4129
|
+
#
|
4130
|
+
# source://rbi//lib/rbi/type.rb#133
|
4131
|
+
class RBI::Type::Void < ::RBI::Type
|
4132
|
+
# source://rbi//lib/rbi/type.rb#137
|
4133
|
+
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
|
4134
|
+
def ==(other); end
|
4135
|
+
|
4136
|
+
# source://rbi//lib/rbi/type.rb#142
|
4137
|
+
sig { override.returns(::String) }
|
4138
|
+
def to_rbi; end
|
4139
|
+
end
|
4140
|
+
|
4141
|
+
# source://rbi//lib/rbi/model.rb#1400
|
4142
|
+
class RBI::TypeMember < ::RBI::NodeWithComments
|
4143
|
+
include ::RBI::Indexable
|
4144
|
+
|
4145
|
+
# source://rbi//lib/rbi/model.rb#1415
|
4146
|
+
sig do
|
4147
|
+
params(
|
4148
|
+
name: ::String,
|
4149
|
+
value: ::String,
|
4150
|
+
loc: T.nilable(::RBI::Loc),
|
4151
|
+
comments: T::Array[::RBI::Comment],
|
4152
|
+
block: T.nilable(T.proc.params(node: ::RBI::TypeMember).void)
|
4153
|
+
).void
|
4154
|
+
end
|
4155
|
+
def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
4156
|
+
|
4157
|
+
# source://rbi//lib/rbi/model.rb#1423
|
4158
|
+
sig { returns(::String) }
|
4159
|
+
def fully_qualified_name; end
|
4160
|
+
|
4161
|
+
# source://rbi//lib/rbi/index.rb#183
|
4162
|
+
sig { override.returns(T::Array[::String]) }
|
4163
|
+
def index_ids; end
|
4164
|
+
|
4165
|
+
# source://rbi//lib/rbi/model.rb#1404
|
4166
|
+
sig { returns(::String) }
|
4167
|
+
def name; end
|
4168
|
+
|
4169
|
+
# source://rbi//lib/rbi/model.rb#1430
|
4170
|
+
sig { override.returns(::String) }
|
4171
|
+
def to_s; end
|
4172
|
+
|
4173
|
+
# @return [String]
|
4174
|
+
#
|
4175
|
+
# source://rbi//lib/rbi/model.rb#1404
|
4176
|
+
def value; end
|
4177
|
+
end
|
4178
|
+
|
4179
|
+
# source://rbi//lib/rbi/rbs_printer.rb#787
|
4180
|
+
class RBI::TypePrinter
|
4181
|
+
# source://rbi//lib/rbi/rbs_printer.rb#794
|
4182
|
+
sig { void }
|
4183
|
+
def initialize; end
|
4184
|
+
|
4185
|
+
# source://rbi//lib/rbi/rbs_printer.rb#791
|
4186
|
+
sig { returns(::String) }
|
4187
|
+
def string; end
|
4188
|
+
|
4189
|
+
# source://rbi//lib/rbi/rbs_printer.rb#799
|
4190
|
+
sig { params(node: ::RBI::Type).void }
|
4191
|
+
def visit(node); end
|
4192
|
+
|
4193
|
+
# source://rbi//lib/rbi/rbs_printer.rb#907
|
4194
|
+
sig { params(type: ::RBI::Type::All).void }
|
4195
|
+
def visit_all(type); end
|
4196
|
+
|
4197
|
+
# source://rbi//lib/rbi/rbs_printer.rb#917
|
4198
|
+
sig { params(type: ::RBI::Type::Any).void }
|
4199
|
+
def visit_any(type); end
|
4200
|
+
|
4201
|
+
# source://rbi//lib/rbi/rbs_printer.rb#864
|
4202
|
+
sig { params(type: ::RBI::Type::Anything).void }
|
4203
|
+
def visit_anything(type); end
|
4204
|
+
|
4205
|
+
# source://rbi//lib/rbi/rbs_printer.rb#889
|
4206
|
+
sig { params(type: ::RBI::Type::AttachedClass).void }
|
4207
|
+
def visit_attached_class(type); end
|
4208
|
+
|
4209
|
+
# source://rbi//lib/rbi/rbs_printer.rb#848
|
4210
|
+
sig { params(type: ::RBI::Type::Boolean).void }
|
4211
|
+
def visit_boolean(type); end
|
4212
|
+
|
4213
|
+
# source://rbi//lib/rbi/rbs_printer.rb#969
|
4214
|
+
sig { params(type: ::RBI::Type::Class).void }
|
4215
|
+
def visit_class(type); end
|
4216
|
+
|
4217
|
+
# source://rbi//lib/rbi/rbs_printer.rb#900
|
4218
|
+
sig { params(type: ::RBI::Type::ClassOf).void }
|
4219
|
+
def visit_class_of(type); end
|
4220
|
+
|
4221
|
+
# source://rbi//lib/rbi/rbs_printer.rb#853
|
4222
|
+
sig { params(type: ::RBI::Type::Generic).void }
|
4223
|
+
def visit_generic(type); end
|
4224
|
+
|
4225
|
+
# source://rbi//lib/rbi/rbs_printer.rb#894
|
4226
|
+
sig { params(type: ::RBI::Type::Nilable).void }
|
4227
|
+
def visit_nilable(type); end
|
4228
|
+
|
4229
|
+
# source://rbi//lib/rbi/rbs_printer.rb#874
|
4230
|
+
sig { params(type: ::RBI::Type::NoReturn).void }
|
4231
|
+
def visit_no_return(type); end
|
4232
|
+
|
4233
|
+
# source://rbi//lib/rbi/rbs_printer.rb#948
|
4234
|
+
sig { params(type: ::RBI::Type::Proc).void }
|
4235
|
+
def visit_proc(type); end
|
4236
|
+
|
4237
|
+
# source://rbi//lib/rbi/rbs_printer.rb#884
|
4238
|
+
sig { params(type: ::RBI::Type::SelfType).void }
|
4239
|
+
def visit_self_type(type); end
|
4240
|
+
|
4241
|
+
# source://rbi//lib/rbi/rbs_printer.rb#937
|
4242
|
+
sig { params(type: ::RBI::Type::Shape).void }
|
4243
|
+
def visit_shape(type); end
|
4244
|
+
|
4245
|
+
# source://rbi//lib/rbi/rbs_printer.rb#843
|
4246
|
+
sig { params(type: ::RBI::Type::Simple).void }
|
4247
|
+
def visit_simple(type); end
|
4248
|
+
|
4249
|
+
# source://rbi//lib/rbi/rbs_printer.rb#927
|
4250
|
+
sig { params(type: ::RBI::Type::Tuple).void }
|
4251
|
+
def visit_tuple(type); end
|
4252
|
+
|
4253
|
+
# source://rbi//lib/rbi/rbs_printer.rb#964
|
4254
|
+
sig { params(type: ::RBI::Type::TypeParameter).void }
|
4255
|
+
def visit_type_parameter(type); end
|
4256
|
+
|
4257
|
+
# source://rbi//lib/rbi/rbs_printer.rb#879
|
4258
|
+
sig { params(type: ::RBI::Type::Untyped).void }
|
4259
|
+
def visit_untyped(type); end
|
4260
|
+
|
4261
|
+
# source://rbi//lib/rbi/rbs_printer.rb#869
|
4262
|
+
sig { params(type: ::RBI::Type::Void).void }
|
4263
|
+
def visit_void(type); end
|
4264
|
+
|
4265
|
+
private
|
4266
|
+
|
4267
|
+
# source://rbi//lib/rbi/rbs_printer.rb#978
|
4268
|
+
sig { params(type_name: ::String).returns(::String) }
|
4269
|
+
def translate_t_type(type_name); end
|
4270
|
+
end
|
4271
|
+
|
4272
|
+
# source://rbi//lib/rbi/rewriters/attr_to_methods.rb#5
|
4273
|
+
class RBI::UnexpectedMultipleSigsError < ::RBI::Error
|
4274
|
+
# source://rbi//lib/rbi/rewriters/attr_to_methods.rb#10
|
4275
|
+
sig { params(node: ::RBI::Node).void }
|
4276
|
+
def initialize(node); end
|
4277
|
+
|
4278
|
+
# source://rbi//lib/rbi/rewriters/attr_to_methods.rb#7
|
4279
|
+
sig { returns(::RBI::Node) }
|
4280
|
+
def node; end
|
4281
|
+
end
|
4282
|
+
|
4283
|
+
# source://rbi//lib/rbi/parser.rb#20
|
4284
|
+
class RBI::UnexpectedParserError < ::RBI::Error
|
4285
|
+
# source://rbi//lib/rbi/parser.rb#27
|
4286
|
+
sig { params(parent_exception: ::Exception, last_location: ::RBI::Loc).void }
|
4287
|
+
def initialize(parent_exception, last_location); end
|
4288
|
+
|
4289
|
+
# source://rbi//lib/rbi/parser.rb#24
|
4290
|
+
sig { returns(::RBI::Loc) }
|
4291
|
+
def last_location; end
|
4292
|
+
|
4293
|
+
# source://rbi//lib/rbi/parser.rb#34
|
4294
|
+
sig { params(io: T.any(::IO, ::StringIO)).void }
|
4295
|
+
def print_debug(io: T.unsafe(nil)); end
|
4296
|
+
end
|
4297
|
+
|
4298
|
+
# source://rbi//lib/rbi/version.rb#5
|
4299
|
+
RBI::VERSION = T.let(T.unsafe(nil), String)
|
4300
|
+
|
4301
|
+
# Visibility
|
4302
|
+
#
|
4303
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
4304
|
+
#
|
4305
|
+
# source://rbi//lib/rbi/model.rb#916
|
4306
|
+
class RBI::Visibility < ::RBI::NodeWithComments
|
4307
|
+
abstract!
|
4308
|
+
|
4309
|
+
# source://rbi//lib/rbi/model.rb#926
|
4310
|
+
sig { params(visibility: ::Symbol, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void }
|
4311
|
+
def initialize(visibility, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
|
4312
|
+
|
4313
|
+
# source://rbi//lib/rbi/model.rb#932
|
4314
|
+
sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
|
4315
|
+
def ==(other); end
|
4316
|
+
|
4317
|
+
# source://rbi//lib/rbi/model.rb#949
|
4318
|
+
sig { returns(T::Boolean) }
|
4319
|
+
def private?; end
|
4320
|
+
|
4321
|
+
# source://rbi//lib/rbi/model.rb#944
|
4322
|
+
sig { returns(T::Boolean) }
|
4323
|
+
def protected?; end
|
4324
|
+
|
4325
|
+
# source://rbi//lib/rbi/model.rb#939
|
4326
|
+
sig { returns(T::Boolean) }
|
4327
|
+
def public?; end
|
4328
|
+
|
4329
|
+
# source://rbi//lib/rbi/model.rb#923
|
4330
|
+
sig { returns(::Symbol) }
|
4331
|
+
def visibility; end
|
4332
|
+
end
|
4333
|
+
|
4334
|
+
# source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#52
|
4335
|
+
class RBI::VisibilityGroup < ::RBI::Tree
|
4336
|
+
# source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#59
|
4337
|
+
sig { params(visibility: ::RBI::Visibility).void }
|
4338
|
+
def initialize(visibility); end
|
4339
|
+
|
4340
|
+
# source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#56
|
4341
|
+
sig { returns(::RBI::Visibility) }
|
4342
|
+
def visibility; end
|
4343
|
+
end
|
4344
|
+
|
4345
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
4346
|
+
#
|
4347
|
+
# source://rbi//lib/rbi/visitor.rb#7
|
4348
|
+
class RBI::Visitor
|
4349
|
+
abstract!
|
4350
|
+
|
4351
|
+
# source://rbi//lib/rbi/visitor.rb#14
|
4352
|
+
sig { params(node: T.nilable(::RBI::Node)).void }
|
4353
|
+
def visit(node); end
|
4354
|
+
|
4355
|
+
# source://rbi//lib/rbi/visitor.rb#108
|
4356
|
+
sig { params(nodes: T::Array[::RBI::Node]).void }
|
4357
|
+
def visit_all(nodes); end
|
4358
|
+
|
4359
|
+
# source://rbi//lib/rbi/visitor.rb#113
|
4360
|
+
sig { params(file: ::RBI::File).void }
|
4361
|
+
def visit_file(file); end
|
4362
|
+
|
4363
|
+
private
|
4364
|
+
|
4365
|
+
# source://rbi//lib/rbi/visitor.rb#195
|
4366
|
+
sig { params(node: ::RBI::Arg).void }
|
4367
|
+
def visit_arg(node); end
|
4368
|
+
|
4369
|
+
# source://rbi//lib/rbi/visitor.rb#144
|
4370
|
+
sig { params(node: ::RBI::AttrAccessor).void }
|
4371
|
+
def visit_attr_accessor(node); end
|
4372
|
+
|
4373
|
+
# source://rbi//lib/rbi/visitor.rb#147
|
4374
|
+
sig { params(node: ::RBI::AttrReader).void }
|
4375
|
+
def visit_attr_reader(node); end
|
4376
|
+
|
4377
|
+
# source://rbi//lib/rbi/visitor.rb#150
|
4378
|
+
sig { params(node: ::RBI::AttrWriter).void }
|
4379
|
+
def visit_attr_writer(node); end
|
4380
|
+
|
4381
|
+
# source://rbi//lib/rbi/visitor.rb#123
|
4382
|
+
sig { params(node: ::RBI::BlankLine).void }
|
4383
|
+
def visit_blank_line(node); end
|
4384
|
+
|
4385
|
+
# source://rbi//lib/rbi/visitor.rb#174
|
4386
|
+
sig { params(node: ::RBI::BlockParam).void }
|
4387
|
+
def visit_block_param(node); end
|
4388
|
+
|
4389
|
+
# source://rbi//lib/rbi/visitor.rb#129
|
4390
|
+
sig { params(node: ::RBI::Class).void }
|
4391
|
+
def visit_class(node); end
|
4392
|
+
|
4393
|
+
# source://rbi//lib/rbi/visitor.rb#120
|
4394
|
+
sig { params(node: ::RBI::Comment).void }
|
4395
|
+
def visit_comment(node); end
|
4396
|
+
|
4397
|
+
# source://rbi//lib/rbi/visitor.rb#240
|
4398
|
+
sig { params(node: ::RBI::ConflictTree).void }
|
4399
|
+
def visit_conflict_tree(node); end
|
4400
|
+
|
4401
|
+
# source://rbi//lib/rbi/visitor.rb#141
|
4402
|
+
sig { params(node: ::RBI::Const).void }
|
4403
|
+
def visit_const(node); end
|
4404
|
+
|
4405
|
+
# source://rbi//lib/rbi/visitor.rb#180
|
4406
|
+
sig { params(node: ::RBI::Extend).void }
|
4407
|
+
def visit_extend(node); end
|
4408
|
+
|
4409
|
+
# source://rbi//lib/rbi/visitor.rb#234
|
4410
|
+
sig { params(node: ::RBI::Group).void }
|
4411
|
+
def visit_group(node); end
|
4412
|
+
|
4413
|
+
# source://rbi//lib/rbi/visitor.rb#222
|
4414
|
+
sig { params(node: ::RBI::Helper).void }
|
4415
|
+
def visit_helper(node); end
|
4416
|
+
|
4417
|
+
# source://rbi//lib/rbi/visitor.rb#177
|
4418
|
+
sig { params(node: ::RBI::Include).void }
|
4419
|
+
def visit_include(node); end
|
4420
|
+
|
4421
|
+
# source://rbi//lib/rbi/visitor.rb#198
|
4422
|
+
sig { params(node: ::RBI::KwArg).void }
|
4423
|
+
def visit_kw_arg(node); end
|
4424
|
+
|
4425
|
+
# source://rbi//lib/rbi/visitor.rb#168
|
4426
|
+
sig { params(node: ::RBI::KwOptParam).void }
|
4427
|
+
def visit_kw_opt_param(node); end
|
4428
|
+
|
4429
|
+
# source://rbi//lib/rbi/visitor.rb#165
|
4430
|
+
sig { params(node: ::RBI::KwParam).void }
|
4431
|
+
def visit_kw_param(node); end
|
4432
|
+
|
4433
|
+
# source://rbi//lib/rbi/visitor.rb#171
|
4434
|
+
sig { params(node: ::RBI::KwRestParam).void }
|
4435
|
+
def visit_kw_rest_param(node); end
|
4436
|
+
|
4437
|
+
# source://rbi//lib/rbi/visitor.rb#153
|
4438
|
+
sig { params(node: ::RBI::Method).void }
|
4439
|
+
def visit_method(node); end
|
4440
|
+
|
4441
|
+
# source://rbi//lib/rbi/visitor.rb#228
|
4442
|
+
sig { params(node: ::RBI::MixesInClassMethods).void }
|
4443
|
+
def visit_mixes_in_class_methods(node); end
|
4444
|
+
|
4445
|
+
# source://rbi//lib/rbi/visitor.rb#126
|
4446
|
+
sig { params(node: ::RBI::Module).void }
|
4447
|
+
def visit_module(node); end
|
4448
|
+
|
4449
|
+
# source://rbi//lib/rbi/visitor.rb#159
|
4450
|
+
sig { params(node: ::RBI::OptParam).void }
|
4451
|
+
def visit_opt_param(node); end
|
4452
|
+
|
4453
|
+
# source://rbi//lib/rbi/visitor.rb#189
|
4454
|
+
sig { params(node: ::RBI::Private).void }
|
4455
|
+
def visit_private(node); end
|
4456
|
+
|
4457
|
+
# source://rbi//lib/rbi/visitor.rb#186
|
4458
|
+
sig { params(node: ::RBI::Protected).void }
|
4459
|
+
def visit_protected(node); end
|
4460
|
+
|
4461
|
+
# source://rbi//lib/rbi/visitor.rb#183
|
4462
|
+
sig { params(node: ::RBI::Public).void }
|
4463
|
+
def visit_public(node); end
|
4464
|
+
|
4465
|
+
# source://rbi//lib/rbi/visitor.rb#156
|
4466
|
+
sig { params(node: ::RBI::ReqParam).void }
|
4467
|
+
def visit_req_param(node); end
|
4468
|
+
|
4469
|
+
# source://rbi//lib/rbi/visitor.rb#231
|
4470
|
+
sig { params(node: ::RBI::RequiresAncestor).void }
|
4471
|
+
def visit_requires_ancestor(node); end
|
4472
|
+
|
4473
|
+
# source://rbi//lib/rbi/visitor.rb#162
|
4474
|
+
sig { params(node: ::RBI::RestParam).void }
|
4475
|
+
def visit_rest_param(node); end
|
4476
|
+
|
4477
|
+
# source://rbi//lib/rbi/visitor.rb#243
|
4478
|
+
sig { params(node: ::RBI::ScopeConflict).void }
|
4479
|
+
def visit_scope_conflict(node); end
|
4480
|
+
|
4481
|
+
# source://rbi//lib/rbi/visitor.rb#192
|
4482
|
+
sig { params(node: ::RBI::Send).void }
|
4483
|
+
def visit_send(node); end
|
4484
|
+
|
4485
|
+
# source://rbi//lib/rbi/visitor.rb#201
|
4486
|
+
sig { params(node: ::RBI::Sig).void }
|
4487
|
+
def visit_sig(node); end
|
4488
|
+
|
4489
|
+
# source://rbi//lib/rbi/visitor.rb#204
|
4490
|
+
sig { params(node: ::RBI::SigParam).void }
|
4491
|
+
def visit_sig_param(node); end
|
4492
|
+
|
4493
|
+
# source://rbi//lib/rbi/visitor.rb#132
|
4494
|
+
sig { params(node: ::RBI::SingletonClass).void }
|
4495
|
+
def visit_singleton_class(node); end
|
4496
|
+
|
4497
|
+
# source://rbi//lib/rbi/visitor.rb#135
|
4498
|
+
sig { params(node: ::RBI::Struct).void }
|
4499
|
+
def visit_struct(node); end
|
4500
|
+
|
4501
|
+
# source://rbi//lib/rbi/visitor.rb#216
|
4502
|
+
sig { params(node: ::RBI::TEnum).void }
|
4503
|
+
def visit_tenum(node); end
|
4504
|
+
|
4505
|
+
# source://rbi//lib/rbi/visitor.rb#219
|
4506
|
+
sig { params(node: ::RBI::TEnumBlock).void }
|
4507
|
+
def visit_tenum_block(node); end
|
4508
|
+
|
4509
|
+
# source://rbi//lib/rbi/visitor.rb#138
|
4510
|
+
sig { params(node: ::RBI::Tree).void }
|
4511
|
+
def visit_tree(node); end
|
4512
|
+
|
4513
|
+
# source://rbi//lib/rbi/visitor.rb#207
|
4514
|
+
sig { params(node: ::RBI::TStruct).void }
|
4515
|
+
def visit_tstruct(node); end
|
4516
|
+
|
4517
|
+
# source://rbi//lib/rbi/visitor.rb#210
|
4518
|
+
sig { params(node: ::RBI::TStructConst).void }
|
4519
|
+
def visit_tstruct_const(node); end
|
4520
|
+
|
4521
|
+
# source://rbi//lib/rbi/visitor.rb#213
|
4522
|
+
sig { params(node: ::RBI::TStructProp).void }
|
4523
|
+
def visit_tstruct_prop(node); end
|
4524
|
+
|
4525
|
+
# source://rbi//lib/rbi/visitor.rb#225
|
4526
|
+
sig { params(node: ::RBI::TypeMember).void }
|
4527
|
+
def visit_type_member(node); end
|
4528
|
+
|
4529
|
+
# source://rbi//lib/rbi/visitor.rb#237
|
4530
|
+
sig { params(node: ::RBI::VisibilityGroup).void }
|
4531
|
+
def visit_visibility_group(node); end
|
4532
|
+
end
|
4533
|
+
|
4534
|
+
# source://rbi//lib/rbi/visitor.rb#5
|
4535
|
+
class RBI::VisitorError < ::RBI::Error; end
|