-
Notifications
You must be signed in to change notification settings - Fork 90
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
feat: enable ctor arg passthrough for requestHandler #1167
Conversation
@@ -253,11 +253,13 @@ private void generateClientDefaults() { | |||
|
|||
writer.writeDocs("@public") | |||
.openBlock("export interface ClientDefaults\n" | |||
+ " extends Partial<__SmithyResolvedConfiguration<$T>> {", "}", | |||
+ " extends Partial<__SmithyConfiguration<$T>> {", "}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ClientDefaults is on the input side, and should not have been assigned the ResolvedConfig version of "SmithyConfiguration". This correction is backwards compatible.
bc0e30d
to
538ac0e
Compare
538ac0e
to
abddf1e
Compare
MiddlewareStack, | ||
NodeHttpHandlerOptions, | ||
RequestHandler, | ||
} from "@smithy/types"; | ||
|
||
/** | ||
* @public | ||
*/ | ||
export interface SmithyConfiguration<HandlerOptions> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an input config corresponding to the resolved config below. So, it can be loosened.
SDK Clients' requestHandler field can now accept constructor parameters instead of needing the constructor call itself. See smithy-lang/smithy-typescript#1167.
This implements step 3 of the following progression mentioned earlier in #1165.
Simplifying provision of custom settings to the requestHandler.
Previously:
Step 2 (implemented):
Step 3 (this PR):
AWS SDK sample diff in aws/aws-sdk-js-v3#5820