Skip to content

Commit 38671e1

Browse files
committed
add client config option reference
1 parent 2b7059c commit 38671e1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,8 @@ private String getCommandExample(
271271
packageName)
272272
+ String.format("// const { %s, %s } = require(\"%s\"); // CommonJS import%n", serviceName, commandName,
273273
packageName)
274+
+ String.format("// import type { %sConfig } from \"%s\";%n", serviceName, packageName)
275+
+ String.format("const config = {}; // type is %sConfig%n", serviceName)
274276
+ String.format("const client = new %s(config);%n", serviceName)
275277
+ String.format("const input = %s%n",
276278
StructureExampleGenerator.generateStructuralHintDocumentation(

0 commit comments

Comments
 (0)