"""
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.codebase.codebase_graph import CodebaseGraph
from graph_sitter.core.expressions import Expression
from graph_sitter.core.interfaces.has_name import HasName
from graph_sitter.core.node_id_factory import NodeId
from graph_sitter.core.statements.statement import Statement
from graph_sitter.writer_decorators import ts_apidoc
from graph_sitter.typescript.detached_symbols.code_block import TSCodeBlock

if TYPE_CHECKING:
    ...
Parent = TypeVar("Parent", bound="TSCodeBlock")
@ts_apidoc
class TSLabeledStatement(Statement[Parent], HasName, Generic[Parent]):
    """Statement with a named label. It resolves to various types of statements like loops, switch cases, etc.

    Examples:
    ```
    outerLoop: for (let i = 0; i < 5; i++) {
      innerLoop: for (let j = 0; j < 5; j++) {
        if (i === 2 && j === 2) {
          break outerLoop; // This will break out of the outer loop
        }
        console.log(`i: ${i}, j: ${j}`);
      }
    }
    ```
    ```
    emptyStatement: { pass }
    ```
    """
    statement_type = ...
    body: Expression | None
    def __init__(self, ts_node: TSNode, file_node_id: NodeId, G: CodebaseGraph, parent: Parent, pos: int) -> None:
        ...
    
    @property
    def label(self) -> str:
        """Returns the label of the labeled statement.

        Acts as a property getter that returns the name of the labeled statement. For example, in code like
        'outerLoop: for...', this would return 'outerLoop'.

        Returns:
            str: The label name of the statement.
        """
        ...
    


