mirror of
https://github.com/chenasraf/DefinitelyTyped.git
synced 2026-05-18 01:49:01 +00:00
update(preview-email): new options properties (#65513)
Updates from 3.0.11:
ce6d4439ab
Thanks!
This commit is contained in:
committed by
GitHub
parent
b0683348c2
commit
22bd9343dd
17
types/preview-email/index.d.ts
vendored
17
types/preview-email/index.d.ts
vendored
@@ -2,9 +2,11 @@
|
||||
// Project: https://github.com/niftylettuce/preview-email
|
||||
// Definitions by: Piotr Błażejewicz <https://github.com/peterblazejewicz>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.3
|
||||
|
||||
import { Options as NodeMailerOptions } from 'nodemailer/lib/mailer';
|
||||
/// <reference types="node" />
|
||||
|
||||
import type { Options as NodeMailerOptions } from 'nodemailer/lib/mailer';
|
||||
import type { SimpleParserOptions } from 'mailparser';
|
||||
|
||||
/**
|
||||
* Automatically opens your browser to preview Node.js email messages sent with Nodemailer. Made for Lad!
|
||||
@@ -48,6 +50,17 @@ declare namespace previewEmail {
|
||||
* @default true
|
||||
*/
|
||||
openSimulator?: boolean | undefined;
|
||||
/**
|
||||
* an options Object to pass to `mailparser`'s `simpleParser` method
|
||||
* (see [mailparser docs](https://nodemailer.com/extras/mailparser/#options) for available options
|
||||
* – note that `Iconv` option is always overridden for safeguard)
|
||||
*/
|
||||
simpleParser?: Omit<SimpleParserOptions, 'Iconv'> | undefined;
|
||||
/**
|
||||
* whether or not to return HTML only – and subsequently not write nor open the file preview file
|
||||
* @default false
|
||||
*/
|
||||
returnHtml?: boolean | undefined;
|
||||
}
|
||||
|
||||
interface OpenOptions {
|
||||
|
||||
@@ -33,6 +33,8 @@ const options: Options = {
|
||||
template: './dir/template.pug',
|
||||
urlTransform: path => `./dir/${path}`,
|
||||
openSimulator: true,
|
||||
simpleParser: {},
|
||||
returnHtml: true,
|
||||
};
|
||||
|
||||
// async/await
|
||||
|
||||
Reference in New Issue
Block a user