New
v0.12.0
Additions:
- The default options used are now fetched from the application configuration. This means that you can configure a default for your app as well as for each of your dependencies(!) by adding
config :app_name, :type_check [...]to your configuration file(s). (c.f. #61) TypeCheck.Externalmodule, with functions to work with typespecs in modules outside of your control. Thank you very much, @orsinium! (c.f. #113)fetch_specto build a TypeCheck type from any function that has a@spec.fetch_typeto build a TypeCheck type from any@type.enforce_spec!to wrap a call to any function that has a@specwith a runtime type-check on the input parameters and return value.applyandapply!to wrap a call to any function with the function spec type that you give it.
TypeCheck.Defstruct.defstruct!, a way to combinedefstruct,@enforce_keysand the creation of the struct's type, reducing boilerplate and the possibility of mistakes. (c.f. #118 )
Fixes:
- Long-standing issue where Dialyzer would sometimes complain in apps using TypeCheck is resolved. (c.f. #95)
- Creation of the new
maybe_nonempty_listtype will no longer get stuck in an infinite loop on creation. (c.f. #120)