swc_core::ecma::visit

Trait InjectVars

pub trait InjectVars {
    // Required method
    fn take_vars(&mut self) -> Vec<VarDeclarator>;
}
Available on crate features __ecma and __visit only.
Expand description

Implemented for passes which inject variables.

If a pass depends on other pass which injects variables, this trait can be used to keep the variables.

Required Methods§

fn take_vars(&mut self) -> Vec<VarDeclarator>

Implementors§

§

impl<V> InjectVars for FoldPass<V>
where V: Fold + InjectVars,

§

impl<V> InjectVars for VisitMutPass<V>
where V: VisitMut + InjectVars,

§

impl<V> InjectVars for VisitPass<V>
where V: Visit + InjectVars,