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

from typing import Generic, TYPE_CHECKING, TypeVar
from tree_sitter import Node as TSNode
from graph_sitter.codebase.codebase_graph import CodebaseGraph
from graph_sitter.core.detached_symbols.function_call import FunctionCall
from graph_sitter.core.interfaces.has_value import HasValue
from graph_sitter.core.interfaces.wrapper_expression import IWrapper
from graph_sitter.core.node_id_factory import NodeId
from graph_sitter.core.statements.statement import Statement
from graph_sitter.extensions.autocommit import reader
from graph_sitter.writer_decorators import apidoc
from graph_sitter.core.detached_symbols.code_block import CodeBlock
from graph_sitter.core.interfaces.has_block import HasBlock

if TYPE_CHECKING:
    ...
Parent = TypeVar("Parent", bound="HasBlock")
TCodeBlock = TypeVar("TCodeBlock", bound="CodeBlock")
@apidoc
class ExpressionStatement(Statement, HasValue, IWrapper, Generic[Parent, TCodeBlock]):
    """Abstract representation of any expression statements that resolves to an expression. In some
    languages without a statement delimiter, expression statement and the enclosed expression looks
    the same in text.

    For example, in Python:
    ```python
    x = 1
    ```
    The above code is an expression statement, but its expression value is an assignment.

    In Typescript:
    ```typescript
    x = 1;
    ```
    The above code is also an expression statement, but its expression value is an assignment excluding the semicolon.
    """
    statement_type = ...
    def __init__(self, ts_node: TSNode, file_node_id: NodeId, G: CodebaseGraph, parent: Parent, pos: int, expression_node: TSNode) -> None:
        ...
    
    @property
    @reader
    def function_calls(self) -> list[FunctionCall]:
        """Get all function calls contained within this expression statement.

        Returns a list of function calls that are direct or nested within the expression of this statement. This retrieves function calls from the resolved value of the expression.

        Returns:
            list[FunctionCall]: A list of FunctionCall objects representing all function calls contained within this statement.
        """
        ...
    


