Skip to content

Commit

Permalink
Export event types for use with abstract Client class
Browse files Browse the repository at this point in the history
Without exported event types, they must be duplicated in dependant code to correctly use the abstract `Client` class.
  • Loading branch information
Tapppi authored Jun 25, 2024
1 parent f594d11 commit 43e980f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 43e980f

Please sign in to comment.