Skip to content

Commit 392e921

Browse files
chore: add missing comments for documentation
1 parent c031e1e commit 392e921

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/types.ts

+15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import { SQSClient, Message, QueueAttributeName } from '@aws-sdk/client-sqs';
22

3+
/**
4+
* The options for the consumer.
5+
*/
36
export interface ConsumerOptions {
47
/**
58
* The SQS queue URL.
@@ -139,12 +142,18 @@ export interface ConsumerOptions {
139142
postReceiveMessageCallback?(): Promise<void>;
140143
}
141144

145+
/**
146+
* A subset of the ConsumerOptions that can be updated at runtime.
147+
*/
142148
export type UpdatableOptions =
143149
| 'visibilityTimeout'
144150
| 'batchSize'
145151
| 'waitTimeSeconds'
146152
| 'pollingWaitTimeMs';
147153

154+
/**
155+
* The options for the stop method.
156+
*/
148157
export interface StopOptions {
149158
/**
150159
* Default to `false`, if you want the stop action to also abort requests to SQS
@@ -154,6 +163,9 @@ export interface StopOptions {
154163
abort?: boolean;
155164
}
156165

166+
/**
167+
* These are the events that the consumer emits.
168+
*/
157169
export interface Events {
158170
/**
159171
* Fired after one batch of items (up to `batchSize`) has been successfully processed.
@@ -212,6 +224,9 @@ export interface Events {
212224
waiting_for_polling_to_complete_timeout_exceeded: [];
213225
}
214226

227+
/**
228+
* The error object that is emitted with error events from AWS.
229+
*/
215230
export type AWSError = {
216231
/**
217232
* Name, eg. ConditionalCheckFailedException

0 commit comments

Comments
 (0)