swc_core::ecma::utils

Trait FunctionFactory

pub trait FunctionFactory: Into<Box<Function>> {
    // Provided methods
    fn into_fn_expr(self, ident: Option<Ident>) -> FnExpr { ... }
    fn into_fn_decl(self, ident: Ident) -> FnDecl { ... }
    fn into_method_prop(self, key: PropName) -> MethodProp { ... }
}
Available on crate features __ecma and __utils only.

Provided Methods§

fn into_fn_expr(self, ident: Option<Ident>) -> FnExpr

fn into_fn_decl(self, ident: Ident) -> FnDecl

fn into_method_prop(self, key: PropName) -> MethodProp

Object Safety§

This trait is not object safe.

Implementors§

§

impl<T> FunctionFactory for T
where T: Into<Box<Function>>,