ex_type
ex_type copied to clipboard
Support custom typespec
- Support custom typespec in
type.exsconf file. (kind of like type definitions from Typescript) - The scope of this custom typespec should be limited to the package.
- It would override exist typespec.
example type.exs file:
[
typespec: %{
Enum => quote do
@type some_special_type :: any()
@spec map(T.p(Enumerable, x), (x -> y)) :: [y] when x: any(), y: any()
end
}
]