From 13109a657588af404f6836a2786acbf4514f1d6f Mon Sep 17 00:00:00 2001 From: Zack Schuster Date: Fri, 6 May 2022 21:19:24 -0700 Subject: [PATCH] smtp/message: make chunk const types more strict --- smtp/message.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/smtp/message.ts b/smtp/message.ts index 5fa2a01..0cf579c 100644 --- a/smtp/message.ts +++ b/smtp/message.ts @@ -20,18 +20,21 @@ const CRLF = '\r\n' as const; /** * MIME standard wants 76 char chunks when sending out. + * @type {76} */ export const MIMECHUNK = 76 as const; /** * meets both base64 and mime divisibility + * @type {456} */ -export const MIME64CHUNK = (MIMECHUNK * 6) as 456; +export const MIME64CHUNK = 456 as const; // MIMECHUNK * 6 /** * size of the message stream buffer + * @type {12768} */ -export const BUFFERSIZE = (MIMECHUNK * 24 * 7) as 12768; +export const BUFFERSIZE = 12768 as const; // MIMECHUNK * 24 * 7; export interface MessageAttachmentHeaders { [index: string]: string | undefined;