u-struct 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +5 -5
  3. data/.rubocop.yml +129 -0
  4. data/.rubocop_todo.yml +10 -0
  5. data/.tool-versions +1 -0
  6. data/CHANGELOG.md +115 -27
  7. data/Gemfile +14 -3
  8. data/README.md +166 -62
  9. data/Rakefile +5 -5
  10. data/bin/console +3 -3
  11. data/bin/prepare_coverage +7 -9
  12. data/bin/run_ci +17 -0
  13. data/bin/tapioca +28 -0
  14. data/examples/rgb/number.rb +1 -1
  15. data/examples/rgb_1.rb +3 -3
  16. data/examples/rgb_2.rb +2 -2
  17. data/examples/rgb_3.rb +1 -1
  18. data/lib/micro/struct/factory/create_struct.rb +12 -5
  19. data/lib/micro/struct/factory/members.rb +1 -0
  20. data/lib/micro/struct/factory.rb +10 -5
  21. data/lib/micro/struct/features.rb +18 -23
  22. data/lib/micro/struct/normalize_names.rb +4 -3
  23. data/lib/micro/struct/version.rb +2 -1
  24. data/lib/micro/struct.rb +32 -5
  25. data/lib/u-struct.rb +2 -0
  26. data/rbi/micro/struct/factory/create_struct.rbi +60 -0
  27. data/rbi/micro/struct/factory/members.rbi +67 -0
  28. data/rbi/micro/struct/factory.rbi +41 -0
  29. data/rbi/micro/struct/features.rbi +41 -0
  30. data/rbi/micro/struct/normalize_names.rbi +20 -0
  31. data/rbi/micro/struct/version.rbi +3 -0
  32. data/rbi/micro/struct.rbi +68 -0
  33. data/sorbet/config +8 -0
  34. data/sorbet/rbi/gems/ast@2.4.2.rbi +54 -0
  35. data/sorbet/rbi/gems/coderay@1.1.3.rbi +8 -0
  36. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +11 -0
  37. data/sorbet/rbi/gems/docile@1.4.0.rbi +54 -0
  38. data/sorbet/rbi/gems/method_source@1.0.0.rbi +8 -0
  39. data/sorbet/rbi/gems/minitest@5.15.0.rbi +345 -0
  40. data/sorbet/rbi/gems/parser@3.1.0.0.rbi +1196 -0
  41. data/sorbet/rbi/gems/pry@0.14.1.rbi +8 -0
  42. data/sorbet/rbi/gems/rake@13.0.6.rbi +806 -0
  43. data/sorbet/rbi/gems/rbi@0.0.9.rbi +1602 -0
  44. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +89 -0
  45. data/sorbet/rbi/gems/simplecov@0.21.2.rbi +577 -0
  46. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.3.rbi +8 -0
  47. data/sorbet/rbi/gems/spoom@1.1.8.rbi +1252 -0
  48. data/sorbet/rbi/gems/tapioca@0.6.2.rbi +1232 -0
  49. data/sorbet/rbi/gems/thor@1.2.1.rbi +844 -0
  50. data/sorbet/rbi/gems/unparser@0.6.3.rbi +8 -0
  51. data/sorbet/rbi/gems/webrick@1.7.0.rbi +601 -0
  52. data/sorbet/rbi/gems/yard-sorbet@0.6.1.rbi +199 -0
  53. data/sorbet/rbi/gems/yard@0.9.27.rbi +4112 -0
  54. data/sorbet/tapioca/config.yml +13 -0
  55. data/sorbet/tapioca/require.rb +4 -0
  56. data/u-struct.gemspec +3 -3
  57. metadata +37 -3
  58. data/bin/test +0 -8
@@ -0,0 +1,1232 @@
1
+ # typed: true
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
+ class ActiveRecordColumnTypeHelper
8
+ def initialize(*args, &blk); end
9
+
10
+ sig { params(column_name: String).returns([String, String]) }
11
+ def type_for(column_name); end
12
+
13
+ private
14
+
15
+ sig { params(type: String).returns(String) }
16
+ def as_nilable_type(type); end
17
+
18
+ sig { params(constant: Module).returns(T::Boolean) }
19
+ def do_not_generate_strong_types?(constant); end
20
+
21
+ sig { params(column_type: Object).returns(String) }
22
+ def handle_unknown_type(column_type); end
23
+
24
+ def lookup_arg_type_of_method(*args, &blk); end
25
+ def lookup_return_type_of_method(*args, &blk); end
26
+ end
27
+
28
+ class DynamicMixinCompiler
29
+ include ::Tapioca::Reflection
30
+
31
+ sig { params(constant: Module).void }
32
+ def initialize(constant); end
33
+
34
+ def class_attribute_predicates; end
35
+
36
+ sig { returns(T::Array[Symbol]) }
37
+ def class_attribute_readers; end
38
+
39
+ def class_attribute_writers; end
40
+
41
+ sig { params(tree: RBI::Tree).void }
42
+ def compile_class_attributes(tree); end
43
+
44
+ sig { params(tree: RBI::Tree).returns([T::Array[Module], T::Array[Module]]) }
45
+ def compile_mixes_in_class_methods(tree); end
46
+
47
+ sig { returns(T::Array[Module]) }
48
+ def dynamic_extends; end
49
+
50
+ def dynamic_includes; end
51
+
52
+ sig { returns(T::Boolean) }
53
+ def empty_attributes?; end
54
+
55
+ sig { params(qualified_mixin_name: String).returns(T::Boolean) }
56
+ def filtered_mixin?(qualified_mixin_name); end
57
+
58
+ def instance_attribute_predicates; end
59
+
60
+ sig { returns(T::Array[Symbol]) }
61
+ def instance_attribute_readers; end
62
+
63
+ def instance_attribute_writers; end
64
+
65
+ sig { params(mod: Module, dynamic_extends: T::Array[Module]).returns(T::Boolean) }
66
+ def module_included_by_another_dynamic_extend?(mod, dynamic_extends); end
67
+ end
68
+
69
+ class Module
70
+ def autoload(const_name, path); end
71
+ end
72
+
73
+ module RBI; end
74
+
75
+ class RBI::File
76
+ sig { params(strictness: T.nilable(String), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(file: RBI::File).void)).void }
77
+ def initialize(strictness: T.unsafe(nil), comments: T.unsafe(nil), &block); end
78
+
79
+ sig { params(node: RBI::Node).void }
80
+ def <<(node); end
81
+
82
+ sig { params(v: RBI::Printer).void }
83
+ def accept_printer(v); end
84
+
85
+ sig { returns(T::Array[RBI::Comment]) }
86
+ def comments; end
87
+
88
+ def comments=(_arg0); end
89
+
90
+ sig { returns(T::Boolean) }
91
+ def empty?; end
92
+
93
+ sig { params(out: T.any(IO, StringIO), indent: Integer, print_locs: T::Boolean).void }
94
+ def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end
95
+
96
+ sig { returns(RBI::Tree) }
97
+ def root; end
98
+
99
+ def root=(_arg0); end
100
+
101
+ sig { void }
102
+ def set_empty_body_content; end
103
+
104
+ sig { params(command: String, reason: T.nilable(String), display_heading: T::Boolean).void }
105
+ def set_file_header(command, reason: T.unsafe(nil), display_heading: T.unsafe(nil)); end
106
+
107
+ sig { returns(T.nilable(String)) }
108
+ def strictness; end
109
+
110
+ def strictness=(_arg0); end
111
+
112
+ sig { params(indent: Integer, print_locs: T::Boolean).returns(String) }
113
+ def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end
114
+
115
+ sig { void }
116
+ def transform_rbi!; end
117
+
118
+ sig { returns(String) }
119
+ def transformed_string; end
120
+ end
121
+
122
+ class RBI::Tree < ::RBI::NodeWithComments
123
+ sig { params(loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Tree).void)).void }
124
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
125
+
126
+ sig { params(node: RBI::Node).void }
127
+ def <<(node); end
128
+
129
+ sig { override.params(v: RBI::Printer).void }
130
+ def accept_printer(v); end
131
+
132
+ sig { params(with_todo_comment: T::Boolean).void }
133
+ def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end
134
+
135
+ sig { params(annotation: String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void }
136
+ def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end
137
+
138
+ sig { params(name: String, superclass_name: T.nilable(String), block: T.nilable(T.proc.params(scope: RBI::Scope).void)).returns(RBI::Scope) }
139
+ def create_class(name, superclass_name: T.unsafe(nil), &block); end
140
+
141
+ sig { params(name: String, value: String).void }
142
+ def create_constant(name, value:); end
143
+
144
+ sig { params(name: String).void }
145
+ def create_extend(name); end
146
+
147
+ sig { params(name: String).void }
148
+ def create_include(name); end
149
+
150
+ sig { params(name: String, parameters: T::Array[RBI::TypedParam], return_type: String, class_method: T::Boolean, visibility: RBI::Visibility).void }
151
+ def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil)); end
152
+
153
+ sig { params(name: String).void }
154
+ def create_mixes_in_class_methods(name); end
155
+
156
+ sig { params(name: String, block: T.nilable(T.proc.params(scope: RBI::Scope).void)).returns(RBI::Scope) }
157
+ def create_module(name, &block); end
158
+
159
+ sig { params(constant: Module, block: T.nilable(T.proc.params(scope: RBI::Scope).void)).void }
160
+ def create_path(constant, &block); end
161
+
162
+ sig { params(name: String, value: String).void }
163
+ def create_type_member(name, value: T.unsafe(nil)); end
164
+
165
+ sig { params(annotation: String).void }
166
+ def deannotate!(annotation); end
167
+
168
+ sig { returns(T::Boolean) }
169
+ def empty?; end
170
+
171
+ sig { void }
172
+ def group_nodes!; end
173
+
174
+ sig { returns(RBI::Index) }
175
+ def index; end
176
+
177
+ sig { params(other: RBI::Tree, left_name: String, right_name: String, keep: RBI::Rewriters::Merge::Keep).returns(RBI::MergeTree) }
178
+ def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
179
+
180
+ sig { void }
181
+ def nest_non_public_methods!; end
182
+
183
+ sig { void }
184
+ def nest_singleton_methods!; end
185
+
186
+ sig { returns(T::Array[RBI::Node]) }
187
+ def nodes; end
188
+
189
+ sig { override.returns(T::Boolean) }
190
+ def oneline?; end
191
+
192
+ sig { void }
193
+ def sort_nodes!; end
194
+
195
+ private
196
+
197
+ sig { params(node: RBI::Node).returns(RBI::Node) }
198
+ def create_node(node); end
199
+
200
+ sig { returns(T::Hash[String, RBI::Node]) }
201
+ def nodes_cache; end
202
+
203
+ sig { params(name: String).returns(T::Boolean) }
204
+ def valid_method_name?(name); end
205
+ end
206
+
207
+ RBI::Tree::SPECIAL_METHOD_NAMES = T.let(T.unsafe(nil), Array)
208
+
209
+ class RBI::TypedParam < ::T::Struct
210
+ const :param, RBI::Param
211
+ const :type, String
212
+
213
+ class << self
214
+ def inherited(s); end
215
+ end
216
+ end
217
+
218
+ RBI::VERSION = T.let(T.unsafe(nil), String)
219
+
220
+ module T::Generic::TypeStoragePatch
221
+ def [](*types); end
222
+ def type_member(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil)); end
223
+ def type_template(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil)); end
224
+ end
225
+
226
+ module T::Types::Simple::GenericPatch
227
+ def name; end
228
+ def valid?(obj); end
229
+ end
230
+
231
+ module T::Types::Simple::NamePatch
232
+ def name; end
233
+ end
234
+
235
+ module Tapioca
236
+ class << self
237
+ sig { type_parameters(:Result).params(blk: T.proc.returns(T.type_parameter(:Result))).returns(T.type_parameter(:Result)) }
238
+ def silence_warnings(&blk); end
239
+ end
240
+ end
241
+
242
+ class Tapioca::Cli < ::Thor
243
+ include ::Tapioca::CliHelper
244
+ include ::Tapioca::ConfigHelper
245
+
246
+ def __print_version; end
247
+ def clean_shims(*files_to_clean); end
248
+ def dsl(*constants); end
249
+ def gem(*gems); end
250
+ def init; end
251
+ def require; end
252
+ def todo; end
253
+
254
+ class << self
255
+ def exit_on_failure?; end
256
+ end
257
+ end
258
+
259
+ Tapioca::Cli::FILE_HEADER_OPTION_DESC = T.let(T.unsafe(nil), String)
260
+
261
+ module Tapioca::CliHelper
262
+ sig { params(message: String, color: T.any(Symbol, T::Array[Symbol])).void }
263
+ def say_error(message = T.unsafe(nil), *color); end
264
+ end
265
+
266
+ module Tapioca::Compilers; end
267
+ module Tapioca::Compilers::Dsl; end
268
+
269
+ class Tapioca::Compilers::Dsl::Base
270
+ include ::Tapioca::Reflection
271
+ include ::Tapioca::Compilers::Dsl::ParamHelper
272
+
273
+ abstract!
274
+
275
+ sig { params(compiler: Tapioca::Compilers::DslCompiler).void }
276
+ def initialize(compiler); end
277
+
278
+ sig { params(error: String).void }
279
+ def add_error(error); end
280
+
281
+ sig { abstract.type_parameters(:T).params(tree: RBI::Tree, constant: T.type_parameter(:T)).void }
282
+ def decorate(tree, constant); end
283
+
284
+ sig { returns(T::Array[String]) }
285
+ def errors; end
286
+
287
+ sig { abstract.returns(T::Enumerable[Module]) }
288
+ def gather_constants; end
289
+
290
+ sig { params(generator_name: String).returns(T::Boolean) }
291
+ def generator_enabled?(generator_name); end
292
+
293
+ sig { params(constant: Module).returns(T::Boolean) }
294
+ def handles?(constant); end
295
+
296
+ sig { returns(T::Set[Module]) }
297
+ def processable_constants; end
298
+
299
+ private
300
+
301
+ sig { returns(T::Enumerable[Class]) }
302
+ def all_classes; end
303
+
304
+ sig { returns(T::Enumerable[Module]) }
305
+ def all_modules; end
306
+
307
+ sig { params(method_def: T.any(Method, UnboundMethod)).returns(T::Array[RBI::TypedParam]) }
308
+ def compile_method_parameters_to_rbi(method_def); end
309
+
310
+ sig { params(method_def: T.any(Method, UnboundMethod)).returns(String) }
311
+ def compile_method_return_type_to_rbi(method_def); end
312
+
313
+ sig { params(scope: RBI::Scope, method_def: T.any(Method, UnboundMethod), class_method: T::Boolean).void }
314
+ def create_method_from_def(scope, method_def, class_method: T.unsafe(nil)); end
315
+
316
+ sig { params(method_def: T.any(Method, UnboundMethod), signature: T.untyped).returns(T::Array[String]) }
317
+ def parameters_types_from_signature(method_def, signature); end
318
+
319
+ sig { params(name: String).returns(T::Boolean) }
320
+ def valid_parameter_name?(name); end
321
+
322
+ class << self
323
+ sig { params(name: String).returns(T.nilable(T.class_of(Tapioca::Compilers::Dsl::Base))) }
324
+ def resolve(name); end
325
+ end
326
+ end
327
+
328
+ Tapioca::Compilers::Dsl::DSL_COMPILERS_DIR = T.let(T.unsafe(nil), String)
329
+
330
+ module Tapioca::Compilers::Dsl::ParamHelper
331
+ sig { params(name: String, type: String).returns(RBI::TypedParam) }
332
+ def create_block_param(name, type:); end
333
+
334
+ sig { params(name: String, type: String, default: String).returns(RBI::TypedParam) }
335
+ def create_kw_opt_param(name, type:, default:); end
336
+
337
+ sig { params(name: String, type: String).returns(RBI::TypedParam) }
338
+ def create_kw_param(name, type:); end
339
+
340
+ sig { params(name: String, type: String).returns(RBI::TypedParam) }
341
+ def create_kw_rest_param(name, type:); end
342
+
343
+ sig { params(name: String, type: String, default: String).returns(RBI::TypedParam) }
344
+ def create_opt_param(name, type:, default:); end
345
+
346
+ sig { params(name: String, type: String).returns(RBI::TypedParam) }
347
+ def create_param(name, type:); end
348
+
349
+ sig { params(name: String, type: String).returns(RBI::TypedParam) }
350
+ def create_rest_param(name, type:); end
351
+
352
+ sig { params(param: RBI::Param, type: String).returns(RBI::TypedParam) }
353
+ def create_typed_param(param, type); end
354
+ end
355
+
356
+ class Tapioca::Compilers::DslCompiler
357
+ sig { params(requested_constants: T::Array[Module], requested_generators: T::Array[T.class_of(Tapioca::Compilers::Dsl::Base)], excluded_generators: T::Array[T.class_of(Tapioca::Compilers::Dsl::Base)], error_handler: T.proc.params(error: String).void, number_of_workers: T.nilable(Integer)).void }
358
+ def initialize(requested_constants:, requested_generators: T.unsafe(nil), excluded_generators: T.unsafe(nil), error_handler: T.unsafe(nil), number_of_workers: T.unsafe(nil)); end
359
+
360
+ sig { returns(T.proc.params(error: String).void) }
361
+ def error_handler; end
362
+
363
+ sig { params(generator_name: String).returns(T::Boolean) }
364
+ def generator_enabled?(generator_name); end
365
+
366
+ sig { returns(T::Enumerable[Tapioca::Compilers::Dsl::Base]) }
367
+ def generators; end
368
+
369
+ sig { returns(T::Array[Module]) }
370
+ def requested_constants; end
371
+
372
+ sig { type_parameters(:T).params(blk: T.proc.params(constant: Module, rbi: RBI::File).returns(T.type_parameter(:T))).returns(T::Array[T.type_parameter(:T)]) }
373
+ def run(&blk); end
374
+
375
+ private
376
+
377
+ sig { params(requested_constants: T::Array[Module]).returns(T::Set[Module]) }
378
+ def gather_constants(requested_constants); end
379
+
380
+ sig { params(requested_generators: T::Array[T.class_of(Tapioca::Compilers::Dsl::Base)], excluded_generators: T::Array[T.class_of(Tapioca::Compilers::Dsl::Base)]).returns(T::Enumerable[Tapioca::Compilers::Dsl::Base]) }
381
+ def gather_generators(requested_generators, excluded_generators); end
382
+
383
+ sig { params(constant: Module).returns(T.nilable(RBI::File)) }
384
+ def rbi_for_constant(constant); end
385
+
386
+ sig { params(error: String).returns(T.noreturn) }
387
+ def report_error(error); end
388
+ end
389
+
390
+ class Tapioca::Compilers::RequiresCompiler
391
+ sig { params(sorbet_path: String).void }
392
+ def initialize(sorbet_path); end
393
+
394
+ sig { returns(String) }
395
+ def compile; end
396
+
397
+ private
398
+
399
+ sig { params(config: Spoom::Sorbet::Config).returns(T::Array[String]) }
400
+ def collect_files(config); end
401
+
402
+ sig { params(file_path: String).returns(T::Enumerable[String]) }
403
+ def collect_requires(file_path); end
404
+
405
+ sig { params(config: Spoom::Sorbet::Config, file_path: Pathname).returns(T::Boolean) }
406
+ def file_ignored_by_sorbet?(config, file_path); end
407
+
408
+ sig { params(path: Pathname).returns(T::Array[String]) }
409
+ def path_parts(path); end
410
+ end
411
+
412
+ module Tapioca::Compilers::Sorbet
413
+ class << self
414
+ sig { params(args: String).returns(String) }
415
+ def run(*args); end
416
+
417
+ sig { returns(String) }
418
+ def sorbet_path; end
419
+
420
+ sig { params(feature: Symbol, version: T.nilable(Gem::Version)).returns(T::Boolean) }
421
+ def supports?(feature, version: T.unsafe(nil)); end
422
+ end
423
+ end
424
+
425
+ Tapioca::Compilers::Sorbet::EXE_PATH_ENV_VAR = T.let(T.unsafe(nil), String)
426
+ Tapioca::Compilers::Sorbet::FEATURE_REQUIREMENTS = T.let(T.unsafe(nil), Hash)
427
+ Tapioca::Compilers::Sorbet::SORBET = T.let(T.unsafe(nil), Pathname)
428
+ Tapioca::Compilers::Sorbet::SORBET_GEM_SPEC = T.let(T.unsafe(nil), Gem::Specification)
429
+ module Tapioca::Compilers::SymbolTable; end
430
+
431
+ class Tapioca::Compilers::SymbolTable::SymbolGenerator
432
+ include ::Tapioca::Reflection
433
+
434
+ sig { params(gem: Tapioca::Gemfile::GemSpec, indent: Integer, include_doc: T::Boolean).void }
435
+ def initialize(gem, indent = T.unsafe(nil), include_doc = T.unsafe(nil)); end
436
+
437
+ sig { returns(Tapioca::Gemfile::GemSpec) }
438
+ def gem; end
439
+
440
+ sig { params(rbi: RBI::File).void }
441
+ def generate(rbi); end
442
+
443
+ sig { returns(Integer) }
444
+ def indent; end
445
+
446
+ private
447
+
448
+ sig { params(tree: RBI::Tree, mods: T::Array[Module], mixin_type: Tapioca::Trackers::Mixin::Type).void }
449
+ def add_mixins(tree, mods, mixin_type); end
450
+
451
+ sig { params(name: String).void }
452
+ def add_to_alias_namespace(name); end
453
+
454
+ sig { params(name: T.nilable(String)).void }
455
+ def add_to_symbol_queue(name); end
456
+
457
+ sig { params(name: String).returns(T::Boolean) }
458
+ def alias_namespaced?(name); end
459
+
460
+ sig { params(tree: RBI::Tree, name: T.nilable(String), constant: BasicObject).void }
461
+ def compile(tree, name, constant); end
462
+
463
+ sig { params(tree: RBI::Tree, name: String, constant: Module).void }
464
+ def compile_alias(tree, name, constant); end
465
+
466
+ sig { params(tree: RBI::Tree, name: String, constant: Module).void }
467
+ def compile_body(tree, name, constant); end
468
+
469
+ sig { params(tree: RBI::Tree, name: String, constant: BasicObject).void }
470
+ def compile_constant(tree, name, constant); end
471
+
472
+ sig { params(tree: RBI::Tree, module_name: String, mod: Module, for_visibility: T::Array[Symbol]).void }
473
+ def compile_directly_owned_methods(tree, module_name, mod, for_visibility = T.unsafe(nil)); end
474
+
475
+ sig { params(tree: RBI::Tree, constant: Module).void }
476
+ def compile_dynamic_mixins(tree, constant); end
477
+
478
+ sig { params(tree: RBI::Tree, constant: Module).void }
479
+ def compile_enums(tree, constant); end
480
+
481
+ sig { params(tree: RBI::Tree, symbol_name: String, constant: Module, method: T.nilable(UnboundMethod), visibility: RBI::Visibility).void }
482
+ def compile_method(tree, symbol_name, constant, method, visibility = T.unsafe(nil)); end
483
+
484
+ sig { params(tree: RBI::Tree, name: String, constant: Module).void }
485
+ def compile_methods(tree, name, constant); end
486
+
487
+ sig { params(tree: RBI::Tree, constant: Module).void }
488
+ def compile_mixins(tree, constant); end
489
+
490
+ sig { params(tree: RBI::Tree, name: String, constant: Module).void }
491
+ def compile_module(tree, name, constant); end
492
+
493
+ sig { params(tree: RBI::Tree, constant: Module).void }
494
+ def compile_module_helpers(tree, constant); end
495
+
496
+ sig { params(tree: RBI::Tree, name: String, value: BasicObject).void }
497
+ def compile_object(tree, name, value); end
498
+
499
+ sig { params(tree: RBI::Tree, constant: Module).void }
500
+ def compile_props(tree, constant); end
501
+
502
+ sig { params(signature: T.untyped, parameters: T::Array[[Symbol, String]]).returns(RBI::Sig) }
503
+ def compile_signature(signature, parameters); end
504
+
505
+ sig { params(tree: RBI::Tree, name: String, constant: Module).void }
506
+ def compile_subconstants(tree, name, constant); end
507
+
508
+ sig { params(constant: Class).returns(T.nilable(String)) }
509
+ def compile_superclass(constant); end
510
+
511
+ sig { params(tree: RBI::Tree, constant: Module).void }
512
+ def compile_type_variable_declarations(tree, constant); end
513
+
514
+ sig { params(tree: RBI::Tree, constant: Module).void }
515
+ def compile_type_variables(tree, constant); end
516
+
517
+ sig { params(constant: Module, strict: T::Boolean).returns(T::Boolean) }
518
+ def defined_in_gem?(constant, strict: T.unsafe(nil)); end
519
+
520
+ sig { params(name: String).returns(T::Array[RBI::Comment]) }
521
+ def documentation_comments(name); end
522
+
523
+ sig { params(symbols: T::Set[String]).returns(T::Set[String]) }
524
+ def engine_symbols(symbols); end
525
+
526
+ sig { params(mixin_name: String).returns(T::Boolean) }
527
+ def filtered_mixin?(mixin_name); end
528
+
529
+ sig { params(tree: RBI::Tree, symbol: String).void }
530
+ def generate_from_symbol(tree, symbol); end
531
+
532
+ sig { params(constant: T.all(Module, T::Generic)).returns(String) }
533
+ def generic_name_of(constant); end
534
+
535
+ sig { params(constant: Module).returns(T::Array[String]) }
536
+ def get_file_candidates(constant); end
537
+
538
+ sig { params(constant: Module).returns(T.nilable(UnboundMethod)) }
539
+ def initialize_method_for(constant); end
540
+
541
+ sig { params(constant: Module).returns(T::Array[Module]) }
542
+ def interesting_ancestors_of(constant); end
543
+
544
+ sig { params(name: String).void }
545
+ def mark_seen(name); end
546
+
547
+ sig { params(method: UnboundMethod).returns(T::Boolean) }
548
+ def method_in_gem?(method); end
549
+
550
+ sig { params(mod: Module).returns(T::Hash[Symbol, T::Array[Symbol]]) }
551
+ def method_names_by_visibility(mod); end
552
+
553
+ sig { params(mod: Module, mixin_type: Tapioca::Trackers::Mixin::Type, mixin_locations: T::Hash[Tapioca::Trackers::Mixin::Type, T::Hash[Module, T::Array[String]]]).returns(T::Boolean) }
554
+ def mixed_in_by_gem?(mod, mixin_type, mixin_locations); end
555
+
556
+ sig { params(constant: Module).returns(T.nilable(String)) }
557
+ def name_of(constant); end
558
+
559
+ sig { params(constant: Module, class_name: T.nilable(String)).returns(T.nilable(String)) }
560
+ def name_of_proxy_target(constant, class_name); end
561
+
562
+ sig { params(sig_string: String).returns(String) }
563
+ def sanitize_signature_types(sig_string); end
564
+
565
+ sig { params(name: String).returns(T::Boolean) }
566
+ def seen?(name); end
567
+
568
+ sig { params(constant: Module, method_name: String).returns(T::Boolean) }
569
+ def struct_method?(constant, method_name); end
570
+
571
+ sig { params(symbol_name: String).returns(T::Boolean) }
572
+ def symbol_ignored?(symbol_name); end
573
+
574
+ sig { returns(T::Set[String]) }
575
+ def symbols; end
576
+
577
+ sig { params(name: String).returns(T::Boolean) }
578
+ def valid_method_name?(name); end
579
+
580
+ sig { params(name: String).returns(T::Boolean) }
581
+ def valid_parameter_name?(name); end
582
+ end
583
+
584
+ Tapioca::Compilers::SymbolTable::SymbolGenerator::IGNORED_COMMENTS = T.let(T.unsafe(nil), Array)
585
+ Tapioca::Compilers::SymbolTable::SymbolGenerator::IGNORED_SYMBOLS = T.let(T.unsafe(nil), Array)
586
+ Tapioca::Compilers::SymbolTable::SymbolGenerator::SPECIAL_METHOD_NAMES = T.let(T.unsafe(nil), Array)
587
+ Tapioca::Compilers::SymbolTable::SymbolGenerator::TYPE_PARAMETER_MATCHER = T.let(T.unsafe(nil), Regexp)
588
+
589
+ module Tapioca::Compilers::SymbolTable::SymbolLoader
590
+ class << self
591
+ def ignore_symbol?(symbol); end
592
+
593
+ sig { params(paths: T::Array[Pathname]).returns(T::Set[String]) }
594
+ def list_from_paths(paths); end
595
+
596
+ private
597
+
598
+ def ignored_symbols; end
599
+
600
+ sig { params(paths: T::Array[String]).returns(T::Set[String]) }
601
+ def load_symbols(paths); end
602
+
603
+ def symbol_table_json_from(input, table_type: T.unsafe(nil)); end
604
+ end
605
+ end
606
+
607
+ class Tapioca::Compilers::SymbolTable::SymbolLoader::SymbolTableParser
608
+ class << self
609
+ def parse(object, parents = T.unsafe(nil)); end
610
+ end
611
+ end
612
+
613
+ class Tapioca::Compilers::SymbolTableCompiler
614
+ sig { params(gem: Tapioca::Gemfile::GemSpec, rbi: RBI::File, indent: Integer, include_docs: T::Boolean).void }
615
+ def compile(gem, rbi, indent = T.unsafe(nil), include_docs = T.unsafe(nil)); end
616
+ end
617
+
618
+ class Tapioca::Compilers::TodosCompiler
619
+ sig { returns(String) }
620
+ def compile; end
621
+
622
+ private
623
+
624
+ sig { returns(String) }
625
+ def list_todos; end
626
+ end
627
+
628
+ module Tapioca::ConfigHelper
629
+ sig { params(args: T.untyped, local_options: T.untyped, config: T.untyped).void }
630
+ def initialize(args = T.unsafe(nil), local_options = T.unsafe(nil), config = T.unsafe(nil)); end
631
+
632
+ sig { returns(String) }
633
+ def command_name; end
634
+
635
+ sig { returns(Thor::CoreExt::HashWithIndifferentAccess) }
636
+ def defaults; end
637
+
638
+ sig { returns(Thor::CoreExt::HashWithIndifferentAccess) }
639
+ def options; end
640
+
641
+ private
642
+
643
+ sig { params(msg: String).returns(Tapioca::ConfigHelper::ConfigError) }
644
+ def build_error(msg); end
645
+
646
+ sig { params(options: Thor::CoreExt::HashWithIndifferentAccess).returns(Thor::CoreExt::HashWithIndifferentAccess) }
647
+ def config_options(options); end
648
+
649
+ sig { params(options: T::Hash[Symbol, Thor::Option]).void }
650
+ def filter_defaults(options); end
651
+
652
+ sig { params(options: T.nilable(Thor::CoreExt::HashWithIndifferentAccess)).returns(Thor::CoreExt::HashWithIndifferentAccess) }
653
+ def merge_options(*options); end
654
+
655
+ sig { params(config_file: String, errors: T::Array[Tapioca::ConfigHelper::ConfigError]).void }
656
+ def print_errors(config_file, errors); end
657
+
658
+ sig { params(config_file: String, config: T::Hash[T.untyped, T.untyped]).void }
659
+ def validate_config!(config_file, config); end
660
+
661
+ sig { params(command_options: T::Hash[Symbol, Thor::Option], config_key: String, config_options: T::Hash[T.untyped, T.untyped]).returns(T::Array[Tapioca::ConfigHelper::ConfigError]) }
662
+ def validate_config_options(command_options, config_key, config_options); end
663
+ end
664
+
665
+ class Tapioca::ConfigHelper::ConfigError < ::T::Struct
666
+ const :message_parts, T::Array[Tapioca::ConfigHelper::ConfigErrorMessagePart]
667
+
668
+ class << self
669
+ def inherited(s); end
670
+ end
671
+ end
672
+
673
+ class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct
674
+ const :colors, T::Array[Symbol]
675
+ const :message, String
676
+
677
+ class << self
678
+ def inherited(s); end
679
+ end
680
+ end
681
+
682
+ Tapioca::DEFAULT_COMMAND = T.let(T.unsafe(nil), String)
683
+ Tapioca::DEFAULT_DSL_DIR = T.let(T.unsafe(nil), String)
684
+ Tapioca::DEFAULT_GEM_DIR = T.let(T.unsafe(nil), String)
685
+ Tapioca::DEFAULT_OVERRIDES = T.let(T.unsafe(nil), Hash)
686
+ Tapioca::DEFAULT_POSTREQUIRE_FILE = T.let(T.unsafe(nil), String)
687
+ Tapioca::DEFAULT_RBI_DIR = T.let(T.unsafe(nil), String)
688
+ Tapioca::DEFAULT_SHIM_DIR = T.let(T.unsafe(nil), String)
689
+ Tapioca::DEFAULT_TODO_FILE = T.let(T.unsafe(nil), String)
690
+ class Tapioca::Error < ::StandardError; end
691
+
692
+ class Tapioca::Executor
693
+ sig { params(queue: T::Array[T.untyped], number_of_workers: T.nilable(Integer)).void }
694
+ def initialize(queue, number_of_workers: T.unsafe(nil)); end
695
+
696
+ sig { type_parameters(:T).params(block: T.proc.params(item: T.untyped).returns(T.type_parameter(:T))).returns(T::Array[T.type_parameter(:T)]) }
697
+ def run_in_parallel(&block); end
698
+ end
699
+
700
+ Tapioca::Executor::MINIMUM_ITEMS_PER_WORKER = T.let(T.unsafe(nil), Integer)
701
+
702
+ class Tapioca::Gemfile
703
+ sig { void }
704
+ def initialize; end
705
+
706
+ sig { returns(Bundler::Definition) }
707
+ def definition; end
708
+
709
+ sig { returns(T::Array[Tapioca::Gemfile::GemSpec]) }
710
+ def dependencies; end
711
+
712
+ sig { params(gem_name: String).returns(T.nilable(Tapioca::Gemfile::GemSpec)) }
713
+ def gem(gem_name); end
714
+
715
+ sig { returns(T::Array[String]) }
716
+ def missing_specs; end
717
+
718
+ sig { void }
719
+ def require_bundle; end
720
+
721
+ private
722
+
723
+ sig { returns(String) }
724
+ def dir; end
725
+
726
+ sig { returns(File) }
727
+ def gemfile; end
728
+
729
+ sig { returns(T::Array[Symbol]) }
730
+ def groups; end
731
+
732
+ sig { returns([T::Array[Tapioca::Gemfile::GemSpec], T::Array[String]]) }
733
+ def load_dependencies; end
734
+
735
+ def lockfile; end
736
+
737
+ sig { returns([T::Enumerable[T.any(Bundler::StubSpecification, Gem::Specification)], T::Array[String]]) }
738
+ def materialize_deps; end
739
+
740
+ sig { returns(Bundler::Runtime) }
741
+ def runtime; end
742
+ end
743
+
744
+ class Tapioca::Gemfile::GemSpec
745
+ sig { params(spec: T.any(Bundler::StubSpecification, Gem::Specification)).void }
746
+ def initialize(spec); end
747
+
748
+ sig { params(path: String).returns(T::Boolean) }
749
+ def contains_path?(path); end
750
+
751
+ sig { returns(T::Boolean) }
752
+ def export_rbi_files?; end
753
+
754
+ sig { returns(T::Array[String]) }
755
+ def exported_rbi_files; end
756
+
757
+ sig { returns(RBI::MergeTree) }
758
+ def exported_rbi_tree; end
759
+
760
+ sig { returns(T::Array[Pathname]) }
761
+ def files; end
762
+
763
+ sig { returns(String) }
764
+ def full_gem_path; end
765
+
766
+ sig { params(gemfile_dir: String).returns(T::Boolean) }
767
+ def ignore?(gemfile_dir); end
768
+
769
+ sig { returns(String) }
770
+ def name; end
771
+
772
+ sig { void }
773
+ def parse_yard_docs; end
774
+
775
+ sig { returns(String) }
776
+ def rbi_file_name; end
777
+
778
+ def version; end
779
+
780
+ private
781
+
782
+ sig { returns(T::Array[Pathname]) }
783
+ def collect_files; end
784
+
785
+ sig { returns(T.nilable(T::Boolean)) }
786
+ def default_gem?; end
787
+
788
+ sig { returns(T::Boolean) }
789
+ def gem_ignored?; end
790
+
791
+ sig { params(gemfile_dir: String).returns(T::Boolean) }
792
+ def gem_in_app_dir?(gemfile_dir); end
793
+
794
+ sig { returns(T::Boolean) }
795
+ def gem_in_bundle_path?; end
796
+
797
+ sig { params(path: String).returns(T::Boolean) }
798
+ def has_parent_gemspec?(path); end
799
+
800
+ sig { returns(Regexp) }
801
+ def require_paths_prefix_matcher; end
802
+
803
+ sig { params(file: String).returns(Pathname) }
804
+ def resolve_to_ruby_lib_dir(file); end
805
+
806
+ sig { params(path: T.any(Pathname, String)).returns(String) }
807
+ def to_realpath(path); end
808
+
809
+ sig { returns(String) }
810
+ def version_string; end
811
+ end
812
+
813
+ Tapioca::Gemfile::GemSpec::IGNORED_GEMS = T.let(T.unsafe(nil), Array)
814
+ Tapioca::Gemfile::Spec = T.type_alias { T.any(Bundler::StubSpecification, Gem::Specification) }
815
+ module Tapioca::Generators; end
816
+
817
+ class Tapioca::Generators::Base
818
+ include ::Thor::Base
819
+ include ::Thor::Invocation
820
+ include ::Thor::Shell
821
+ include ::Tapioca::CliHelper
822
+ extend ::Thor::Base::ClassMethods
823
+ extend ::Thor::Invocation::ClassMethods
824
+
825
+ abstract!
826
+
827
+ sig { params(default_command: String, file_writer: Thor::Actions).void }
828
+ def initialize(default_command:, file_writer: T.unsafe(nil)); end
829
+
830
+ sig { abstract.void }
831
+ def generate; end
832
+
833
+ private
834
+
835
+ sig { params(path: T.any(Pathname, String), content: String, force: T::Boolean, skip: T::Boolean, verbose: T::Boolean).void }
836
+ def create_file(path, content, force: T.unsafe(nil), skip: T.unsafe(nil), verbose: T.unsafe(nil)); end
837
+
838
+ sig { params(path: T.any(Pathname, String), verbose: T::Boolean).void }
839
+ def remove_file(path, verbose: T.unsafe(nil)); end
840
+ end
841
+
842
+ class Tapioca::Generators::Base::FileWriter < ::Thor
843
+ include ::Thor::Actions
844
+ extend ::Thor::Actions::ClassMethods
845
+ end
846
+
847
+ class Tapioca::Generators::Dsl < ::Tapioca::Generators::Base
848
+ sig { params(requested_constants: T::Array[String], outpath: Pathname, only: T::Array[String], exclude: T::Array[String], file_header: T::Boolean, compiler_path: String, tapioca_path: String, default_command: String, file_writer: Thor::Actions, should_verify: T::Boolean, quiet: T::Boolean, verbose: T::Boolean, number_of_workers: T.nilable(Integer)).void }
849
+ def initialize(requested_constants:, outpath:, only:, exclude:, file_header:, compiler_path:, tapioca_path:, default_command:, file_writer: T.unsafe(nil), should_verify: T.unsafe(nil), quiet: T.unsafe(nil), verbose: T.unsafe(nil), number_of_workers: T.unsafe(nil)); end
850
+
851
+ sig { override.void }
852
+ def generate; end
853
+
854
+ private
855
+
856
+ sig { void }
857
+ def abort_if_pending_migrations!; end
858
+
859
+ sig { params(cause: Symbol, files: T::Array[String]).returns(String) }
860
+ def build_error_for_files(cause, files); end
861
+
862
+ sig { params(constant_name: String, rbi: RBI::File, outpath: Pathname, quiet: T::Boolean).returns(T.nilable(Pathname)) }
863
+ def compile_dsl_rbi(constant_name, rbi, outpath: T.unsafe(nil), quiet: T.unsafe(nil)); end
864
+
865
+ sig { params(constant_names: T::Array[String]).returns(T::Array[Module]) }
866
+ def constantize(constant_names); end
867
+
868
+ sig { params(generator_names: T::Array[String]).returns(T::Array[T.class_of(Tapioca::Compilers::Dsl::Base)]) }
869
+ def constantize_generators(generator_names); end
870
+
871
+ sig { params(constant_name: String).returns(Pathname) }
872
+ def dsl_rbi_filename(constant_name); end
873
+
874
+ sig { params(requested_constants: T::Array[String], path: Pathname).returns(T::Set[Pathname]) }
875
+ def existing_rbi_filenames(requested_constants, path: T.unsafe(nil)); end
876
+
877
+ sig { params(constant: String).returns(String) }
878
+ def generate_command_for(constant); end
879
+
880
+ sig { params(eager_load: T::Boolean).void }
881
+ def load_application(eager_load:); end
882
+
883
+ sig { void }
884
+ def load_dsl_extensions; end
885
+
886
+ sig { void }
887
+ def load_dsl_generators; end
888
+
889
+ sig { returns(Tapioca::Loader) }
890
+ def loader; end
891
+
892
+ sig { params(dir: Pathname).void }
893
+ def perform_dsl_verification(dir); end
894
+
895
+ sig { params(files: T::Set[Pathname]).void }
896
+ def purge_stale_dsl_rbi_files(files); end
897
+
898
+ sig { params(constant: String).returns(String) }
899
+ def rbi_filename_for(constant); end
900
+
901
+ sig { params(path: Pathname).returns(T::Array[Pathname]) }
902
+ def rbi_files_in(path); end
903
+
904
+ sig { params(diff: T::Hash[String, Symbol], command: String).void }
905
+ def report_diff_and_exit_if_out_of_date(diff, command); end
906
+
907
+ sig { params(class_name: String).returns(String) }
908
+ def underscore(class_name); end
909
+
910
+ sig { params(tmp_dir: Pathname).returns(T::Hash[String, Symbol]) }
911
+ def verify_dsl_rbi(tmp_dir:); end
912
+ end
913
+
914
+ class Tapioca::Generators::Gem < ::Tapioca::Generators::Base
915
+ sig { params(gem_names: T::Array[String], exclude: T::Array[String], prerequire: T.nilable(String), postrequire: String, typed_overrides: T::Hash[String, String], default_command: String, outpath: Pathname, file_header: T::Boolean, doc: T::Boolean, include_exported_rbis: T::Boolean, file_writer: Thor::Actions, number_of_workers: T.nilable(Integer)).void }
916
+ def initialize(gem_names:, exclude:, prerequire:, postrequire:, typed_overrides:, default_command:, outpath:, file_header:, doc:, include_exported_rbis:, file_writer: T.unsafe(nil), number_of_workers: T.unsafe(nil)); end
917
+
918
+ sig { override.void }
919
+ def generate; end
920
+
921
+ sig { params(should_verify: T::Boolean).void }
922
+ def sync(should_verify: T.unsafe(nil)); end
923
+
924
+ private
925
+
926
+ sig { returns(T::Array[String]) }
927
+ def added_rbis; end
928
+
929
+ sig { params(cause: Symbol, files: T::Array[String]).returns(String) }
930
+ def build_error_for_files(cause, files); end
931
+
932
+ sig { returns(Tapioca::Gemfile) }
933
+ def bundle; end
934
+
935
+ sig { params(gem: Tapioca::Gemfile::GemSpec).void }
936
+ def compile_gem_rbi(gem); end
937
+
938
+ sig { params(gem_name: String).returns(Pathname) }
939
+ def existing_rbi(gem_name); end
940
+
941
+ sig { returns(T::Hash[String, String]) }
942
+ def existing_rbis; end
943
+
944
+ sig { params(gem_name: String).returns(Pathname) }
945
+ def expected_rbi(gem_name); end
946
+
947
+ sig { returns(T::Hash[String, String]) }
948
+ def expected_rbis; end
949
+
950
+ sig { params(file: String, error: LoadError).void }
951
+ def explain_failed_require(file, error); end
952
+
953
+ sig { params(gem_name: String).returns(T::Boolean) }
954
+ def gem_rbi_exists?(gem_name); end
955
+
956
+ sig { params(gem_name: String, version: String).returns(Pathname) }
957
+ def gem_rbi_filename(gem_name, version); end
958
+
959
+ sig { params(gem_names: T::Array[String]).returns(T::Array[Tapioca::Gemfile::GemSpec]) }
960
+ def gems_to_generate(gem_names); end
961
+
962
+ sig { returns(Tapioca::Loader) }
963
+ def loader; end
964
+
965
+ sig { params(gem: Tapioca::Gemfile::GemSpec, file: RBI::File).void }
966
+ def merge_with_exported_rbi(gem, file); end
967
+
968
+ sig { params(old_filename: Pathname, new_filename: Pathname).void }
969
+ def move(old_filename, new_filename); end
970
+
971
+ sig { void }
972
+ def perform_additions; end
973
+
974
+ sig { void }
975
+ def perform_removals; end
976
+
977
+ sig { void }
978
+ def perform_sync_verification; end
979
+
980
+ sig { returns(T::Array[String]) }
981
+ def removed_rbis; end
982
+
983
+ sig { params(diff: T::Hash[String, Symbol], command: String).void }
984
+ def report_diff_and_exit_if_out_of_date(diff, command); end
985
+
986
+ sig { void }
987
+ def require_gem_file; end
988
+ end
989
+
990
+ class Tapioca::Generators::Init < ::Tapioca::Generators::Base
991
+ sig { params(sorbet_config: String, tapioca_config: String, default_postrequire: String, default_command: String, file_writer: Thor::Actions).void }
992
+ def initialize(sorbet_config:, tapioca_config:, default_postrequire:, default_command:, file_writer: T.unsafe(nil)); end
993
+
994
+ sig { override.void }
995
+ def generate; end
996
+
997
+ private
998
+
999
+ sig { void }
1000
+ def create_binstub; end
1001
+
1002
+ sig { void }
1003
+ def create_post_require; end
1004
+
1005
+ sig { void }
1006
+ def create_sorbet_config; end
1007
+
1008
+ sig { void }
1009
+ def create_tapioca_config; end
1010
+
1011
+ sig { returns(Bundler::Installer) }
1012
+ def installer; end
1013
+
1014
+ sig { returns(Bundler::StubSpecification) }
1015
+ def spec; end
1016
+ end
1017
+
1018
+ class Tapioca::Generators::Require < ::Tapioca::Generators::Base
1019
+ sig { params(requires_path: String, sorbet_config_path: String, default_command: String, file_writer: Thor::Actions).void }
1020
+ def initialize(requires_path:, sorbet_config_path:, default_command:, file_writer: T.unsafe(nil)); end
1021
+
1022
+ sig { override.void }
1023
+ def generate; end
1024
+ end
1025
+
1026
+ class Tapioca::Generators::Todo < ::Tapioca::Generators::Base
1027
+ sig { params(todo_file: String, file_header: T::Boolean, default_command: String, file_writer: Thor::Actions).void }
1028
+ def initialize(todo_file:, file_header:, default_command:, file_writer: T.unsafe(nil)); end
1029
+
1030
+ sig { override.void }
1031
+ def generate; end
1032
+
1033
+ sig { params(command: String, reason: T.nilable(String), strictness: T.nilable(String)).returns(String) }
1034
+ def rbi_header(command, reason: T.unsafe(nil), strictness: T.unsafe(nil)); end
1035
+ end
1036
+
1037
+ module Tapioca::GenericTypeRegistry
1038
+ class << self
1039
+ sig { params(instance: Object).returns(T::Boolean) }
1040
+ def generic_type_instance?(instance); end
1041
+
1042
+ sig { params(constant: Module).returns(T.nilable(T::Array[Tapioca::TypeVariableModule])) }
1043
+ def lookup_type_variables(constant); end
1044
+
1045
+ sig { params(constant: T.untyped, types: T.untyped).returns(Module) }
1046
+ def register_type(constant, types); end
1047
+
1048
+ sig { params(constant: T.untyped, type_variable: Tapioca::TypeVariableModule).void }
1049
+ def register_type_variable(constant, type_variable); end
1050
+
1051
+ private
1052
+
1053
+ sig { params(constant: Module, name: String).returns(Module) }
1054
+ def create_generic_type(constant, name); end
1055
+
1056
+ sig { params(constant: Class).returns(Class) }
1057
+ def create_safe_subclass(constant); end
1058
+
1059
+ sig { params(constant: Module).returns(T::Array[Tapioca::TypeVariableModule]) }
1060
+ def lookup_or_initialize_type_variables(constant); end
1061
+ end
1062
+ end
1063
+
1064
+ class Tapioca::Loader
1065
+ sig { params(gemfile: Tapioca::Gemfile, initialize_file: T.nilable(String), require_file: T.nilable(String)).void }
1066
+ def load_bundle(gemfile, initialize_file, require_file); end
1067
+
1068
+ sig { params(environment_load: T::Boolean, eager_load: T::Boolean).void }
1069
+ def load_rails_application(environment_load: T.unsafe(nil), eager_load: T.unsafe(nil)); end
1070
+
1071
+ private
1072
+
1073
+ sig { void }
1074
+ def eager_load_rails_app; end
1075
+
1076
+ sig { void }
1077
+ def load_rails_engines; end
1078
+
1079
+ sig { returns(T::Array[T.untyped]) }
1080
+ def rails_engines; end
1081
+
1082
+ sig { params(file: T.nilable(String)).void }
1083
+ def require_helper(file); end
1084
+
1085
+ sig { params(path: String).void }
1086
+ def safe_require(path); end
1087
+
1088
+ sig { void }
1089
+ def silence_deprecations; end
1090
+ end
1091
+
1092
+ module Tapioca::Reflection
1093
+ extend ::Tapioca::Reflection
1094
+
1095
+ sig { params(constant: Module).returns(T::Array[Module]) }
1096
+ def ancestors_of(constant); end
1097
+
1098
+ sig { params(object: BasicObject, other: BasicObject).returns(T::Boolean) }
1099
+ def are_equal?(object, other); end
1100
+
1101
+ sig { params(object: BasicObject).returns(Class) }
1102
+ def class_of(object); end
1103
+
1104
+ sig { params(symbol: String, inherit: T::Boolean, namespace: Module).returns(BasicObject) }
1105
+ def constantize(symbol, inherit: T.unsafe(nil), namespace: T.unsafe(nil)); end
1106
+
1107
+ sig { params(constant: Module).returns(T::Array[Symbol]) }
1108
+ def constants_of(constant); end
1109
+
1110
+ sig { type_parameters(:U).params(klass: T.type_parameter(:U)).returns(T::Array[T.type_parameter(:U)]) }
1111
+ def descendants_of(klass); end
1112
+
1113
+ sig { params(constant: Module).returns(T::Array[Module]) }
1114
+ def inherited_ancestors_of(constant); end
1115
+
1116
+ sig { params(constant: Module, method: Symbol).returns(Method) }
1117
+ def method_of(constant, method); end
1118
+
1119
+ sig { params(constant: Module).returns(T.nilable(String)) }
1120
+ def name_of(constant); end
1121
+
1122
+ sig { params(type: T::Types::Base).returns(String) }
1123
+ def name_of_type(type); end
1124
+
1125
+ sig { params(object: BasicObject).returns(Integer) }
1126
+ def object_id_of(object); end
1127
+
1128
+ sig { params(constant: Module).returns(T::Array[Symbol]) }
1129
+ def private_instance_methods_of(constant); end
1130
+
1131
+ sig { params(constant: Module).returns(T::Array[Symbol]) }
1132
+ def protected_instance_methods_of(constant); end
1133
+
1134
+ sig { params(constant: Module).returns(T::Array[Symbol]) }
1135
+ def public_instance_methods_of(constant); end
1136
+
1137
+ sig { params(constant: Module).returns(T.nilable(String)) }
1138
+ def qualified_name_of(constant); end
1139
+
1140
+ sig { params(method: T.any(Method, UnboundMethod)).returns(T.untyped) }
1141
+ def signature_of(method); end
1142
+
1143
+ sig { params(constant: Module).returns(Class) }
1144
+ def singleton_class_of(constant); end
1145
+
1146
+ sig { params(constant: Class).returns(T.nilable(Class)) }
1147
+ def superclass_of(constant); end
1148
+ end
1149
+
1150
+ Tapioca::Reflection::ANCESTORS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1151
+ Tapioca::Reflection::CLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1152
+ Tapioca::Reflection::CONSTANTS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1153
+ Tapioca::Reflection::EQUAL_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1154
+ Tapioca::Reflection::METHOD_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1155
+ Tapioca::Reflection::NAME_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1156
+ Tapioca::Reflection::OBJECT_ID_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1157
+ Tapioca::Reflection::PRIVATE_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1158
+ Tapioca::Reflection::PROTECTED_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1159
+ Tapioca::Reflection::PUBLIC_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1160
+ Tapioca::Reflection::SINGLETON_CLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1161
+ Tapioca::Reflection::SUPERCLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1162
+ Tapioca::SORBET_CONFIG_FILE = T.let(T.unsafe(nil), String)
1163
+ Tapioca::SORBET_DIR = T.let(T.unsafe(nil), String)
1164
+ Tapioca::TAPIOCA_CONFIG_FILE = T.let(T.unsafe(nil), String)
1165
+ Tapioca::TAPIOCA_DIR = T.let(T.unsafe(nil), String)
1166
+ module Tapioca::Trackers; end
1167
+
1168
+ module Tapioca::Trackers::Autoload
1169
+ class << self
1170
+ sig { void }
1171
+ def eager_load_all!; end
1172
+
1173
+ sig { params(constant_name: String).void }
1174
+ def register(constant_name); end
1175
+
1176
+ sig { type_parameters(:Result).params(block: T.proc.returns(T.type_parameter(:Result))).returns(T.type_parameter(:Result)) }
1177
+ def with_disabled_exits(&block); end
1178
+ end
1179
+ end
1180
+
1181
+ Tapioca::Trackers::Autoload::NOOP_METHOD = T.let(T.unsafe(nil), Proc)
1182
+
1183
+ module Tapioca::Trackers::ConstantDefinition
1184
+ extend ::Tapioca::Reflection
1185
+
1186
+ class << self
1187
+ def files_for(klass); end
1188
+ end
1189
+ end
1190
+
1191
+ module Tapioca::Trackers::Mixin
1192
+ class << self
1193
+ sig { params(constant: Module).returns(T::Hash[Tapioca::Trackers::Mixin::Type, T::Hash[Module, T::Array[String]]]) }
1194
+ def mixin_locations_for(constant); end
1195
+
1196
+ sig { params(constant: Module, mod: Module, mixin_type: Tapioca::Trackers::Mixin::Type, locations: T.nilable(T::Array[Thread::Backtrace::Location])).void }
1197
+ def register(constant, mod, mixin_type, locations); end
1198
+ end
1199
+ end
1200
+
1201
+ class Tapioca::Trackers::Mixin::Type < ::T::Enum
1202
+ enums do
1203
+ Prepend = new
1204
+ Include = new
1205
+ Extend = new
1206
+ end
1207
+ end
1208
+
1209
+ class Tapioca::TypeVariableModule < ::Module
1210
+ sig { params(context: Module, type: Tapioca::TypeVariableModule::Type, variance: Symbol, fixed: T.untyped, lower: T.untyped, upper: T.untyped).void }
1211
+ def initialize(context, type, variance, fixed, lower, upper); end
1212
+
1213
+ sig { returns(T.nilable(String)) }
1214
+ def name; end
1215
+
1216
+ sig { returns(String) }
1217
+ def serialize; end
1218
+
1219
+ private
1220
+
1221
+ sig { type_parameters(:Result).params(block: T.proc.returns(T.type_parameter(:Result))).returns(T.type_parameter(:Result)) }
1222
+ def with_bound_name_pre_3_0(&block); end
1223
+ end
1224
+
1225
+ class Tapioca::TypeVariableModule::Type < ::T::Enum
1226
+ enums do
1227
+ Member = new
1228
+ Template = new
1229
+ end
1230
+ end
1231
+
1232
+ Tapioca::VERSION = T.let(T.unsafe(nil), String)