Utility functions for string manipulation and transformations.
Summary
Functions
Formats a field name using the configured output field formatter.
Formats a value for embedding in generated TypeScript code.
Helper functions for commonly used calculation and field selection field names. These ensure consistency across all args/fields-related type generation.
Helper functions for commonly used error field names. These ensure consistency across all error-related type generation.
Helper functions for commonly used config interface field names. These ensure consistency across all RPC config-related type generation.
Helper function for pagination page field name.
Helper functions for commonly used pagination field names. These ensure consistency across all pagination-related type generation.
Functions
Formats a field name using the configured output field formatter.
Formats a value for embedding in generated TypeScript code.
Accepts either:
- A string: Returns the string as a quoted literal for direct embedding
- A tuple
{:runtime_expr, "expression"}: Returns the expression as-is for runtime evaluation
Examples
iex> format_ts_value("/rpc/run")
""/rpc/run""
iex> format_ts_value({:runtime_expr, "AppConfig.getEndpoint()"})
"AppConfig.getEndpoint()"
Helper functions for commonly used calculation and field selection field names. These ensure consistency across all args/fields-related type generation.
Helper functions for commonly used error field names. These ensure consistency across all error-related type generation.
Matches the error structure defined in AshTypescript.Rpc.Error protocol.
Helper functions for commonly used config interface field names. These ensure consistency across all RPC config-related type generation.
Helper function for pagination page field name.
Helper functions for commonly used pagination field names. These ensure consistency across all pagination-related type generation.