Function getContainerOfType

  • Walk along the hierarchy of containers from the given AST node to the root and return the first node that matches the type predicate. If the start node itself matches, it is returned. If no container matches, undefined is returned.

    Type Parameters

    Parameters

    Returns T | undefined