@types/email-templates
Advanced tools
Comparing version 2.6.0 to 2.6.1
@@ -7,36 +7,11 @@ // Type definitions for node-email-templates 2.6 | ||
/** | ||
* @summary Interface for result of email template. | ||
* @interface | ||
*/ | ||
interface EmailTemplateResults { | ||
/** | ||
* @summary HTML result. | ||
* @type {string} | ||
*/ | ||
export interface EmailTemplateResults { | ||
html: string; | ||
/** | ||
* @summary Text result. | ||
* @type {string} | ||
*/ | ||
text: string; | ||
/** | ||
* @summary Subject result. | ||
* @type {string} | ||
*/ | ||
subject: string; | ||
} | ||
/** | ||
* @summary Callback signature. | ||
*/ | ||
type EmailTemplateCallback = (err: any, results: EmailTemplateResults) => void; | ||
export type EmailTemplateCallback = (err: any, results: EmailTemplateResults) => void; | ||
/** | ||
* @summary Interface for email-template options | ||
* @interface | ||
*/ | ||
interface EmailTemplateOptions { | ||
export interface EmailTemplateOptions { | ||
disableJuice?: boolean; | ||
@@ -47,108 +22,94 @@ juiceOptions?: any; | ||
declare module "email-templates" { | ||
export class EmailTemplate { | ||
/** | ||
* @summary Email template class. | ||
* @class | ||
* @param templateDir The template directory. | ||
*/ | ||
class EmailTemplate { | ||
/** | ||
* @summary Constructor. | ||
* @param {string} templateDir The template directory. | ||
*/ | ||
constructor(templateDir: string, options?: EmailTemplateOptions); | ||
constructor(templateDir: string, options?: EmailTemplateOptions); | ||
/** | ||
* @summary Render a single template. | ||
* @param locals The template variables. | ||
* @param locale The language code. | ||
*/ | ||
render(locals: any, locale?: string): Promise<EmailTemplateResults>; | ||
/** | ||
* Render a single template. | ||
* @param locals The template variables. | ||
* @param locale The language code. | ||
*/ | ||
render(locals: any, locale?: string): Promise<EmailTemplateResults>; | ||
/** | ||
* @summary Render a single template. | ||
* @param callback The callback function. | ||
*/ | ||
render(callback: EmailTemplateCallback): void; | ||
/** | ||
* Render a single template. | ||
*/ | ||
render(callback: EmailTemplateCallback): void; | ||
/** | ||
* @summary Render a single template. | ||
* @param locals The template variables. | ||
* @param callback The callback function. | ||
*/ | ||
render(locals: any, callback: EmailTemplateCallback): void; | ||
/** | ||
* Render a single template. | ||
* @param locals The template variables. | ||
*/ | ||
render(locals: any, callback: EmailTemplateCallback): void; | ||
/** | ||
* @summary Render a single template. | ||
* @param locals The template variables. | ||
* @param locale The language code. | ||
* @param callback The callback function. | ||
*/ | ||
render(locals: any, locale: string, callback: EmailTemplateCallback): void; | ||
/** | ||
* Render a single template. | ||
* @param locals The template variables. | ||
* @param locale The language code. | ||
*/ | ||
render(locals: any, locale: string, callback: EmailTemplateCallback): void; | ||
/** | ||
* @summary Render text | ||
* @param locals The template variables. | ||
* @param locale The language code. | ||
*/ | ||
renderText(locals: any, locale?: string): Promise<string>; | ||
/** | ||
* Render text | ||
* @param locals The template variables. | ||
* @param locale The language code. | ||
*/ | ||
renderText(locals: any, locale?: string): Promise<string>; | ||
/** | ||
* @summary Render text | ||
* @param locals The template variables. | ||
* @param callback The language code. | ||
*/ | ||
renderText(locals: any, callback: EmailTemplateCallback): void; | ||
/** | ||
* Render text | ||
* @param locals The template variables. | ||
* @param callback The language code. | ||
*/ | ||
renderText(locals: any, callback: EmailTemplateCallback): void; | ||
/** | ||
* @summary Render text | ||
* @param locals The template variables. | ||
* @param locale The language code. | ||
* @param callback The language code. | ||
*/ | ||
renderText(locals: any, locale: string, callback: EmailTemplateCallback): void; | ||
/** | ||
* Render text | ||
* @param locals The template variables. | ||
* @param locale The language code. | ||
* @param callback The language code. | ||
*/ | ||
renderText(locals: any, locale: string, callback: EmailTemplateCallback): void; | ||
/** | ||
* @summary Render subject | ||
* @param locals The template variables. | ||
* @param locale The language code. | ||
*/ | ||
renderSubject(locals: any, locale?: string): Promise<string>; | ||
/** | ||
* Render subject | ||
* @param locals The template variables. | ||
* @param locale The language code. | ||
*/ | ||
renderSubject(locals: any, locale?: string): Promise<string>; | ||
/** | ||
* @summary Render subject | ||
* @param locals The template variables. | ||
* @param callback The language code. | ||
*/ | ||
renderSubject(locals: any, callback: EmailTemplateCallback): void; | ||
/** | ||
* Render subject | ||
* @param locals The template variables. | ||
*/ | ||
renderSubject(locals: any, callback: EmailTemplateCallback): void; | ||
/** | ||
* @summary Render subject | ||
* @param locals The template variables. | ||
* @param locale The language code. | ||
* @param callback The language code. | ||
*/ | ||
renderSubject(locals: any, locale: string, callback: EmailTemplateCallback): void; | ||
/** | ||
* Render subject | ||
* @param locals The template variables. | ||
* @param locale The language code. | ||
*/ | ||
renderSubject(locals: any, locale: string, callback: EmailTemplateCallback): void; | ||
/** | ||
* @summary Render HTML | ||
* @param locals The template variables. | ||
* @param locale The language code. | ||
*/ | ||
renderHtml(locals: any, locale?: string): Promise<string>; | ||
/** | ||
* Render HTML | ||
* @param locals The template variables. | ||
* @param locale The language code. | ||
*/ | ||
renderHtml(locals: any, locale?: string): Promise<string>; | ||
/** | ||
* @summary Render HTML | ||
* @param locals The template variables. | ||
* @param callback The language code. | ||
*/ | ||
renderHtml(locals: any, callback: EmailTemplateCallback): void; | ||
/** | ||
* Render HTML | ||
* @param locals The template variables. | ||
*/ | ||
renderHtml(locals: any, callback: EmailTemplateCallback): void; | ||
/** | ||
* @summary Render HTML | ||
* @param locals The template variables. | ||
* @param locale The language code. | ||
* @param callback The language code. | ||
*/ | ||
renderHtml(locals: any, locale: string, callback: EmailTemplateCallback): void; | ||
} | ||
/** | ||
* Render HTML | ||
* @param locals The template variables. | ||
* @param locale The language code. | ||
*/ | ||
renderHtml(locals: any, locale: string, callback: EmailTemplateCallback): void; | ||
} |
{ | ||
"name": "@types/email-templates", | ||
"version": "2.6.0", | ||
"version": "2.6.1", | ||
"description": "TypeScript definitions for node-email-templates", | ||
@@ -9,7 +9,9 @@ "license": "MIT", | ||
"name": "Cyril Schumacher", | ||
"url": "https://github.com/cyrilschumacher" | ||
"url": "https://github.com/cyrilschumacher", | ||
"githubUsername": "cyrilschumacher" | ||
}, | ||
{ | ||
"name": "Matus Gura", | ||
"url": "https://github.com/gurisko" | ||
"url": "https://github.com/gurisko", | ||
"githubUsername": "gurisko" | ||
} | ||
@@ -24,5 +26,4 @@ ], | ||
"dependencies": {}, | ||
"peerDependencies": {}, | ||
"typesPublisherContentHash": "8b5723f09581c8c84594ac9d9b3af737304e3bf70cacd7002150fdd160005670", | ||
"typesPublisherContentHash": "e0eb7a88701ad19b7c29c994770bec02ff3a294ae0840487147326fce85a5ad1", | ||
"typeScriptVersion": "2.0" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Sat, 22 Jul 2017 19:03:51 GMT | ||
* Last updated: Wed, 25 Oct 2017 00:19:45 GMT | ||
* Dependencies: none | ||
@@ -14,0 +14,0 @@ * Global values: none |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5746
96