Update type definitions for "sqs-producer" (#38735)

This commit is contained in:
Greyson Wright 2019-10-02 15:32:01 -05:00 committed by Ryan Cavanaugh
parent 74937467de
commit 41d9712db2

View File

@ -1,4 +1,4 @@
// Type definitions for sqs-producer 1.5
// Type definitions for sqs-producer 1.6
// Project: https://github.com/BBC/sqs-producer
// Definitions by: Daniel Chao <http://dchao.co/>
// John Hamelink <https://johnhamelink.com/>
@ -29,10 +29,12 @@ export interface ProducerMessage {
body: string;
messageAttributes?: { [key: string]: ProducerMessageAttribute };
delaySeconds?: number;
groupId?: string;
deduplicationId?: string;
}
export interface Producer {
send(messages: string[] | ProducerMessage[], cb: ProducerCallback<void>): void;
send(messages: string | string[] | ProducerMessage | ProducerMessage[], cb: ProducerCallback<void>): void;
queueSize(cb: ProducerCallback<number>): void;
}