diff --git a/ts-rs/src/export.rs b/ts-rs/src/export.rs index 724129b..8bf1e89 100644 --- a/ts-rs/src/export.rs +++ b/ts-rs/src/export.rs @@ -146,7 +146,8 @@ pub mod __private { pub fn get_export_to_path() -> Option { provided_default_dir().map_or_else( || T::EXPORT_TO.map(ToString::to_string), - |path| Some(format!("{path}/{}.ts", T::name())), + // TODO: maybe introduce T::NAME or T::ident() or something in that vein + |path| Some(format!("{path}/{}.ts", T::name().split('<').next().unwrap())), ) } } diff --git a/ts-rs/src/lib.rs b/ts-rs/src/lib.rs index 2fb0301..3553e0c 100644 --- a/ts-rs/src/lib.rs +++ b/ts-rs/src/lib.rs @@ -410,6 +410,7 @@ impl Dependency { let exported_to = T::get_export_to()?; Some(Dependency { type_id: TypeId::of::(), + // TODO: maybe introduce T::NAME or T::ident() or something in that vein ts_name: T::name().split('<').next().unwrap().to_owned(), exported_to, })