Skip to content

Commit

Permalink
chore: updating types
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasgriffintn committed Nov 24, 2023
1 parent a12cada commit 6e9b93d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/consumer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class Consumer extends TypedEventEmitter {
private postReceiveMessageCallback?: () => Promise<void>;
private sqs: SQSClient;
private handleMessageTimeout: number;
private attributeNames: string[];
private attributeNames: QueueAttributeName[];
private messageAttributeNames: string[];
private shouldDeleteMessages: boolean;
private batchSize: number;
Expand Down Expand Up @@ -199,7 +199,7 @@ export class Consumer extends TypedEventEmitter {
let currentPollingTimeout = this.pollingWaitTimeMs;
this.receiveMessage({
QueueUrl: this.queueUrl,
AttributeNames: this.attributeNames as QueueAttributeName[],
AttributeNames: this.attributeNames,
MessageAttributeNames: this.messageAttributeNames,
MaxNumberOfMessages: this.batchSize,
WaitTimeSeconds: this.waitTimeSeconds,
Expand Down
4 changes: 2 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SQSClient, Message } from '@aws-sdk/client-sqs';
import { SQSClient, Message, QueueAttributeName } from '@aws-sdk/client-sqs';

export interface ConsumerOptions {
/**
Expand All @@ -10,7 +10,7 @@ export interface ConsumerOptions {
* `['All', 'ApproximateFirstReceiveTimestamp', 'ApproximateReceiveCount']`).
* @defaultvalue `[]`
*/
attributeNames?: string[];
attributeNames?: QueueAttributeName[];
/**
* List of message attributes to retrieve (i.e. `['name', 'address']`).
* @defaultvalue `[]`
Expand Down

0 comments on commit 6e9b93d

Please sign in to comment.