mirror of
https://github.com/eleith/emailjs.git
synced 2024-07-05 20:10:37 +00:00
strongly type SMPTState enum
This commit is contained in:
parent
1dad23e285
commit
082c99ffa3
16
smtp/smtp.js
16
smtp/smtp.js
@ -51,6 +51,16 @@ const AUTH_METHODS = {
|
||||
XOAUTH2: /** @type {'XOAUTH2'} */ ('XOAUTH2'),
|
||||
};
|
||||
|
||||
/**
|
||||
* @readonly
|
||||
* @enum
|
||||
*/
|
||||
const SMTPState = {
|
||||
NOTCONNECTED: /** @type {0} */ (0),
|
||||
CONNECTING: /** @type {1} */ (1),
|
||||
CONNECTED: /** @type {2} */ (2),
|
||||
};
|
||||
|
||||
/**
|
||||
* @type {0 | 1}
|
||||
*/
|
||||
@ -85,12 +95,6 @@ const caller = (callback, ...args) => {
|
||||
}
|
||||
};
|
||||
|
||||
const SMTPState = {
|
||||
NOTCONNECTED: 0,
|
||||
CONNECTING: 1,
|
||||
CONNECTED: 2,
|
||||
};
|
||||
|
||||
class SMTP extends EventEmitter {
|
||||
/**
|
||||
* @typedef {Object} SMTPSocketOptions
|
||||
|
Loading…
Reference in New Issue
Block a user