@@ -301,16 +301,23 @@ module RBS
301
301
end
302
302
303
303
class Record
304
- attr_reader all_fields: Hash[ Symbol, [t, bool ]]
304
+ type key = Symbol | String | Integer | bool
305
305
306
- attr_reader fields: Hash[Symbol, t]
306
+ # All types of all files
307
+ #
308
+ # If the key is *required*, the second value of the tuple is `true`.
309
+ # If the key is *optional*, the second value of the tuple is `false`.
310
+ #
311
+ attr_reader all_fields: Hash[key, [t, bool ]]
312
+
313
+ attr_reader fields: Hash[key, t]
307
314
308
- attr_reader optional_fields: Hash[Symbol , t]
315
+ attr_reader optional_fields: Hash[key , t]
309
316
310
317
type loc = Location[bot , bot ]
311
318
312
- def initialize : (fields: Hash[Symbol , t], location: loc?) -> void
313
- | (all_fields: Hash[Symbol , [t, bool ]], location: loc?) -> void
319
+ def initialize : (fields: Hash[key , t], location: loc?) -> void
320
+ | (all_fields: Hash[key , [t, bool ]], location: loc?) -> void
314
321
315
322
include _TypeBase
316
323
0 commit comments