From bdb06d4b671e82ba4a297908723a5afe6dd94d8d Mon Sep 17 00:00:00 2001 From: Gustavo Date: Fri, 16 Feb 2024 11:26:00 -0300 Subject: [PATCH] use TS::ident --- ts-rs/src/export.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ts-rs/src/export.rs b/ts-rs/src/export.rs index cf3232b..7ecccc9 100644 --- a/ts-rs/src/export.rs +++ b/ts-rs/src/export.rs @@ -141,8 +141,7 @@ pub mod __private { pub fn get_export_to_path() -> Option { 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())), ) } }