/**
 * 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 type { ChannelOwner } from './channelOwner';
import type * as channels from '@protocol/channels';
import type { EventEmitter } from 'events';
export declare class Waiter {
    private _dispose;
    private _failures;
    private _immediateError?;
    private _logs;
    private _channelOwner;
    private _waitId;
    private _error;
    private _savedZone;
    constructor(channelOwner: ChannelOwner<channels.EventTargetChannel>, event: string);
    static createForEvent(channelOwner: ChannelOwner<channels.EventTargetChannel>, event: string): Waiter;
    waitForEvent<T = void>(emitter: EventEmitter, event: string, predicate?: (arg: T) => boolean | Promise<boolean>): Promise<T>;
    rejectOnEvent<T = void>(emitter: EventEmitter, event: string, error: Error | (() => Error), predicate?: (arg: T) => boolean | Promise<boolean>): void;
    rejectOnTimeout(timeout: number, message: string): void;
    rejectImmediately(error: Error): void;
    dispose(): void;
    waitForPromise<T>(promise: Promise<T>, dispose?: () => void): Promise<T>;
    log(s: string): void;
    private _rejectOn;
}
//# sourceMappingURL=waiter.d.ts.map