Expand description
TypeScript code generation for roam services.
This module generates TypeScript client and server code from service definitions. The generated code includes:
- Type definitions for all named types (structs, enums)
- Client interface and implementation for making RPC calls
- Handler interface for implementing the service
- A Dispatcher class that routes calls to handler methods
- A service descriptor for runtime schema-driven encode/decode
Re-exports§
pub use client::generate_client;pub use http_client::generate_http_client;pub use schema::generate_descriptor;pub use server::generate_server;pub use types::collect_named_types;pub use types::generate_named_types;
Modules§
- client
- TypeScript client generation.
- http_
client - TypeScript HTTP client generation.
- schema
- TypeScript schema generation for runtime service descriptors.
- server
- TypeScript server/handler generation.
- types
- TypeScript type generation and collection.
Functions§
- generate_
method_ ids - Generate method IDs as a TypeScript constant record.
- generate_
service - Generate a complete TypeScript module for a service.