typewriter-typescript
TypeScript emitter for the typewriter SDK.
What It Generates
| Rust | TypeScript |
|---|---|
struct |
export interface |
Simple enum |
String literal union ("A" | "B") |
Tagged enum |
Discriminated union ({ type: "A"; ... }) |
Option<T> |
field?: T | undefined |
Vec<T> |
T[] |
HashMap<K,V> |
Record<K, V> |
Example Output
export interface UserProfile {
id: string;
email: string;
age?: number | undefined;
tags: string[];
}
Usage
Used internally by typewriter-macros. Most users should depend on the main typewriter crate.
License
Apache-2.0 — Darshan Vichhi