import { EventEmitter } from 'node:events'; import { Transport } from '../utils/transport'; import { Logger } from '../utils/logger'; import { VimValue } from '../types/VimValue'; export interface BaseConstructorOptions { transport: Transport; logger?: Logger; data?: Buffer; metadata?: any; client?: any; } declare const DO_REQUEST: unique symbol; export declare class BaseApi extends EventEmitter { protected transport: Transport; protected _isReady: Promise; protected prefix: string; logger: Logger; data?: Buffer | number; protected client: any; constructor({ transport, data, logger, metadata, client }: BaseConstructorOptions); equals(other: BaseApi): boolean; [DO_REQUEST]: (name: string, args?: any[]) => Promise; asyncRequest(name: string, args?: any[]): Promise; /** Sends a request to Nvim (the peer). */ request(name: string, args?: any[]): Promise; _getArgsByPrefix(...args: any[]): any[]; /** Retrieves a scoped variable depending on type (using `this.prefix`) */ getVar(name: string): Promise; /** Set a scoped variable */ setVar(name: string, value: VimValue): Promise; /** Delete a scoped variable */ deleteVar(name: string): Promise; /** Retrieves a scoped option depending on type of `this` */ getOption(name: string): Promise | void; /** Set scoped option */ setOption(name: string, value: VimValue): Promise | void; /** `request` is basically the same except you can choose to wait forpromise to be resolved */ notify(name: string, args: any[]): void; } export {};