Module typescript

Module typescript 

Source
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
  • Server handler interface for implementing services
  • Encoding/decoding logic for all types
  • Runtime schema information for streaming channel binding

Re-exports§

pub use client::generate_client;
pub use http_client::generate_http_client;
pub use schema::generate_schemas;
pub use server::generate_server;
pub use types::collect_named_types;
pub use types::generate_named_types;

Modules§

client
TypeScript client generation.
decode
TypeScript decoding statement generation.
encode
TypeScript encoding expression generation.
http_client
TypeScript HTTP client generation.
schema
TypeScript schema generation for runtime channel binding.
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.