Function hasContainerOfType

  • Walk along the hierarchy of containers from the given AST node to the root and check for existence of a container that matches the given predicate. The start node is included in the checks.

    Parameters

    • node: undefined | AstNode
    • predicate: ((n: AstNode) => boolean)
        • (n): boolean
        • Parameters

          Returns boolean

    Returns boolean