Skip to content

Commit

Permalink
Make it possible to narrow between message types
Browse files Browse the repository at this point in the history
  • Loading branch information
Nevon committed Jun 28, 2022
1 parent c360613 commit e1b016e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,7 @@ interface MessageSetEntry {
attributes: number
offset: string
size: number
headers?: never
}

interface RecordBatchEntry {
Expand All @@ -647,6 +648,7 @@ interface RecordBatchEntry {
attributes: number
offset: string
headers: IHeaders
size?: never
}

export type KafkaMessage = MessageSetEntry | RecordBatchEntry
Expand Down

0 comments on commit e1b016e

Please sign in to comment.