Generates TypeScript interfaces for Ash resources and their filter types.
Produces the types.ts file that defines TypeScript interfaces for each
Ash resource, plus filter interfaces for resources with enable_filter: true.
Also provides output_type/2 to determine the return type of an event.
See Mix.Tasks.Alva.Codegen for the full code generation pipeline.
Summary
Functions
Generates the complete types.ts content including base filter types,
resource filter interfaces, and resource data interfaces.
Derives the TypeScript interface name from an Ash resource module.
Determines the TypeScript output type for a given event.
Functions
Generates the complete types.ts content including base filter types,
resource filter interfaces, and resource data interfaces.
Derives the TypeScript interface name from an Ash resource module.
Uses the last segment of the module name (e.g. MyApp.Catalog.Product → Product).
Determines the TypeScript output type for a given event.
Returns "InterfaceName[]" for list reads, or "InterfaceName" for
single-record reads, lookups, and mutations.