AshTypescript.Rpc.Codegen.FunctionGenerators.TypeBuilders (ash_typescript v0.17.3)

Copy Markdown View Source

Builds TypeScript type definitions for RPC function results and configurations.

This module generates the complex result types that include:

  • Success/error union types
  • Generic parameters for field selection
  • Metadata field types
  • Pagination types

Summary

Functions

Builds the optional pagination config type export (for HTTP functions with optional pagination).

Builds the result type definition for an execution function.

Functions

build_optional_pagination_config(shape, config_fields)

Builds the optional pagination config type export (for HTTP functions with optional pagination).

Returns: {config_type_export, config_type_ref}

build_result_type(shape, config_type_ref)

Builds the result type definition for an execution function.

Returns a tuple: {result_type_def, return_type_def, generic_param, function_signature}

Parameters:

  • shape: The function shape from FunctionCore
  • config_type_ref: The config type reference (varies by transport)