import { type MaybePromise } from '@augment-vir/common';
import { type Download, type Page } from '@playwright/test';
import { type RequireExactlyOne } from 'type-fest';
import { type UniversalTestContext } from '../augments/universal-testing-suite/universal-test-context.js';
/**
 * Output from {@link handleNewPageOrDownload}.
 *
 * @category Internal
 */
export type HandleNewPageOrDownloadResult = RequireExactlyOne<{
    newPage: Page;
    download: Download;
}>;
/**
 * Run the trigger and catch a new page _or_ a new download (sometimes Playwright inconsistently
 * chooses on or the other).
 *
 * @category Internal
 */
export declare function handleNewPageOrDownload(testContext: Readonly<UniversalTestContext>, trigger: () => MaybePromise<void>): Promise<HandleNewPageOrDownloadResult>;
