From 2598e04e138c9a57fc0f46d7d2eef7ccc82e15cc Mon Sep 17 00:00:00 2001 From: Piotr Roszatycki Date: Tue, 19 Jun 2018 14:58:02 +0200 Subject: [PATCH 1/2] nodemailer: Mail.use returns this --- types/nodemailer/lib/mailer/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/nodemailer/lib/mailer/index.d.ts b/types/nodemailer/lib/mailer/index.d.ts index f9d36d7efb..00cf40839c 100644 --- a/types/nodemailer/lib/mailer/index.d.ts +++ b/types/nodemailer/lib/mailer/index.d.ts @@ -165,7 +165,7 @@ declare class Mail extends EventEmitter { verify(callback: (err: Error | null, success: true) => void): void; verify(): Promise; - use(step: string, plugin: Mail.PluginFunction): void; // TODO Plugin? + use(step: string, plugin: Mail.PluginFunction): this; /** Sends an email using the preselected transport object */ sendMail(mailOptions: Mail.Options, callback: (err: Error | null, info: SentMessageInfo) => void): void; From b02db5b0eebd06a8521a07f00b7bb8b9ea8d98f1 Mon Sep 17 00:00:00 2001 From: Piotr Roszatycki Date: Tue, 19 Jun 2018 15:07:11 +0200 Subject: [PATCH 2/2] nodemailer: JSONTransport.Options has skipEncoding --- types/nodemailer/lib/json-transport.d.ts | 1 + types/nodemailer/nodemailer-tests.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/types/nodemailer/lib/json-transport.d.ts b/types/nodemailer/lib/json-transport.d.ts index f6792f4402..239decbdb6 100644 --- a/types/nodemailer/lib/json-transport.d.ts +++ b/types/nodemailer/lib/json-transport.d.ts @@ -15,6 +15,7 @@ declare namespace JSONTransport { interface Options extends MailOptions, TransportOptions { jsonTransport: true; + skipEncoding?: boolean; } interface SentMessageInfo { diff --git a/types/nodemailer/nodemailer-tests.ts b/types/nodemailer/nodemailer-tests.ts index 6f045df08b..140b351c6b 100644 --- a/types/nodemailer/nodemailer-tests.ts +++ b/types/nodemailer/nodemailer-tests.ts @@ -832,7 +832,8 @@ function stream_buffer_unix_newlines_test() { function json_test() { const transporter = nodemailer.createTransport({ - jsonTransport: true + jsonTransport: true, + skipEncoding: true }); transporter.sendMail({ from: 'sender@example.com',