use TS::ident

This commit is contained in:
Gustavo
2024-02-16 11:26:00 -03:00
parent a693b60683
commit bdb06d4b67
+1 -2
View File
@@ -141,8 +141,7 @@ 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),
// TODO: maybe introduce T::NAME or T::ident() or something in that vein
|path| Some(format!("{path}/{}.ts", T::name().split('<').next().unwrap())),
|path| Some(format!("{path}/{}.ts", T::ident())),
)
}
}