Skip to main content

generate_typescript_protobuf

Function generate_typescript_protobuf 

Source
pub fn generate_typescript_protobuf(
    schema: &ProtobufSchema,
    target: &ProtobufTarget,
) -> Result<String>
Expand description

Generate TypeScript Protobuf code from a schema

Parses the Protobuf schema and generates complete TypeScript code with message types, service clients, and server implementations based on the target specification.

§Arguments

  • schema - Parsed Protobuf schema
  • target - Generation target: ProtobufTarget::All (complete), ProtobufTarget::Messages (messages only), or ProtobufTarget::Services (services only)

§Returns

Generated TypeScript code as a string, or an error if generation fails