Trait CustomTransformer

Source
pub trait CustomTransformer: Debug {
    // Required method
    fn transform<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        program: &'life1 mut Program,
        ctx: &'life2 TransformContext<'life3>,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
}
Expand description

The CustomTransformer trait allows you to implement your own custom SWC transformer to run over all ECMAScript files imported in the graph.

Required Methods§

Source

fn transform<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, program: &'life1 mut Program, ctx: &'life2 TransformContext<'life3>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Implementors§