Erlang and hence Elixir are dynamically typed languages. They both have extended abilities to type check in compile time using typespecs. Here are an introduction and more detailed documentation.Basically one might declare the specification of the function and if the actual function declaration violates this contract, the static code analysis tool called dialyzer will report an issue.