pub trait ToTsTypeName {
// Required method
fn to_ts_type_name(&self) -> String;
}Expand description
Trait for converting values to type name strings.
This is used for type placeholder substitution in templates.
The key difference from ToString is that for Ident, this uses
the symbol directly (.sym) rather than the Display impl, which
avoids including SyntaxContext markers like #0.
Required Methods§
fn to_ts_type_name(&self) -> String
Implementations on Foreign Types§
Source§impl ToTsTypeName for &str
Available on crate feature swc only.
impl ToTsTypeName for &str
Available on crate feature
swc only.fn to_ts_type_name(&self) -> String
Source§impl ToTsTypeName for &String
Available on crate feature swc only.
impl ToTsTypeName for &String
Available on crate feature
swc only.fn to_ts_type_name(&self) -> String
Source§impl ToTsTypeName for String
Available on crate feature swc only.
impl ToTsTypeName for String
Available on crate feature
swc only.fn to_ts_type_name(&self) -> String
Implementors§
impl ToTsTypeName for &Ident
Available on crate feature
swc only.impl ToTsTypeName for Ident
Available on crate feature
swc only.