danger-packwerk 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/lib/danger-packwerk/packwerk_wrapper.rb +2 -2
  3. data/lib/danger-packwerk/version.rb +1 -1
  4. data/sorbet/config +1 -0
  5. data/sorbet/rbi/gems/actionview@7.0.4.rbi +11543 -0
  6. data/sorbet/rbi/gems/activesupport@7.0.4.rbi +12959 -0
  7. data/sorbet/rbi/gems/addressable@2.8.1.rbi +1505 -0
  8. data/sorbet/rbi/gems/ast@2.4.2.rbi +522 -0
  9. data/sorbet/rbi/gems/better_html@2.0.1.rbi +286 -0
  10. data/sorbet/rbi/gems/builder@3.2.4.rbi +8 -0
  11. data/sorbet/rbi/gems/claide-plugins@0.9.2.rbi +791 -0
  12. data/sorbet/rbi/gems/claide@1.1.0.rbi +1132 -0
  13. data/sorbet/rbi/gems/coderay@1.1.3.rbi +2256 -0
  14. data/sorbet/rbi/gems/colored2@3.1.2.rbi +130 -0
  15. data/sorbet/rbi/gems/concurrent-ruby@1.1.10.rbi +8695 -0
  16. data/sorbet/rbi/gems/cork@0.3.0.rbi +248 -0
  17. data/sorbet/rbi/gems/crass@1.0.6.rbi +436 -0
  18. data/sorbet/rbi/gems/danger-plugin-api@1.0.0.rbi +8 -0
  19. data/sorbet/rbi/gems/danger@9.0.0.rbi +4722 -0
  20. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +862 -0
  21. data/sorbet/rbi/gems/erubi@1.11.0.rbi +102 -0
  22. data/sorbet/rbi/gems/faraday-em_http@1.0.0.rbi +266 -0
  23. data/sorbet/rbi/gems/faraday-em_synchrony@1.0.0.rbi +209 -0
  24. data/sorbet/rbi/gems/faraday-excon@1.1.0.rbi +212 -0
  25. data/sorbet/rbi/gems/faraday-http-cache@2.4.1.rbi +805 -0
  26. data/sorbet/rbi/gems/faraday-httpclient@1.0.1.rbi +221 -0
  27. data/sorbet/rbi/gems/faraday-multipart@1.0.4.rbi +266 -0
  28. data/sorbet/rbi/gems/faraday-net_http@1.0.1.rbi +216 -0
  29. data/sorbet/rbi/gems/faraday-net_http_persistent@1.2.0.rbi +206 -0
  30. data/sorbet/rbi/gems/faraday-patron@1.0.0.rbi +212 -0
  31. data/sorbet/rbi/gems/faraday-rack@1.0.0.rbi +225 -0
  32. data/sorbet/rbi/gems/faraday-retry@1.0.3.rbi +222 -0
  33. data/sorbet/rbi/gems/faraday@1.10.2.rbi +1862 -0
  34. data/sorbet/rbi/gems/git@1.12.0.rbi +1936 -0
  35. data/sorbet/rbi/gems/i18n@1.12.0.rbi +1643 -0
  36. data/sorbet/rbi/gems/json@2.6.2.rbi +1418 -0
  37. data/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi +8 -0
  38. data/sorbet/rbi/gems/kramdown@2.4.0.rbi +2168 -0
  39. data/sorbet/rbi/gems/loofah@2.19.0.rbi +646 -0
  40. data/sorbet/rbi/gems/method_source@1.0.0.rbi +199 -0
  41. data/sorbet/rbi/gems/minitest@5.16.3.rbi +997 -0
  42. data/sorbet/rbi/gems/multipart-post@2.2.3.rbi +165 -0
  43. data/sorbet/rbi/gems/nap@1.1.0.rbi +351 -0
  44. data/sorbet/rbi/gems/no_proxy_fix@0.1.2.rbi +8 -0
  45. data/sorbet/rbi/gems/nokogiri@1.13.8.rbi +4916 -0
  46. data/sorbet/rbi/gems/octokit@5.6.1.rbi +8939 -0
  47. data/sorbet/rbi/gems/open4@1.3.4.rbi +8 -0
  48. data/sorbet/rbi/gems/{packwerk@2.1.1.rbi → packwerk@2.2.1.rbi} +602 -51
  49. data/sorbet/rbi/gems/parallel@1.22.1.rbi +163 -0
  50. data/sorbet/rbi/gems/parser@3.1.2.1.rbi +5988 -0
  51. data/sorbet/rbi/gems/pry@0.14.1.rbi +6969 -0
  52. data/sorbet/rbi/gems/public_suffix@5.0.0.rbi +779 -0
  53. data/sorbet/rbi/gems/racc@1.6.0.rbi +92 -0
  54. data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +8 -0
  55. data/sorbet/rbi/gems/rails-html-sanitizer@1.4.3.rbi +493 -0
  56. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +227 -0
  57. data/sorbet/rbi/gems/rake@13.0.6.rbi +1865 -0
  58. data/sorbet/rbi/gems/rbi@0.0.14.rbi +2337 -0
  59. data/sorbet/rbi/gems/rchardet@1.8.0.rbi +587 -0
  60. data/sorbet/rbi/gems/regexp_parser@2.5.0.rbi +1851 -0
  61. data/sorbet/rbi/gems/rexml@3.2.5.rbi +3852 -0
  62. data/sorbet/rbi/gems/rspec-core@3.11.0.rbi +7725 -0
  63. data/sorbet/rbi/gems/rspec-expectations@3.11.0.rbi +6201 -0
  64. data/sorbet/rbi/gems/rspec-mocks@3.11.1.rbi +3625 -0
  65. data/sorbet/rbi/gems/rspec-support@3.11.0.rbi +1176 -0
  66. data/sorbet/rbi/gems/rspec@3.11.0.rbi +40 -0
  67. data/sorbet/rbi/gems/rubocop-ast@1.21.0.rbi +4193 -0
  68. data/sorbet/rbi/gems/rubocop-sorbet@0.6.8.rbi +677 -0
  69. data/sorbet/rbi/gems/rubocop@1.36.0.rbi +37914 -0
  70. data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +732 -0
  71. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +8 -0
  72. data/sorbet/rbi/gems/sawyer@0.9.2.rbi +513 -0
  73. data/sorbet/rbi/gems/smart_properties@1.17.0.rbi +326 -0
  74. data/sorbet/rbi/gems/spoom@1.1.11.rbi +1600 -0
  75. data/sorbet/rbi/gems/tapioca@0.8.0.rbi +1959 -0
  76. data/sorbet/rbi/gems/terminal-table@3.0.2.rbi +438 -0
  77. data/sorbet/rbi/gems/thor@1.2.1.rbi +2921 -0
  78. data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +4879 -0
  79. data/sorbet/rbi/gems/unicode-display_width@2.3.0.rbi +27 -0
  80. data/sorbet/rbi/gems/unparser@0.6.5.rbi +2789 -0
  81. data/sorbet/rbi/gems/webrick@1.7.0.rbi +1802 -0
  82. data/sorbet/rbi/gems/yard-sorbet@0.6.1.rbi +288 -0
  83. data/sorbet/rbi/gems/yard@0.9.27.rbi +12668 -0
  84. data/sorbet/rbi/todo.rbi +122 -0
  85. metadata +84 -7
  86. data/sorbet/rbi/gems/danger@8.5.0.rbi +0 -122
@@ -0,0 +1,1959 @@
1
+ # typed: false
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `tapioca` gem.
5
+ # Please instead update this file by running `bin/tapioca gem tapioca`.
6
+
7
+ # We need to do the alias-method-chain dance since Bootsnap does the same,
8
+ # and prepended modules and alias-method-chain don't play well together.
9
+ #
10
+ # So, why does Bootsnap do alias-method-chain and not prepend? Glad you asked!
11
+ # That's because RubyGems does alias-method-chain for Kernel#require and such,
12
+ # so, if Bootsnap were to do prepend, it might end up breaking RubyGems.
13
+ class Module
14
+ include ::Module::Concerning
15
+
16
+ def append_features(constant); end
17
+ def autoload(const_name, path); end
18
+ def extend_object(obj); end
19
+ def prepend_features(constant); end
20
+ end
21
+
22
+ Module::DELEGATION_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array)
23
+ Module::DELEGATION_RESERVED_METHOD_NAMES = T.let(T.unsafe(nil), Set)
24
+ Module::RUBY_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array)
25
+ module RBI; end
26
+
27
+ class RBI::Tree < ::RBI::NodeWithComments
28
+ sig do
29
+ params(
30
+ loc: T.nilable(::RBI::Loc),
31
+ comments: T::Array[::RBI::Comment],
32
+ block: T.nilable(T.proc.params(node: ::RBI::Tree).void)
33
+ ).void
34
+ end
35
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
36
+
37
+ sig { params(node: ::RBI::Node).void }
38
+ def <<(node); end
39
+
40
+ sig { override.params(v: ::RBI::Printer).void }
41
+ def accept_printer(v); end
42
+
43
+ sig { params(with_todo_comment: T::Boolean).void }
44
+ def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end
45
+
46
+ sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void }
47
+ def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end
48
+
49
+ sig do
50
+ params(
51
+ name: ::String,
52
+ superclass_name: T.nilable(::String),
53
+ block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)
54
+ ).returns(::RBI::Scope)
55
+ end
56
+ def create_class(name, superclass_name: T.unsafe(nil), &block); end
57
+
58
+ sig { params(name: ::String, value: ::String).void }
59
+ def create_constant(name, value:); end
60
+
61
+ sig { params(name: ::String).void }
62
+ def create_extend(name); end
63
+
64
+ sig { params(name: ::String).void }
65
+ def create_include(name); end
66
+
67
+ sig do
68
+ params(
69
+ name: ::String,
70
+ parameters: T::Array[::RBI::TypedParam],
71
+ return_type: ::String,
72
+ class_method: T::Boolean,
73
+ visibility: ::RBI::Visibility
74
+ ).void
75
+ end
76
+ def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil)); end
77
+
78
+ sig { params(name: ::String).void }
79
+ def create_mixes_in_class_methods(name); end
80
+
81
+ sig { params(name: ::String, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) }
82
+ def create_module(name, &block); end
83
+
84
+ sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).void }
85
+ def create_path(constant, &block); end
86
+
87
+ sig do
88
+ params(
89
+ name: ::String,
90
+ type: ::String,
91
+ variance: ::Symbol,
92
+ fixed: T.nilable(::String),
93
+ upper: T.nilable(::String),
94
+ lower: T.nilable(::String)
95
+ ).void
96
+ end
97
+ def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end
98
+
99
+ sig { params(annotation: ::String).void }
100
+ def deannotate!(annotation); end
101
+
102
+ sig { returns(T::Boolean) }
103
+ def empty?; end
104
+
105
+ sig { void }
106
+ def group_nodes!; end
107
+
108
+ sig { returns(::RBI::Index) }
109
+ def index; end
110
+
111
+ sig do
112
+ params(
113
+ other: ::RBI::Tree,
114
+ left_name: ::String,
115
+ right_name: ::String,
116
+ keep: ::RBI::Rewriters::Merge::Keep
117
+ ).returns(::RBI::MergeTree)
118
+ end
119
+ def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
120
+
121
+ sig { void }
122
+ def nest_non_public_methods!; end
123
+
124
+ sig { void }
125
+ def nest_singleton_methods!; end
126
+
127
+ sig { returns(T::Array[::RBI::Node]) }
128
+ def nodes; end
129
+
130
+ sig { override.returns(T::Boolean) }
131
+ def oneline?; end
132
+
133
+ sig { void }
134
+ def sort_nodes!; end
135
+
136
+ private
137
+
138
+ sig { params(node: ::RBI::Node).returns(::RBI::Node) }
139
+ def create_node(node); end
140
+
141
+ sig { returns(T::Hash[::String, ::RBI::Node]) }
142
+ def nodes_cache; end
143
+
144
+ sig { params(name: ::String).returns(T::Boolean) }
145
+ def valid_method_name?(name); end
146
+ end
147
+
148
+ RBI::Tree::SPECIAL_METHOD_NAMES = T.let(T.unsafe(nil), Array)
149
+
150
+ class RBI::TypedParam < ::T::Struct
151
+ const :param, ::RBI::Param
152
+ const :type, ::String
153
+
154
+ class << self
155
+ def inherited(s); end
156
+ end
157
+ end
158
+
159
+ RBI::VERSION = T.let(T.unsafe(nil), String)
160
+
161
+ module T::Generic
162
+ def [](*types); end
163
+ def type_member(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &blk); end
164
+ def type_template(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &blk); end
165
+ end
166
+
167
+ # This module intercepts calls to generic type instantiations and type variable definitions.
168
+ # Tapioca stores the data from those calls in a `GenericTypeRegistry` which can then be used
169
+ # to look up the original call details when we are trying to do code generation.
170
+ #
171
+ # We are interested in the data of the `[]`, `type_member` and `type_template` calls which
172
+ # are all needed to generate good generic information at runtime.
173
+ module T::Generic::TypeStoragePatch
174
+ def [](*types); end
175
+ def type_member(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &blk); end
176
+ def type_template(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &blk); end
177
+ end
178
+
179
+ class T::Types::Simple < ::T::Types::Base
180
+ def name; end
181
+ end
182
+
183
+ module T::Types::Simple::GenericPatch
184
+ # This method intercepts calls to the `name` method for simple types, so that
185
+ # it can ask the name to the type if the type is generic, since, by this point,
186
+ # we've created a clone of that type with the `name` method returning the
187
+ # appropriate name for that specific concrete type.
188
+ def name; end
189
+ end
190
+
191
+ module T::Types::Simple::NamePatch
192
+ def name; end
193
+ end
194
+
195
+ module T::Utils
196
+ class << self
197
+ def coerce(val); end
198
+ end
199
+ end
200
+
201
+ module T::Utils::CoercePatch
202
+ def coerce(val); end
203
+ end
204
+
205
+ module Tapioca
206
+ class << self
207
+ sig do
208
+ type_parameters(:Result)
209
+ .params(
210
+ blk: T.proc.returns(T.type_parameter(:Result))
211
+ ).returns(T.type_parameter(:Result))
212
+ end
213
+ def silence_warnings(&blk); end
214
+ end
215
+ end
216
+
217
+ Tapioca::BINARY_FILE = T.let(T.unsafe(nil), String)
218
+ Tapioca::CENTRAL_REPO_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String)
219
+ Tapioca::CENTRAL_REPO_INDEX_PATH = T.let(T.unsafe(nil), String)
220
+ Tapioca::CENTRAL_REPO_ROOT_URI = T.let(T.unsafe(nil), String)
221
+
222
+ class Tapioca::Cli < ::Thor
223
+ include ::Tapioca::CliHelper
224
+ include ::Tapioca::ConfigHelper
225
+ include ::Tapioca::SorbetHelper
226
+ include ::Tapioca::ShimsHelper
227
+
228
+ def __print_version; end
229
+ def annotations; end
230
+ def check_shims; end
231
+ def dsl(*constants); end
232
+ def gem(*gems); end
233
+ def init; end
234
+ def require; end
235
+ def todo; end
236
+
237
+ class << self
238
+ def exit_on_failure?; end
239
+ end
240
+ end
241
+
242
+ Tapioca::Cli::FILE_HEADER_OPTION_DESC = T.let(T.unsafe(nil), String)
243
+
244
+ module Tapioca::CliHelper
245
+ requires_ancestor { Thor::Shell }
246
+
247
+ sig { params(options: T::Hash[::Symbol, T.untyped]).returns(::Tapioca::RBIFormatter) }
248
+ def rbi_formatter(options); end
249
+
250
+ sig { params(message: ::String, color: T.any(::Symbol, T::Array[::Symbol])).void }
251
+ def say_error(message = T.unsafe(nil), *color); end
252
+ end
253
+
254
+ module Tapioca::Commands; end
255
+
256
+ class Tapioca::Commands::Annotations < ::Tapioca::Commands::Command
257
+ sig { params(central_repo_root_uri: ::String, central_repo_index_path: ::String).void }
258
+ def initialize(central_repo_root_uri:, central_repo_index_path: T.unsafe(nil)); end
259
+
260
+ sig { override.void }
261
+ def execute; end
262
+
263
+ private
264
+
265
+ sig { params(name: ::String, content: ::String).returns(::String) }
266
+ def add_header(name, content); end
267
+
268
+ sig { params(gem_name: ::String).void }
269
+ def fetch_annotation(gem_name); end
270
+
271
+ sig { params(gem_names: T::Array[::String]).returns(T::Array[::String]) }
272
+ def fetch_annotations(gem_names); end
273
+
274
+ sig { params(path: ::String).returns(T.nilable(::String)) }
275
+ def fetch_file(path); end
276
+
277
+ sig { params(path: ::String).returns(T.nilable(::String)) }
278
+ def fetch_http_file(path); end
279
+
280
+ sig { returns(Tapioca::RepoIndex) }
281
+ def fetch_index; end
282
+
283
+ sig { params(path: ::String).returns(T.nilable(::String)) }
284
+ def fetch_local_file(path); end
285
+
286
+ sig { returns(T::Array[::String]) }
287
+ def list_gemfile_gems; end
288
+
289
+ sig { params(project_gems: T::Array[::String]).void }
290
+ def remove_expired_annotations(project_gems); end
291
+ end
292
+
293
+ # @abstract It cannont be directly instantiated. Subclasses must implement the `abstract` methods below.
294
+ class Tapioca::Commands::Command
295
+ include ::Thor::Base
296
+ include ::Thor::Invocation
297
+ include ::Thor::Shell
298
+ include ::Tapioca::CliHelper
299
+ extend ::Thor::Base::ClassMethods
300
+ extend ::Thor::Invocation::ClassMethods
301
+
302
+ abstract!
303
+
304
+ sig { void }
305
+ def initialize; end
306
+
307
+ # @abstract
308
+ sig { abstract.void }
309
+ def execute; end
310
+
311
+ sig { returns(::Thor::Actions) }
312
+ def file_writer; end
313
+
314
+ private
315
+
316
+ sig do
317
+ params(
318
+ path: T.any(::Pathname, ::String),
319
+ content: ::String,
320
+ force: T::Boolean,
321
+ skip: T::Boolean,
322
+ verbose: T::Boolean
323
+ ).void
324
+ end
325
+ def create_file(path, content, force: T.unsafe(nil), skip: T.unsafe(nil), verbose: T.unsafe(nil)); end
326
+
327
+ sig { params(command: ::Symbol, args: ::String).returns(::String) }
328
+ def default_command(command, *args); end
329
+
330
+ sig { params(path: T.any(::Pathname, ::String), verbose: T::Boolean).void }
331
+ def remove_file(path, verbose: T.unsafe(nil)); end
332
+ end
333
+
334
+ class Tapioca::Commands::Command::FileWriter < ::Thor
335
+ include ::Thor::Actions
336
+ extend ::Thor::Actions::ClassMethods
337
+ end
338
+
339
+ class Tapioca::Commands::Dsl < ::Tapioca::Commands::Command
340
+ include ::Tapioca::SorbetHelper
341
+ include ::Tapioca::RBIHelper
342
+
343
+ sig do
344
+ params(
345
+ requested_constants: T::Array[::String],
346
+ outpath: ::Pathname,
347
+ only: T::Array[::String],
348
+ exclude: T::Array[::String],
349
+ file_header: T::Boolean,
350
+ compiler_path: ::String,
351
+ tapioca_path: ::String,
352
+ should_verify: T::Boolean,
353
+ quiet: T::Boolean,
354
+ verbose: T::Boolean,
355
+ number_of_workers: T.nilable(::Integer),
356
+ auto_strictness: T::Boolean,
357
+ gem_dir: ::String,
358
+ rbi_formatter: ::Tapioca::RBIFormatter
359
+ ).void
360
+ end
361
+ def initialize(requested_constants:, outpath:, only:, exclude:, file_header:, compiler_path:, tapioca_path:, should_verify: T.unsafe(nil), quiet: T.unsafe(nil), verbose: T.unsafe(nil), number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), gem_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil)); end
362
+
363
+ sig { override.void }
364
+ def execute; end
365
+
366
+ private
367
+
368
+ sig { void }
369
+ def abort_if_pending_migrations!; end
370
+
371
+ sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) }
372
+ def build_error_for_files(cause, files); end
373
+
374
+ sig do
375
+ params(
376
+ constant_name: ::String,
377
+ rbi: ::RBI::File,
378
+ outpath: ::Pathname,
379
+ quiet: T::Boolean
380
+ ).returns(T.nilable(::Pathname))
381
+ end
382
+ def compile_dsl_rbi(constant_name, rbi, outpath: T.unsafe(nil), quiet: T.unsafe(nil)); end
383
+
384
+ sig { params(constant_names: T::Array[::String]).returns(T::Array[::Module]) }
385
+ def constantize(constant_names); end
386
+
387
+ sig { params(compiler_names: T::Array[::String]).returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) }
388
+ def constantize_compilers(compiler_names); end
389
+
390
+ sig { params(constant_name: ::String).returns(::Pathname) }
391
+ def dsl_rbi_filename(constant_name); end
392
+
393
+ sig { params(requested_constants: T::Array[::String], path: ::Pathname).returns(T::Set[::Pathname]) }
394
+ def existing_rbi_filenames(requested_constants, path: T.unsafe(nil)); end
395
+
396
+ sig { params(constant: ::String).returns(::String) }
397
+ def generate_command_for(constant); end
398
+
399
+ sig { params(eager_load: T::Boolean).void }
400
+ def load_application(eager_load:); end
401
+
402
+ sig { void }
403
+ def load_dsl_compilers; end
404
+
405
+ sig { void }
406
+ def load_dsl_extensions; end
407
+
408
+ sig { returns(::Tapioca::Runtime::Loader) }
409
+ def loader; end
410
+
411
+ sig { params(dir: ::Pathname).void }
412
+ def perform_dsl_verification(dir); end
413
+
414
+ sig { params(files: T::Set[::Pathname]).void }
415
+ def purge_stale_dsl_rbi_files(files); end
416
+
417
+ sig { params(constant: ::String).returns(::String) }
418
+ def rbi_filename_for(constant); end
419
+
420
+ sig { params(path: ::Pathname).returns(T::Array[::Pathname]) }
421
+ def rbi_files_in(path); end
422
+
423
+ sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void }
424
+ def report_diff_and_exit_if_out_of_date(diff, command); end
425
+
426
+ sig { params(name: ::String).returns(T.nilable(T.class_of(Tapioca::Dsl::Compiler))) }
427
+ def resolve(name); end
428
+
429
+ sig { params(class_name: ::String).returns(::String) }
430
+ def underscore(class_name); end
431
+
432
+ sig { params(tmp_dir: ::Pathname).returns(T::Hash[::String, ::Symbol]) }
433
+ def verify_dsl_rbi(tmp_dir:); end
434
+ end
435
+
436
+ class Tapioca::Commands::Gem < ::Tapioca::Commands::Command
437
+ include ::Tapioca::SorbetHelper
438
+ include ::Tapioca::RBIHelper
439
+
440
+ sig do
441
+ params(
442
+ gem_names: T::Array[::String],
443
+ exclude: T::Array[::String],
444
+ prerequire: T.nilable(::String),
445
+ postrequire: ::String,
446
+ typed_overrides: T::Hash[::String, ::String],
447
+ outpath: ::Pathname,
448
+ file_header: T::Boolean,
449
+ doc: T::Boolean,
450
+ include_exported_rbis: T::Boolean,
451
+ number_of_workers: T.nilable(::Integer),
452
+ auto_strictness: T::Boolean,
453
+ dsl_dir: ::String,
454
+ rbi_formatter: ::Tapioca::RBIFormatter
455
+ ).void
456
+ end
457
+ def initialize(gem_names:, exclude:, prerequire:, postrequire:, typed_overrides:, outpath:, file_header:, doc:, include_exported_rbis:, number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), dsl_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil)); end
458
+
459
+ sig { override.void }
460
+ def execute; end
461
+
462
+ sig { params(should_verify: T::Boolean).void }
463
+ def sync(should_verify: T.unsafe(nil)); end
464
+
465
+ private
466
+
467
+ sig { returns(T::Array[::String]) }
468
+ def added_rbis; end
469
+
470
+ sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) }
471
+ def build_error_for_files(cause, files); end
472
+
473
+ sig { returns(::Tapioca::Gemfile) }
474
+ def bundle; end
475
+
476
+ sig { params(gem: ::Tapioca::Gemfile::GemSpec).void }
477
+ def compile_gem_rbi(gem); end
478
+
479
+ sig { params(gem_name: ::String).returns(::Pathname) }
480
+ def existing_rbi(gem_name); end
481
+
482
+ sig { returns(T::Hash[::String, ::String]) }
483
+ def existing_rbis; end
484
+
485
+ sig { params(gem_name: ::String).returns(::Pathname) }
486
+ def expected_rbi(gem_name); end
487
+
488
+ sig { returns(T::Hash[::String, ::String]) }
489
+ def expected_rbis; end
490
+
491
+ sig { params(file: ::String, error: ::LoadError).void }
492
+ def explain_failed_require(file, error); end
493
+
494
+ sig { params(gem_name: ::String).returns(T::Boolean) }
495
+ def gem_rbi_exists?(gem_name); end
496
+
497
+ sig { params(gem_name: ::String, version: ::String).returns(::Pathname) }
498
+ def gem_rbi_filename(gem_name, version); end
499
+
500
+ sig { params(gem_names: T::Array[::String]).returns(T::Array[::Tapioca::Gemfile::GemSpec]) }
501
+ def gems_to_generate(gem_names); end
502
+
503
+ sig { returns(::Tapioca::Runtime::Loader) }
504
+ def loader; end
505
+
506
+ sig { params(gem: ::Tapioca::Gemfile::GemSpec, file: ::RBI::File).void }
507
+ def merge_with_exported_rbi(gem, file); end
508
+
509
+ sig { params(old_filename: ::Pathname, new_filename: ::Pathname).void }
510
+ def move(old_filename, new_filename); end
511
+
512
+ sig { void }
513
+ def perform_additions; end
514
+
515
+ sig { void }
516
+ def perform_removals; end
517
+
518
+ sig { void }
519
+ def perform_sync_verification; end
520
+
521
+ sig { returns(T::Array[::String]) }
522
+ def removed_rbis; end
523
+
524
+ sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void }
525
+ def report_diff_and_exit_if_out_of_date(diff, command); end
526
+
527
+ sig { void }
528
+ def require_gem_file; end
529
+ end
530
+
531
+ class Tapioca::Commands::Init < ::Tapioca::Commands::Command
532
+ sig { params(sorbet_config: ::String, tapioca_config: ::String, default_postrequire: ::String).void }
533
+ def initialize(sorbet_config:, tapioca_config:, default_postrequire:); end
534
+
535
+ sig { override.void }
536
+ def execute; end
537
+
538
+ private
539
+
540
+ sig { void }
541
+ def create_binstub; end
542
+
543
+ sig { void }
544
+ def create_post_require; end
545
+
546
+ sig { void }
547
+ def create_sorbet_config; end
548
+
549
+ sig { void }
550
+ def create_tapioca_config; end
551
+
552
+ sig { returns(::Bundler::Installer) }
553
+ def installer; end
554
+
555
+ sig { returns(::Bundler::StubSpecification) }
556
+ def spec; end
557
+ end
558
+
559
+ class Tapioca::Commands::Require < ::Tapioca::Commands::Command
560
+ sig { params(requires_path: ::String, sorbet_config_path: ::String).void }
561
+ def initialize(requires_path:, sorbet_config_path:); end
562
+
563
+ sig { override.void }
564
+ def execute; end
565
+ end
566
+
567
+ class Tapioca::Commands::Todo < ::Tapioca::Commands::Command
568
+ include ::Tapioca::SorbetHelper
569
+
570
+ sig { params(todo_file: ::String, file_header: T::Boolean).void }
571
+ def initialize(todo_file:, file_header:); end
572
+
573
+ sig { override.void }
574
+ def execute; end
575
+
576
+ private
577
+
578
+ sig { params(constants: T::Array[::String], command: ::String).returns(::RBI::File) }
579
+ def rbi(constants, command:); end
580
+
581
+ sig { returns(T::Array[::String]) }
582
+ def unresolved_constants; end
583
+ end
584
+
585
+ module Tapioca::ConfigHelper
586
+ requires_ancestor { Thor }
587
+
588
+ sig { params(args: T.untyped, local_options: T.untyped, config: T.untyped).void }
589
+ def initialize(args = T.unsafe(nil), local_options = T.unsafe(nil), config = T.unsafe(nil)); end
590
+
591
+ sig { returns(::String) }
592
+ def command_name; end
593
+
594
+ sig { returns(::Thor::CoreExt::HashWithIndifferentAccess) }
595
+ def defaults; end
596
+
597
+ sig { returns(::Thor::CoreExt::HashWithIndifferentAccess) }
598
+ def options; end
599
+
600
+ private
601
+
602
+ sig { params(msg: ::String).returns(::Tapioca::ConfigHelper::ConfigError) }
603
+ def build_error(msg); end
604
+
605
+ sig do
606
+ params(
607
+ options: ::Thor::CoreExt::HashWithIndifferentAccess
608
+ ).returns(::Thor::CoreExt::HashWithIndifferentAccess)
609
+ end
610
+ def config_options(options); end
611
+
612
+ sig { params(options: T::Hash[::Symbol, ::Thor::Option]).void }
613
+ def filter_defaults(options); end
614
+
615
+ sig do
616
+ params(
617
+ options: T.nilable(::Thor::CoreExt::HashWithIndifferentAccess)
618
+ ).returns(::Thor::CoreExt::HashWithIndifferentAccess)
619
+ end
620
+ def merge_options(*options); end
621
+
622
+ sig { params(config_file: ::String, errors: T::Array[::Tapioca::ConfigHelper::ConfigError]).void }
623
+ def print_errors(config_file, errors); end
624
+
625
+ sig { params(config_file: ::String, config: T::Hash[T.untyped, T.untyped]).void }
626
+ def validate_config!(config_file, config); end
627
+
628
+ sig do
629
+ params(
630
+ command_options: T::Hash[::Symbol, ::Thor::Option],
631
+ config_key: ::String,
632
+ config_options: T::Hash[T.untyped, T.untyped]
633
+ ).returns(T::Array[::Tapioca::ConfigHelper::ConfigError])
634
+ end
635
+ def validate_config_options(command_options, config_key, config_options); end
636
+ end
637
+
638
+ class Tapioca::ConfigHelper::ConfigError < ::T::Struct
639
+ const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart]
640
+
641
+ class << self
642
+ def inherited(s); end
643
+ end
644
+ end
645
+
646
+ class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct
647
+ const :colors, T::Array[::Symbol]
648
+ const :message, ::String
649
+
650
+ class << self
651
+ def inherited(s); end
652
+ end
653
+ end
654
+
655
+ Tapioca::DEFAULT_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String)
656
+ Tapioca::DEFAULT_DSL_DIR = T.let(T.unsafe(nil), String)
657
+ Tapioca::DEFAULT_GEM_DIR = T.let(T.unsafe(nil), String)
658
+ Tapioca::DEFAULT_OVERRIDES = T.let(T.unsafe(nil), Hash)
659
+ Tapioca::DEFAULT_POSTREQUIRE_FILE = T.let(T.unsafe(nil), String)
660
+ Tapioca::DEFAULT_RBI_DIR = T.let(T.unsafe(nil), String)
661
+ Tapioca::DEFAULT_RBI_FORMATTER = T.let(T.unsafe(nil), Tapioca::RBIFormatter)
662
+ Tapioca::DEFAULT_SHIM_DIR = T.let(T.unsafe(nil), String)
663
+ Tapioca::DEFAULT_TODO_FILE = T.let(T.unsafe(nil), String)
664
+ module Tapioca::Dsl; end
665
+
666
+ # @abstract It cannont be directly instantiated. Subclasses must implement the `abstract` methods below.
667
+ class Tapioca::Dsl::Compiler
668
+ extend T::Generic
669
+ include ::Tapioca::Runtime::Reflection
670
+ include ::Tapioca::SignaturesHelper
671
+ include ::Tapioca::Dsl::Helpers::ParamHelper
672
+ extend ::Tapioca::Runtime::Reflection
673
+
674
+ abstract!
675
+
676
+ ConstantType = type_member { { upper: Module } }
677
+
678
+ sig { params(pipeline: ::Tapioca::Dsl::Pipeline, root: ::RBI::Tree, constant: ConstantType).void }
679
+ def initialize(pipeline, root, constant); end
680
+
681
+ # NOTE: This should eventually accept an `Error` object or `Exception` rather than simply a `String`.
682
+ sig { params(error: ::String).void }
683
+ def add_error(error); end
684
+
685
+ sig { params(compiler_name: ::String).returns(T::Boolean) }
686
+ def compiler_enabled?(compiler_name); end
687
+
688
+ sig { returns(ConstantType) }
689
+ def constant; end
690
+
691
+ # @abstract
692
+ sig { abstract.void }
693
+ def decorate; end
694
+
695
+ sig { returns(::RBI::Tree) }
696
+ def root; end
697
+
698
+ private
699
+
700
+ sig { params(type: ::String).returns(::String) }
701
+ def as_nilable_type(type); end
702
+
703
+ sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(T::Array[::RBI::TypedParam]) }
704
+ def compile_method_parameters_to_rbi(method_def); end
705
+
706
+ sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(::String) }
707
+ def compile_method_return_type_to_rbi(method_def); end
708
+
709
+ sig { params(scope: ::RBI::Scope, method_def: T.any(::Method, ::UnboundMethod), class_method: T::Boolean).void }
710
+ def create_method_from_def(scope, method_def, class_method: T.unsafe(nil)); end
711
+
712
+ # Get the types of each parameter from a method signature
713
+ sig { params(method_def: T.any(::Method, ::UnboundMethod), signature: T.untyped).returns(T::Array[::String]) }
714
+ def parameters_types_from_signature(method_def, signature); end
715
+
716
+ sig { params(name: ::String).returns(T::Boolean) }
717
+ def valid_parameter_name?(name); end
718
+
719
+ class << self
720
+ # @abstract
721
+ sig { abstract.returns(T::Enumerable[::Module]) }
722
+ def gather_constants; end
723
+
724
+ sig { params(constant: ::Module).returns(T::Boolean) }
725
+ def handles?(constant); end
726
+
727
+ sig { returns(T::Set[::Module]) }
728
+ def processable_constants; end
729
+
730
+ private
731
+
732
+ sig { returns(T::Enumerable[::Class]) }
733
+ def all_classes; end
734
+
735
+ sig { returns(T::Enumerable[::Module]) }
736
+ def all_modules; end
737
+ end
738
+ end
739
+
740
+ module Tapioca::Dsl::Compilers; end
741
+ Tapioca::Dsl::Compilers::DIRECTORY = T.let(T.unsafe(nil), String)
742
+
743
+ # DSL compilers are either built-in to Tapioca and live under the
744
+ # `Tapioca::Dsl::Compilers` namespace (i.e. this namespace), and
745
+ # can be referred to by just using the class name, or they live in
746
+ # a different namespace and can only be referred to using their fully
747
+ # qualified name. This constant encapsulates that dual lookup when
748
+ # a compiler needs to be resolved by name.
749
+ Tapioca::Dsl::Compilers::NAMESPACES = T.let(T.unsafe(nil), Array)
750
+
751
+ module Tapioca::Dsl::Helpers; end
752
+
753
+ module Tapioca::Dsl::Helpers::ParamHelper
754
+ include ::Tapioca::SignaturesHelper
755
+
756
+ sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) }
757
+ def create_block_param(name, type:); end
758
+
759
+ sig { params(name: ::String, type: ::String, default: ::String).returns(::RBI::TypedParam) }
760
+ def create_kw_opt_param(name, type:, default:); end
761
+
762
+ sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) }
763
+ def create_kw_param(name, type:); end
764
+
765
+ sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) }
766
+ def create_kw_rest_param(name, type:); end
767
+
768
+ sig { params(name: ::String, type: ::String, default: ::String).returns(::RBI::TypedParam) }
769
+ def create_opt_param(name, type:, default:); end
770
+
771
+ sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) }
772
+ def create_param(name, type:); end
773
+
774
+ sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) }
775
+ def create_rest_param(name, type:); end
776
+
777
+ sig { params(param: ::RBI::Param, type: ::String).returns(::RBI::TypedParam) }
778
+ def create_typed_param(param, type); end
779
+ end
780
+
781
+ class Tapioca::Dsl::Pipeline
782
+ sig do
783
+ params(
784
+ requested_constants: T::Array[::Module],
785
+ requested_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)],
786
+ excluded_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)],
787
+ error_handler: T.proc.params(error: ::String).void,
788
+ number_of_workers: T.nilable(::Integer)
789
+ ).void
790
+ end
791
+ def initialize(requested_constants:, requested_compilers: T.unsafe(nil), excluded_compilers: T.unsafe(nil), error_handler: T.unsafe(nil), number_of_workers: T.unsafe(nil)); end
792
+
793
+ sig { params(error: ::String).void }
794
+ def add_error(error); end
795
+
796
+ sig { params(compiler_name: ::String).returns(T::Boolean) }
797
+ def compiler_enabled?(compiler_name); end
798
+
799
+ sig { returns(T::Enumerable[T.class_of(Tapioca::Dsl::Compiler)]) }
800
+ def compilers; end
801
+
802
+ sig { returns(T.proc.params(error: ::String).void) }
803
+ def error_handler; end
804
+
805
+ sig { returns(T::Array[::String]) }
806
+ def errors; end
807
+
808
+ sig { returns(T::Array[::Module]) }
809
+ def requested_constants; end
810
+
811
+ sig do
812
+ type_parameters(:T)
813
+ .params(
814
+ blk: T.proc.params(constant: ::Module, rbi: ::RBI::File).returns(T.type_parameter(:T))
815
+ ).returns(T::Array[T.type_parameter(:T)])
816
+ end
817
+ def run(&blk); end
818
+
819
+ private
820
+
821
+ sig { params(constants: T::Set[::Module]).returns(T::Set[::Module]) }
822
+ def filter_anonymous_and_reloaded_constants(constants); end
823
+
824
+ sig do
825
+ params(
826
+ requested_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)],
827
+ excluded_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)]
828
+ ).returns(T::Enumerable[T.class_of(Tapioca::Dsl::Compiler)])
829
+ end
830
+ def gather_compilers(requested_compilers, excluded_compilers); end
831
+
832
+ sig { params(requested_constants: T::Array[::Module]).returns(T::Set[::Module]) }
833
+ def gather_constants(requested_constants); end
834
+
835
+ sig { params(constant: ::Module).returns(T.nilable(::RBI::File)) }
836
+ def rbi_for_constant(constant); end
837
+
838
+ sig { params(error: ::String).returns(T.noreturn) }
839
+ def report_error(error); end
840
+ end
841
+
842
+ class Tapioca::Error < ::StandardError; end
843
+
844
+ class Tapioca::Executor
845
+ sig { params(queue: T::Array[T.untyped], number_of_workers: T.nilable(::Integer)).void }
846
+ def initialize(queue, number_of_workers: T.unsafe(nil)); end
847
+
848
+ sig do
849
+ type_parameters(:T)
850
+ .params(
851
+ block: T.proc.params(item: T.untyped).returns(T.type_parameter(:T))
852
+ ).returns(T::Array[T.type_parameter(:T)])
853
+ end
854
+ def run_in_parallel(&block); end
855
+ end
856
+
857
+ Tapioca::Executor::MINIMUM_ITEMS_PER_WORKER = T.let(T.unsafe(nil), Integer)
858
+ module Tapioca::Gem; end
859
+
860
+ class Tapioca::Gem::ConstNodeAdded < ::Tapioca::Gem::NodeAdded
861
+ sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Const).void }
862
+ def initialize(symbol, constant, node); end
863
+
864
+ sig { returns(::RBI::Const) }
865
+ def node; end
866
+ end
867
+
868
+ class Tapioca::Gem::ConstantFound < ::Tapioca::Gem::Event
869
+ sig { params(symbol: ::String, constant: ::BasicObject).void }
870
+ def initialize(symbol, constant); end
871
+
872
+ sig { returns(::BasicObject) }
873
+ def constant; end
874
+
875
+ sig { returns(::String) }
876
+ def symbol; end
877
+ end
878
+
879
+ # @abstract It cannont be directly instantiated. Subclasses must implement the `abstract` methods below.
880
+ class Tapioca::Gem::Event
881
+ abstract!
882
+
883
+ def initialize(*args, &blk); end
884
+ end
885
+
886
+ module Tapioca::Gem::Listeners; end
887
+
888
+ # @abstract It cannont be directly instantiated. Subclasses must implement the `abstract` methods below.
889
+ class Tapioca::Gem::Listeners::Base
890
+ abstract!
891
+
892
+ sig { params(pipeline: ::Tapioca::Gem::Pipeline).void }
893
+ def initialize(pipeline); end
894
+
895
+ sig { params(event: ::Tapioca::Gem::NodeAdded).void }
896
+ def dispatch(event); end
897
+
898
+ private
899
+
900
+ sig { params(event: ::Tapioca::Gem::ConstNodeAdded).void }
901
+ def on_const(event); end
902
+
903
+ sig { params(event: ::Tapioca::Gem::MethodNodeAdded).void }
904
+ def on_method(event); end
905
+
906
+ sig { params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
907
+ def on_scope(event); end
908
+ end
909
+
910
+ class Tapioca::Gem::Listeners::DynamicMixins < ::Tapioca::Gem::Listeners::Base
911
+ include ::Tapioca::Runtime::Reflection
912
+
913
+ private
914
+
915
+ sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
916
+ def on_scope(event); end
917
+ end
918
+
919
+ class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base
920
+ include ::Tapioca::Runtime::Reflection
921
+
922
+ private
923
+
924
+ sig { params(tree: ::RBI::Tree, module_name: ::String, mod: ::Module, for_visibility: T::Array[::Symbol]).void }
925
+ def compile_directly_owned_methods(tree, module_name, mod, for_visibility = T.unsafe(nil)); end
926
+
927
+ sig do
928
+ params(
929
+ tree: ::RBI::Tree,
930
+ symbol_name: ::String,
931
+ constant: ::Module,
932
+ method: T.nilable(::UnboundMethod),
933
+ visibility: ::RBI::Visibility
934
+ ).void
935
+ end
936
+ def compile_method(tree, symbol_name, constant, method, visibility = T.unsafe(nil)); end
937
+
938
+ sig { params(constant: ::Module).returns(T.nilable(::UnboundMethod)) }
939
+ def initialize_method_for(constant); end
940
+
941
+ sig { params(mod: ::Module).returns(T::Hash[::Symbol, T::Array[::Symbol]]) }
942
+ def method_names_by_visibility(mod); end
943
+
944
+ # Check whether the method is defined by the constant.
945
+ #
946
+ # In most cases, it works to check that the constant is the method owner. However,
947
+ # in the case that a method is also defined in a module prepended to the constant, it
948
+ # will be owned by the prepended module, not the constant.
949
+ #
950
+ # This method implements a better way of checking whether a constant defines a method.
951
+ # It walks up the ancestor tree via the `super_method` method; if any of the super
952
+ # methods are owned by the constant, it means that the constant declares the method.
953
+ sig { params(method: ::UnboundMethod, constant: ::Module).returns(T::Boolean) }
954
+ def method_owned_by_constant?(method, constant); end
955
+
956
+ sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
957
+ def on_scope(event); end
958
+
959
+ sig { params(constant: ::Module, method_name: ::String).returns(T::Boolean) }
960
+ def struct_method?(constant, method_name); end
961
+
962
+ sig { params(name: ::String).returns(T::Boolean) }
963
+ def valid_method_name?(name); end
964
+
965
+ sig { params(name: ::String).returns(T::Boolean) }
966
+ def valid_parameter_name?(name); end
967
+ end
968
+
969
+ Tapioca::Gem::Listeners::Methods::SPECIAL_METHOD_NAMES = T.let(T.unsafe(nil), Array)
970
+
971
+ class Tapioca::Gem::Listeners::Mixins < ::Tapioca::Gem::Listeners::Base
972
+ include ::Tapioca::Runtime::Reflection
973
+
974
+ private
975
+
976
+ sig do
977
+ params(
978
+ tree: ::RBI::Tree,
979
+ mods: T::Array[::Module],
980
+ mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type
981
+ ).void
982
+ end
983
+ def add_mixins(tree, mods, mixin_type); end
984
+
985
+ sig { params(mixin_name: ::String).returns(T::Boolean) }
986
+ def filtered_mixin?(mixin_name); end
987
+
988
+ sig { params(constant: ::Module).returns(T::Array[::Module]) }
989
+ def interesting_ancestors_of(constant); end
990
+
991
+ sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
992
+ def on_scope(event); end
993
+ end
994
+
995
+ class Tapioca::Gem::Listeners::RemoveEmptyPayloadScopes < ::Tapioca::Gem::Listeners::Base
996
+ include ::Tapioca::Runtime::Reflection
997
+
998
+ private
999
+
1000
+ sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
1001
+ def on_scope(event); end
1002
+ end
1003
+
1004
+ class Tapioca::Gem::Listeners::SorbetEnums < ::Tapioca::Gem::Listeners::Base
1005
+ private
1006
+
1007
+ sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
1008
+ def on_scope(event); end
1009
+ end
1010
+
1011
+ class Tapioca::Gem::Listeners::SorbetHelpers < ::Tapioca::Gem::Listeners::Base
1012
+ include ::Tapioca::Runtime::Reflection
1013
+
1014
+ private
1015
+
1016
+ sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
1017
+ def on_scope(event); end
1018
+ end
1019
+
1020
+ class Tapioca::Gem::Listeners::SorbetProps < ::Tapioca::Gem::Listeners::Base
1021
+ private
1022
+
1023
+ sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
1024
+ def on_scope(event); end
1025
+ end
1026
+
1027
+ class Tapioca::Gem::Listeners::SorbetRequiredAncestors < ::Tapioca::Gem::Listeners::Base
1028
+ private
1029
+
1030
+ sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
1031
+ def on_scope(event); end
1032
+ end
1033
+
1034
+ class Tapioca::Gem::Listeners::SorbetSignatures < ::Tapioca::Gem::Listeners::Base
1035
+ include ::Tapioca::Runtime::Reflection
1036
+ include ::Tapioca::SignaturesHelper
1037
+
1038
+ private
1039
+
1040
+ sig { params(signature: T.untyped, parameters: T::Array[[::Symbol, ::String]]).returns(::RBI::Sig) }
1041
+ def compile_signature(signature, parameters); end
1042
+
1043
+ sig { override.params(event: ::Tapioca::Gem::MethodNodeAdded).void }
1044
+ def on_method(event); end
1045
+
1046
+ sig { params(signature: T.untyped).returns(T::Boolean) }
1047
+ def signature_final?(signature); end
1048
+ end
1049
+
1050
+ Tapioca::Gem::Listeners::SorbetSignatures::TYPE_PARAMETER_MATCHER = T.let(T.unsafe(nil), Regexp)
1051
+
1052
+ class Tapioca::Gem::Listeners::SorbetTypeVariables < ::Tapioca::Gem::Listeners::Base
1053
+ include ::Tapioca::Runtime::Reflection
1054
+
1055
+ private
1056
+
1057
+ sig { params(tree: ::RBI::Tree, constant: ::Module).void }
1058
+ def compile_type_variable_declarations(tree, constant); end
1059
+
1060
+ sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
1061
+ def on_scope(event); end
1062
+ end
1063
+
1064
+ class Tapioca::Gem::Listeners::Subconstants < ::Tapioca::Gem::Listeners::Base
1065
+ include ::Tapioca::Runtime::Reflection
1066
+
1067
+ private
1068
+
1069
+ sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
1070
+ def on_scope(event); end
1071
+ end
1072
+
1073
+ class Tapioca::Gem::Listeners::YardDoc < ::Tapioca::Gem::Listeners::Base
1074
+ sig { params(pipeline: ::Tapioca::Gem::Pipeline).void }
1075
+ def initialize(pipeline); end
1076
+
1077
+ private
1078
+
1079
+ sig { params(name: ::String, sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Comment]) }
1080
+ def documentation_comments(name, sigs: T.unsafe(nil)); end
1081
+
1082
+ sig { override.params(event: ::Tapioca::Gem::ConstNodeAdded).void }
1083
+ def on_const(event); end
1084
+
1085
+ sig { override.params(event: ::Tapioca::Gem::MethodNodeAdded).void }
1086
+ def on_method(event); end
1087
+
1088
+ sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
1089
+ def on_scope(event); end
1090
+ end
1091
+
1092
+ Tapioca::Gem::Listeners::YardDoc::IGNORED_COMMENTS = T.let(T.unsafe(nil), Array)
1093
+ Tapioca::Gem::Listeners::YardDoc::IGNORED_SIG_TAGS = T.let(T.unsafe(nil), Array)
1094
+
1095
+ class Tapioca::Gem::MethodNodeAdded < ::Tapioca::Gem::NodeAdded
1096
+ sig do
1097
+ params(
1098
+ symbol: ::String,
1099
+ constant: ::Module,
1100
+ node: ::RBI::Method,
1101
+ signature: T.untyped,
1102
+ parameters: T::Array[[::Symbol, ::String]]
1103
+ ).void
1104
+ end
1105
+ def initialize(symbol, constant, node, signature, parameters); end
1106
+
1107
+ sig { returns(::RBI::Method) }
1108
+ def node; end
1109
+
1110
+ sig { returns(T::Array[[::Symbol, ::String]]) }
1111
+ def parameters; end
1112
+
1113
+ sig { returns(T.untyped) }
1114
+ def signature; end
1115
+ end
1116
+
1117
+ # @abstract It cannont be directly instantiated. Subclasses must implement the `abstract` methods below.
1118
+ class Tapioca::Gem::NodeAdded < ::Tapioca::Gem::Event
1119
+ abstract!
1120
+
1121
+ sig { params(symbol: ::String, constant: ::Module).void }
1122
+ def initialize(symbol, constant); end
1123
+
1124
+ sig { returns(::Module) }
1125
+ def constant; end
1126
+
1127
+ sig { returns(::String) }
1128
+ def symbol; end
1129
+ end
1130
+
1131
+ class Tapioca::Gem::Pipeline
1132
+ include ::Tapioca::Runtime::Reflection
1133
+ include ::Tapioca::SignaturesHelper
1134
+
1135
+ sig { params(gem: ::Tapioca::Gemfile::GemSpec, include_doc: T::Boolean).void }
1136
+ def initialize(gem, include_doc: T.unsafe(nil)); end
1137
+
1138
+ sig { returns(::RBI::Tree) }
1139
+ def compile; end
1140
+
1141
+ sig { returns(::Tapioca::Gemfile::GemSpec) }
1142
+ def gem; end
1143
+
1144
+ sig { params(method: ::UnboundMethod).returns(T::Boolean) }
1145
+ def method_in_gem?(method); end
1146
+
1147
+ sig { params(constant: ::Module).returns(T.nilable(::String)) }
1148
+ def name_of(constant); end
1149
+
1150
+ sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Const).void }
1151
+ def push_const(symbol, constant, node); end
1152
+
1153
+ sig { params(symbol: ::String, constant: ::BasicObject).void }
1154
+ def push_constant(symbol, constant); end
1155
+
1156
+ sig do
1157
+ params(
1158
+ symbol: ::String,
1159
+ constant: ::Module,
1160
+ node: ::RBI::Method,
1161
+ signature: T.untyped,
1162
+ parameters: T::Array[[::Symbol, ::String]]
1163
+ ).void
1164
+ end
1165
+ def push_method(symbol, constant, node, signature, parameters); end
1166
+
1167
+ sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void }
1168
+ def push_scope(symbol, constant, node); end
1169
+
1170
+ sig { params(symbol: ::String).void }
1171
+ def push_symbol(symbol); end
1172
+
1173
+ sig { params(symbol_name: ::String).returns(T::Boolean) }
1174
+ def symbol_in_payload?(symbol_name); end
1175
+
1176
+ private
1177
+
1178
+ sig { params(name: ::String).void }
1179
+ def add_to_alias_namespace(name); end
1180
+
1181
+ sig { params(name: ::String).returns(T::Boolean) }
1182
+ def alias_namespaced?(name); end
1183
+
1184
+ sig { params(name: ::String, constant: ::Module).void }
1185
+ def compile_alias(name, constant); end
1186
+
1187
+ # Compile
1188
+ sig { params(symbol: ::String, constant: ::BasicObject).void }
1189
+ def compile_constant(symbol, constant); end
1190
+
1191
+ sig { params(name: ::String, constant: ::Module).void }
1192
+ def compile_module(name, constant); end
1193
+
1194
+ sig { params(name: ::String, value: ::BasicObject).void }
1195
+ def compile_object(name, value); end
1196
+
1197
+ sig { params(constant: ::Class).returns(T.nilable(::String)) }
1198
+ def compile_superclass(constant); end
1199
+
1200
+ sig { params(constant: ::Module, strict: T::Boolean).returns(T::Boolean) }
1201
+ def defined_in_gem?(constant, strict: T.unsafe(nil)); end
1202
+
1203
+ sig { params(event: ::Tapioca::Gem::Event).void }
1204
+ def dispatch(event); end
1205
+
1206
+ sig { params(constant: T.all(::Module, ::T::Generic)).returns(::String) }
1207
+ def generic_name_of(constant); end
1208
+
1209
+ sig { params(constant: ::Module).returns(T::Array[::String]) }
1210
+ def get_file_candidates(constant); end
1211
+
1212
+ sig { params(name: ::String).void }
1213
+ def mark_seen(name); end
1214
+
1215
+ sig { params(constant: ::Module, class_name: T.nilable(::String)).returns(T.nilable(::String)) }
1216
+ def name_of_proxy_target(constant, class_name); end
1217
+
1218
+ sig { returns(::Tapioca::Gem::Event) }
1219
+ def next_event; end
1220
+
1221
+ sig { params(event: ::Tapioca::Gem::ConstantFound).void }
1222
+ def on_constant(event); end
1223
+
1224
+ sig { params(event: ::Tapioca::Gem::NodeAdded).void }
1225
+ def on_node(event); end
1226
+
1227
+ sig { params(event: ::Tapioca::Gem::SymbolFound).void }
1228
+ def on_symbol(event); end
1229
+
1230
+ sig { params(name: ::String).returns(T::Boolean) }
1231
+ def seen?(name); end
1232
+ end
1233
+
1234
+ Tapioca::Gem::Pipeline::IGNORED_SYMBOLS = T.let(T.unsafe(nil), Array)
1235
+
1236
+ class Tapioca::Gem::ScopeNodeAdded < ::Tapioca::Gem::NodeAdded
1237
+ sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void }
1238
+ def initialize(symbol, constant, node); end
1239
+
1240
+ sig { returns(::RBI::Scope) }
1241
+ def node; end
1242
+ end
1243
+
1244
+ class Tapioca::Gem::SymbolFound < ::Tapioca::Gem::Event
1245
+ sig { params(symbol: ::String).void }
1246
+ def initialize(symbol); end
1247
+
1248
+ sig { returns(::String) }
1249
+ def symbol; end
1250
+ end
1251
+
1252
+ class Tapioca::Gemfile
1253
+ sig { params(exclude: T::Array[::String]).void }
1254
+ def initialize(exclude); end
1255
+
1256
+ sig { returns(::Bundler::Definition) }
1257
+ def definition; end
1258
+
1259
+ sig { returns(T::Array[::Tapioca::Gemfile::GemSpec]) }
1260
+ def dependencies; end
1261
+
1262
+ sig { params(gem_name: ::String).returns(T.nilable(::Tapioca::Gemfile::GemSpec)) }
1263
+ def gem(gem_name); end
1264
+
1265
+ sig { returns(T::Array[::String]) }
1266
+ def missing_specs; end
1267
+
1268
+ sig { void }
1269
+ def require_bundle; end
1270
+
1271
+ private
1272
+
1273
+ sig { returns(::String) }
1274
+ def dir; end
1275
+
1276
+ sig { returns(::File) }
1277
+ def gemfile; end
1278
+
1279
+ sig { returns(T::Array[::Symbol]) }
1280
+ def groups; end
1281
+
1282
+ sig { returns([T::Array[::Tapioca::Gemfile::GemSpec], T::Array[::String]]) }
1283
+ def load_dependencies; end
1284
+
1285
+ # @return [File]
1286
+ def lockfile; end
1287
+
1288
+ sig { returns([T::Enumerable[T.any(::Bundler::StubSpecification, ::Gem::Specification)], T::Array[::String]]) }
1289
+ def materialize_deps; end
1290
+
1291
+ sig { returns(::Bundler::Runtime) }
1292
+ def runtime; end
1293
+ end
1294
+
1295
+ # This is a module that gets prepended to `Bundler::Dependency` and
1296
+ # makes sure even gems marked as `require: false` are required during
1297
+ # `Bundler.require`.
1298
+ module Tapioca::Gemfile::AutoRequireHook
1299
+ requires_ancestor { Bundler::Dependency }
1300
+
1301
+ sig { returns(T.untyped) }
1302
+ def autorequire; end
1303
+
1304
+ class << self
1305
+ sig { params(exclude: T::Array[::String]).returns(T::Array[::String]) }
1306
+ def exclude=(exclude); end
1307
+
1308
+ sig { params(name: T.untyped).returns(T::Boolean) }
1309
+ def excluded?(name); end
1310
+ end
1311
+ end
1312
+
1313
+ class Tapioca::Gemfile::GemSpec
1314
+ sig { params(spec: T.any(::Bundler::StubSpecification, ::Gem::Specification)).void }
1315
+ def initialize(spec); end
1316
+
1317
+ sig { params(path: ::String).returns(T::Boolean) }
1318
+ def contains_path?(path); end
1319
+
1320
+ sig { returns(T::Boolean) }
1321
+ def export_rbi_files?; end
1322
+
1323
+ sig { returns(T::Array[::String]) }
1324
+ def exported_rbi_files; end
1325
+
1326
+ sig { returns(::RBI::MergeTree) }
1327
+ def exported_rbi_tree; end
1328
+
1329
+ sig { returns(T::Array[::Pathname]) }
1330
+ def files; end
1331
+
1332
+ sig { returns(::String) }
1333
+ def full_gem_path; end
1334
+
1335
+ sig { params(gemfile_dir: ::String).returns(T::Boolean) }
1336
+ def ignore?(gemfile_dir); end
1337
+
1338
+ sig { returns(::String) }
1339
+ def name; end
1340
+
1341
+ sig { void }
1342
+ def parse_yard_docs; end
1343
+
1344
+ sig { returns(::String) }
1345
+ def rbi_file_name; end
1346
+
1347
+ # @return [String]
1348
+ def version; end
1349
+
1350
+ private
1351
+
1352
+ sig { returns(T::Array[::Pathname]) }
1353
+ def collect_files; end
1354
+
1355
+ sig { returns(T.nilable(T::Boolean)) }
1356
+ def default_gem?; end
1357
+
1358
+ sig { returns(T::Boolean) }
1359
+ def gem_ignored?; end
1360
+
1361
+ sig { params(gemfile_dir: ::String).returns(T::Boolean) }
1362
+ def gem_in_app_dir?(gemfile_dir); end
1363
+
1364
+ sig { returns(T::Boolean) }
1365
+ def gem_in_bundle_path?; end
1366
+
1367
+ sig { params(path: ::String).returns(T::Boolean) }
1368
+ def has_parent_gemspec?(path); end
1369
+
1370
+ sig { returns(::Regexp) }
1371
+ def require_paths_prefix_matcher; end
1372
+
1373
+ sig { params(file: ::String).returns(::Pathname) }
1374
+ def resolve_to_ruby_lib_dir(file); end
1375
+
1376
+ sig { params(path: T.any(::Pathname, ::String)).returns(::String) }
1377
+ def to_realpath(path); end
1378
+
1379
+ sig { returns(::String) }
1380
+ def version_string; end
1381
+ end
1382
+
1383
+ Tapioca::Gemfile::GemSpec::IGNORED_GEMS = T.let(T.unsafe(nil), Array)
1384
+ Tapioca::Gemfile::Spec = T.type_alias { T.any(::Bundler::StubSpecification, ::Gem::Specification) }
1385
+
1386
+ class Tapioca::RBIFormatter < ::RBI::Formatter
1387
+ sig { params(file: ::RBI::File).void }
1388
+ def write_empty_body_comment!(file); end
1389
+
1390
+ sig { params(file: ::RBI::File, command: ::String, reason: T.nilable(::String)).void }
1391
+ def write_header!(file, command, reason: T.unsafe(nil)); end
1392
+ end
1393
+
1394
+ module Tapioca::RBIHelper
1395
+ requires_ancestor { Tapioca::SorbetHelper }
1396
+ requires_ancestor { Thor::Shell }
1397
+
1398
+ sig do
1399
+ params(
1400
+ command: ::String,
1401
+ gem_dir: ::String,
1402
+ dsl_dir: ::String,
1403
+ auto_strictness: T::Boolean,
1404
+ gems: T::Array[::Tapioca::Gemfile::GemSpec],
1405
+ compilers: T::Enumerable[::Class]
1406
+ ).void
1407
+ end
1408
+ def validate_rbi_files(command:, gem_dir:, dsl_dir:, auto_strictness:, gems: T.unsafe(nil), compilers: T.unsafe(nil)); end
1409
+
1410
+ private
1411
+
1412
+ sig { params(path: ::String).returns(::String) }
1413
+ def gem_name_from_rbi_path(path); end
1414
+
1415
+ sig { params(errors: T::Array[::Spoom::Sorbet::Errors::Error], gem_dir: ::String).void }
1416
+ def update_gem_rbis_strictnesses(errors, gem_dir); end
1417
+ end
1418
+
1419
+ class Tapioca::RepoIndex
1420
+ sig { void }
1421
+ def initialize; end
1422
+
1423
+ sig { params(gem_name: ::String).void }
1424
+ def <<(gem_name); end
1425
+
1426
+ sig { returns(T::Enumerable[::String]) }
1427
+ def gems; end
1428
+
1429
+ sig { params(gem_name: ::String).returns(T::Boolean) }
1430
+ def has_gem?(gem_name); end
1431
+
1432
+ class << self
1433
+ sig { params(hash: T::Hash[::String, T::Hash[T.untyped, T.untyped]]).returns(Tapioca::RepoIndex) }
1434
+ def from_hash(hash); end
1435
+
1436
+ sig { params(json: ::String).returns(Tapioca::RepoIndex) }
1437
+ def from_json(json); end
1438
+ end
1439
+ end
1440
+
1441
+ module Tapioca::Runtime; end
1442
+
1443
+ class Tapioca::Runtime::DynamicMixinCompiler
1444
+ include ::Tapioca::Runtime::Reflection
1445
+
1446
+ sig { params(constant: ::Module).void }
1447
+ def initialize(constant); end
1448
+
1449
+ # @return [Array<Symbol>]
1450
+ def class_attribute_predicates; end
1451
+
1452
+ sig { returns(T::Array[::Symbol]) }
1453
+ def class_attribute_readers; end
1454
+
1455
+ # @return [Array<Symbol>]
1456
+ def class_attribute_writers; end
1457
+
1458
+ sig { params(tree: ::RBI::Tree).void }
1459
+ def compile_class_attributes(tree); end
1460
+
1461
+ sig { params(tree: ::RBI::Tree).returns([T::Array[::Module], T::Array[::Module]]) }
1462
+ def compile_mixes_in_class_methods(tree); end
1463
+
1464
+ sig { returns(T::Array[::Module]) }
1465
+ def dynamic_extends; end
1466
+
1467
+ # @return [Array<Module>]
1468
+ def dynamic_includes; end
1469
+
1470
+ sig { returns(T::Boolean) }
1471
+ def empty_attributes?; end
1472
+
1473
+ sig { params(qualified_mixin_name: ::String).returns(T::Boolean) }
1474
+ def filtered_mixin?(qualified_mixin_name); end
1475
+
1476
+ # @return [Array<Symbol>]
1477
+ def instance_attribute_predicates; end
1478
+
1479
+ sig { returns(T::Array[::Symbol]) }
1480
+ def instance_attribute_readers; end
1481
+
1482
+ # @return [Array<Symbol>]
1483
+ def instance_attribute_writers; end
1484
+
1485
+ sig { params(mod: ::Module, dynamic_extends: T::Array[::Module]).returns(T::Boolean) }
1486
+ def module_included_by_another_dynamic_extend?(mod, dynamic_extends); end
1487
+ end
1488
+
1489
+ # This class is responsible for storing and looking up information related to generic types.
1490
+ #
1491
+ # The class stores 2 different kinds of data, in two separate lookup tables:
1492
+ # 1. a lookup of generic type instances by name: `@generic_instances`
1493
+ # 2. a lookup of type variable serializer by constant and type variable
1494
+ # instance: `@type_variables`
1495
+ #
1496
+ # By storing the above data, we can cheaply query each constant against this registry
1497
+ # to see if it declares any generic type variables. This becomes a simple lookup in the
1498
+ # `@type_variables` hash table with the given constant.
1499
+ #
1500
+ # If there is no entry, then we can cheaply know that we can skip generic type
1501
+ # information generation for this type.
1502
+ #
1503
+ # On the other hand, if we get a result, then the result will be a hash of type
1504
+ # variable to type variable serializers. This allows us to associate type variables
1505
+ # to the constant names that represent them, easily.
1506
+ module Tapioca::Runtime::GenericTypeRegistry
1507
+ class << self
1508
+ sig { params(instance: ::Object).returns(T::Boolean) }
1509
+ def generic_type_instance?(instance); end
1510
+
1511
+ sig { params(constant: ::Module).returns(T.nilable(T::Array[::Tapioca::TypeVariableModule])) }
1512
+ def lookup_type_variables(constant); end
1513
+
1514
+ # This method is responsible for building the name of the instantiated concrete type
1515
+ # and cloning the given constant so that we can return a type that is the same
1516
+ # as the current type but is a different instance and has a different name method.
1517
+ #
1518
+ # We cache those cloned instances by their name in `@generic_instances`, so that
1519
+ # we don't keep instantiating a new type every single time it is referenced.
1520
+ # For example, `[Foo[Integer], Foo[Integer], Foo[Integer], Foo[String]]` will only
1521
+ # result in 2 clones (1 for `Foo[Integer]` and another for `Foo[String]`) and
1522
+ # 2 hash lookups (for the other two `Foo[Integer]`s).
1523
+ #
1524
+ # This method returns the created or cached clone of the constant.
1525
+ sig { params(constant: T.untyped, types: T.untyped).returns(::Module) }
1526
+ def register_type(constant, types); end
1527
+
1528
+ # This method is called from intercepted calls to `type_member` and `type_template`.
1529
+ # We get passed all the arguments to those methods, as well as the `T::Types::TypeVariable`
1530
+ # instance generated by the Sorbet defined `type_member`/`type_template` call on `T::Generic`.
1531
+ #
1532
+ # This method creates a `String` with that data and stores it in the
1533
+ # `@type_variables` lookup table, keyed by the `constant` and `type_variable`.
1534
+ #
1535
+ # Finally, the original `type_variable` is returned from this method, so that the caller
1536
+ # can return it from the original methods as well.
1537
+ sig { params(constant: T.untyped, type_variable: ::Tapioca::TypeVariableModule).void }
1538
+ def register_type_variable(constant, type_variable); end
1539
+
1540
+ private
1541
+
1542
+ sig { params(constant: ::Module, name: ::String).returns(::Module) }
1543
+ def create_generic_type(constant, name); end
1544
+
1545
+ sig { params(constant: ::Class).returns(::Class) }
1546
+ def create_safe_subclass(constant); end
1547
+
1548
+ sig { params(constant: ::Module).returns(T::Array[::Tapioca::TypeVariableModule]) }
1549
+ def lookup_or_initialize_type_variables(constant); end
1550
+ end
1551
+ end
1552
+
1553
+ class Tapioca::Runtime::Loader
1554
+ sig do
1555
+ params(
1556
+ gemfile: ::Tapioca::Gemfile,
1557
+ initialize_file: T.nilable(::String),
1558
+ require_file: T.nilable(::String)
1559
+ ).void
1560
+ end
1561
+ def load_bundle(gemfile, initialize_file, require_file); end
1562
+
1563
+ sig { params(environment_load: T::Boolean, eager_load: T::Boolean).void }
1564
+ def load_rails_application(environment_load: T.unsafe(nil), eager_load: T.unsafe(nil)); end
1565
+
1566
+ private
1567
+
1568
+ sig { void }
1569
+ def eager_load_rails_app; end
1570
+
1571
+ sig { void }
1572
+ def load_rails_engines; end
1573
+
1574
+ sig { returns(T::Array[T.untyped]) }
1575
+ def rails_engines; end
1576
+
1577
+ sig { params(file: T.nilable(::String)).void }
1578
+ def require_helper(file); end
1579
+
1580
+ sig { params(path: ::String).void }
1581
+ def safe_require(path); end
1582
+
1583
+ sig { void }
1584
+ def silence_deprecations; end
1585
+ end
1586
+
1587
+ module Tapioca::Runtime::Reflection
1588
+ extend ::Tapioca::Runtime::Reflection
1589
+
1590
+ sig { params(constant: ::Module).returns(T::Array[::Module]) }
1591
+ def ancestors_of(constant); end
1592
+
1593
+ sig { params(object: ::BasicObject, other: ::BasicObject).returns(T::Boolean) }
1594
+ def are_equal?(object, other); end
1595
+
1596
+ sig { params(object: ::BasicObject).returns(::Class) }
1597
+ def class_of(object); end
1598
+
1599
+ sig { params(symbol: ::String, inherit: T::Boolean, namespace: ::Module).returns(::BasicObject) }
1600
+ def constantize(symbol, inherit: T.unsafe(nil), namespace: T.unsafe(nil)); end
1601
+
1602
+ sig { params(constant: ::Module).returns(T::Array[::Symbol]) }
1603
+ def constants_of(constant); end
1604
+
1605
+ # Returns an array with all classes that are < than the supplied class.
1606
+ #
1607
+ # class C; end
1608
+ # descendants_of(C) # => []
1609
+ #
1610
+ # class B < C; end
1611
+ # descendants_of(C) # => [B]
1612
+ #
1613
+ # class A < B; end
1614
+ # descendants_of(C) # => [B, A]
1615
+ #
1616
+ # class D < C; end
1617
+ # descendants_of(C) # => [B, A, D]
1618
+ sig do
1619
+ type_parameters(:U)
1620
+ .params(
1621
+ klass: T.all(::Class, T.type_parameter(:U))
1622
+ ).returns(T::Array[T.type_parameter(:U)])
1623
+ end
1624
+ def descendants_of(klass); end
1625
+
1626
+ sig { params(constant: ::Module).returns(T::Array[::Module]) }
1627
+ def inherited_ancestors_of(constant); end
1628
+
1629
+ sig { params(constant: ::Module, method: ::Symbol).returns(::Method) }
1630
+ def method_of(constant, method); end
1631
+
1632
+ sig { params(constant: ::Module).returns(T.nilable(::String)) }
1633
+ def name_of(constant); end
1634
+
1635
+ sig { params(type: ::T::Types::Base).returns(::String) }
1636
+ def name_of_type(type); end
1637
+
1638
+ sig { params(object: ::BasicObject).returns(::Integer) }
1639
+ def object_id_of(object); end
1640
+
1641
+ sig { params(constant: ::Module).returns(T::Array[::Symbol]) }
1642
+ def private_instance_methods_of(constant); end
1643
+
1644
+ sig { params(constant: ::Module).returns(T::Array[::Symbol]) }
1645
+ def protected_instance_methods_of(constant); end
1646
+
1647
+ sig { params(constant: ::Module).returns(T::Array[::Symbol]) }
1648
+ def public_instance_methods_of(constant); end
1649
+
1650
+ sig { params(constant: ::Module).returns(T.nilable(::String)) }
1651
+ def qualified_name_of(constant); end
1652
+
1653
+ sig { params(method: T.any(::Method, ::UnboundMethod)).returns(T.untyped) }
1654
+ def signature_of(method); end
1655
+
1656
+ sig { params(constant: ::Module).returns(::Class) }
1657
+ def singleton_class_of(constant); end
1658
+
1659
+ sig { params(constant: ::Class).returns(T.nilable(::Class)) }
1660
+ def superclass_of(constant); end
1661
+ end
1662
+
1663
+ Tapioca::Runtime::Reflection::ANCESTORS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1664
+ Tapioca::Runtime::Reflection::CLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1665
+ Tapioca::Runtime::Reflection::CONSTANTS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1666
+ Tapioca::Runtime::Reflection::EQUAL_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1667
+ Tapioca::Runtime::Reflection::METHOD_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1668
+ Tapioca::Runtime::Reflection::NAME_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1669
+ Tapioca::Runtime::Reflection::OBJECT_ID_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1670
+ Tapioca::Runtime::Reflection::PRIVATE_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1671
+ Tapioca::Runtime::Reflection::PROTECTED_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1672
+ Tapioca::Runtime::Reflection::PUBLIC_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1673
+ Tapioca::Runtime::Reflection::SINGLETON_CLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1674
+ Tapioca::Runtime::Reflection::SUPERCLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1675
+ module Tapioca::Runtime::Trackers; end
1676
+
1677
+ module Tapioca::Runtime::Trackers::Autoload
1678
+ class << self
1679
+ sig { void }
1680
+ def eager_load_all!; end
1681
+
1682
+ sig { params(constant_name: ::String).void }
1683
+ def register(constant_name); end
1684
+
1685
+ sig do
1686
+ type_parameters(:Result)
1687
+ .params(
1688
+ block: T.proc.returns(T.type_parameter(:Result))
1689
+ ).returns(T.type_parameter(:Result))
1690
+ end
1691
+ def with_disabled_exits(&block); end
1692
+ end
1693
+ end
1694
+
1695
+ Tapioca::Runtime::Trackers::Autoload::NOOP_METHOD = T.let(T.unsafe(nil), Proc)
1696
+
1697
+ # Registers a TracePoint immediately upon load to track points at which
1698
+ # classes and modules are opened for definition. This is used to track
1699
+ # correspondence between classes/modules and files, as this information isn't
1700
+ # available in the ruby runtime without extra accounting.
1701
+ module Tapioca::Runtime::Trackers::ConstantDefinition
1702
+ extend ::Tapioca::Runtime::Reflection
1703
+
1704
+ class << self
1705
+ # Returns the files in which this class or module was opened. Doesn't know
1706
+ # about situations where the class was opened prior to +require+ing,
1707
+ # or where metaprogramming was used via +eval+, etc.
1708
+ def files_for(klass); end
1709
+ end
1710
+ end
1711
+
1712
+ module Tapioca::Runtime::Trackers::Mixin
1713
+ class << self
1714
+ sig do
1715
+ params(
1716
+ constant: ::Module
1717
+ ).returns(T::Hash[::Tapioca::Runtime::Trackers::Mixin::Type, T::Hash[::Module, T::Array[::String]]])
1718
+ end
1719
+ def mixin_locations_for(constant); end
1720
+
1721
+ sig do
1722
+ params(
1723
+ constant: ::Module,
1724
+ mod: ::Module,
1725
+ mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type,
1726
+ locations: T.nilable(T::Array[::Thread::Backtrace::Location])
1727
+ ).void
1728
+ end
1729
+ def register(constant, mod, mixin_type, locations); end
1730
+ end
1731
+ end
1732
+
1733
+ class Tapioca::Runtime::Trackers::Mixin::Type < ::T::Enum
1734
+ enums do
1735
+ Prepend = new
1736
+ Include = new
1737
+ Extend = new
1738
+ end
1739
+ end
1740
+
1741
+ module Tapioca::Runtime::Trackers::RequiredAncestor
1742
+ class << self
1743
+ sig { params(requiring: ::T::Helpers, block: T.proc.returns(::Module)).void }
1744
+ def register(requiring, block); end
1745
+
1746
+ sig { params(mod: ::Module).returns(T::Array[T.proc.returns(::Module)]) }
1747
+ def required_ancestors_blocks_by(mod); end
1748
+
1749
+ sig { params(mod: ::Module).returns(T::Array[T.nilable(::Module)]) }
1750
+ def required_ancestors_by(mod); end
1751
+ end
1752
+ end
1753
+
1754
+ Tapioca::SORBET_CONFIG_FILE = T.let(T.unsafe(nil), String)
1755
+ Tapioca::SORBET_DIR = T.let(T.unsafe(nil), String)
1756
+
1757
+ module Tapioca::ShimsHelper
1758
+ requires_ancestor { Thor::Shell }
1759
+
1760
+ sig { params(index: ::RBI::Index, shim_rbi_dir: ::String).returns(T::Hash[::String, T::Array[::RBI::Node]]) }
1761
+ def duplicated_nodes_from_index(index, shim_rbi_dir); end
1762
+
1763
+ sig { params(index: ::RBI::Index, dir: ::String).void }
1764
+ def index_payload(index, dir); end
1765
+
1766
+ sig { params(index: ::RBI::Index, kind: ::String, dir: ::String).void }
1767
+ def index_rbis(index, kind, dir); end
1768
+
1769
+ sig { params(loc: ::RBI::Loc, path_prefix: T.nilable(::String)).returns(::String) }
1770
+ def location_to_payload_url(loc, path_prefix:); end
1771
+
1772
+ private
1773
+
1774
+ sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[T.any(::RBI::Attr, ::RBI::Method)]) }
1775
+ def extract_methods_and_attrs(nodes); end
1776
+
1777
+ sig do
1778
+ params(
1779
+ nodes: T::Array[T.any(::RBI::Attr, ::RBI::Method)]
1780
+ ).returns(T::Array[T.any(::RBI::Attr, ::RBI::Method)])
1781
+ end
1782
+ def extract_nodes_with_sigs(nodes); end
1783
+
1784
+ sig { params(nodes: T::Array[::RBI::Node], shim_rbi_dir: ::String).returns(T::Array[::RBI::Node]) }
1785
+ def extract_shims(nodes, shim_rbi_dir); end
1786
+
1787
+ sig { params(index: ::RBI::Index, files: T::Array[::String]).void }
1788
+ def parse_and_index_files(index, files); end
1789
+
1790
+ sig { params(nodes: T::Array[::RBI::Node], shim_rbi_dir: ::String).returns(T::Boolean) }
1791
+ def shims_have_duplicates?(nodes, shim_rbi_dir); end
1792
+ end
1793
+
1794
+ Tapioca::ShimsHelper::SORBET_PAYLOAD_URL = T.let(T.unsafe(nil), String)
1795
+
1796
+ module Tapioca::SignaturesHelper
1797
+ sig { params(sig_string: ::String).returns(::String) }
1798
+ def sanitize_signature_types(sig_string); end
1799
+ end
1800
+
1801
+ module Tapioca::SorbetHelper
1802
+ sig { params(sorbet_args: ::String).returns(::Spoom::ExecResult) }
1803
+ def sorbet(*sorbet_args); end
1804
+
1805
+ sig { returns(::String) }
1806
+ def sorbet_path; end
1807
+
1808
+ sig { params(feature: ::Symbol, version: T.nilable(::Gem::Version)).returns(T::Boolean) }
1809
+ def sorbet_supports?(feature, version: T.unsafe(nil)); end
1810
+ end
1811
+
1812
+ Tapioca::SorbetHelper::FEATURE_REQUIREMENTS = T.let(T.unsafe(nil), Hash)
1813
+ Tapioca::SorbetHelper::SORBET_BIN = T.let(T.unsafe(nil), Pathname)
1814
+ Tapioca::SorbetHelper::SORBET_EXE_PATH_ENV_VAR = T.let(T.unsafe(nil), String)
1815
+ Tapioca::SorbetHelper::SORBET_GEM_SPEC = T.let(T.unsafe(nil), Gem::Specification)
1816
+ module Tapioca::Static; end
1817
+
1818
+ class Tapioca::Static::RequiresCompiler
1819
+ sig { params(sorbet_path: ::String).void }
1820
+ def initialize(sorbet_path); end
1821
+
1822
+ sig { returns(::String) }
1823
+ def compile; end
1824
+
1825
+ private
1826
+
1827
+ sig { params(config: ::Spoom::Sorbet::Config).returns(T::Array[::String]) }
1828
+ def collect_files(config); end
1829
+
1830
+ sig { params(file_path: ::String).returns(T::Enumerable[::String]) }
1831
+ def collect_requires(file_path); end
1832
+
1833
+ sig { params(config: ::Spoom::Sorbet::Config, file_path: ::Pathname).returns(T::Boolean) }
1834
+ def file_ignored_by_sorbet?(config, file_path); end
1835
+
1836
+ sig { params(path: ::Pathname).returns(T::Array[::String]) }
1837
+ def path_parts(path); end
1838
+ end
1839
+
1840
+ module Tapioca::Static::SymbolLoader
1841
+ extend ::Tapioca::SorbetHelper
1842
+ extend ::Tapioca::Runtime::Reflection
1843
+
1844
+ class << self
1845
+ sig { returns(T::Set[::String]) }
1846
+ def engine_symbols; end
1847
+
1848
+ sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) }
1849
+ def gem_symbols(gem); end
1850
+
1851
+ sig { returns(T::Set[::String]) }
1852
+ def payload_symbols; end
1853
+
1854
+ private
1855
+
1856
+ sig { returns(T::Set[::String]) }
1857
+ def load_engine_symbols; end
1858
+
1859
+ sig { params(input: ::String, table_type: ::String).returns(::String) }
1860
+ def symbol_table_json_from(input, table_type: T.unsafe(nil)); end
1861
+
1862
+ sig { params(paths: T::Array[::Pathname]).returns(T::Set[::String]) }
1863
+ def symbols_from_paths(paths); end
1864
+ end
1865
+ end
1866
+
1867
+ class Tapioca::Static::SymbolTableParser
1868
+ sig { void }
1869
+ def initialize; end
1870
+
1871
+ sig { params(name: ::String).returns(::String) }
1872
+ def fully_qualified_name(name); end
1873
+
1874
+ sig { params(object: T::Hash[::String, T.untyped]).void }
1875
+ def parse_object(object); end
1876
+
1877
+ sig { returns(T::Set[::String]) }
1878
+ def symbols; end
1879
+
1880
+ class << self
1881
+ sig { params(json_string: ::String).returns(T::Set[::String]) }
1882
+ def parse_json(json_string); end
1883
+ end
1884
+ end
1885
+
1886
+ Tapioca::TAPIOCA_CONFIG_FILE = T.let(T.unsafe(nil), String)
1887
+ Tapioca::TAPIOCA_DIR = T.let(T.unsafe(nil), String)
1888
+
1889
+ class Tapioca::TypeVariable < ::T::Types::TypeVariable
1890
+ # @return [TypeVariable] a new instance of TypeVariable
1891
+ def initialize(name, variance); end
1892
+
1893
+ # Returns the value of attribute name.
1894
+ def name; end
1895
+ end
1896
+
1897
+ module Tapioca::TypeVariableHelper
1898
+ extend ::Tapioca::SorbetHelper
1899
+
1900
+ class << self
1901
+ sig do
1902
+ params(
1903
+ type: ::String,
1904
+ variance: ::Symbol,
1905
+ fixed: T.nilable(::String),
1906
+ upper: T.nilable(::String),
1907
+ lower: T.nilable(::String)
1908
+ ).returns(::String)
1909
+ end
1910
+ def serialize_type_variable(type, variance, fixed, upper, lower); end
1911
+ end
1912
+ end
1913
+
1914
+ # This is subclassing from `Module` so that instances of this type will be modules.
1915
+ # The reason why we want that is because that means those instances will automatically
1916
+ # get bound to the constant names they are assigned to by Ruby. As a result, we don't
1917
+ # need to do any matching of constants to type variables to bind their names, Ruby will
1918
+ # do that automatically for us and we get the `name` method for free from `Module`.
1919
+ class Tapioca::TypeVariableModule < ::Module
1920
+ sig do
1921
+ params(
1922
+ context: ::Module,
1923
+ type: ::Tapioca::TypeVariableModule::Type,
1924
+ variance: ::Symbol,
1925
+ fixed: T.untyped,
1926
+ lower: T.untyped,
1927
+ upper: T.untyped
1928
+ ).void
1929
+ end
1930
+ def initialize(context, type, variance, fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil)); end
1931
+
1932
+ sig { returns(::Tapioca::TypeVariable) }
1933
+ def coerce_to_type_variable; end
1934
+
1935
+ sig { returns(T.nilable(::String)) }
1936
+ def name; end
1937
+
1938
+ sig { returns(::String) }
1939
+ def serialize; end
1940
+
1941
+ private
1942
+
1943
+ sig do
1944
+ type_parameters(:Result)
1945
+ .params(
1946
+ block: T.proc.returns(T.type_parameter(:Result))
1947
+ ).returns(T.type_parameter(:Result))
1948
+ end
1949
+ def with_bound_name_pre_3_0(&block); end
1950
+ end
1951
+
1952
+ class Tapioca::TypeVariableModule::Type < ::T::Enum
1953
+ enums do
1954
+ Member = new
1955
+ Template = new
1956
+ end
1957
+ end
1958
+
1959
+ Tapioca::VERSION = T.let(T.unsafe(nil), String)