#![cfg(feature = "tokio-impl")] use tokio::sync::{Mutex, OnceCell, RwLock}; use ts_rs::TS; #[derive(TS)] #[ts(export, export_to = "tokio/")] #[ts(concrete(T = i32))] struct Tokio { mutex: Mutex, once_cell: OnceCell, rw_lock: RwLock, } #[test] fn tokio() { assert_eq!( Tokio::::decl(), "type Tokio = { mutex: number, once_cell: number, rw_lock: number, };" ) }