import type { TestRunnerOptions } from './types/common.ts';
/**
 * Exposes the API to run Japa tests and optionally watch for file
 * changes to re-run the tests.
 *
 * The TestRunner provides intelligent test execution with watch mode capabilities.
 * When files change, it can selectively run specific tests or the entire suite
 * based on what changed.
 *
 * The watch mode functions as follows:
 *  - If the changed file is a test file, then only tests for that file
 *    will be re-run.
 *  - Otherwise, all tests will re-run with respect to the initial
 *    filters applied when running the `node ace test` command.
 *
 * @example
 * const testRunner = new TestRunner(cwd, { suites: [], hooks: [] })
 * await testRunner.run()
 *
 * @example
 * // Run tests in watch mode
 * const testRunner = new TestRunner(cwd, { suites: [], hooks: [] })
 * await testRunner.runAndWatch(ts, { poll: false })
 */
export declare class TestRunner {
    #private;
    /**
     * CLI UI instance for displaying colorful messages and progress information
     */
    ui: {
        colors: import("@poppinss/colors/types").Colors;
        logger: import("@poppinss/cliui").Logger;
        table: (tableOptions?: Partial<import("@poppinss/cliui/types").TableOptions>) => import("@poppinss/cliui").Table;
        tasks: (tasksOptions?: Partial<import("@poppinss/cliui/types").TaskManagerOptions>) => import("@poppinss/cliui").TaskManager;
        steps: () => import("@poppinss/cliui").Steps;
        icons: {
            tick: string;
            cross: string;
            bullet: string;
            nodejs: string;
            pointer: string;
            info: string;
            warning: string;
            squareSmallFilled: string;
            borderVertical: string;
        };
        sticker: () => import("@poppinss/cliui").Instructions;
        instructions: () => import("@poppinss/cliui").Instructions;
        switchMode(modeToUse: "raw" | "silent" | "normal"): void;
        useRenderer(rendererToUse: import("@poppinss/cliui/types").RendererContract): void;
        useColors(colorsToUse: import("@poppinss/colors/types").Colors): void;
    };
    /**
     * The script file to run as a child process
     */
    scriptFile: string;
    /**
     * The current working directory URL
     */
    cwd: URL;
    /**
     * The current working directory path as a string
     */
    cwdPath: string;
    /**
     * Test runner configuration options including filters, reporters, and hooks
     */
    options: TestRunnerOptions;
    /**
     * Create a new TestRunner instance
     *
     * @param cwd - The current working directory URL
     * @param options - Test runner configuration options
     */
    constructor(cwd: URL, options: TestRunnerOptions);
    /**
     * Add listener to get notified when test runner is closed
     *
     * @param callback - Function to call when test runner closes
     * @returns This TestRunner instance for method chaining
     */
    onClose(callback: (exitCode: number) => any): this;
    /**
     * Add listener to get notified when test runner encounters an error
     *
     * @param callback - Function to call when test runner encounters an error
     * @returns This TestRunner instance for method chaining
     */
    onError(callback: (error: any) => any): this;
    /**
     * Close watchers and running child processes
     *
     * Cleans up file system watchers and terminates any running test
     * processes to ensure graceful shutdown.
     */
    close(): Promise<void>;
    /**
     * Runs tests once without watching for file changes
     *
     * Executes the test suite a single time and exits. This is the
     * equivalent of running tests in CI/CD environments.
     */
    run(): Promise<void>;
    /**
     * Run tests in watch mode and re-run them when files change
     *
     * Starts the test runner in watch mode, monitoring the file system
     * for changes and automatically re-running tests when relevant files
     * are modified. Uses intelligent filtering to run only affected tests
     * when possible.
     *
     * @param ts - TypeScript module reference for parsing configuration
     * @param options - Watch options including polling mode for file system monitoring
     */
    runAndWatch(options?: {
        poll: boolean;
    }): Promise<void>;
}
