In Typescript, SQS.CreateQueueCommand requires all queue attributes due to Attributes having type Record<QueueAttributeName, string> #5387
Labels
bug
This issue is a bug.
closing-soon
This issue will automatically close in 4 days unless further comments are made.
p1
This is a high priority issue
pending-release
This issue will be fixed by an approved PR that hasn't been released yet.
workaround-available
This issue has a work around available.
Checkboxes for prior research
Describe the bug
A simple code below:
gives TypeScript error as follows:
SDK version number
@aws-sdk/client-sqs@3.431.0
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
18.15.0
Reproduction Steps
Create a typescript file with the content above and run
tsc
. Use@aws-sdk/client-sqs
with version >=3.430.0.Observed Behavior
Typescript error that says as below:
Expected Behavior
This code should compile with Typescript.
Specifiying all the parameters is not required, it can be seen as, for example, here: https://docs.aws.amazon.com/cli/latest/reference/sqs/create-queue.html
This code didn't produce Typescript Error at least until 3.421.0.
Possible Solution
Maybe change the type of
Attributes
into something likePartial< Record<QueueAttributeName, string> >
?Additional Information/Context
Typescript 5.2.2
The text was updated successfully, but these errors were encountered: