Open dmeehan1968 opened 2 months ago
Facing a similar issue, I'm basically trying to do something like this:
import { DynamoDBDocumentClient } from '@aws-sdk/lib-dynamodb';
import { mockClient } from 'aws-sdk-client-mock';
let dynamoDbDocumentClient: DynamoDBDocumentClient;
dynamoDbDocumentClient = mockClient(DynamoDBDocumentClient);
And I get the error Type 'AwsStub<ServiceInputTypes, ServiceOutputTypes, DynamoDBDocumentClientResolvedConfig>' is missing the following properties from type 'DynamoDBDocumentClient': config, destroy, middlewareStack
Dependencies:
"@aws-sdk/lib-dynamodb": "^3.650.0",
"aws-sdk-client-mock": "^4.0.1",
npm ls
shows @smithy/types@3.4.0
Checklist
Bug description
Relates to #197
I've tried all of the suggestions here but the reported type problem is always the same.
I can workaround the problem using the
as unknown as SQSCLient
override.Note that there is a conflict for @smithy/types in @aws-lambda-powertools/tracer, but even when following the steps in #197, removing the dependency or creating an override didn't resolve the issue.
I use Jetbrains PHPStorm 2024.2 EAP as my IDE.
Reproduction
Environment