mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Merge pull request #12178 from cyrilschumacher/master
Add definition for "nodemailer-stub-transport".
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
/// <reference path="nodemailer-stub-transport.d.ts"/>
|
||||
|
||||
import nodemailer = require("nodemailer");
|
||||
import stubTransport = require("nodemailer-stub-transport");
|
||||
|
||||
var transport = nodemailer.createTransport(stubTransport());
|
||||
nodemailer.createTransport(stubTransport({ error: new Error('Invalid recipient') }));
|
||||
transport = nodemailer.createTransport(stubTransport({ keepBcc: true }));
|
||||
|
||||
nodemailer.createTransport(stubTransport());
|
||||
@@ -0,0 +1,38 @@
|
||||
// Type definitions for nodemailer-stub-transport v1.1.0
|
||||
// Project: https://github.com/andris9/nodemailer-stub-transport
|
||||
// Definitions by: Cyril Schumacher <https://github.com/cyrilschumacher/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference path="../nodemailer/nodemailer.d.ts"/>
|
||||
|
||||
declare module "nodemailer-stub-transport" {
|
||||
import * as nodemailer from "nodemailer";
|
||||
|
||||
namespace StubTransportStatic {
|
||||
/**
|
||||
* Options.
|
||||
* @interface
|
||||
*/
|
||||
export interface Options {
|
||||
/**
|
||||
* Specifies a custom error.
|
||||
* @type {any}
|
||||
*/
|
||||
error?: any;
|
||||
|
||||
/**
|
||||
* Value that indicates if the BCC addresses must be included in generated message.
|
||||
* @type {boolean}
|
||||
*/
|
||||
keepBcc?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a stub transport.
|
||||
* @param {Options} [options] Options.
|
||||
* @return {Transport} The stub transport.
|
||||
*/
|
||||
function stubTransport(options?: StubTransportStatic.Options): nodemailer.Transport;
|
||||
export = stubTransport;
|
||||
}
|
||||
Reference in New Issue
Block a user