Skip to main content

generate_client_file

Function generate_client_file 

Source
pub fn generate_client_file(
    manifest: &Manifest,
    types_import_path: &str,
    preserve_docs: bool,
) -> String
Expand description

Generates the complete rpc-client.ts file content from a manifest.

The output includes:

  1. Auto-generation header
  2. Re-export of Procedures type from the types file
  3. RpcError class for structured error handling
  4. Internal rpcFetch helper
  5. createRpcClient factory function with fully typed query / mutate methods