From 629e963a618b25638671e48e2001c3e3696b7b03 Mon Sep 17 00:00:00 2001 From: shivlaks Date: Sun, 30 Jun 2019 04:04:06 -0700 Subject: [PATCH] fix(cli): update TypeScript lib init template (#3134) Aligning with SQS construct to use `visibilityTimeout` as well as using `Duration` as the type. --- .../lib/init-templates/lib/typescript/lib/index.template.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/aws-cdk/lib/init-templates/lib/typescript/lib/index.template.ts b/packages/aws-cdk/lib/init-templates/lib/typescript/lib/index.template.ts index f13779bf2d95e..982aa9a1c519d 100644 --- a/packages/aws-cdk/lib/init-templates/lib/typescript/lib/index.template.ts +++ b/packages/aws-cdk/lib/init-templates/lib/typescript/lib/index.template.ts @@ -7,9 +7,9 @@ export interface %name.PascalCased%Props { /** * The visibility timeout to be configured on the SQS Queue, in seconds. * - * @default 300 + * @default Duration.seconds(300) */ - visibilityTimeout?: number; + visibilityTimeout?: cdk.Duration; } export class %name.PascalCased% extends cdk.Construct { @@ -20,7 +20,7 @@ export class %name.PascalCased% extends cdk.Construct { super(scope, id); const queue = new sqs.Queue(this, '%name.PascalCased%Queue', { - visibilityTimeoutSec: props.visibilityTimeout || 300 + visibilityTimeout: props.visibilityTimeout || cdk.Duration.seconds(300) }); const topic = new sns.Topic(this, '%name.PascalCased%Topic');