UNPKG

node-beanstalk

Version:

The most comprehensive beanstalk client for nodejs

20 lines (19 loc) 813 B
/// <reference types="node" /> import { BeanstalkCommand, BeanstalkResponseStatus, ICommandHandledResponse, ICommandResponse, Serializer } from './types'; export interface ICommandCtorOptions<R extends BeanstalkResponseStatus = BeanstalkResponseStatus> { payloadBody?: boolean; yamlBody?: boolean; expectedStatus?: readonly R[]; } export declare class Command<R extends BeanstalkResponseStatus = BeanstalkResponseStatus> { private readonly commandName; private readonly opt; constructor(commandName: BeanstalkCommand, opt?: ICommandCtorOptions<R>); /** * Build command as buffer * * @private */ buildCommandBuffer(args?: string[], payload?: Buffer): Buffer; handleResponse(response: ICommandResponse, serializer?: Serializer): ICommandHandledResponse<R>; }