Trait swc_core::ecma::utils::QueryRef

pub trait QueryRef {
    // Provided methods
    fn query_ref(&self, _ident: &Ident) -> Option<Box<Expr>> { ... }
    fn query_lhs(&self, _ident: &Ident) -> Option<Box<Expr>> { ... }
    fn query_jsx(&self, _ident: &Ident) -> Option<JSXElementName> { ... }
    fn should_fix_this(&self, _ident: &Ident) -> bool { ... }
}
Available on crate features __ecma and __utils only.

Provided Methods§

fn query_ref(&self, _ident: &Ident) -> Option<Box<Expr>>

fn query_lhs(&self, _ident: &Ident) -> Option<Box<Expr>>

fn query_jsx(&self, _ident: &Ident) -> Option<JSXElementName>

ref used in JSX

fn should_fix_this(&self, _ident: &Ident) -> bool

when foo() is replaced with bar.baz(), should bar.baz be indirect call?

Implementors§