CodeQL library for JavaScript/TypeScript
codeql/javascript-all 0.8.12 (changelog, source)
Search

Member predicate 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()