Skip to content

Commit

Permalink
Export event types for use with abstract Client class (#1083)
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 Jul 16, 2024
1 parent eb73d5b commit d336699
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 d336699

Please sign in to comment.