mix ash_typescript.codegen (ash_typescript v0.18.1)

Copy Markdown View Source

Generates TypeScript types for Ash Rpc-calls.

Output file locations are controlled by configuration (output_file and friends) — see the Configuration Reference. --output overrides the output_file config for a single run.

Usage: mix ash_typescript.codegen [--check | --dry-run] [--dev]

[--output PATH] [--run-endpoint PATH] [--validate-endpoint PATH]

--output

Overrides the output_file config, which every other generated path auto-derives from. A path ending in .ts is used verbatim as the RPC functions file; anything else is treated as a directory and gets ash_rpc.ts appended.

# both write assets/js/ash_rpc.ts + assets/js/ash_types.ts + ...
mix ash_typescript.codegen --output assets/js
mix ash_typescript.codegen --output assets/js/ash_rpc.ts

# writes myfolder/client.ts + myfolder/ash_types.ts + ...
mix ash_typescript.codegen --output myfolder/client.ts

Paths set explicitly via types_output_file, zod_output_file, valibot_output_file, routes_output_file or typed_channels_output_file still win over the derived location — --output only moves the paths that were left to auto-derive.

Summary

Functions

Callback implementation for Mix.Task.run/1.

Functions

run(args)

Callback implementation for Mix.Task.run/1.