diff --git a/types/kafka-node/index.d.ts b/types/kafka-node/index.d.ts index e5aa9cf0a8..71d1fd6728 100644 --- a/types/kafka-node/index.d.ts +++ b/types/kafka-node/index.d.ts @@ -3,6 +3,8 @@ // Definitions by: Daniel Imrie-Situnayake , Bill , Michael Haan , Amiram Korach // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/// + // # Classes export class Client { constructor(connectionString: string, clientId?: string, options?: ZKOptions, noBatchOptions?: AckBatchOptions, sslOptions?: any); @@ -88,24 +90,24 @@ export class Offset { } export class KeyedMessage { - constructor(key: string, message: string); + constructor(key: string, value: string | Buffer); } // # Interfaces export interface Message { - topic: string; - value: string; - offset?: number; - partition?: number; - highWaterOffset?: number; - key?: string; -} + topic: string; + value: string | Buffer; + offset?: number; + partition?: number; + highWaterOffset?: number; + key?: string; + } export interface ProducerOptions { - requireAcks?: number; - ackTimeoutMs?: number; - partitionerType?: number; + requireAcks?: number; + ackTimeoutMs?: number; + partitionerType?: number; } export interface KafkaClientOptions {