From 42488ae513fe5a5f3947c4de960510a83eafae73 Mon Sep 17 00:00:00 2001 From: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Date: Thu, 2 Jun 2022 13:58:35 -0700 Subject: [PATCH] Use Record type in event stream deserializer (#556) --- .../codegen/integration/HttpBindingProtocolGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 0aaa9dc03d4..6c217ddad96 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 @@ -2404,7 +2404,7 @@ private void generateEventStreamDeserializer(GenerationContext context, MemberSh writer.openBlock("const eventHeaders = Object.entries(event[eventName].headers).reduce(", ");", () -> { writer.write( "(accummulator, curr) => {accummulator[curr[0]] = curr[1].value; return accummulator; },"); - writer.write("{} as {[key: string]: any}"); + writer.write("{} as Record"); }); writer.openBlock("const eventMessage = {", "};", () -> { writer.write("headers: eventHeaders,");