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 schematarget- Generation target:ProtobufTarget::All(complete),ProtobufTarget::Messages(messages only), orProtobufTarget::Services(services only)
§Returns
Generated TypeScript code as a string, or an error if generation fails