ToTsTypeName

Trait ToTsTypeName 

Source
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§

Implementations on Foreign Types§

Source§

impl ToTsTypeName for &str

Available on crate feature swc only.
Source§

impl ToTsTypeName for &String

Available on crate feature swc only.
Source§

impl ToTsTypeName for String

Available on crate feature swc only.

Implementors§

Source§

impl ToTsTypeName for &Ident

Available on crate feature swc only.
Source§

impl ToTsTypeName for Ident

Available on crate feature swc only.