ts-rs 2.1.3

generate typescript bindings from rust types
Documentation
#![allow(dead_code)]

use std::time::Instant;
use ts_rs::TS;

#[derive(TS)]
struct Override {
    a: i32,
    #[ts(type = "0 | 1 | 2")]
    b: i32,
    #[ts(type = "string")]
    x: Instant,
}

#[test]
fn test() {
    assert_eq!(
        Override::inline(0),
        "\
{
    a: number,
    b: 0 | 1 | 2,
    x: string,
}"
    )
}