mirror of
https://github.com/xazukx/ts-rs.git
synced 2026-11-19 22:40:25 +00:00
use TS::ident
This commit is contained in:
+1
-2
@@ -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())),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user