Closed trivikr closed 2 months ago
Export NativeAttributeValue from @aws-sdk/lib-dynamodb
When working with any types which take NativeAttributeValue in lib-dynamodb, they need to be imported from util-dynamodb
NativeAttributeValue
util-dynamodb
Example:
import { DynamoDB } from "@aws-sdk/client-dynamodb"; import { DynamoDBDocument } from "@aws-sdk/lib-dynamodb"; import { NativeAttributeValue } from "@aws-sdk/util-dynamodb"; const ddbClient = new DynamoDB({}); const ddbDocClient = DynamoDBDocument.from(ddbClient); const key: Record<string, NativeAttributeValue> = {};
Re-export NativeAttributeValue from lib-dynamodb so that it can be imported from there
lib-dynamodb
import { DynamoDB } from "@aws-sdk/client-dynamodb"; import { DynamoDBDocument, NativeAttributeValue } from "@aws-sdk/lib-dynamodb"; const ddbClient = new DynamoDB({}); const ddbDocClient = DynamoDBDocument.from(ddbClient); const key: Record<string, NativeAttributeValue> = {};
Noticed in https://github.com/aws/aws-sdk-js-codemod/issues/824
3.549.0
TypeScript on any JavaScript runtime
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.
Describe the feature
Export NativeAttributeValue from @aws-sdk/lib-dynamodb
Use Case
When working with any types which take
NativeAttributeValue
in lib-dynamodb, they need to be imported fromutil-dynamodb
Example:
Proposed Solution
Re-export
NativeAttributeValue
fromlib-dynamodb
so that it can be imported from thereOther Information
Noticed in https://github.com/aws/aws-sdk-js-codemod/issues/824
Acknowledgements
SDK version used
3.549.0
Environment details (OS name and version, etc.)
TypeScript on any JavaScript runtime