Powered by AppSignal & Oban Pro
Would you like to see your link here? Contact us

Code.Typespec

elixir_livebooks/code_typespec.livemd

Code.Typespec

Function fetch_callbacks/1

Returns all callbacks available from the module’s BEAM code.

The result is returned as a list of tuples where the first element is spec name and arity and the second is the spec.

The module must have a corresponding BEAM file which can be located by the runtime system. The types will be in the Erlang Abstract Format.

Function fetch_specs/1

Returns all specs available from the module’s BEAM code.

The result is returned as a list of tuples where the first element is spec name and arity and the second is the spec.

The module must have a corresponding BEAM file which can be located by the runtime system. The types will be in the Erlang Abstract Format.

Function fetch_types/1

Returns all types available from the module’s BEAM code.

The result is returned as a list of tuples where the first element is the type (:typep, :type and :opaque).

The module must have a corresponding BEAM file which can be located by the runtime system. The types will be in the Erlang Abstract Format.

Function spec_to_quoted/2

Converts a spec clause back to Elixir quoted expression.

Function type_to_quoted/1

Converts a type clause back to Elixir AST.