smtp/message: make chunk const types more strict

This commit is contained in:
Zack Schuster 2022-05-06 21:19:24 -07:00
parent a5ff7bd85e
commit 13109a6575
1 changed files with 5 additions and 2 deletions

View File

@ -20,18 +20,21 @@ const CRLF = '\r\n' as const;
/** /**
* MIME standard wants 76 char chunks when sending out. * MIME standard wants 76 char chunks when sending out.
* @type {76}
*/ */
export const MIMECHUNK = 76 as const; export const MIMECHUNK = 76 as const;
/** /**
* meets both base64 and mime divisibility * 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 * 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 { export interface MessageAttachmentHeaders {
[index: string]: string | undefined; [index: string]: string | undefined;