Skip to content

Commit

Permalink
Allow null in consumer commitSync typings (#1082)
Browse files Browse the repository at this point in the history
KafkaConsumer incorrectly requires that commitSync be supplied with a TopicPartitionOffset or an array of TopicPartitionOffsets, when docs say that null can be passed to commit all read offsets.
  • Loading branch information
Tapppi authored Jul 16, 2024
1 parent 020db59 commit eb73d5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ export class KafkaConsumer extends Client<KafkaConsumerEvents> {

commitMessageSync(msg: TopicPartitionOffset): this;

commitSync(topicPartition: TopicPartitionOffset | TopicPartitionOffset[]): this;
commitSync(topicPartition: TopicPartitionOffset | TopicPartitionOffset[] | null): this;

committed(toppars: TopicPartition[], timeout: number, cb: (err: LibrdKafkaError, topicPartitions: TopicPartitionOffset[]) => void): this;
committed(timeout: number, cb: (err: LibrdKafkaError, topicPartitions: TopicPartitionOffset[]) => void): this;
Expand Down

0 comments on commit eb73d5b

Please sign in to comment.