mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Merge remote-tracking branch 'upstream/master' into merge_7_25
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import mailparser_mod = require("mailparser");
|
||||
import MailParser = mailparser_mod.MailParser;
|
||||
import ParsedMail = mailparser_mod.ParsedMail;
|
||||
import Attachment = mailparser_mod.Attachment;
|
||||
|
||||
var mailparser = new MailParser();
|
||||
|
||||
@@ -57,7 +58,7 @@ var mp = new MailParser({
|
||||
streamAttachments: true
|
||||
})
|
||||
|
||||
mp.on("attachment", function(attachment, mail){
|
||||
mp.on("attachment", function(attachment : Attachment, mail : ParsedMail){
|
||||
var output = fs.createWriteStream(attachment.generatedFileName);
|
||||
attachment.stream.pipe(output);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user