Skip to content

Commit f95dbf3

Browse files
amomchilovdejmedus
andcommitted
Add erase_generic_types option
Co-authored-by: Julia Boutin <julia.boutin@shopify.com>
1 parent 7583bb1 commit f95dbf3

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs

lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/options.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ class Options
4444

4545
ALLOWED_OVERLOAD_STRATEGIES = [:translate_all, :translate_last, :raise].freeze
4646

47+
#: bool
48+
attr_reader :erase_generic_types
49+
4750
#: BaseRBIFormat
4851
attr_reader :output_format
4952

@@ -52,11 +55,13 @@ class Options
5255

5356
#: (
5457
#| ?overloads_strategy: Symbol,
58+
#| ?erase_generic_types: bool,
5559
#| ?output_format: BaseRBIFormat,
5660
#| ?translate_abstract_methods: bool,
5761
#| ) -> void
5862
def initialize(
5963
overloads_strategy: :translate_all,
64+
erase_generic_types: false,
6065
output_format: HumanReadableRBIFormat.default,
6166
translate_abstract_methods: true
6267
)
@@ -66,6 +71,7 @@ def initialize(
6671
end
6772

6873
@overloads_strategy = overloads_strategy
74+
@erase_generic_types = erase_generic_types
6975
@output_format = output_format
7076
@translate_abstract_methods = translate_abstract_methods
7177

0 commit comments

Comments
 (0)