From b0b66996a08493b32249e44046a8a8e72f1b3baf Mon Sep 17 00:00:00 2001 From: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Date: Mon, 27 Apr 2020 20:15:24 +0000 Subject: [PATCH] Convert isa method to an arrow function --- .../smithy/typescript/codegen/StructureGenerator.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/StructureGenerator.java b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/StructureGenerator.java index f158e98664b..d6ba6f1ade2 100644 --- a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/StructureGenerator.java +++ b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/StructureGenerator.java @@ -174,9 +174,9 @@ private void renderStructureNamespace() { writer.addImport("isa", "__isa", "@aws-sdk/smithy-client"); Symbol symbol = symbolProvider.toSymbol(shape); writer.openBlock("export namespace $L {", "}", symbol.getName(), () -> { - writer.openBlock("export function isa(o: any): o is $L {", "}", symbol.getName(), () -> { - writer.write("return __isa(o, $S);", shape.getId().getName()); - }); + writer.write("export const isa = (o: any): o is $L => __isa(o, $S);", + symbol.getName(), shape.getId().getName() + ); }); } }