From d336699fedfa74c1706a7096313fac7c8e97c632 Mon Sep 17 00:00:00 2001 From: Tapani Moilanen Date: Tue, 16 Jul 2024 20:25:25 +0300 Subject: [PATCH] Export event types for use with abstract Client class (#1083) Without exported event types, they must be duplicated in dependant code to correctly use the abstract `Client` class. --- index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.d.ts b/index.d.ts index ece3c531..43bedfc9 100644 --- a/index.d.ts +++ b/index.d.ts @@ -142,9 +142,9 @@ export interface ConsumerStream extends Readable { close(cb?: () => void): void; } -type KafkaClientEvents = 'disconnected' | 'ready' | 'connection.failure' | 'event.error' | 'event.stats' | 'event.log' | 'event.event' | 'event.throttle'; -type KafkaConsumerEvents = 'data' | 'partition.eof' | 'rebalance' | 'rebalance.error' | 'subscribed' | 'unsubscribed' | 'unsubscribe' | 'offset.commit' | KafkaClientEvents; -type KafkaProducerEvents = 'delivery-report' | KafkaClientEvents; +export type KafkaClientEvents = 'disconnected' | 'ready' | 'connection.failure' | 'event.error' | 'event.stats' | 'event.log' | 'event.event' | 'event.throttle'; +export type KafkaConsumerEvents = 'data' | 'partition.eof' | 'rebalance' | 'rebalance.error' | 'subscribed' | 'unsubscribed' | 'unsubscribe' | 'offset.commit' | KafkaClientEvents; +export type KafkaProducerEvents = 'delivery-report' | KafkaClientEvents; type EventListenerMap = { // ### Client