mirror of
https://github.com/xazukx/ts-rs.git
synced 2026-11-23 23:20:24 +00:00
fix TS_RS_EXPORT_DIR
This commit is contained in:
+2
-1
@@ -146,7 +146,8 @@ pub mod __private {
|
||||
pub fn get_export_to_path<T: TS + ?Sized>() -> Option<String> {
|
||||
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())),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -410,6 +410,7 @@ impl Dependency {
|
||||
let exported_to = T::get_export_to()?;
|
||||
Some(Dependency {
|
||||
type_id: TypeId::of::<T>(),
|
||||
// TODO: maybe introduce T::NAME or T::ident() or something in that vein
|
||||
ts_name: T::name().split('<').next().unwrap().to_owned(),
|
||||
exported_to,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user