"""
This type stub file was generated by pyright.
"""

from functools import cached_property
from typing import Self, TypeVar
from graph_sitter.core.expressions import Expression
from graph_sitter.core.expressions.binary_expression import BinaryExpression
from graph_sitter.core.symbol_groups.expression_group import ExpressionGroup
from graph_sitter.writer_decorators import apidoc

Parent = TypeVar("Parent")
@apidoc
class ComparisonExpression(BinaryExpression):
    """Any comparison expression in the code.

    Includes all set of `<`, `<=`, `>`, `>=`, `==`, `!=` etc.
    """
    def __init__(self, ts_node, file_node_id, G, parent: Parent) -> None:
        ...
    
    @property
    def operators(self) -> list[ExpressionGroup[Expression[Self], Self]]:
        """Returns a list of operator expressions in a comparison expression.

        Extracts and groups the non-named operators (e.g., <, <=, >, >=, ==, !=) from the
        comparison expression's tree-sitter node. Each group of operators is wrapped in an
        ExpressionGroup.

        Returns:
            list[ExpressionGroup[Expression[Self], Self]]: A list of ExpressionGroups
            containing one or more expression operators that appear between the compared
            elements.
        """
        ...
    
    @cached_property
    def elements(self) -> list[Expression[Self]]:
        """Returns a list of expressions for named child nodes.

        Args:
            None

        Returns:
            list[Expression[Self]]: A list of Expression objects for each named child node.
        """
        ...
    


