View Source TypedStructor.Definer.Utils (TypedStructor v0.5.0)
Utilities for definer modules.
Summary
Functions
@spec fields_and_enforce_keys(TypedStructor.Definition.t()) :: {Keyword.t(), [atom()]}
Extracts fields and enforce keys from a definition.
@spec types(TypedStructor.Definition.t(), Macro.Env.t()) :: {type_kind :: :type | :opaque | :typep, type_name :: atom(), parameters :: [{parameter_name :: atom(), [], context :: atom()}], fields :: [{field_name :: atom(), Macro.t()}]}
Extracts types from a definition.