From cb692976c6fa3ce83f85770c92ca648c4bd0f073 Mon Sep 17 00:00:00 2001 From: Zack Schuster Date: Thu, 25 Jun 2020 09:01:57 -0700 Subject: [PATCH] smtp/message: fix attachment stream type --- smtp/message.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/smtp/message.ts b/smtp/message.ts index 395ecfe..f32d8d1 100644 --- a/smtp/message.ts +++ b/smtp/message.ts @@ -1,7 +1,8 @@ import fs from 'fs'; -import type { PathLike, ReadStream } from 'fs'; +import type { PathLike } from 'fs'; import { hostname } from 'os'; import { Stream } from 'stream'; +import type { Readable } from 'stream'; import { addressparser } from './address'; import { getRFC2822Date } from './date'; @@ -38,7 +39,7 @@ export interface MessageAttachment { | MessageAttachment | MessageAttachment[] | MessageAttachmentHeaders - | ReadStream + | Readable | PathLike | undefined; name?: string; @@ -48,7 +49,7 @@ export interface MessageAttachment { related?: MessageAttachment[]; data?: string; encoded?: boolean; - stream?: ReadStream; + stream?: Readable; path?: PathLike; type?: string; charset?: string;