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

from typing import TYPE_CHECKING, TypeVar, override
from tree_sitter import Node as TSNode
from graph_sitter.core.autocommit import writer
from graph_sitter.core.expressions import Expression
from graph_sitter.core.interfaces.editable import Editable
from graph_sitter.core.interfaces.has_attribute import HasAttribute
from graph_sitter.core.node_id_factory import NodeId
from graph_sitter.core.symbol_groups.dict import Dict, Pair
from graph_sitter.extensions.autocommit import reader
from graph_sitter.writer_decorators import apidoc, noapidoc, ts_apidoc
from graph_sitter.codebase.codebase_graph import CodebaseGraph

if TYPE_CHECKING:
    ...
Parent = TypeVar("Parent", bound="Editable")
TExpression = TypeVar("TExpression", bound=Expression)
logger = ...
@ts_apidoc
class TSPair(Pair):
    """A TypeScript pair node that represents key-value pairs in object literals.

    A specialized class extending `Pair` for handling TypeScript key-value pairs,
    particularly in object literals. It provides functionality for handling both
    regular key-value pairs and shorthand property identifiers, with support for
    reducing boolean conditions.

    Attributes:
        shorthand (bool): Indicates whether this pair uses shorthand property syntax.
    """
    shorthand: bool
    def __init__(self, ts_node: TSNode, file_node_id: NodeId, G: CodebaseGraph, parent: Parent) -> None:
        ...
    
    @writer
    def reduce_condition(self, bool_condition: bool, node: Editable | None = ...) -> None:
        """Reduces an editable to the following condition"""
        ...
    


@apidoc
class TSDict(Dict, HasAttribute):
    """A typescript dict object. You can use standard operations to operate on this dict (IE len, del, set, get, etc)"""
    def __init__(self, ts_node: TSNode, file_node_id: NodeId, G: CodebaseGraph, parent: Parent, delimiter: str = ..., pair_type: type[Pair] = ...) -> None:
        ...
    
    def __getitem__(self, __key: str) -> TExpression:
        ...
    
    def __setitem__(self, __key: str, __value: TExpression) -> None:
        ...
    
    @reader
    @noapidoc
    @override
    def resolve_attribute(self, name: str) -> Expression | None:
        ...
    


