pub trait ToTsStmt {
// Required method
fn to_ts_stmt(self) -> Stmt;
}Expand description
Converts common Rust values into SWC Stmt nodes.
This enables ergonomic interpolation in template literals where a statement is expected.
Required Methods§
fn to_ts_stmt(self) -> Stmt
Implementations on Foreign Types§
Source§impl ToTsStmt for &String
Available on crate feature swc only.
impl ToTsStmt for &String
Available on crate feature
swc only.fn to_ts_stmt(self) -> Stmt
Source§impl ToTsStmt for Box<Expr>
Available on crate feature swc only.
impl ToTsStmt for Box<Expr>
Available on crate feature
swc only.fn to_ts_stmt(self) -> Stmt
Source§impl ToTsStmt for Box<Stmt>
Available on crate feature swc only.
impl ToTsStmt for Box<Stmt>
Available on crate feature
swc only.fn to_ts_stmt(self) -> Stmt
Source§impl ToTsStmt for String
Available on crate feature swc only.
impl ToTsStmt for String
Available on crate feature
swc only.