import { AbortSignal } from 'abort-controller';
import { RootCausePage } from './interfaces';
import { StartTestParams } from './attachInterfaces';
import { Page as PuppeteerPage, PageEventObj as PuppeteerPageEventObj } from 'puppeteer';
import { Page as PlaywrightPage, ChromiumBrowserContext, BrowserContext } from 'playwright';
import { TestSystemInfo, CodeLocationDetails, StepError } from '@testim/root-cause-types';
import { StackLineData, CallSite } from 'stack-utils';
export declare function captureStacktraceDetails(): {
    stackLines: StackLineData[];
    stacktrace: string;
};
export declare function testResultDirFromStartParams(startParams: StartTestParams): string;
export declare function constructTestInvocationResultDir(projectRoot: string, runId: string): string;
export declare function constructTestResultDir(projectRoot: string, runId: string, testId: string): string;
export declare function constructResultDir(projectRoot: string): string;
export declare function testUniqueIdentifierFromStartParams(startParams: {
    projectRoot: string;
    fullSuitePath: string;
    fullName: string;
}): string;
export declare function isNotPlaywrightPage(page: RootCausePage): page is PuppeteerPage;
export declare function isPlaywrightChromiumBrowserContext(context: BrowserContext): context is ChromiumBrowserContext;
export declare function getSystemInfoForPage(page: RootCausePage): Promise<TestSystemInfo>;
export declare function getSystemInfoForPlaywrightPage(page: PlaywrightPage): Promise<TestSystemInfo>;
export declare function getSystemInfoForPlaywrightChromiumPage(page: PlaywrightPage, context: ChromiumBrowserContext): Promise<TestSystemInfo>;
export declare function getSystemInfoForPuppeteerPage(page: PuppeteerPage): Promise<TestSystemInfo>;
export declare function guessOperatingSystemUserAgent(): {
    name: string;
    version: string;
};
export declare function assertNotNullOrUndefined<T>(value: T): void;
export declare function nonNullable<T>(value: T): value is NonNullable<T>;
export declare function sleep(time: number, abortSignal?: AbortSignal): Promise<void>;
export declare class AbortError extends Error {
    name: 'AbortError';
}
export declare function isAbortError(maybeAbortError: unknown): maybeAbortError is AbortError;
export declare function unknownValueThatIsProbablyErrorToStepError(probablyError: unknown): StepError;
export declare function jsonRemoveNoiseReviver(key: string, value: any): any;
export declare function jsonReduceNoiseReviver(key: string, value: any): any;
export declare function removeStringFromString(strToRemove: string, strToRemoveFrom: string): string;
export declare function readJsonTestSnapshotFile(filePath: string): Promise<any>;
export declare function removeStringFromStringAndParse(strToRemove: string, strToRemoveFrom: string, reviver?: ((this: any, key: string, value: any) => any) | undefined): any;
export declare function arrayFlat<T>(arr: T[][]): T[];
export declare function extractCodeLocationDetailsSync(userTestFile: string, workingDirectory: string): CodeLocationDetails;
export declare function isPromise(maybePromise: unknown): maybePromise is Promise<unknown>;
export declare function puppeteerAddEventReturnDisposer<TEventName extends keyof PuppeteerPageEventObj>(page: PuppeteerPage, eventName: TEventName, handler: (e: PuppeteerPageEventObj[TEventName], ...args: any[]) => unknown): () => void;
export declare function getSelfCallSiteFromStacktrace(howManyBack?: number): CallSite | null;
