Skip to content

Commit acf0ed1

Browse files
authored
Convert isa method to an arrow function (#163)
1 parent 571d40c commit acf0ed1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,9 @@ private void renderStructureNamespace() {
174174
writer.addImport("isa", "__isa", "@aws-sdk/smithy-client");
175175
Symbol symbol = symbolProvider.toSymbol(shape);
176176
writer.openBlock("export namespace $L {", "}", symbol.getName(), () -> {
177-
writer.openBlock("export function isa(o: any): o is $L {", "}", symbol.getName(), () -> {
178-
writer.write("return __isa(o, $S);", shape.getId().getName());
179-
});
177+
writer.write("export const isa = (o: any): o is $L => __isa(o, $S);",
178+
symbol.getName(), shape.getId().getName()
179+
);
180180
});
181181
}
182182
}

0 commit comments

Comments
 (0)