Skip to content

Commit 38e1f20

Browse files
AllanZhengYPmtdowling
authored andcommitted
fix unused imports and outdated code
1 parent a46f985 commit 38e1f20

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/CommandGenerator.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ public void run() {
8585

8686
// Add required imports.
8787
writer.addImport(configType, configType, serviceSymbol.getNamespace());
88-
writer.addImport("ServiceInputTypes", "ServiceInputTypes", serviceSymbol.getNamespace());
89-
writer.addImport("ServiceOutputTypes", "ServiceOutputTypes", serviceSymbol.getNamespace());
9088
writer.addImport("Command", "$Command", "@aws-sdk/smithy-client");
9189
writer.addImport("FinalizeHandlerArguments", "FinalizeHandlerArguments", "@aws-sdk/types");
9290
writer.addImport("Handler", "Handler", "@aws-sdk/types");

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/ServiceGenerator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,8 @@ private void generateClientDefaults() {
179179
}
180180

181181
writer.openBlock("export interface ClientDefaults\n"
182-
+ " extends Partial<SmithyResolvedConfiguration<__HttpOptions>> {", "}", () -> {
182+
+ " extends Partial<__SmithyResolvedConfiguration<$T>> {", "}",
183+
applicationProtocol.getOptionsType(), () -> {
183184
writer.addImport("HttpHandler", "__HttpHandler", "@aws-sdk/protocol-http");
184185
writer.writeDocs("The HTTP handler to use. Fetch in browser and Https in Nodejs.");
185186
writer.write("requestHandler?: __HttpHandler;\n");

smithy-typescript-codegen/src/main/resources/software/amazon/smithy/typescript/codegen/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"noEmitHelpers": true,
1111
"incremental": true,
1212
"resolveJsonModule": true,
13+
"noUnusedLocals": true,
1314
"declarationDir": "./types"
1415
},
1516
"typedocOptions": {

0 commit comments

Comments
 (0)