Member predicate AST::StmtContainer::getFunctionBoundary

Gets the innermost enclosing function or top-level, possibly this container itself if it is a function or top-level.

To get a strictly enclosing function or top-level, use getEnclosingContainer().getFunctionBoundary().

TypeScript namespace declarations are containers that are not considered function boundaries. In plain JavaScript, all containers are function boundaries.

StmtContainer getFunctionBoundary()