swc_core::ecma::utils

Trait IsDirective

pub trait IsDirective {
    // Required method
    fn as_ref(&self) -> Option<&Stmt>;

    // Provided methods
    fn is_directive(&self) -> bool { ... }
    fn directive_continue(&self) -> bool { ... }
    fn is_use_strict(&self) -> bool { ... }
}
Available on crate features __ecma and __utils only.

Required Methods§

fn as_ref(&self) -> Option<&Stmt>

Provided Methods§

fn is_directive(&self) -> bool

👎Deprecated: use directive_continue instead

fn directive_continue(&self) -> bool

fn is_use_strict(&self) -> bool

Implementors§