/**
 * Copyright (c) Microsoft Corporation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import { ChannelOwner } from './channelOwner';
import { TargetClosedError } from './errors';
import type { BrowserContext } from './browserContext';
import type { Page } from './page';
import type * as structs from '../../types/structs';
import type * as api from '../../types/types';
import type * as channels from '@protocol/channels';
import type { WaitForEventOptions } from './types';
export declare class Worker extends ChannelOwner<channels.WorkerChannel> implements api.Worker {
    _page: Page | undefined;
    _context: BrowserContext | undefined;
    readonly _closedScope: any;
    private _closeReason;
    static fromNullable(worker: channels.WorkerChannel | undefined): Worker | null;
    static from(worker: channels.WorkerChannel): Worker;
    constructor(parent: ChannelOwner, type: string, guid: string, initializer: channels.WorkerInitializer);
    _closeErrorWithReason(): TargetClosedError;
    url(): string;
    evaluate<R, Arg>(pageFunction: structs.PageFunction<Arg, R>, arg?: Arg): Promise<R>;
    evaluateHandle<R, Arg>(pageFunction: structs.PageFunction<Arg, R>, arg?: Arg): Promise<structs.SmartHandle<R>>;
    waitForEvent(event: string, optionsOrPredicate?: WaitForEventOptions): Promise<any>;
    _disconnect(options?: {
        reason?: string;
    }): Promise<void>;
}
//# sourceMappingURL=worker.d.ts.map