timriley on remove-auto-register
Remove commented code (compare)
timriley on remove-auto-register
Remove no-longer-relevant doc (compare)
timriley on remove-auto-register
Remove another unneeded splat (compare)
timriley on remove-auto-register
Li’l tweak (compare)
timriley on remove-auto-register
Li’l tweak (compare)
timriley on remove-auto-register
Simplify args passed to build_f… (compare)
timriley on remove-auto-register
Further simplify args for build… (compare)
timriley on remove-auto-register
Remove `auto_register!` and add… Provide the default loader to a… Simplify args passed to build_f… (compare)
timriley on rich-component-dirs-config
Accept plain options hash inste… (compare)
Hi guys, it seems that I maybe encounter a bug of dry-types SUM
, but I'm not sure. Could you help me on this?
It happens when I try to verify a object which should be a hash or a string
test = Dry::Types['hash'].map(Dry::Types['symbol'], Dry::Types['strict.string']) | Dry::Types['strict.string']
test[a: 'b'] # passed as expected
test['a' => 'b'] # should fail but pass!
test['test'] # passed as expected
test[12345] # should fail but pass!
I'm wondering if there is anything that I didn't notice or I use the wrong way to build my rule. Thanks :)
Links = Map(Symbol, String | JSONAPI::Types::Link.optional)