Closed whatyouhide closed 2 years ago
@josevalim the macro is a good idea in and of its own, I'll work on that.
When it comes to the docs, I think this makes it easier because we can express more complex types, with type documentation linked to them, in a bit easier syntax. The non-typespec docs can be verbose. We can think about it for a bit, I'll work on NimbleOptions.spec/1
for now 😉
@josevalim I added the new NimbleOptions.option_type_union/1
function. 👍 Ready for review!
@josevalim ready for another round 😉
I am actually not the biggest fan because I think it makes understanding the options more complex, specially if you are not familar with typespecs.
Maybe we could support
NimbleOptions.spec
macro though that returns the spec for a given type?