Maps Ash types to TypeScript types using unified type-driven dispatch.
This module provides a unified approach to type mapping with a single core
dispatcher (map_type/3) that handles both input and output directions.
Summary
Functions
Builds a TypeScript map type with optional field filtering and name mapping.
Builds a resource type for non-Ash resources.
Builds an input type for unions (discriminated union syntax).
Builds a union type with metadata for field selection.
Generates a TypeScript union of primitive field names.
Gets the TypeScript field specification for a resource field.
Maps an Ash type to a TypeScript type for input schemas. Backward compatible wrapper around map_type/3.
Maps an Ash type to a TypeScript type for output schemas. Backward compatible wrapper around map_type/3.
Determines if a union member is a "primitive" (no selectable fields).
Maps an Ash type to a TypeScript type for channel event payloads.
Maps an Ash type to a TypeScript type string.
Types
Functions
Builds a TypeScript map type with optional field filtering and name mapping.
Builds a resource type for non-Ash resources.
Builds an input type for unions (discriminated union syntax).
Builds a union type with metadata for field selection.
Generates a TypeScript union of primitive field names.
Gets the TypeScript field specification for a resource field.
Maps an Ash type to a TypeScript type for input schemas. Backward compatible wrapper around map_type/3.
Maps an Ash type to a TypeScript type for output schemas. Backward compatible wrapper around map_type/3.
Determines if a union member is a "primitive" (no selectable fields).
Maps an Ash type to a TypeScript type for channel event payloads.
Like map_type/3 with :output direction, but typed containers (maps/structs
with :fields constraint) generate plain object types without the
__type/__primitiveFields metadata that the RPC field-selection system needs.
Maps an Ash type to a TypeScript type string.
Parameters
type- The Ash type (atom, tuple, or map with :type/:constraints)constraints- Type constraintsdirection- :input or :output
Returns
A TypeScript type string.