diff --git a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/HttpProtocolTestGenerator.java b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/HttpProtocolTestGenerator.java index 6589546dd6c..0f6f027b95b 100644 --- a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/HttpProtocolTestGenerator.java +++ b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/HttpProtocolTestGenerator.java @@ -457,12 +457,6 @@ public Void arrayNode(ArrayNode node) { String openElement = "["; String closeElement = "]"; - // Handle sets needing to use the Set typing instead of standard array syntax. - if (workingShape.isSetShape()) { - openElement = "new Set(" + openElement; - closeElement = closeElement + ")"; - } - // Write the value out directly. writer.openBlock("$L\n", closeElement + ",\n", openElement, () -> { Shape wrapperShape = this.workingShape; diff --git a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/SymbolVisitor.java b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/SymbolVisitor.java index 415d2abdbf6..ac0446967f4 100644 --- a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/SymbolVisitor.java +++ b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/SymbolVisitor.java @@ -132,7 +132,7 @@ public Symbol listShape(ListShape shape) { @Override public Symbol setShape(SetShape shape) { Symbol reference = toSymbol(shape.getMember()); - return createSymbolBuilder(shape, format("Set<%s>", reference.getName()), null) + return createSymbolBuilder(shape, format("(%s)[]", reference.getName()), null) .addReference(reference) .build(); } diff --git a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/integration/DocumentShapeDeserVisitor.java b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/integration/DocumentShapeDeserVisitor.java index 472d2da7938..7a644ea9057 100644 --- a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/integration/DocumentShapeDeserVisitor.java +++ b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/integration/DocumentShapeDeserVisitor.java @@ -442,7 +442,7 @@ public final Void mapShape(MapShape shape) { * const deserializeAws_restJson1_1ParameterSet = ( * output: any, * context: SerdeContext - * ): Set => { + * ): Parameter[] => { * return (output || []).map((entry: any) => * deserializeAws_restJson1_1Parameter(entry, context) * ); diff --git a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/integration/DocumentShapeSerVisitor.java b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/integration/DocumentShapeSerVisitor.java index 003b463b4bf..7b9e83d1f87 100644 --- a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/integration/DocumentShapeSerVisitor.java +++ b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/integration/DocumentShapeSerVisitor.java @@ -437,7 +437,7 @@ public final Void mapShape(MapShape shape) { * *
{@code
      * const serializeAws_restJson1_1ParametersSet = (
-     *   input: Set,
+     *   input: Parameter[],
      *   context: SerdeContext
      * ): any => {
      *   return (input || []).map(entry =>
diff --git a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/integration/HttpBindingProtocolGenerator.java b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/integration/HttpBindingProtocolGenerator.java
index f302818344a..58d0f9f499d 100644
--- a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/integration/HttpBindingProtocolGenerator.java
+++ b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/integration/HttpBindingProtocolGenerator.java
@@ -1397,10 +1397,6 @@ private String getCollectionOutputParam(
                 // Iterate over each entry and do deser work.
                 outputParam += ".map(_entry => " + collectionTargetValue + ")";
 
-                // Make sets when necessary.
-                if (target.isSetShape()) {
-                    outputParam = "new Set(" + outputParam + ")";
-                }
                 return outputParam;
             default:
                 throw new CodegenException("Unexpected collection binding location `" + bindingType + "`");
diff --git a/smithy-typescript-codegen/src/main/resources/software/amazon/smithy/typescript/codegen/protocol-test-stub.ts b/smithy-typescript-codegen/src/main/resources/software/amazon/smithy/typescript/codegen/protocol-test-stub.ts
index 235506f7200..2d1a10b4c49 100644
--- a/smithy-typescript-codegen/src/main/resources/software/amazon/smithy/typescript/codegen/protocol-test-stub.ts
+++ b/smithy-typescript-codegen/src/main/resources/software/amazon/smithy/typescript/codegen/protocol-test-stub.ts
@@ -100,10 +100,6 @@ const compareParts = (expectedParts: comparableParts, generatedParts: comparable
  */
 const equivalentContents = (expected: any, generated: any): boolean => {
   let localExpected = expected;
-  // Handle comparing sets to arrays properly.
-  if (expected instanceof Set) {
-    localExpected = Array.from(expected);
-  }
 
   // Short circuit on equality.
   if (localExpected == generated) {