Skip to main content

ToTsStmt

Trait ToTsStmt 

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

Implementations on Foreign Types§

Source§

impl ToTsStmt for &str

Available on crate feature swc only.
Source§

impl ToTsStmt for &String

Available on crate feature swc only.
Source§

impl ToTsStmt for Box<Expr>

Available on crate feature swc only.
Source§

impl ToTsStmt for Box<Stmt>

Available on crate feature swc only.
Source§

impl ToTsStmt for String

Available on crate feature swc only.

Implementors§

Source§

impl ToTsStmt for &Stmt

Available on crate feature swc only.
Source§

impl ToTsStmt for Expr

Available on crate feature swc only.

Convert an expression to an expression statement.

Source§

impl ToTsStmt for Stmt

Available on crate feature swc only.