#![allow(dead_code)] use std::{cell::Cell, rc::Rc, sync::Arc}; use ts_rs::TS; #[derive(TS)] struct A { x1: Arc, y1: Cell, } #[derive(TS)] struct B { a1: Box, #[ts(inline)] a2: A, } #[derive(TS)] struct C { b1: Rc, #[ts(inline)] b2: B, } #[test] fn test_nested() { assert_eq!( C::inline(), "{ b1: B, b2: { a1: A, a2: { x1: number, y1: number, }, }, }" ); }