typegen 0.1.1-alpha.0

Generate TypeScript, Flow, and Hack types from Rust struct definitions
Documentation

TypeGen

A library for generating TypeScript and Flow.js type definitions from Rust structs.

Usage

use typegen::TypeGen;
use typegen::TypeGenDeclTrait;

#[derive(TypeGen)]
struct User {
    id: u64,
    name: String,
}

Add a typegen.toml file somewhere in any of the parent directories of your source file. Now running tests with TYPEGEN=1 will generate definitions for languages specified in the typegen.toml file.