Thank you for your feedback. Your suggestion will result in the following error:
Conversion of type '{ putObject: jest.Mock; }' to type 'S3' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Type '{ putObject: Mock; }' is missing the following properties from type 'S3': config, abortMultipartUpload, completeMultipartUpload, copyObject, and 98 more.ts(2352)
But this can be remedied by casting to unknown first:
I opted for the Pick solution as it actually changes the interface of the object to be more concise and more explicit about what part of the object is actually required.
I think this mostly will come down to preference.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thank you for your feedback. Your suggestion will result in the following error:
But this can be remedied by casting to
unknown
first:I opted for the
Pick
solution as it actually changes the interface of the object to be more concise and more explicit about what part of the object is actually required.I think this mostly will come down to preference.