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

from abc import abstractmethod
from typing import Generic, TYPE_CHECKING, TypeVar
from tree_sitter import Node as TSNode
from graph_sitter.core.autocommit import reader
from graph_sitter.core.detached_symbols.function_call import FunctionCall
from graph_sitter.core.expressions import Expression
from graph_sitter.core.interfaces.has_name import HasName
from graph_sitter.writer_decorators import apidoc
from graph_sitter.core.class_definition import Class
from graph_sitter.core.detached_symbols.parameter import Parameter
from graph_sitter.core.function import Function

if TYPE_CHECKING:
    ...
TClass = TypeVar("TClass", bound="Class")
TFunction = TypeVar("TFunction", bound="Function")
TParameter = TypeVar("TParameter", bound="Parameter")
@apidoc
class Decorator(Expression[TClass | TFunction], HasName, Generic[TClass, TFunction, TParameter]):
    """Abstract representation of a Decorator."""
    def __init__(self, ts_node: TSNode, parent: TClass | TFunction) -> None:
        ...
    
    @property
    @reader
    @abstractmethod
    def call(self) -> FunctionCall | None:
        """Returns any function call made by this decorator.

        This property identifies whether a decorator makes a function call and provides access to the call details.

        Returns:
            FunctionCall | None: The FunctionCall object representing the function call made by the decorator if one exists,
                None if the decorator does not make a function call.
        """
        ...
    


