@@ -30,7 +30,7 @@ def initialize(name, uri, location, comments)
30
30
@name = name
31
31
@uri = uri
32
32
@comments = comments
33
- @visibility = T . let ( Visibility ::PUBLIC , Visibility )
33
+ @visibility = Visibility ::PUBLIC #: Visibility
34
34
@location = location
35
35
end
36
36
@@ -137,7 +137,7 @@ class Namespace < Entry
137
137
138
138
#: (Array[String] nesting, URI::Generic uri, Location location, Location name_location, String? comments) -> void
139
139
def initialize ( nesting , uri , location , name_location , comments )
140
- @name = T . let ( nesting . join ( "::" ) , String )
140
+ @name = nesting . join ( "::" ) #: String
141
141
# The original nesting where this namespace was discovered
142
142
@nesting = nesting
143
143
@@ -156,7 +156,7 @@ def mixin_operation_module_names
156
156
# and prepended
157
157
#: -> Array[ModuleOperation]
158
158
def mixin_operations
159
- @mixin_operations ||= T . let ( [ ] , T . nilable ( T :: Array [ ModuleOperation ] ) )
159
+ @mixin_operations ||= [ ] #: Array[ModuleOperation]?
160
160
end
161
161
162
162
#: -> Integer
@@ -251,7 +251,7 @@ def decorated_name
251
251
252
252
# A rest method parameter, e.g. `def foo(*a)`
253
253
class RestParameter < Parameter
254
- DEFAULT_NAME = T . let ( :"<anonymous splat>" , Symbol )
254
+ DEFAULT_NAME = :"<anonymous splat>" #: Symbol
255
255
256
256
# @override
257
257
#: -> Symbol
@@ -262,7 +262,7 @@ def decorated_name
262
262
263
263
# A keyword rest method parameter, e.g. `def foo(**a)`
264
264
class KeywordRestParameter < Parameter
265
- DEFAULT_NAME = T . let ( :"<anonymous keyword splat>" , Symbol )
265
+ DEFAULT_NAME = :"<anonymous keyword splat>" #: Symbol
266
266
267
267
# @override
268
268
#: -> Symbol
@@ -273,7 +273,7 @@ def decorated_name
273
273
274
274
# A block method parameter, e.g. `def foo(&block)`
275
275
class BlockParameter < Parameter
276
- DEFAULT_NAME = T . let ( :"<anonymous block>" , Symbol )
276
+ DEFAULT_NAME = :"<anonymous block>" #: Symbol
277
277
278
278
class << self
279
279
#: -> BlockParameter
@@ -343,14 +343,11 @@ class Accessor < Member
343
343
# @override
344
344
#: -> Array[Signature]
345
345
def signatures
346
- @signatures ||= T . let (
347
- begin
348
- params = [ ]
349
- params << RequiredParameter . new ( name : name . delete_suffix ( "=" ) . to_sym ) if name . end_with? ( "=" )
350
- [ Entry ::Signature . new ( params ) ]
351
- end ,
352
- T . nilable ( T ::Array [ Signature ] ) ,
353
- )
346
+ @signatures ||= begin
347
+ params = [ ]
348
+ params << RequiredParameter . new ( name : name . delete_suffix ( "=" ) . to_sym ) if name . end_with? ( "=" )
349
+ [ Entry ::Signature . new ( params ) ]
350
+ end #: Array[Signature]?
354
351
end
355
352
end
356
353
@@ -484,7 +481,7 @@ def initialize(target, unresolved_alias)
484
481
)
485
482
486
483
@target = target
487
- @owner = T . let ( unresolved_alias . owner , T . nilable ( Entry ::Namespace ) )
484
+ @owner = unresolved_alias . owner #: Entry::Namespace?
488
485
end
489
486
490
487
#: -> String
@@ -539,10 +536,10 @@ def format
539
536
#: (Array[Prism::Node] arguments) -> bool
540
537
def matches? ( arguments )
541
538
min_pos = 0
542
- max_pos = T . let ( 0 , T . any ( Integer , Float ) )
539
+ max_pos = 0 #: (Integer | Float)
543
540
names = [ ]
544
- has_forward = T . let ( false , T :: Boolean )
545
- has_keyword_rest = T . let ( false , T :: Boolean )
541
+ has_forward = false #: bool
542
+ has_keyword_rest = false #: bool
546
543
547
544
@parameters . each do |param |
548
545
case param
0 commit comments