Skip to content

Commit 6ec886c

Browse files
authored
Update documentation for changing isa method to arrow function (#164)
1 parent acf0ed1 commit 6ec886c

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

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

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,7 @@ public void run() {
7777
* }
7878
*
7979
* export namespace Person {
80-
* export function isa(o: any): o is Person {
81-
* return __isa(o, "Person");
82-
* }
80+
* export const isa = (o: any): o is Person => __isa(o, "Person");
8381
* }
8482
* }</pre>
8583
*/
@@ -138,10 +136,8 @@ private void renderNonErrorStructure() {
138136
* resourceType: string | undefined;
139137
* }
140138
*
141-
* export namespace Person {
142-
* export function isa(o: any): o is NoSuchResource {
143-
* return __isa(o, "NoSuchResource");
144-
* }
139+
* export namespace NoSuchResource {
140+
* export const isa = (o: any): o is NoSuchResource => __isa(o, "NoSuchResource");
145141
* }
146142
* }</pre>
147143
*/

0 commit comments

Comments
 (0)