import type * as Mocha from 'mocha';
import { StateProvider } from './state-provider.js';
export declare function screenshotError(state: E2E.State, error: Error): Promise<any>;
type ExtendedState = Awaited<ReturnType<typeof StateProvider.instance.getState>>;
export declare class InstrumentedTestFunction {
    #private;
    /**
     * We track the initial timeouts for each context if we reset it back
     * Mocha check timing of the full executed function and fails
     * the test.
     * https://github.com/mochajs/mocha/blob/main/lib/runnable.js#L307
     */
    static timeoutByContext: WeakMap<Mocha.Context, number>;
    /**
     * We track the initial timeouts for each functions because mocha
     * does not reset test timeout for retries.
     */
    static timeoutByTestFunction: WeakMap<Mocha.AsyncFunc, number>;
    state: ExtendedState | undefined;
    fn: Mocha.AsyncFunc;
    label: string;
    suite?: Mocha.Suite;
    actualTimeout: number;
    originalContextTimeout: number;
    private constructor();
    static instrument(fn: Mocha.AsyncFunc, label: string, suite?: Mocha.Suite): (this: Mocha.Context) => Promise<void>;
}
export {};
