/// import { MonkeyCallback } from '../util'; import { Socket } from 'net'; import Api from './api'; import { BaseCommand } from './command'; import { CommandQueue } from './commandqueue'; export declare class Monkey extends Api { queue: BaseCommand[]; private parser; private stream_; private timeout; get stream(): Socket; private sendInternal; sendAndParse(commands: string | string[], cb: MonkeyCallback, parser: (data: string | null) => T): this; /** * Writes commands to monkey stream. * @example * monkey.send('key event 24', (err, value, command) => {}); */ send(commands: string[] | string, cb: MonkeyCallback): this; protected hook(): void; on(event: 'error', listener: (err: Error) => void): this; on(event: 'end' | 'finish' | 'close', listener: () => void): this; private consume; connect(param: Socket): this; end(cb?: () => void): this; /** * Allows executing commands in a queue. * @example * monkey * .commandQueue() * .touchDown(100, 0) * .sleep(5) * .touchUp(100, 0) * .execute((err, values) => { * monkey.end(); * }); */ commandQueue(): CommandQueue; }