/**
 * 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 { EventEmitter } from './eventEmitter';
import type { ClientInstrumentation } from './clientInstrumentation';
import type { Connection } from './connection';
import type { Logger } from './types';
import type * as channels from '@protocol/channels';
type Listener = (...args: any[]) => void;
export declare abstract class ChannelOwner<T extends channels.Channel = channels.Channel> extends EventEmitter {
    readonly _connection: Connection;
    private _parent;
    private _objects;
    readonly _type: string;
    readonly _guid: string;
    readonly _channel: T;
    readonly _initializer: channels.InitializerTraits<T>;
    _logger: Logger | undefined;
    readonly _instrumentation: ClientInstrumentation;
    private _eventToSubscriptionMapping;
    _wasCollected: boolean;
    constructor(parent: ChannelOwner | Connection, type: string, guid: string, initializer: channels.InitializerTraits<T>);
    _setEventToSubscriptionMapping(mapping: Map<string, string>): void;
    private _updateSubscription;
    on(event: string | symbol, listener: Listener): this;
    addListener(event: string | symbol, listener: Listener): this;
    prependListener(event: string | symbol, listener: Listener): this;
    off(event: string | symbol, listener: Listener): this;
    removeListener(event: string | symbol, listener: Listener): this;
    _adopt(child: ChannelOwner<any>): void;
    _dispose(reason: 'gc' | undefined): void;
    _debugScopeState(): any;
    private _validatorToWireContext;
    private _createChannel;
    _wrapApiCall<R>(func: (apiZone: ApiZone) => Promise<R>, options?: {
        internal?: boolean;
        title?: string;
    }): Promise<R>;
    private toJSON;
}
type ApiZone = {
    apiName: string;
    frames: channels.StackFrame[];
    title?: string;
    internal?: boolean;
    reported: boolean;
    userData: any;
    stepId?: string;
    error?: Error;
};
export {};
//# sourceMappingURL=channelOwner.d.ts.map