Skip to content

Commit

Permalink
fix(cli): update TypeScript lib init template (#3134)
Browse files Browse the repository at this point in the history
Aligning with SQS construct to use `visibilityTimeout` as well as
using `Duration` as the type.
  • Loading branch information
shivlaks authored and Elad Ben-Israel committed Jun 30, 2019
1 parent 16345dc commit 629e963
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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');
Expand Down

0 comments on commit 629e963

Please sign in to comment.