-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect Typescript type for DynamoDB StringSetAttributeValue #3627
Comments
Hey @Nevon thanks for opening this issue, the Typescript definitions were added late to the SDK, while I am not sure when this will be fixed in this SDK, The version 3.x of the AWS SDK for JavaScript is generally available. The V3 is written in TypeScript to provide type safety, while Please let us know you feel about using V3 for your application. |
This issue has not received a response in 1 week. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing. |
This is true, but migrating from aws-sdk v2 to v3 is unfortunately not as simple as a single method call for non-trivial systems. Eventually we will of course migrate over, but seeing as how v2 is still supported and even baked into the NodeJS lambda runtimes by default, it doesn't seem like too much to ask that the Typescript types be updated to be correct. |
@Nevon apologies for late reply here V3 was able to have the full implementation of all the DynamoDb functions, with that being said, I believe you are right but since its already fixed in V3 of the SDK it takes less of a priority. We welcome PRs in case you wanna open one but I am not sure about the priority for this mostly because V3 was intended to solve this problem. |
Greetings! We’re closing this issue because it has been open a long time and hasn’t been updated in a while and may not be getting the attention it deserves. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to comment or open a new issue. |
This is still an issue |
Greetings! We’re closing this issue because it has been open a long time and hasn’t been updated in a while and may not be getting the attention it deserves. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to comment or open a new issue. |
Confirm by changing [ ] to [x] below to ensure that it's a bug:
Describe the bug
The Typescript type definition for a StringSetAttributeValue in a DynamoDB response is
string[]
:aws-sdk-js/lib/dynamodb/document_client.d.ts
Lines 2619 to 2620 in 1407405
But in reality, it's the DynamoDBSet type.
Is the issue in the browser/Node.js?
Browser & Node.js
If on Node.js, are you running this on AWS Lambda?
Yes, but it shouldn't matter.
Details of the browser/Node.js version
v14.15.1
SDK version number
2.580.0
To Reproduce (observed behavior)
Just do a get on an item with a StringSet. For example:
Expected behavior
I would expect that the
StringSetAttributeValue
would be something like aDynamoDBSet<string>
, not astring[]
. I assume the other set types have the same issue.The text was updated successfully, but these errors were encountered: