From 3dde9d27dbc3269c09dad6eb95ab0f33bce312ad Mon Sep 17 00:00:00 2001 From: MichaelBuen Date: Sun, 24 Jul 2016 14:21:08 +0800 Subject: [PATCH] Update aws-sdk.d.ts (#10232) Make QueueUrl optional, as it can have a default value that is be obtained from aws.SQS: ``` var sqs = new aws.SQS({ region: config.aws.region, accessKeyId: config.aws.accessID, secretAccessKey: config.aws.secretKey, // For every request in this demo, I'm going to be using the same QueueUrl; so, // rather than explicitly defining it on every request, I can set it here as the // default QueueUrl to be automatically appended to every request. params: { QueueUrl: config.aws.queueUrl } }); var sendMessage = Q.nbind( sqs.sendMessage, sqs ); // ---------------------------------------------------------- // // ---------------------------------------------------------- // // Now that we have a Q-ified method, we can send the message. sendMessage({ MessageBody: "This is my first ever SQS request... evar!" }) ``` Based on: http://www.bennadel.com/blog/2792-shedding-the-monolithic-application-with-aws-simple-queue-service-sqs-and-node-js.htm --- aws-sdk/aws-sdk.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws-sdk/aws-sdk.d.ts b/aws-sdk/aws-sdk.d.ts index 270f06d36a..a5341fcb45 100644 --- a/aws-sdk/aws-sdk.d.ts +++ b/aws-sdk/aws-sdk.d.ts @@ -397,7 +397,7 @@ declare module "aws-sdk" { } export interface SendMessageParams { - QueueUrl: string; + QueueUrl?: string; MessageBody: string; DelaySeconds?: number; MessageAttributes?: { [name:string]: MessageAttribute; }