interface TsServerEvent {
    seq: number;
    type: "event";
    event: string;
    body?: any;
}
export interface TsServerRequestResult {
    success: boolean;
    body?: any;
    message?: string;
}
export declare class TsServerManager {
    #private;
    /** Timeout for individual tsserver requests (ms) */
    static REQUEST_TIMEOUT: number;
    constructor(cwd: string);
    /**
     * Start the tsserver process. Finds tsserver in the project's node_modules
     * or falls back to a globally installed one.
     */
    start(): Promise<void>;
    /**
     * Set a callback for tsserver events (diagnostics, etc.).
     */
    setEventHandler(handler: (event: TsServerEvent) => void): void;
    /**
     * Notify tsserver that a file is open (must be done before requesting
     * completions/definitions/etc.).
     */
    openFile(filePath: string, content: string, projectRootPath?: string): Promise<void>;
    /**
     * Notify tsserver that a file has changed.
     */
    changeFile(filePath: string, content: string): Promise<void>;
    /**
     * Notify tsserver that a file is closed.
     */
    closeFile(filePath: string): Promise<void>;
    /**
     * Get completions at a position.
     */
    getCompletions(filePath: string, line: number, offset: number, options?: {
        triggerCharacter?: string;
        includeExternalModuleExports?: boolean;
    }): Promise<TsServerRequestResult>;
    /**
     * Get completion entry details (documentation, etc.).
     */
    getCompletionDetails(filePath: string, line: number, offset: number, entryNames: string[]): Promise<TsServerRequestResult>;
    /**
     * Get the definition location of a symbol.
     */
    getDefinition(filePath: string, line: number, offset: number): Promise<TsServerRequestResult>;
    /**
     * Get type definition location.
     */
    getTypeDefinition(filePath: string, line: number, offset: number): Promise<TsServerRequestResult>;
    /**
     * Get hover/quickinfo at a position.
     */
    getQuickInfo(filePath: string, line: number, offset: number): Promise<TsServerRequestResult>;
    /**
     * Get references to a symbol.
     */
    getReferences(filePath: string, line: number, offset: number): Promise<TsServerRequestResult>;
    /**
     * Get signature help (function parameter info).
     */
    getSignatureHelp(filePath: string, line: number, offset: number): Promise<TsServerRequestResult>;
    /**
     * Request diagnostics for a file. tsserver returns these as events
     * (syntaxDiag, semanticDiag, suggestionDiag).
     */
    requestDiagnostics(filePaths: string[]): Promise<void>;
    /**
     * Get rename locations for a symbol.
     */
    getRenameLocations(filePath: string, line: number, offset: number): Promise<TsServerRequestResult>;
    /**
     * Get the navigation tree (document symbols / outline) for a file.
     */
    getNavTree(filePath: string): Promise<TsServerRequestResult>;
    /**
     * Organize imports in a file.
     */
    organizeImports(filePath: string): Promise<TsServerRequestResult>;
    /**
     * Get inlay hints for a file.
     * tsserver's provideInlayHints expects character offsets (start + length),
     * so we request the entire file and let Monaco filter by visible range.
     */
    getInlayHints(filePath: string): Promise<TsServerRequestResult>;
    /**
     * Get code fixes for errors in a range.
     */
    getCodeFixes(filePath: string, startLine: number, startOffset: number, endLine: number, endOffset: number, errorCodes: number[]): Promise<TsServerRequestResult>;
    /**
     * Get applicable refactors at a position/range.
     */
    getApplicableRefactors(filePath: string, startLine: number, startOffset: number, endLine: number, endOffset: number): Promise<TsServerRequestResult>;
    /**
     * Get edits for a specific refactor action.
     */
    getEditsForRefactor(filePath: string, startLine: number, startOffset: number, endLine: number, endOffset: number, refactorName: string, actionName: string): Promise<TsServerRequestResult>;
    /**
     * Get implementation locations for a symbol (e.g. interface implementations).
     */
    getImplementation(filePath: string, line: number, offset: number): Promise<TsServerRequestResult>;
    /**
     * Get smart selection ranges at given positions.
     */
    getSelectionRange(filePath: string, locations: Array<{
        line: number;
        offset: number;
    }>): Promise<TsServerRequestResult>;
    /**
     * Get linked editing ranges (e.g. matching JSX tags).
     */
    getLinkedEditingRange(filePath: string, line: number, offset: number): Promise<TsServerRequestResult>;
    /**
     * Format a range within a file.
     */
    getFormatRange(filePath: string, startLine: number, startOffset: number, endLine: number, endOffset: number): Promise<TsServerRequestResult>;
    /**
     * Get the working directory (project root).
     */
    getCwd(): string;
    /**
     * Check if the server is running.
     */
    isRunning(): boolean;
    /**
     * Dispose of the tsserver process and clean up.
     */
    dispose(): void;
}
export {};
