AshTypescript. Manifest. Verifiers. VerifyMappableTypes
(ash_typescript v0.18.1)
Copy Markdown
View Source
Compile-time check that every type reachable from the manifest can be mapped to a TypeScript type.
The manifest generator classifies custom use Ash.Type modules it cannot
categorize as kind: :unknown (module preserved). Codegen can only map such
a module when it implements typescript_type_name/0, has a
type_mapping_overrides config entry, or is a known third-party type (see
AshTypescript.Codegen.TypeMapper.unknown_module_mapping/1). Anything else
fails codegen; this verifier surfaces all offenders at compile time in one
aggregated error instead of a mid-codegen raise on the first one.
kind: :unknown types without a module (e.g. generic actions without a
declared return type) are skipped — there is nothing to map or to point at.
Walks the top level of each definition site: resource fields, entrypoint
action inputs/returns/metadata, and standalone type definitions in
manifest.types (including embedded resources). Nested references to named
types (:type_ref, :embedded_resource, :resource) are not descended
into, because their full definitions are walked independently — this also
makes cycles impossible.