"""
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.core.expressions.type import Type
from graph_sitter.core.interfaces.editable import Editable
from graph_sitter.core.node_id_factory import NodeId
from graph_sitter.core.symbol_groups.collection import Collection
from graph_sitter.writer_decorators import apidoc, noapidoc
from graph_sitter.codebase.codebase_graph import CodebaseGraph
from graph_sitter.core.interfaces.importable import Importable

if TYPE_CHECKING:
    ...
TType = TypeVar("TType", bound="Type")
Parent = TypeVar("Parent", bound="Editable")
@apidoc
class UnionType(Collection[Type, Parent], Type[Parent], Generic[TType, Parent]):
    """An abstract representation of a union type.
    For example `str | None` or `string | number`.
    """
    def __init__(self, ts_node: TSNode, file_node_id: NodeId, G: CodebaseGraph, parent: Parent) -> None:
        ...
    
    @property
    @noapidoc
    def descendant_symbols(self) -> list[Importable]:
        """Returns the nested symbols of the importable object, including itself."""
        ...
    


