swc_ecma_utils

Function contains_this_expr

source
pub fn contains_this_expr<N>(body: &N) -> bool
where N: VisitWith<ThisVisitor>,
Expand description

This does not recurse into a function if this is changed by it.

e.g.

  • The body of an arrow expression is visited.
  • The body of a function expression is not visited.