1
0
mirror of https://github.com/eleith/emailjs.git synced 2024-07-05 20:10:37 +00:00

smtp: remove reference to unpublished types

This commit is contained in:
Zack Schuster 2020-05-01 20:14:19 -07:00
parent ab7ecafb8c
commit f9d8388a45
2 changed files with 7 additions and 6 deletions

View File

@ -2,7 +2,6 @@ import fs from 'fs';
import { hostname } from 'os'; import { hostname } from 'os';
import { Stream } from 'stream'; import { Stream } from 'stream';
import type { Duplex } from 'stream'; // eslint-disable-line no-unused-vars import type { Duplex } from 'stream'; // eslint-disable-line no-unused-vars
import type { Indexed } from '@ledge/types'; // eslint-disable-line no-unused-vars
import addressparser from 'addressparser'; import addressparser from 'addressparser';
import { mimeWordEncode } from 'emailjs-mime-codec'; import { mimeWordEncode } from 'emailjs-mime-codec';
@ -25,13 +24,15 @@ export const MIME64CHUNK = (MIMECHUNK * 6) as 456;
*/ */
export const BUFFERSIZE = (MIMECHUNK * 24 * 7) as 12768; export const BUFFERSIZE = (MIMECHUNK * 24 * 7) as 12768;
export interface MessageAttachmentHeaders extends Indexed { export interface MessageAttachmentHeaders {
[index: string]: any;
'content-type'?: string; 'content-type'?: string;
'content-transfer-encoding'?: string; 'content-transfer-encoding'?: string;
'content-disposition'?: string; 'content-disposition'?: string;
} }
export interface AlternateMessageAttachment extends Indexed { export interface AlternateMessageAttachment {
[index: string]: any;
headers?: MessageAttachmentHeaders; headers?: MessageAttachmentHeaders;
inline: boolean; inline: boolean;
alternative?: MessageAttachment | boolean; alternative?: MessageAttachment | boolean;
@ -49,7 +50,8 @@ export interface MessageAttachment extends AlternateMessageAttachment {
stream: Duplex; stream: Duplex;
} }
export interface MessageHeaders extends Indexed { export interface MessageHeaders {
[index: string]: any;
'content-type': string; 'content-type': string;
'message-id': string; 'message-id': string;
date: string; date: string;

View File

@ -3,7 +3,6 @@ import { createHmac } from 'crypto';
import { hostname } from 'os'; import { hostname } from 'os';
import { connect, createSecureContext, TLSSocket } from 'tls'; import { connect, createSecureContext, TLSSocket } from 'tls';
import { EventEmitter } from 'events'; import { EventEmitter } from 'events';
import type { Indexed } from '@ledge/types'; // eslint-disable-line no-unused-vars
import { SMTPResponse } from './response'; import { SMTPResponse } from './response';
import { makeSMTPError, SMTPErrorStates } from './error'; import { makeSMTPError, SMTPErrorStates } from './error';
@ -108,7 +107,7 @@ export class SMTPConnection extends EventEmitter {
protected loggedin = false; protected loggedin = false;
protected sock: Socket | TLSSocket | null = null; protected sock: Socket | TLSSocket | null = null;
protected features: Indexed<string | boolean> | null = null; protected features: { [index: string]: string | boolean } | null = null;
protected monitor: SMTPResponse | null = null; protected monitor: SMTPResponse | null = null;
protected domain = hostname(); protected domain = hostname();
protected host = 'localhost'; protected host = 'localhost';