typewriter-typescript 0.2.0

TypeScript emitter for the typewriter type sync SDK
Documentation

typewriter-typescript

TypeScript emitter for the typewriter SDK.

Crates.io Docs.rs

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