-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
Observed behavior
When calling consumer.fetch() the returned value becomes of any type.
I see that the consumer.fetch() is defined to return Promise<ConsumerMessages> in jetstream/src/types.ts and ConsumerMessage is defined as QueuedIterator<JsMsg>
export type ExportedConsumer = ConsumerKind & {
fetch(opts?: FetchOptions): Promise<ConsumerMessages>;
};
export type ConsumerMessages = QueuedIterator<JsMsg> & Close & {
status(): AsyncIterable<ConsumerNotification>;
};However when importing @nats-io/jetstream in my code, the return value of consumer.fetch() gets erased to any, see attached screenshots from my IDE
Expected behavior
The return value of consumer.fetch() should be "ConsumerMessages"
Server and client version
@nats-io/jetstream version 3.2.0
Host environment
No response
Steps to reproduce
No response
mpeterdev
Metadata
Metadata
Assignees
Labels
No labels