Function closest

  • Walk up the parent chain until a node is found that matches the callback.

    Parameters

    • node: Node

      the node to start from

    • callback: ((node) => boolean)

      the callback predicate to match

        • (node): boolean
        • Parameters

          • node: Node

          Returns boolean

    Returns Node

    the matching node or null if none is found

Generated using TypeDoc