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

from typing import TYPE_CHECKING
from tree_sitter import Node as TSNode
from graph_sitter.codebase.codebase_graph import CodebaseGraph
from graph_sitter.core.assignment import Assignment
from graph_sitter.core.autocommit import writer
from graph_sitter.core.expressions.multi_expression import MultiExpression
from graph_sitter.core.node_id_factory import NodeId
from graph_sitter.typescript.symbol import TSSymbol
from graph_sitter.writer_decorators import noapidoc, ts_apidoc
from graph_sitter.typescript.statements.assignment_statement import TSAssignmentStatement

if TYPE_CHECKING:
    ...
@ts_apidoc
class TSAssignment(Assignment["TSAssignmentStatement | ExportStatement"], TSSymbol):
    """A class representing TypeScript assignments, including variable declarations and property assignments.

    Handles various types of TypeScript assignments including variable declarators, assignment expressions,
    augmented assignments, property signatures, and public field definitions. It provides functionality
    for manipulating assignments and managing their associated types and comments.

    Attributes:
        assignment_types (list[str]): List of valid TypeScript assignment node types that this class can handle.
    """
    assignment_types: list[str] = ...
    @noapidoc
    @classmethod
    def from_assignment(cls, ts_node: TSNode, file_node_id: NodeId, G: CodebaseGraph, parent: TSAssignmentStatement) -> MultiExpression[TSAssignmentStatement, TSAssignment]:
        ...
    
    @classmethod
    def from_named_expression(cls, ts_node: TSNode, file_node_id: NodeId, G: CodebaseGraph, parent: TSAssignmentStatement) -> MultiExpression[TSAssignmentStatement, TSAssignment]:
        """Creates a MultiExpression object from a TypeScript named expression node.

        Constructs assignments from a TypeScript named expression node (variable declarator, public field definition, or property signature) by extracting the left (name) and right (value) nodes.

        Args:
            ts_node (TSNode): The TypeScript node representing the named expression.
            file_node_id (NodeId): The unique identifier for the file containing this node.
            G (CodebaseGraph): The graph representation of the codebase.
            parent (Parent): The parent node containing this expression.

        Returns:
            MultiExpression[Parent, TSAssignment]: A MultiExpression object containing the constructed assignments.

        Raises:
            ValueError: If the node type is not one of: "variable_declarator", "public_field_definition", or "property_signature".
        """
        ...
    
    @writer
    def set_inline_comment(self, comment: str, auto_format: bool = ..., clean_format: bool = ...) -> None:
        """Sets an inline comment for an assignment node.

        This method adds or updates an inline comment on the parent statement of the assignment node.

        Args:
            comment (str): The comment text to set.
            auto_format (bool, optional): Whether to automatically format the comment. Defaults to True.
            clean_format (bool, optional): Whether to clean existing formatting. Defaults to True.

        Returns:
            None
        """
        ...
    


