We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Record
1 parent 902ff7b commit eae4ebbCopy full SHA for eae4ebb
sig/types.rbs
@@ -301,16 +301,23 @@ module RBS
301
end
302
303
class Record
304
- attr_reader all_fields: Hash[Symbol, [t, bool]]
+ type key = Symbol | String | Integer | bool
305
306
- attr_reader fields: Hash[Symbol, t]
+ # 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]
314
- attr_reader optional_fields: Hash[Symbol, t]
315
+ attr_reader optional_fields: Hash[key, t]
316
317
type loc = Location[bot, bot]
318
- def initialize: (fields: Hash[Symbol, t], location: loc?) -> void
- | (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
321
322
include _TypeBase
323
0 commit comments