You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Because of the limitation of TS, 2 classes with the same signature but with private member variables are not assignable. In V3 SDK the situation happens a lot. For example, when users import client-s3@1.0.0 that depends on middleware-stack@1.0.0, and s3-request-presigner@1.0.0 that depends on middleware-stack@2.0.0, they import difference version of dependency middleware-stack. Then NPM will install to difference MiddlewareStack class. Because they both contain private members, middleware instantiated from each class are not assignable.
This will be a problem whenever 2 middleware stack need to interact, like merging. So user will see TS errors when presign an S3 request with incompatible S3 client and S3 presigner version. See #1365
Describe the solution you'd like
Get rid of private variables/methods by:
make them public
convert the class implementation of MiddlewareStack to be pure functional.
The text was updated successfully, but these errors were encountered:
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.
Is your feature request related to a problem? Please describe.
Because of the limitation of TS, 2 classes with the same signature but with private member variables are not assignable. In V3 SDK the situation happens a lot. For example, when users import
client-s3@1.0.0
that depends onmiddleware-stack@1.0.0
, ands3-request-presigner@1.0.0
that depends onmiddleware-stack@2.0.0
, they import difference version of dependencymiddleware-stack
. Then NPM will install to differenceMiddlewareStack
class. Because they both contain private members, middleware instantiated from each class are not assignable.This will be a problem whenever 2 middleware stack need to interact, like merging. So user will see TS errors when presign an S3 request with incompatible S3 client and S3 presigner version. See #1365
Describe the solution you'd like
Get rid of private variables/methods by:
public
MiddlewareStack
to be pure functional.The text was updated successfully, but these errors were encountered: