/**
* @license
* Copyright 2017 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/
///
///
///
///
import type FS from 'fs/promises';
import { Buffer } from 'node:buffer';
import type { OperatorFunction } from '../../third_party/rxjs/rxjs.js';
import { Observable } from '../../third_party/rxjs/rxjs.js';
import type { CDPSession } from '../api/CDPSession.js';
import type { EventEmitter, EventType } from './EventEmitter.js';
import type { ParsedPDFOptions, PDFOptions } from './PDFOptions.js';
/**
* @internal
*/
export declare const debugError: (...args: unknown[]) => void;
/**
* @internal
*/
export declare const DEFAULT_VIEWPORT: Readonly<{
width: 800;
height: 600;
}>;
/**
* @internal
*/
export declare class PuppeteerURL {
#private;
static INTERNAL_URL: string;
static fromCallSite(functionName: string, site: NodeJS.CallSite): PuppeteerURL;
static parse: (url: string) => PuppeteerURL;
static isPuppeteerURL: (url: string) => boolean;
get functionName(): string;
get siteString(): string;
toString(): string;
}
/**
* @internal
*/
export declare const withSourcePuppeteerURLIfNone: (functionName: string, object: T) => T;
/**
* @internal
*/
export declare const getSourcePuppeteerURLIfAvailable: (object: T) => PuppeteerURL | undefined;
/**
* @internal
*/
export declare const isString: (obj: unknown) => obj is string;
/**
* @internal
*/
export declare const isNumber: (obj: unknown) => obj is number;
/**
* @internal
*/
export declare const isPlainObject: (obj: unknown) => obj is Record;
/**
* @internal
*/
export declare const isRegExp: (obj: unknown) => obj is RegExp;
/**
* @internal
*/
export declare const isDate: (obj: unknown) => obj is Date;
/**
* @internal
*/
export declare function evaluationString(fun: Function | string, ...args: unknown[]): string;
/**
* @internal
*/
export declare function importFSPromises(): Promise;
/**
* @internal
*/
export declare function getReadableAsBuffer(readable: ReadableStream, path?: string): Promise;
/**
* @internal
*/
/**
* @internal
*/
export declare function getReadableFromProtocolStream(client: CDPSession, handle: string): Promise>;
/**
* @internal
*/
export declare function validateDialogType(type: string): 'alert' | 'confirm' | 'prompt' | 'beforeunload';
/**
* @internal
*/
export declare function timeout(ms: number, cause?: Error): Observable;
/**
* @internal
*/
export declare const UTILITY_WORLD_NAME: string;
/**
* @internal
*/
export declare const SOURCE_URL_REGEX: RegExp;
/**
* @internal
*/
export declare function getSourceUrlComment(url: string): string;
/**
* @internal
*/
export declare const NETWORK_IDLE_TIME = 500;
/**
* @internal
*/
export declare function parsePDFOptions(options?: PDFOptions, lengthUnit?: 'in' | 'cm'): ParsedPDFOptions;
/**
* @internal
*/
export declare const unitToPixels: {
px: number;
in: number;
cm: number;
mm: number;
};
/**
* @internal
*/
export declare function fromEmitterEvent, Event extends keyof Events>(emitter: EventEmitter, eventName: Event): Observable;
/**
* @internal
*/
export declare function fromAbortSignal(signal?: AbortSignal, cause?: Error): Observable;
/**
* @internal
*/
export declare function filterAsync(predicate: (value: T) => boolean | PromiseLike): OperatorFunction;
//# sourceMappingURL=util.d.ts.map