Skip to content

Commit

Permalink
Reexport all types from KafkaJS (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
dakota002 authored May 14, 2024
1 parent a5bbdc3 commit 4d78d7a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ CompressionCodecs[CompressionTypes.ZSTD] = () => {
}
}

export type KafkaConfig = {
type KafkaConfig = {
client_id: string
client_secret?: string
domain?: 'gcn.nasa.gov' | 'test.gcn.nasa.gov' | 'dev.gcn.nasa.gov'
} & Omit<BaseKafkaConfig, 'brokers'>

export type ConsumerConfig = Omit<BaseConsumerConfig, 'groupId'> &
type ConsumerConfig = Omit<BaseConsumerConfig, 'groupId'> &
Partial<Pick<BaseConsumerConfig, 'groupId'>>

export class Kafka extends BaseKafka {
class Kafka extends BaseKafka {
constructor({
client_id,
client_secret,
Expand Down Expand Up @@ -70,3 +70,6 @@ export class Kafka extends BaseKafka {
return super.consumer({ groupId, ...config })
}
}

export * from 'kafkajs'
export { Kafka, ConsumerConfig, KafkaConfig }

0 comments on commit 4d78d7a

Please sign in to comment.