edisonywh/gearbox

Transition functions should also accept a map type on its first argument

Closed this issue · 3 comments

As described in the README, the first argument can be a struct or a non-struct, but the function typespec accepts only a struct, making type check warn a contract break.

👋 rauann!

Great catch! I was also going to suggest to update in the tests too but looks like the tests already cover it.

https://github.com/edisonywh/gearbox/blob/master/test/gearbox_test.exs#L72-L87

So it should just straight forward to update the typespec. Do you want to go ahead and do it? :)

Merged #9. Thanks for the PR :)