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

from typing import TYPE_CHECKING
from py_mini_racer import MiniRacer
from py_mini_racer._objects import JSMappedObject
from graph_sitter.core.external.language_engine import LanguageEngine
from graph_sitter.core.external.dependency_manager import DependencyManager
from graph_sitter.core.interfaces.editable import Editable

if TYPE_CHECKING:
    ...
logger = ...
class TypescriptEngine(LanguageEngine):
    dependency_manager: DependencyManager | None
    def __init__(self, repo_path: str, base_path: str | None = ..., dependency_manager: DependencyManager | None = ...) -> None:
        ...
    


class V8TypescriptEngine(TypescriptEngine):
    """Typescript-compiler based language engine using MiniRacer's V8-based JS engine.

    More experimental approach to type inference, but is faster and more flexible.

    Attributes:
        hard_memory_limit (int): Maximum memory limit in bytes before V8 will force garbage collection
        soft_memory_limit (int): Memory threshold in bytes that triggers garbage collection
    """
    hard_memory_limit: int
    soft_memory_limit: int
    ctx: MiniRacer | None
    mr_type_script_analyzer: JSMappedObject | None
    def __init__(self, repo_path: str, base_path: str | None = ..., dependency_manager: DependencyManager | None = ..., hard_memory_limit: int = ..., soft_memory_limit: int = ...) -> None:
        ...
    
    def get_return_type(self, node: Editable) -> str | None:
        ...
    


class NodeTypescriptEngine(TypescriptEngine):
    """Typescript-compiler based language engine using NodeJS and the TypeScript compiler.

    More mature approach to type inference, but is slower and less flexible.

    Attributes:
        type_data (dict | None): Type data for the codebase
    """
    type_data: dict | None
    def __init__(self, repo_path: str, base_path: str | None = ..., dependency_manager: DependencyManager | None = ...) -> None:
        ...
    
    def get_return_type(self, node: Editable) -> str | None:
        ...
    


