Skip to content

Add missing AMQPGeneratorConsumer export#178

Closed
Copilot wants to merge 0 commit intomainfrom
copilot/add-missing-exports
Closed

Add missing AMQPGeneratorConsumer export#178
Copilot wants to merge 0 commit intomainfrom
copilot/add-missing-exports

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 27, 2025

AMQPGeneratorConsumer was not exported from the package, preventing users from typing their code correctly when using the async generator consumer pattern.

Changes

  • Export AMQPGeneratorConsumer alongside AMQPConsumer from ./amqp-consumer.js in src/index.ts

Usage

import { AMQPGeneratorConsumer } from "@cloudamqp/amqp-client"

const consumer: AMQPGeneratorConsumer = await queue.subscribeGenerator({ noAck: false })
for await (const msg of consumer.messages) {
  // typed correctly
}
Original prompt

This section details on the original issue you should resolve

<issue_title>Add missing exports</issue_title>
<issue_description>Currently the AMQPGeneratorConsumer isn't exported.
For better typing it would be necessary to export it as well.

The index.ts needs to be adapted like that:

export { AMQPClient } from "./amqp-socket-client.js"
export { AMQPWebSocketClient } from "./amqp-websocket-client.js"
export { AMQPChannel, QueueOk, MessageCount, QueueParams, ExchangeParams, ConsumeParams } from "./amqp-channel.js"
export { AMQPQueue } from "./amqp-queue.js"
export { AMQPConsumer, AMQPGeneratorConsumer } from "./amqp-consumer.js" // Add the export here!
export { AMQPError } from "./amqp-error.js"
export { AMQPMessage } from "./amqp-message.js"
export { AMQPProperties, Field } from "./amqp-properties.js"
export { AMQPTlsOptions } from "./amqp-tls-options.js"

```</issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add export for AMQPGeneratorConsumer in index.ts Add missing AMQPGeneratorConsumer export Nov 27, 2025
Copilot AI requested a review from baelter November 27, 2025 20:50
@baelter baelter closed this Nov 27, 2025
@baelter baelter force-pushed the copilot/add-missing-exports branch from a93612e to eb78699 Compare November 27, 2025 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add missing exports

2 participants