// Type definitions for tarantool-driver 3.0 // Project: https://github.com/tarantool/node-tarantool-driver // Definitions by: Evgeni Zharkov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import { EventEmitter } from "events"; declare namespace TarantoolConnection { interface TarantoolOptions { host?: string; port?: number; username?: string; password?: string; reserveHosts?: string[]; beforeReserve?: number; timeout?: number; retryStrategy?: (times: number) => number; lazyConnect?: boolean; } } declare class TarantoolConnection extends EventEmitter { constructor(options: TarantoolConnection.TarantoolOptions); /* Connection */ connect(): Promise; flushQueue(cb: (err: Error) => void): void; destroy(): void; disconnect(reconnect?: boolean): void; /* Commands */ select(spaceId: number | string, indexId: number | string, limit: number, offset: number, iterator: string, key: any[]): Promise; delete(spaceId: number | string, indexId: number | string, key: any[]): Promise; update(spaceId: number | string, indexId: number | string, key: any[], ops: any[]): Promise; upsert(spaceId: number | string, ops: any[], tuple: any[]): Promise; eval(expression: string, ...args: any[]): Promise; call(functionName: string, ...args: any[]): Promise; insert(spaceId: number | string, tuple: any[]): Promise; replace(spaceId: number | string, tuple: any[]): Promise; } export = TarantoolConnection;