1
0
mirror of https://github.com/eleith/emailjs.git synced 2024-07-07 12:40:37 +00:00

smtp/message: fix attachment stream type

This commit is contained in:
Zack Schuster 2020-06-25 09:01:57 -07:00
parent 563fe879f1
commit cb692976c6

View File

@ -1,7 +1,8 @@
import fs from 'fs'; import fs from 'fs';
import type { PathLike, ReadStream } from 'fs'; import type { PathLike } from 'fs';
import { hostname } from 'os'; import { hostname } from 'os';
import { Stream } from 'stream'; import { Stream } from 'stream';
import type { Readable } from 'stream';
import { addressparser } from './address'; import { addressparser } from './address';
import { getRFC2822Date } from './date'; import { getRFC2822Date } from './date';
@ -38,7 +39,7 @@ export interface MessageAttachment {
| MessageAttachment | MessageAttachment
| MessageAttachment[] | MessageAttachment[]
| MessageAttachmentHeaders | MessageAttachmentHeaders
| ReadStream | Readable
| PathLike | PathLike
| undefined; | undefined;
name?: string; name?: string;
@ -48,7 +49,7 @@ export interface MessageAttachment {
related?: MessageAttachment[]; related?: MessageAttachment[];
data?: string; data?: string;
encoded?: boolean; encoded?: boolean;
stream?: ReadStream; stream?: Readable;
path?: PathLike; path?: PathLike;
type?: string; type?: string;
charset?: string; charset?: string;