mirror of
https://github.com/eleith/emailjs.git
synced 2024-07-05 20:10:37 +00:00
add jsdoc tags to top-level module consts
This commit is contained in:
parent
174073d6b0
commit
79c5e02d22
@ -9,19 +9,25 @@ const CRLF = '\r\n';
|
||||
|
||||
/**
|
||||
* MIME standard wants 76 char chunks when sending out.
|
||||
* @type {76}
|
||||
*/
|
||||
const MIMECHUNK = 76;
|
||||
|
||||
/**
|
||||
* meets both base64 and mime divisibility
|
||||
* @type {456}
|
||||
*/
|
||||
const MIME64CHUNK = MIMECHUNK * 6;
|
||||
const MIME64CHUNK = /** @type {456} */ (MIMECHUNK * 6);
|
||||
|
||||
/**
|
||||
* size of the message stream buffer
|
||||
* @type {12768}
|
||||
*/
|
||||
const BUFFERSIZE = MIMECHUNK * 24 * 7;
|
||||
const BUFFERSIZE = /** @type {12768} */ (MIMECHUNK * 24 * 7);
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
let counter = 0;
|
||||
|
||||
/**
|
||||
|
32
smtp/smtp.js
32
smtp/smtp.js
@ -10,15 +10,39 @@ const { EventEmitter } = require('events');
|
||||
const SMTPResponse = require('./response');
|
||||
const SMTPError = require('./error');
|
||||
|
||||
/**
|
||||
* @readonly
|
||||
* @type {25}
|
||||
*/
|
||||
const SMTP_PORT = 25;
|
||||
|
||||
/**
|
||||
* @readonly
|
||||
* @type {465}
|
||||
*/
|
||||
const SMTP_SSL_PORT = 465;
|
||||
|
||||
/**
|
||||
* @readonly
|
||||
* @type {587}
|
||||
*/
|
||||
const SMTP_TLS_PORT = 587;
|
||||
|
||||
/**
|
||||
* @readonly
|
||||
* @type {'\r\n'}
|
||||
*/
|
||||
const CRLF = '\r\n';
|
||||
|
||||
/**
|
||||
* @readonly
|
||||
* @enum
|
||||
*/
|
||||
const AUTH_METHODS = {
|
||||
PLAIN: 'PLAIN',
|
||||
CRAM_MD5: 'CRAM-MD5',
|
||||
LOGIN: 'LOGIN',
|
||||
XOAUTH2: 'XOAUTH2',
|
||||
PLAIN: /** @type {'PLAIN'} */ ('PLAIN'),
|
||||
CRAM_MD5: /** @type {'CRAM-MD5'} */ ('CRAM-MD5'),
|
||||
LOGIN: /** @type {'LOGIN'} */ ('LOGIN'),
|
||||
XOAUTH2: /** @type {'XOAUTH2'} */ ('XOAUTH2'),
|
||||
};
|
||||
|
||||
const TIMEOUT = 5000;
|
||||
|
Loading…
Reference in New Issue
Block a user