AshTypescript.TypedController.Verifiers.VerifyTypedController (ash_typescript v0.19.0)

Copy Markdown View Source

Verifies that typed controller configurations are valid.

Checks:

  1. Route names are unique
  2. Each route has a run handler
  3. Argument types are valid Ash types
  4. Route and argument names are valid for TypeScript generation (no _1, ? patterns)
  5. Field names inside returns and argument types (typed maps, keywords, tuples, structs — at any depth) are valid for TypeScript generation too. Handlers send and receive these as-is, so an invalid name would produce a generated type that doesn't match the wire. A type's own typescript_field_names/0 mapping is honored, as for RPC.