-
Notifications
You must be signed in to change notification settings - Fork 40
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
Breaking Change with AwsStub v 2.2.0 through the introduction of the TConfiguration type #167
Comments
Hey, sorry for that. let snsMock: AwsClientStub<SNSClient>;
snsMock = mockClient(SNSClient); Although I know that's not mentioned in the README. I will improve the docs regarding this. Please let me know if that solves your issue. |
I've tried a few more things but we still have the same issue. Maybe I can provide more context. We have something similar to the following
This obviously breaks since the
This returns the following on runtime
This seems to be because the type returned by the A temporary solution is to leave my original code and set the 3rd parameter to |
Just to let you know I'm looking into that:
Ideally, the While I agree this is an unexpected breaking change, releasing a patch with a rollback would cause more chaos. Especially that The workaround, for now, is to use |
After spending another evening on this, my recommendation is to:
I can't get rid of type errors between I'm leaving this open, but I don't plan anything better soon simply because I have no further ideas at the moment. |
Thank you for your effort on this issue. I think leaving it open with the suggested solution is a decent enough 'conclusion'. Thank you :) |
Hi, I had the same issue when upgrading to This thread saved me a lot of time, thanks to both of you! |
Following solution outlined in this thread: m-radzikowski/aws-sdk-client-mock#167 Does not appear to cause any further issues with the Typescript
Checklist
Bug description
V2.2.0 changes the required types for the AwsStub through the introduction of the TConfiguration type. However, it is not clear to me what I need to set there. The only part I found in the documentation regarding this parameter is the following
Can we get a bit more information of what is meant to be set for this type parameter please?
Reproduction
s3Client: AwsStub<ServiceInputTypes, ServiceOutputTypes>,
Environment
The text was updated successfully, but these errors were encountered: