swc_ecma_utils

Trait StmtLikeInjector

source
pub trait StmtLikeInjector<S>
where S: StmtLike,
{ // Required methods fn prepend_stmt(&mut self, insert_with: S); fn prepend_stmts<I>(&mut self, insert_with: I) where I: IntoIterator<Item = S>; }
Expand description

Prepends statements after directive statements.

Required Methods§

source

fn prepend_stmt(&mut self, insert_with: S)

source

fn prepend_stmts<I>(&mut self, insert_with: I)
where I: IntoIterator<Item = S>,

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<S> StmtLikeInjector<S> for Vec<S>
where S: StmtLike,

source§

fn prepend_stmt(&mut self, insert_with: S)

Note: If there is no directive, use insert instead.

source§

fn prepend_stmts<I>(&mut self, insert_with: I)
where I: IntoIterator<Item = S>,

Note: If there is no directive, use splice instead.

Implementors§