Struct swc_ecma_utils::function::FnWrapperResult
source · pub struct FnWrapperResult<N, R> {
pub name_fn: N,
pub ref_fn: R,
}
Expand description
The result of declaration wrapper includes two parts.
name_fn
is used to replace the original function.
ref_fn
is an extra function called internally by name_fn
.
function NAME(PARAMS) {
return REF.apply(this, arguments);
}
function REF() {
REF = FUNCTION;
return REF.apply(this, arguments);
}
Fields§
§name_fn: N
§ref_fn: R
Trait Implementations§
source§impl From<FunctionWrapper<Expr>> for FnWrapperResult<FnExpr, FnDecl>
impl From<FunctionWrapper<Expr>> for FnWrapperResult<FnExpr, FnDecl>
source§fn from(value: FunctionWrapper<Expr>) -> Self
fn from(value: FunctionWrapper<Expr>) -> Self
Converts to this type from the input type.
source§impl From<FunctionWrapper<FnDecl>> for FnWrapperResult<FnDecl, FnDecl>
impl From<FunctionWrapper<FnDecl>> for FnWrapperResult<FnDecl, FnDecl>
source§fn from(value: FunctionWrapper<FnDecl>) -> Self
fn from(value: FunctionWrapper<FnDecl>) -> Self
Converts to this type from the input type.