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

from typing import Generic, Self, TYPE_CHECKING, TypeVar, Union
from tree_sitter import Node as TSNode
from graph_sitter.core.autocommit import reader
from graph_sitter.core.dataclasses.usage import UsageType
from graph_sitter.core.expressions.expression import Expression
from graph_sitter.core.interfaces.editable import Editable
from graph_sitter.core.interfaces.has_name import HasName
from graph_sitter.core.node_id_factory import NodeId
from graph_sitter.extensions.autocommit import commiter
from graph_sitter.writer_decorators import apidoc, noapidoc
from graph_sitter.codebase.codebase_graph import CodebaseGraph
from graph_sitter.core.import_resolution import Import
from graph_sitter.core.symbol import Symbol

if TYPE_CHECKING:
    ...
Parent = TypeVar("Parent", bound="Editable")
@apidoc
class Importable(Expression[Parent], HasName, Generic[Parent]):
    """An interface for any node object that can import (or reference) an exportable symbol eg. All nodes that are on the graph must inherit from here

    Class, function, imports, exports, etc.
    """
    node_id: int
    def __init__(self, ts_node: TSNode, file_node_id: NodeId, G: CodebaseGraph, parent: Parent) -> None:
        ...
    
    @property
    @reader(cache=False)
    def dependencies(self) -> list[Union[Symbol, Import]]:
        """Returns a list of symbols that this symbol depends on.

        Returns a list of symbols (including imports) that this symbol directly depends on.
        The returned list is sorted by file location for consistent ordering.

        Returns:
            list[Union[Symbol, Import]]: A list of symbols and imports that this symbol directly depends on,
                sorted by file location.
        """
        ...
    
    @reader(cache=False)
    @noapidoc
    def get_dependencies(self, usage_types: UsageType) -> list[Union[Symbol, Import]]:
        """Returns Symbols and Importsthat this symbol depends on.

        Opposite of `usages`
        """
        ...
    
    @commiter
    @noapidoc
    def recompute(self, incremental: bool = ...) -> list[Importable]:
        """Recompute the dependencies of this symbol.

        Returns:
            A list of importables that need to be updated now this importable has been updated.
        """
        ...
    
    @property
    @noapidoc
    def descendant_symbols(self) -> list[Self]:
        ...
    


