-
Notifications
You must be signed in to change notification settings - Fork 637
Closed
Labels
bugThis issue is a bug.This issue is a bug.p3This is a minor priority issueThis is a minor priority issue
Description
Checkboxes for prior research
- I've gone through Developer Guide and API reference
- I've checked AWS Forums and StackOverflow.
- I've searched for previous similar issues and didn't find any solution.
Describe the bug
error TS2345: Argument of type 'DeleteMessageCommand' is not assignable to parameter of type 'Command<ServiceInputTypes, DeleteMessageCommandInput, ServiceOutputTypes, ServiceOutputTypes, SmithyResolvedConfiguration<...>>'.
The types of 'middlewareStack.concat' are incompatible between these types.
Type '<InputType extends DeleteMessageCommandInput, OutputType extends DeleteMessageCommandOutput>(from: MiddlewareStack<InputType, OutputType>) => MiddlewareStack<...>' is not assignable to type '<InputType extends DeleteMessageCommandInput, OutputType extends ServiceOutputTypes>(from: MiddlewareStack<InputType, OutputType>) => MiddlewareStack<...>'.
Types of parameters 'from' and 'from' are incompatible.
Type 'MiddlewareStack<InputType, OutputType>' is not assignable to type 'MiddlewareStack<InputType, DeleteMessageCommandOutput>'.
Types of property 'addRelativeTo' are incompatible.
Type '(middleware: MiddlewareType<InputType, OutputType>, options: RelativeMiddlewareOptions) => void' is not assignable to type '(middleware: MiddlewareType<InputType, DeleteMessageCommandOutput>, options: RelativeMiddlewareOptions) => void'.
Types of parameters 'middleware' and 'middleware' are incompatible.
Type 'MiddlewareType<InputType, DeleteMessageCommandOutput>' is not assignable to type 'MiddlewareType<InputType, OutputType>'.
Type 'InitializeMiddleware<InputType, DeleteMessageCommandOutput>' is not assignable to type 'MiddlewareType<InputType, OutputType>'.
Type 'InitializeMiddleware<InputType, DeleteMessageCommandOutput>' is not assignable to type 'InitializeMiddleware<InputType, OutputType>'.
Call signature return types 'InitializeHandler<InputType, DeleteMessageCommandOutput>' and 'InitializeHandler<InputType, OutputType>' are incompatible.
Type 'Promise<InitializeHandlerOutput<DeleteMessageCommandOutput>>' is not assignable to type 'Promise<InitializeHandlerOutput<OutputType>>'.
Type 'InitializeHandlerOutput<DeleteMessageCommandOutput>' is not assignable to type 'InitializeHandlerOutput<OutputType>'.
Types of property 'output' are incompatible.
Type 'DeleteMessageCommandOutput' is not assignable to type 'OutputType'.
'DeleteMessageCommandOutput' is assignable to the constraint of type 'OutputType', but 'OutputType' could be instantiated with a different subtype of constraint 'ServiceOutputTypes'.
96 new DeleteMessageCommand({
~~~~~~~~~~~~~~~~~~~~~~~~~~
97 QueueUrl: envVars.SQS_NOTIFICATIONS_URL,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
98 ReceiptHandle: record.receiptHandle
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
99 })
~~~~~~~~~~~~
Found 1 error in functions/notifications.ts:96
SDK version number
"@aws-sdk/client-sqs": "^3.485.0",
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
does not matter
Reproduction Steps
await sqsClient.send(
// we need to delete the message from the queue after we process it to avoid duplicate emails when lambda fails with a batch
new DeleteMessageCommand({
QueueUrl: envVars.SQS_NOTIFICATIONS_URL,
ReceiptHandle: record.receiptHandle
})
)
Observed Behavior
type error is raised by TS compiler
Expected Behavior
no type error is raised by TS compiler
Possible Solution
downgrading to previous release
Additional Information/Context
No response
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.p3This is a minor priority issueThis is a minor priority issue