import { ProtocolMapping } from 'devtools-protocol/types/protocol-mapping'; import Protocol from 'devtools-protocol'; import ITypedEventEmitter from './ITypedEventEmitter'; import { FilterFlags, FilterOutFlags } from './AllowedNames'; export declare type DevtoolsEvents = { [Key in keyof ProtocolMapping.Events]: ProtocolMapping.Events[Key][0]; } & { disconnected: void; }; declare type DevtoolsCommandParams = { [Key in keyof ProtocolMapping.Commands]: ProtocolMapping.Commands[Key]['paramsType'][0]; }; declare type OptionalParamsCommands = keyof FilterFlags; declare type RequiredParamsCommands = keyof FilterOutFlags; export default interface IDevtoolsSession extends Omit, 'waitOn'> { id: string; send(method: T, params: DevtoolsCommandParams[T], sendInitiator?: object): Promise; send(method: T, params?: DevtoolsCommandParams[T], sendInitiator?: object): Promise; onMessage(object: IDevtoolsResponseMessage & IDevtoolsEventMessage): void; } export { Protocol }; export interface IDevtoolsResponseMessage { sessionId: string; id: number; error?: { message: string; data: any; }; result?: any; timestamp: Date; } export interface IDevtoolsEventMessage { sessionId: string; method: string; params: any; timestamp: Date; }